Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Can I get Top-Level Form Name?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00817434
Message ID:
00818443
Views:
19
Alright, now your caution makes sense. I hope you're wrong. I hope that the 2nd child launched from inside the 1st child still shows the TL as wparent(). I'll be testing it soon, I'll let you know.

Why wouldn't w***() be good OOP? It seems to me that some of them are precisely what OOP is all about. But again, maybe I'm missing something.
Tell me if I'm doing something that's not good OOP here:
my TL form is minimized (windowstate=1) to start and runs other forms completely in the background on user's computer, but if something happens that needs the user's attention I need to un-minimize the TL form (set windowstate=0). Using wparent() in this situation keeps ALL the code to un-minimize the TL form inside the active form.

BTW what is "WAG"?



>>>>Thought I would point out wparent().
>>>>It seems to be just what I'm looking for.
>>>
>>>Won't that fail if a child launches another child from within the TL scope? I assume that's what you meant by "complexity"...
>>
>>I don't understand why it might fail.
>>The fact that there are 2 child forms with the same wParent() should be no problem.
>>But maybe I'm missing something.
>
>I haven't tested WPARENT with this yet, so just a WAG here. But if your app is like mine, I launch sub-children from children within TLs, and they should give the *child* as WPARENT in theory, rather than the TL. But I'll have to test it later, see what I find.
>
>This is just a cautionary note on my part, you may be okay, but it's worth testing to be sure.
>
>The other reason neither Tracy nor I would likely give W***() windows functions as solutions, is that they're generally not good programming practice in OOP. WPARENT, WONTOP, etc, are throwbacks to before OOP, encapsulation, etc.
>
>Doesn't mean you can't use one when it's the only easy solution, though.
Bill Morris
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform