Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclass class in PRG file
Message
From
22/06/2018 08:44:43
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01660806
Message ID:
01660828
Views:
87
>>Of course, one could argue if your subclass shouldn't be looking for a form in its class hierarchy, and only issue Thisform when it found one.
>
>Thank you, Antonio. For now I will leave the code with "thisform" in a method of this class (since it works). But when time permits I will see if I can review/change this. Just FYI, this is a class that connects to FTP for a file download. And the form has a progress bar. So the class (via updatebuffer method) calls the progress bar to update and show the progress.

The difference is that createobject() and newobject functions will create standalone objects, while .addobject() and .newobject() methods of a form or any of its members which have those methods will create a member object in form's containership hierarchy. Member objects have .parent objects, and ultimately up this hierarchy there would be a form which can be referenced as thisform. Unless, of course, your top container object is something else (custom, session etc).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform