>>>My question is perhaps more for myself, but I am interested in other peoples point of view regarding this.
>>>
>>>I have a formset containing 2 forms. The second form is activated when a value doesn't exist in a combo box or when it is double clicked. Ideally what I would like to do is pass the unknown value ( or .text) to the second form and return either .t. or .f. based on the correct updating of the table ie a new record inserted correctly not cancelled out of.
>>>
>>>I guess the only way to do it in this manner is to dump the formset and call the second form directly, this way a value can be returned also.
>>>Or I could just use some variables which would be available within the formset.
>>>
>>>What do you do?
>>>
>>>Cheers
>>>John
>>
>>Kill the formset and use a modal form with the TO clause. Better yet, why not just a messagebox asking the user if she wants to add the value to the list?
>
>My favorite technique is to use the doformretval procedure which is used in the Tas Traders app. It's a simple way to use class-based forms. I like to call them 'pop-up' forms.
>
>It uses the tsformretval class in the tsbase library. I've made some pretty meaty changes to mine (I didn't bother to subclass, I just made a copy and begain hacking away), but the Tas Traders example is pretty simple.
Thanks guys!
I did feel that getting rid of the formset was the best solution, but was reluctant if there were other ways of utilizing it.
Alas poor formset... I knew him well... (well almost well, more of a casual aquaintance... in fact, the more I think of it... the less I liked him! Alas poor formset... *not*) < G >
Cheers
John
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