Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-11

THelpEvent usage and meaning of parameters?

7 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Based on the class documentation information, it's not very ://www.freepascal.org/docs-html/rtl/classes/thelpevent.html

How are we supposed to use this THelpEvent type? And what exactly does the parameters mean?

BTW:
THelpEvent in Free Pascal has a totally different signature to the THelpEvent type in Kylix 3. I'm not sure about Delphi VCL signature.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys
Graeme Geldenhuys wrote
BTW: THelpEvent in Free Pascal has a totally different signature to the THelpEvent type in Kylix 3. I'm not sure about Delphi VCL signature.
Kylix 3 type signature:
  THelpEvent = function(HelpType: THelpType; HelpContext: THelpContext;
       const HelpKeyword: String; const HelpFile: String;
       var Handled: Boolean): Boolean of object;
Free Pascal type signature:
  THelpEvent = function (Command: Word; Data: Longint;
    var CallHelp: Boolean): Boolean of object;

The Kylix 3 signature seems more useful to me as it clears defines the parameters and sends all information needed to the event handler.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Marco van de Voort
to Graeme Geldenhuys

In our previous episode, Graeme Geldenhuys said:

Show quoted text 14 lines
> BTW: > THelpEvent in Free Pascal has a totally different signature to the > THelpEvent type in Kylix 3. I'm not sure about Delphi VCL signature. Kylix 3 type signature: THelpEvent = function(HelpType: THelpType; HelpContext: THelpContext; const HelpKeyword: String; const HelpFile: String; var Handled: Boolean): Boolean of object; Free Pascal type signature: THelpEvent = function (Command: Word; Data: Longint; var CallHelp: Boolean): Boolean of object;

This looks like chm (k3) vs older (.hlp) definition.

Reply by email

Graeme Geldenhuys
to Marco van de Voort
Marco van de Voort wrote 5 lines
> Free Pascal type signature: > THelpEvent = function (Command: Word; Data: Longint; > var CallHelp: Boolean): Boolean of object; This looks like chm (k3) vs older (.hlp) definition.

For fpGUI I have decided on using thte K3 event type, but renamed the class in fpGUI to not cause conflicts.

I agree with you that the THelpEvent in FPC does look like a rather "old" or "odd" way of doing things - compared to the rest of the help types available. Especially since you have HelpKeyword, HelpContext and HelpType types available.

Do you think there is any chance that we could update the type definition in FPC?

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Marco van de Voort: In our previous episode, Graeme Geldenhuys said: This looks like chm (k3) vs older (.hlp)…
Marco van de Voort wrote
This looks like chm (k3) vs older (.hlp) definition.

Seems you wore spot on! Reading the online help about THelpEvent available on Embarcadero's website. THelpEvent is specific to WinHelp (.hlp) and Win32 API.

Now considering that since WinHelp, Microsoft has had CHM help and even surpassed CHM help with yet another new help system called Microsoft Help 2....

I think we can safely update the THelpEvent to not be WinHelp specific, be more up-to-date and be more cross-platform. Yes/No?

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Marco van de Voort
to Graeme Geldenhuys

In our previous episode, Graeme Geldenhuys said:

I think we can safely update the THelpEvent to not be WinHelp specific, be more up-to-date and be more cross-platform. Yes/No?

I can assume you have grepped FPC and Lazarus SVN for it, and there were no occurrances, so no backwards compatibility reasons?

Reply by email

Graeme Geldenhuys
to Marco van de Voort
Marco van de Voort wrote
I can assume you have grepped FPC and Lazarus SVN for it, and there were no occurrances, so no backwards compatibility reasons?

Actually I did. :-)

* Nothing in FPC - as expected.

* One unit in Lazarus (forms.pp) - as expected.

This should be little effort to fix in Lazarus, but will probably break somebodies code. But then again, the K3 proposed signature is an improvement. And there are many cases in FPC and Lazarus that are not Delphi compatible simply because it's an improvement over Delphi or because it's for the greater good (cross-platform and not tied closely to Windows API).

Clearly this mailing list is not viewed by many, so I will raise this issue and suggestion in the Lazarus mailing list, where this change will have a bigger impact.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email