O$: odd error message revisited
Panikos Stavrou
pstavrou.omnis at cytanet.com.cy
Tue Jan 26 06:45:41 EST 2010
hi andreas
this is my method call:
Do method $executeSQLfind (ivSQLScript,lvFieldsNeeded,ivResultsLst)
thx
Andreas Pfeiffer wrote:
> Panikos,
>
> How did you call the server side method?
>
> Don't use a Do command. Rather
>
> Do method myServermethod(parameters)
>
> Kindest regards,
>
> Andreas
>
> Am 26.01.2010 um 12:32 schrieb Panikos Stavrou:
>
>
>> hi all
>>
>> i followed Andreas advice on the properr notation method call between remote form and subform
>>
>> i call my subform method using $cinst.$objs.rfAutoJoin.$dosomething()
>> there i execute 3 methods doing some client side calculations,
>> all 3 methods set to 'execute on client', and once that is done
>>
>> i call another method in the subform, not set to 'execute on client', because in there i call
>> the server with an SQL statement
>>
>> Do $cinst.tvSessionObj.$newstatement('FindStatement') Returns lvStatementObj
>> Begin statement
>> Sta: [ivSQLtoExecute]
>> End statement
>> Do lvStatementObj.$execdirect()
>> Do lvStatementObj.$fetch(lvResultsLst,kFetchAll)
>>
>> where, on $execdirect i get the error
>> Problem with notation ...$remoteforms.rfAutoJoin.$methods.$executeSQLfind.lvStatementObj.$execdirect
>> When evaluating $execdirect Unrecognized custom attribute
>>
>> tvSessionObj (a task variable set in the web client monitor,not in the startup task, that much i understand)
>> and lvStatementObj are both valid variables
>> why is $execdirect() an unrecognized custom attribute???
>> the same code works everywhere else in my app for SQL calls
>>
>> also, i noticed when i tried debugging and walking thru the code,
>> just before i entered the above method, the web client monitor pops up,
>> sets the server to be busy, the stack gets cleared, and then when i step in line by line,
>> it stops at the Do lvStatementObj.$execdirect() command with the above error.
>>
>> thanx
>>
>> panikos
>>
>> Andreas Pfeiffer wrote:
>>
>>> Hi Panikos,
>>>
>>> If you want to trigger a method within a subform then you need to make it client executed. Also you would need to use
>>> Do method $cinst.$objs.mysubform.$dosomething()
>>>
>>> Note that I do not use Do. Rather I use the command Do method.
>>>
>>> That said it will trigger the method within the subform if it is marked as client executed. From there you are free to trigger another server side method with the command "Do method" that executes the server side.
>>>
>>> Hope that helps.
>>>
>>> Best regards,
>>>
>>> Andreas
>>>
>>> Am 22.01.2010 um 20:49 schrieb Panikos Stavrou:
>>>
>>>
>>>
>>>> ok all, i'm stuck on this for a week
>>>>
>>>> i've tried to simplify my code to understand this error, so here's the gist of it:
>>>>
>>>> in the $event method (set to execute on client) of a field in a remote form i have this code
>>>>
>>>> On evAfter
>>>> Do $cinst.$objs.rfUserAutoJoin.$test(ivResultsLst)
>>>>
>>>> rfUserAutoJoin is a subform within this form.
>>>> here's the only line for $test (a method set to execute on client)
>>>>
>>>> Do method $doshit (pResultsLst)
>>>>
>>>> $doshit is a subform method (NOT set to execute on client, because it needs to do an sql fetch)
>>>>
>>>> i'm not listing the $doshit code because it never gets there
>>>>
>>>> just after i tab out of the field evAfter gets called,
>>>> $cinst.$objs.rfUserAutoJoin.$test is called
>>>>
>>>> and the trace log opens up and displays the error
>>>> "cannot call a server method when part way through evaluating a calculation"
>>>>
>>>> $doshit never gets called
>>>>
>>>> what evaluation??? it's a simple method call with a straightforward parameter!!
>>>> help!
>>>>
>>>> panikos
>>>> _____________________________________________________________
>>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>>
>>>>
>>> _____________________________________________________________
>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>
>>>
>>>
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>>
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
>
>
More information about the omnisdev-en
mailing list