Mr. Linares -> Error Message on .CHM-Help

Postby Antonio Linares » Tue Sep 02, 2008 2:32 pm

Günther,

You can not use numbers for topics when using CHM files. It does not work. Please use strings. i.e:

HelpTopic("Setup") // this works fine with your CHM file

Use strings that correspond to one of the Contents entries, or a specific opic string from your CHM builder tool.

Regarding the use of lShow, what we do is to avoid the show of help if the help is already displayed. It can't be a CLASSDATA or you will be limited a just one shown help from your app, when you can have several simultaneously (not the same as "recursive", that is what lShow controls).
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby byte-one » Tue Sep 02, 2008 4:09 pm

Antonio, the problem is also without a defined nHelpid from dialog! The ::help() from the window-class is called twice if F1 pressed on the dialog!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Postby Antonio Linares » Tue Sep 02, 2008 6:31 pm

Günther,

Please test this EXE using your CHM file (not included):
http://rapidshare.com/files/142115491/testhelp.zip.html
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby byte-one » Wed Sep 03, 2008 8:20 am

Antonio, your EXE not functioning! I have msginfos included in dialog.prg and windows.prg. This show that at first are called the help from dialog (this is okay and functioning also with helpID) but then is called the help from main window! (this should not be!)
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Postby Antonio Linares » Wed Sep 03, 2008 10:40 am

Günther,

We are not using your modified dialog.prg and window.prg. We use our standard FWH library, with our recent changes.

Could you please explain why our EXE is not working right ? Please describe how to reproduce it. Thanks,

We are testing it here in Vista 32 and works ok.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby byte-one » Wed Sep 03, 2008 11:28 am

Antonio, please download this ZIP and read testhelp.txt.
All others can also download the files to test the helptest.exe with the helpfile.

http://byte-one.com/helptest.zip
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Postby byte-one » Wed Sep 03, 2008 9:36 pm

I have now tested with a dialog called from a dialog. The same thing! First called the help from the shown dialog, then called the help from parent dialog and at end the help from main window. The right ding is to only show the help from focused dialog or window and NOT call all the helps from the complete hierarchie!

Popup help is functioning but should only called with the"?" symbol in dialogmenu. F1 should shown the normal help for this dialog or window. For popup help should the file to be set with a function like SetHelpPopup( popupfile )!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Postby Antonio Linares » Wed Sep 03, 2008 10:02 pm

Günther,

> Antonio, please download this ZIP and read testhelp.txt.

There is NO a "goto" topic in your CHM file.

Change your example to use "Setup" topic, that does exists!

DEFINE DIALOG oDlg NAME "test" TITLE "Help-Test-Dialog with Help-ID 11" HELPID "Setup"

REDEFINE BUTTON ID 104 OF oDlg ACTION HelpTopic( "Setup" )

I have the feeling that you don't read what I am telling you...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Wed Sep 03, 2008 10:32 pm

Günther,

What we have noticed, and we agree with you, is that HelpTopic() is non modal when using CHM files, so F1 goes to other windows too, as static lShow is not a solution for a non modal situation.

We are working to provide a solution.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Wed Sep 03, 2008 11:04 pm

Günther,

Fixed. This is the required change:
Code: Select all  Expand view
METHOD Help( nWParam, nLParam ) CLASS TDialog

   local hWndChild := HelpCtrlHwnd( nLParam ), nAtChild

   static lShow := .f.

   ::lHelpIcon = .f.

   if ! lShow
      lShow = .t.
      if ( nAtChild := AScan( ::aControls, { | o | o:hWnd == hWndChild } ) ) != 0 .and. ;
         ! Empty( ::aControls[ nAtChild ]:nHelpID )
         ::aControls[ nAtChild ]:HelpTopic()
      else
         ::HelpTopic()
      endif
      lShow = .f.
      return 1  // NEW !!!!!!!!
   endif   

return nil

Here you have your modified PRG, RC and the EXE:
http://rapidshare.com/files/142429970/gunther.zip.html
I kindly ask other readers to test it and confirm how it works for you, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby byte-one » Wed Sep 03, 2008 11:13 pm

Oh Antonio, its functioning! I am happy!!!!!!

The CHM you uploaded is defect!? On itself can not called any topics.

This points are also to view:

1.) Popup help is functioning but should only called with the"?" symbol in dialogmenu. F1 should shown the normal help for this dialog or window.
2.) For popup help should the file to be set with a function like SetHelpPopup( popupfile )!
3.) The coordinates from the popup-help is the mouse-position. It should be the position from the control if the mouse-position could be on any position when F1 pressed. (only if point 1.) are aktive!)
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Postby byte-one » Sat Sep 06, 2008 9:40 am

I have made some changes from this points:

1.) Popup help is functioning but should only called with the"?" symbol in dialogmenu. F1 should shown the normal help for this dialog or window.
2.) For popup help should the file to be set with a function like SetHelpPopup( popupfile )!
3.) The coordinates from the popup-help is the mouse-position. It should be the position from the control if the mouse-position could be on any position when F1 pressed. (only if point 1.) are aktive!)


to 2.) In the file helpchm.prg i defined the functions SetHelpPopup() and GetHelpPopup() to define the textfile embedded in the CHM.
to 3.) I have also changed control.prg (method __helpTopic()), help32.prg and helpchm.prg to set the coordinates relativ to the calling control!

Antonio, please show me an way to 1.). It is not good, when F1 on an get shows the popup-help from this get-control. It should show the HelpTopic from the dialog! Only the "?" in dialog sysmenu should show the popup!

If all points OK, I will publish you the changes to inspect.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 59 guests