Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Define Class/Add Object structure - 1 level nesting only
Message
From
04/06/2001 09:41:12
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00514461
Message ID:
00514533
Views:
13
Hi!

I always thought the PRG file created by Class Browser could be compiled. And VCX file allows multiple nesting, but PRG does not? Its strange. What if you have a form with pageframes, grid etc etc?

In addition, when I want to define the grid class in the PRG, how do I add the controls into the columns and how I add custom header controls? I see no way but changing all code to use the AddObject...


>Vlad,
>The Class Browser is notorious for producing crap when dealing with containership issues. When doing this in the past, I have had to create the lowest container as a class and use ADD OBEJCT at the next container with the newly defined class. Keep doing this up the line. This may be a limitation of the ADD OBJECT construct, but I think (not sure) you can define all your methods using mulitple dot notation.
>
>Procedure AAA.Area1.Line1.Click
>
>>Hi!
>>
>>I never worked with the large number of classes defined by DEFINE CLASS statement, so I ask maybe I miss something.
>>
>>I have tried to use Class Browser to convert some of my forms and VCX classes to the PRG-like definition. It is converted to something like following:
>>
>>
>>DEFINE CLASS aaa as container
>>
>>Add Object area1 as container with ...
>>
>>&& here is a problem
>>Add Object aaa.area1.line1 as line with ...
>>...
>>
>>
>>When compiling such PRG file, it shows syntax error on the second Add Object.
>>
>>The question is: how to define level 2 and more nested objects in the objects tree? Yet I managed only level 1 of objects work. In othe words, how to define object that is in container, that is in container?
>>
>>TIA.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform