Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Populating a listbox - design question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00267060
Message ID:
00267068
Vues:
25
>I've got a listbox on the last page of a pageframe. In the Activate() event of the frame I force my business obj. to run it's Total() method. The method builds an array that I'd like to use to populate my listbox. The "problem" (not really a problem, I can work around it, but I'd like to handle this cleanly) is that if I place code in my ListBox's Init() event to populate it using my business obj's array, it will fire before my code in Activate() has. Among other things happening in Activate() I have to switch to the new business object (I'm using the Mere Mortals Framework), set some propertys and then the Total(). So, that means I'll usually get an error since the business object that has the Total() method hasn't even become available yet.
>
> I'm thinking I should just add a Populate() method to the listbox and call it after everything else in Activate(). How would you handle it?
>
>Thanks,

I'd put the code in the list's Requery() method and call that when I need to. Requery is the method of lists and combos that is used to requery the rwosource.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform