O$ 5: $methodtext.$assign throws error 25216 (attempt to use instance/task var…)
Hi Nick,
Have you tried the following?
Do $cwind.$objs.Field.$methods.$add(‘$test’) Returns lrMethodRef
Do lrMethodRef.$methodlines.$add() Returns lrLineRef
Do lrLineRef.$text.$assign(“; this is a comment”) Returns #F
Do lrMethodRef.$methodlines.$add() Returns lrLineRef
Do lrLineRef.$text.$assign(“OK message ;; this another comment”)
Returns #F
etc
etc
etc
Rgds,
Graham
On 08/06/2017 11:19, Nick Renders wrote:
> Hi gang,
>
> We have a window where we dynamically add fields. Some of
> these fields require some code in their $event method, so
> we add that as well.
>
> Since we started using an error handler, I have noticed that
> assigning the $methodtext property throws error 25216 :
> Attempt to use an instance or task variable when no instance
> exists.
>
> The code actually works, but for some reason I keep getting
> the 25216 error for every $methodtext.$assign .
>
> Example code:
>
> Do $cwind.$objs.txtField1.$methods.$add(“$test1”) Returns lRef
> Do lRef.$methodtext.$assign(“OK message {Hello world}”)
> Do $cwind.$objs.txtField1.$test1()
>
>
> Anyone have any idea what might be causing this?
>
>
> Best regards,
>
> Nick Renders
>
> _____________________________________________________________
> Manage your list subscriptions at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com