CJPOPUP / ItemClicked

This forum is for support of XCodeJock
Post Reply
Message
Author
User avatar
Tom
Posts: 843
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

CJPOPUP / ItemClicked

#1 Post 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.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4283
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: CJPOPUP / ItemClicked

#2 Post 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
The eXpress train is coming - and it has more cars.

Post Reply