Page 1 of 1

CJPOPUP / ItemClicked

Posted: Tue Oct 05, 2010 8:34 am
by Tom
Hi, Roger.

If you run your sample for the popup control and click on the item, you will receive a runtime error, cause the ITEMCLICK clause does not hand the popup object to the codeblock (anymore? I remember this worked in earlier versions). I found out that you create a PostAppEvent there. If one popup control is used for several parts of the app, the item id is needed to identify the code to be executed on click. Without any knowledge about the object, there seems to be no way to find out the item id.

Re: CJPOPUP / ItemClicked

Posted: Sat Oct 09, 2010 11:21 am
by rdonnay
Tom -

Here is a fix for the problem in XCJCLASS.PRG (approximately line 1547).

Code: Select all

IF Valtype(aOptions[15]) == 'B' ; ::itemClick := {|o|PostAppEvent(DCGUI_EVENT_ACTION,aOptions[15],o,self)} ; ENDIF