Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conversion problems with help ID's
Message
 
À
25/08/1997 16:39:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00046784
Message ID:
00046831
Vues:
23
>I have a large app that has been converted from 3.0b to 5.0a and I'm having a problem with help id's
>
>We have created a base class for buttons derived from commandbutton that is used for all buttons in the application. In this class we've set the HelpContextID to =THISFORM.HelpContextID. That way when the button has focus and someone presses the F1 key, they should get help for the containing form. This worked fine in 3.0, but it fails in 5.0a.
>
>When the instantiated button control inherits the default HelpContextID from the base class, pressing F1 produced the error "Expression evaluated to an ilegal value". If I override the default setting in the instantiated button control and replace it with the exact same text =THISFORM.HelpContextID, it works ok. If I go back in and "reset to default" using the right click on the property in the designer, it will fail again.
>
>Anyone run intor this before or have any idea how to solve it. I don't want to override every single control in our application to place this text in there.
>Thanks


I'm not sure this can help you but...

In my apps i use a single function to call help.
I use a on key label F1 macro to call it and in this
function i can check the value of the helpcontextId
like this:
********
*1st check if the focus is on an object
IF TYPE('_SCREEN.ActiveForm.ActiveControl') = 'O'
   *cool it's an object, have it an hcId?
   IF !EMPTY(_SCREEN.ActiveForm.ActiveControl.HelpContextId)
      *call help with this hcID
   ELSE   && no hcID, check the form hcID
      IF !EMPTY(_SCREEN.ActiveForm.HelpContextId)
         *call help with the hcID of the form
      ELSE   &&no hcID at all
         *call the default help item
      ENDIF
   ENDIF
ELSE
   *call the default help item
ENDIF
*********

Hope this help (F1)!
;)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform