Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>>You can pass parameters to the form that are received in the forms init
>
>You can use the call stack, but if I were to vote, this would be the best method, to recieve a parameter indcating the "mode" the form is in and then save it to a property for later use.
I'm of two minds here. Sometimes when I want a reference to the calling form, I will pass it as a parameter. Sometimes, I will rely on _SCREEN.Activeform in the load of the Called form. But since I've found that _SCREEN.Activeform is not so reliable, I prefer the explicit passing of the reference to the form.
As far as program() is concerned, I believe one advantage would be that you could use that information in the load instead of waiting until the init, but again you are relying on the call stack instead of explicitly passing it which may be safer.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement