Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object invisible at runtime
Message
 
 
À
21/10/2010 19:06:03
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01486572
Message ID:
01486576
Vues:
50
>I have this solved - for now. But since I don't know WTF is going on, the problem may re-appear.
>
>A ComboBox becomes invisible at runtime under certain circumstances. I want it to be visible.
>
>If, in Combo1.Init() [this is not the final name, just for testing purposes] I add:
>
>
>This.AddProperty("SomeProperty")
>
>
>the ComboBox becomes invisible. If I change that to:
>
>
>ADDPROPERTY(This, "SomeProperty")
>
>
>then it is visible, as expected. I originally used another property; A TRY/CATCH reveals no error in either case. The debugger shows that Combo1.Visible = .T., but it is still invisible. Also, this didn't happen before, on the same form. The property is not used anywhere else (I originally used another property name, but changed this to "SomeProperty" for testing purposes).
>
>I would expect to merely need the single This.AddProperty() command; but I included some more code for testing purposes:
>
>DODEFAULT()
>LOCAL llError
>TRY 
>	This.AddProperty("SomeProperty")
>	* ADDPROPERTY(This, "SomeProperty")
>CATCH
>	llError = .T.
>FINALLY
>
>ENDTRY
>MESSAGEBOX(IIF(llError, "There was an error", "NO error"))
>RETURN .T.
>
>
>The message "NO error" is shown, but the ComboBox is still invisible.

This does not make sense - looks like a bug. Are you adding this combobox in run-time? What is the design time visible property set to?
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform