Calling handlers

Discuss OrbForms Designer and PocketC Architect

Postby iboehme on Fri Jul 05, 2002 11:45 am

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???

Posts: 18
Joined: Mon Jun 17, 2002 9:10 am

Postby design4use on Fri Jul 05, 2002 5:52 pm

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.
Posts: 128
Joined: Fri May 10, 2002 3:31 pm

Postby dewey on Mon Jul 08, 2002 5:14 am

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.
Site Admin
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 1 guest