Context Sensitive Help

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Context Sensitive Help

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:50 pm

by Stephen >> Wed, 5 May 2004 20:36:34 GMT

Hi,
We have a chm file help system in place at the moment, using the F1 key and the app.helpFile, and helpContextId properties of a form.
However we are wanting to change it to a web based help system. The problem is now trying to get it to work from within Jade. The app.helpFile only supports hlp, chm and pdf files.
As part of my testing I wrote code on the form keyUp event to check if the keyCode was F1. If it was I opened up my help webpage, with the appropraite helpContextId. Works great.
However I now want to get rid of the keyUp event as I don't want to be checking every key press when the app is running over a thin client.
So my question is, how can I get at the method/event that is called when the F1 key is pressed in a normal Jade Help system? I am assuming the Jade help system is not monitoring every key press to check if its F1, that would have big performance implications over a thin client, so how do they do it? and can I reimplement that method they call, so I can use my own help system instead?

Many Thanks
Stephen Persson

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Context Sensitive Help

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:51 pm

by allistar >> Wed, 5 May 2004 22:10:57 GMT

Hi Stephen,
We have a similar situation (we have coded our own context help system in JADE - we have found it to be much more flexible and easy to update that a .hlp or .chm context sensitive system).

We put code on the keyPress event of all forms (at least all top level forms, of which there are not many). I suggest you use "registerFormKeys" to tell JADE to only send key events for the keys you tell it (so you won't jeapardise thni client performance).

This code may help:

vars
array: IntegerArray;begin

create array transient;
array.add(13); //enter
array.add(27); //esc
array.add(112); //F1
array.add(113); //F2
array.add(114); //F3
array.add(115); //F4
array.add(116); //F5
array.add(117); //F6
array.add(118); //F7
array.add(119); //F8
array.add(120); //F9
array.add(121); //F10
registerFormKeys(array);
epilog
delete array;
end;

Call the method that contains the above code in the load event of your form(s). Hopefully you have a single framework form to put this in.

Regards,
Allistar.
--
------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at: www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 25 guests