General information
Category:
Object Oriented Programming
Marcel,
>You are right.
>I give a wrong track. Not really thinking about It Sorry
>In my app I am using a form collection.
That's OK...your following ideas are wonderful!
> But i think you are able to do the fool.
> =CREATEOBJECT('MyForm')
> Add a property called cObjRef in the form
> 1) In the Init code of the form you add.
> PUBLIC MyUniqueVar
> MyUniqueVar = THIS <--- That's your form reference
> THIS.cObjRef = MyUniqueVarName <--- Character not object
> 2) In the destroy of the form you add
> MyUniqueVarName = THIS.MyUniqueVarName
> RELEASE &MyUniqueVarName.
This would work I think.
> Maybe you can also try to ref the object to himself with
> THISFORM.oMyRef = THIS in the init
> THISFORM.oMyRef = .NULL. in the destroy
> I don't test it.
Actually, someone on the newsgroups had this idea too, and it is a great one! In fact, there really is no need for the NULL in the destroy, as the form will take out its own reference part of the default Release process. A colleague of mine has checked this out and it appears to be exactly what we need. I'll add the one line to my 'frm' class's Init, and then make sure all my other forms are DODEFAULTing the Init...
> or you are also able to use a application framework
> CODEBOOK is shareware or the VFP6 FFC
> Both have form collections
Sure, I could, but I probably won't...thanks for the suggestion though...
JoeK
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only