Edit menu (OpenInsight Specific)
At 08 MAY 1999 10:45:55PM Barry Stevens wrote:
Can anyone help me with code that controls the Cut, Copy & Paste disabling/enabling optios in an edit menu.
I do remember seeing the code somewhere, but I cant find it.
Barry
At 08 MAY 1999 11:06PM Barry Stevens wrote:
Whow
Just found it after I thought I might have a go at it.
Found it in the HELP for EVENTQUALIFIER property.
Now that does raise some questions…How on the earth were you suppose to know that the event is suppose to start with 2*SYSPROG.
and what is the '2'
Barry
(Gee I can just hear don Bakke sharpening his pencil )
At 09 MAY 1999 09:04AM Don Bakke wrote:
(Gee I can just hear don Bakke sharpening his pencil )
Well since I'm typing this, it's more like you hear me cracking my knuckles…
The answer to your question is somewhat given in the help description for QUALIFY_EVENT. The "2" represents the number of parameters for the event that you are "redirecting" to. Now OMNIEVENT has 7 parameters (counting CtrlEntId and CtrlClassId) so that would be the most appropriate number, but in this situation none of the additional parameters (i.e. Message, Param1..Param4) get used so it is only necessary to use 2 (CtrlEntId and CtrlClassId.)
The example referred to SYSPROG purely because it was giving an example for a window developed within SYSPROG. You would need to use the name of your current application (or use a system variable like @APPID).
Remember, the event that you reference has to be a real event in your system because you will have to add your code into it that does the actual enabling/disabling of your edit functions. Now if you wanted to get really crazy, redirect everything to a promoted OMNIEVENT so you only have to do this once for all of your application windows. Since most of our apps our developed with an MDI, we generally only have to do this once.
At 10 MAY 1999 08:47AM Barry Stevens wrote:
Good explanation, sort of. A few things I cant get my head around.
In the following example, how can you pass extra parameters to the ominevent (say 2). I know 2 is change to 4. Do you just add * between, then how does it know its not a key.
User created omnievent call
"2*MYAPP*OMNIEVENT*MAINMENU."
Barry (a bit slow a this stuff)
At 10 MAY 1999 09:03AM Don Bakke wrote:
Barry,
The confusion here is in the assumption that you (as the developer) are explicitely plassing parameters. We need to remember that Qualify_Event (and EVENTQUALIFIER) is a way of redirecting events, not a way of calling them programmatically. These additional parameters are sent by the system as needed based on the event itself.
So any additional parameters are completely dependent on the event you are redirecting. Therefore a redirected CLICK event would never take advantage of more than two parameters since that's all it uses. However, a redirected CHAR event would use additional parameters as the system will automatically generate values for these. The only way you will know the value of these additional parameters is if you set the number of parameters to be high enough.
The only way of explicitely calling an event and sending parameters is by using the Send_Event() function as normal.
At 11 MAY 1999 05:59AM Barry Stevens wrote:
Ok, clearer now.
Thanks for your patience.
Barry
BTW. Have you done any of the OI courses.
I never have, neather for Arev, just had to pick it up. (Using ARev for 8 years), (OI on/off 2 years - basic stuff)
This is probably where I lose a lot in the translation
At 11 MAY 1999 08:39AM Don Bakke wrote:
I have never been to any of the courses except for the very first introduction to OI that Revelation hosted in LA at Zadek about 5 years ago. It was a one day quick review which only covered the very basic tools (and at that version, 2.0, wasn't nearly what we have today.)
Just about everything I know has been through blood, sweat, and tears (and great help from many folks who are no longer at Revelation, many folks who are currently at Revelation, and many folks who are in the community at large.) I would have loved to go to RevU even though I would have gone through the jRev track.