Page 1 of 1

PostPosted: Fri Jul 05, 2002 11:45 am
by iboehme
Why can?Ǭ¥t I call a handler by code? If - for example - if have a list and the <i>onselect</i> handler updates the info for each entry of the list (when selected), how can I initialize this behavior, like

<pre id=code><font face=courier size=2 id=code>lstCity.onselect();</font id=code></pre id=code>

I always get the <i>Not a member of this struct</i> error message. Any idea? Or do I realy have to type the same code twice???


PostPosted: Fri Jul 05, 2002 5:52 pm
by design4use
From the little I know the 'proper' way to do this seems to hbe to ave a function that does the stuff you want like updateMyList() and then call that function from both the onSelect handler and from your code.

PostPosted: Mon Jul 08, 2002 5:14 am
by dewey
Except for custom gadget event handlers, you cannot directly call a handler. design4use is correct, you should separate any repeated code into a separate function which is called by both the handler and your other code.