calling scriptcase micro in scriptcase library

hello,

i’m having a problem to call a scriptcase micro inside my own library created in scriptcase library.

Or is there any other ways to extends scriptcase micro in my own class in library?

error return:

Fatal error: Call to undefined function sc_select() in C:\Program Files (x86)\NetMake\v8\wwwroot\scriptcase\app\smaz_db2_v1\form_SMAZ_AGAMA_multidb\integ_batch_model.php on line 28

Form onScriptInit:

$prefix_batch_id = ‘R1209031’;
$oobatchdata = new IntegBatchModel();
{datasetclass} = $oobatchdata->get_by_id($prefix_batch_id);

integ_batch_model.php:

class IntegBatchModel {

var $table = ‘SMAZ.INTEG_BATCH’;

function get_by_id($batch_id)
{
return $this->_get($batch_id, FALSE);
}

function _get($batch_id, $search=‘NULL’)
{

/**

  • Check for an existing integ_batch record
    */

// SQL statement parameters
$check_table = $this->table; // Table name
$check_where = $batch_id; // Where clause

// Check for record
$check_sql = ‘SELECT *’
. ’ FROM ’ . $check_table
. ’ WHERE ’ . $check_where;
sc_select(dataset, $check_sql);



Hi

DavePrue from an older post wrote:

Cannot use macros in classes within libraries, because of the nature of how the macros translate.

“$this” is expected to be a particular object when a macro is called.
When you create a class, you change the definition of “$this”.

Look at the code that macros generate and it will make sense.

Dave