Worker Objects - $completed where?
David McKeone
david at artsman.com
Mon Aug 11 15:38:49 EDT 2014
What type of variable is varobj? It should be an Object type. If it’s an Object Reference, then it may not be initialized yet.
__________________________________
David McKeone
Arts Management Systems Ltd.
mailto:david at artsman.com
http://www.artsman.com
Phone: (403) 536-1203 Fax: (403) 536-1210
On Aug 11, 2014, at 3:32 PM, Ben Butler <ben.butler at w16.co.uk> wrote:
> Hi,
>
> Ok I have set the $superclass of my object class (myobj) to be the External WO MySQL object. I have left the methods as being inherited and added the $completed and $cancelled metehods.
>
> I then have an object variable (varobj) in my calling menu class for testing that I have set the subtype to myobj.
>
> Now I in the menu I can't call:
>
> Do varobj.$init(Params)
>
> I get an error about an uncegonized custom attribute. If I override the $init method in myobj to stop it being inherited then I dont get the error but it doesnt do anything either of course.
>
> ?
>
> Ben
>
> On 11/08/2014 20:03, David McKeone wrote:
>> HI Ben,
>>
>> All of that is correct.
>>
>> You create an object class that inherits from the worker external class. You then create the method $completion and $cancelled in the object class that you’ve created.
>>
>>
>> $completed has a row has the first parameter, which all of your results come back in.
>>
>> $completed
>>
>> ;; Parameters
>> ;; pReturn Row
>> ;;
>> ;; Local
>> ;; list List
>>
>> Calculate list as pReturn.Results.1.1
>> Breakpoint
>>
>>
>> __________________________________
>> David McKeone
>> Arts Management Systems Ltd.
>> mailto:david at artsman.com
>> http://www.artsman.com
>> Phone: (403) 536-1203 Fax: (403) 536-1210
>>
>>
>>
>>
>> On Aug 11, 2014, at 2:44 PM, Ben Butler <ben.butler at w16.co.uk> wrote:
>>
>>> Hi,
>>>
>>> I must be being a bit slow. With the SQL Worker Objects, where does the $completed and $cancelled methods go. I have put them in the object that contains the methods that call $init and $start and they dont get called...? Do they go inside the Worker Object itself, but they are not shown in the interface manager for that object variable and how would I assign their contents anyway. The worker object has a status of kWorkerStateCompleted after calling $start, but I am a bit of a loss for where the call back is going?
>>>
>>> TIA
>>>
>>> Ben
>>>
>>> _____________________________________________________________
>>> 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