Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with a class but not on a form
Message
De
27/10/2001 11:00:41
Charles Richard
Nvo Management Systems
Boisbriand, Québec, Canada
 
 
À
27/10/2001 10:43:11
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00574051
Message ID:
00574146
Vues:
29
It never occurred to me that VFP would add objects differently when instantiating from the class library than when the command is issued programatically. Tested it, it works now so now I can keep an OOP design for this tool.

Thanks lot Dragan, good thinking.


>>>>What I am doing is creating a simple web browser for testing my web apps. I want to completely refresh the browser so everything is initialized (cookies, sessions, session variables etc...) and I am tired of closing the browser and clicking the shortcut each time. Lazy and it's a fun exercise (or was until ...)
>>>
>>>You'd have to save your browser object as a separate class, more like a wrapper around the browser, and addobject() or newobject() it when you need it, and kill it when you feel like it. Besides, once you get it to work as you like, it could be usable elsewhere, right?
>
>>Well I moved the class to another library where it was on it's own, changed the references in the form. I still get the error. By the way I have the exact same problem with a textbox I put on the form to see if it was an OLE problem. Any other ideas?
>
>The trick would be to not have the browser object as a member of the form class - because in that case you can't destroy it. You'd have to addobject() it from the form's .init, i.e. programmatically. What you add programmatically, you can remove programmatically. If it's a part of the form class, added in the designer, it's impossible to kill. You'd also have to set its position and size etc in the instantiation code, but I figure you already have that.
Charles Richard
NVO Management Systems
crichard@nvo.ca
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform