Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01080964
Message ID:
01081548
Vues:
8
Don,

The problem was my own mistake. I was setting visible property to false by my manager's request (I was strongly objecting it, but finally had to do so), and then accidentally I set the buttoncount property to 0. The code of saving ToolTipText is from MereMortals framework, I don't know its purpose and don't need it anyway...

>Not sure why the invalid subscript, but an alternative approach to what you are doing is preserving a caption/tooltip... Why not create a subclass of a button and add two properties. Then, in the Init() of the button, force to set the new properties to the defaults, then each button would have its OWN values to worry about... Then in a FOR EACH, you could correct / revise as needed...
>
>
>ex:  Init() method
>This.cPreserveCaption = This.caption
>This.cPreserveToolTipText = This.ToolTipText
>
>
>elsewhere...
>
>
>for each loBtn in Thisform.Controls
>  if atc( "commandbutton", loBtn.BaseClass ) > 0
>     lcOriginalCaption = loBtn.cPreserveCaption
>     etc....
>     .
>  endif
>endfor
>
>
>
>
>
>
>
>>Hi everybody,
>>
>>UPDATE. Ok, my mistake. Accidentally I put 0 in the buttons's count. Now I have to copy the form, download the prev. version and make adjustments.
>>
>>I have an option group on the form. After some long debate with my manager I had to make it invisible. But now I'm getting the strange error on this line of code
>>
>>LOCAL lnCount
>>
>>DIMENSION This.aOriginalToolTipText[This.ButtonCount]
>>DIMENSION This.aOriginalCaption[This.ButtonCount]
>>
>>FOR lnCount = 1 TO This.ButtonCount
>> This.aOriginalToolTipText[lnCount] = This.Buttons[lnCount].ToolTipText
>> This.aOriginalCaption[lnCount] = This.Buttons[lnCount].Caption
>>ENDFOR
>>
>>Invalid subscript reference. Why making the option group invisble triggers this error?
>>
>>Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform