|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Define typeIf I define a type and I want it to require and set a value when that type
is called, is it not like this: define_type('events', -namespace='site_'); local( 'sysID' = integer ); define_tag('onCreate'); self->'sysID'; /define_tag; /define_type; Var('myitem' = site_events(28)); The value is 0 when I try to execute a member tag: //this is defined within the define_type tag define_tag('checkDate', -req='event', -type='string'); inline(-database='systems', -table='site_events', -search, -eq, 'system'=(self->'sysID'), -eq, 'event'=#event, -username=$su, -password=$sp); return(iserror ? error_currenterror | found_count ' ' action_statement ' ' field('dateExec')); /inline; /define_tag; //calling the tag: $myitem->checkDate('import'); The action_statement is showing that the ID it's checking is 0. -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: Define typeTaking a guess at things:
define_type('events', -namespace='site_'); local( 'sysID' = integer ); define_tag('onCreate',-req='sysID'); // Need to set internal value here self->'sysID' = #sysID; /define_tag; /define_type; Ke. 2009/10/29 Shelane Enos <senos@...> > > If I define a type and I want it to require and set a value when that type > is called, is it not like this: > > define_type('events', -namespace='site_'); > > local( > 'sysID' = integer > ); > > define_tag('onCreate'); > self->'sysID'; > /define_tag; > > /define_type; > -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: Define typeHmmm. Looks promising, but I'm getting this:
Error Message: No tag, type or constant was defined under the name "     self". Error Code: -9948 On 10/29/09 10:48 AM, "Ke Carlton" <ke@...> wrote: > define_tag('onCreate',-req='sysID'); // Need to set internal value here > self->'sysID' = #sysID; > /define_tag; -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: Define typeProbably some funky characters in there from the copy and paste -
simply retype it and you should be fine. 2009/10/29 Shelane Enos <senos@...>: > Hmmm. Looks promising, but I'm getting this: > > Error Message: No tag, type or constant was defined under the name "     > self". > Error Code: -9948 > > > On 10/29/09 10:48 AM, "Ke Carlton" <ke@...> wrote: > >> define_tag('onCreate',-req='sysID'); // Need to set internal value here >> self->'sysID' = #sysID; >> /define_tag; > > > > -- > This list is a free service of LassoSoft: http://www.LassoSoft.com/ > Search the list archives: http://www.ListSearch.com/Lasso/Browse/ > Manage your subscription: http://www.ListSearch.com/Lasso/ > > > -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: Define typeThat should work. If you want to enforce the data type of the incoming
variable, you need to add the -type flag immediately after the - required in your oncreate. Tim Taplin On Oct 29, 2009, at 12:06 PM, Ke Carlton wrote: > Probably some funky characters in there from the copy and paste - > simply retype it and you should be fine. > > 2009/10/29 Shelane Enos <senos@...>: >> Hmmm. Looks promising, but I'm getting this: >> >> Error Message: No tag, type or constant was defined under the name >> "     >> self". >> Error Code: -9948 >> >> >> On 10/29/09 10:48 AM, "Ke Carlton" <ke@...> wrote: >> >>> define_tag('onCreate',-req='sysID'); // Need to set internal value >>> here >>> self->'sysID' = #sysID; >>> /define_tag; >> >> >> >> -- >> This list is a free service of LassoSoft: http://www.LassoSoft.com/ >> Search the list archives: http://www.ListSearch.com/Lasso/Browse/ >> Manage your subscription: http://www.ListSearch.com/Lasso/ >> >> >> > > -- > This list is a free service of LassoSoft: http://www.LassoSoft.com/ > Search the list archives: http://www.ListSearch.com/Lasso/Browse/ > Manage your subscription: http://www.ListSearch.com/Lasso/ > > -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
| Free embeddable forum powered by Nabble | Forum Help |