I have habit to declare hidden menu items in the main frame. Then in the code i declare global long data nd assign the feq number
hiddenFeq=?hiddenMenuItem
Then from other thread i send with POST to the hidden menu accepted event, so that i can process some code in the main frame.
This is working in c2j. Just one thing is not working. The menu item is not effectivelly hidden.
For example from main frame definition:
MENU('<154>đčć<158,138>ĐČĆ<142>'),USE(?test),HIDE
ITEM('Update globalni param'),USE(?Updateglobalniparam),HIDE
END
Nenad
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'll take a look later on the weekend. Brief look at the code, I would expect HIDE to behave as expected. My initial expectation is that maybe it is a limitation of Java Swing, you cannot hide menu item components. But I have not looked close enough yet.
Interesting hack, using a ?control and posting ACCEPT to it.
c2j will allow you to post events for non existent fields. e.g. the following code snippet behaves the way you would expect. If this is of help:
programwindowwindow('test'),at(10,10,100,100)button('Press me'),use(?b1),at(1,1,50,10)
.
codeopen(window)acceptifaccepted()=?b1post(event:Accepted,100).
ifaccepted()=100message('Got an event for non existant field!').
.
close(window)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have habit to declare hidden menu items in the main frame. Then in the code i declare global long data nd assign the feq number
hiddenFeq=?hiddenMenuItem
Then from other thread i send with POST to the hidden menu accepted event, so that i can process some code in the main frame.
This is working in c2j. Just one thing is not working. The menu item is not effectivelly hidden.
For example from main frame definition:
MENU('<154>đčć<158,138>ĐČĆ<142>'),USE(?test),HIDE
ITEM('Update globalni param'),USE(?Updateglobalniparam),HIDE
END
Nenad
I'll take a look later on the weekend. Brief look at the code, I would expect HIDE to behave as expected. My initial expectation is that maybe it is a limitation of Java Swing, you cannot hide menu item components. But I have not looked close enough yet.
Interesting hack, using a ?control and posting ACCEPT to it.
c2j will allow you to post events for non existent fields. e.g. the following code snippet behaves the way you would expect. If this is of help:
Menu items not responding to disable/hide etc was a one line oversight in runtime code. Committed a fix.
Ok, thanks
Nenad
Works now.
Thanks
Nenad