Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Building confidence in Visual Modeler
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00326164
Message ID:
00326518
Views:
23
FWIW I ran out of 'other stuff' to do and tackled this head on. (being cautious is a good thing as long as you have the patience for it LOL). But I thought I'd share what I found.

Code Gen Wiz is a little trickier than Reverse Engineering Wiz, makes you realize real quick how to organize your diagram. If you just throw everything together under User Services, be prepared to click a lot of checkboxes. I started out with my classes in three folders (packages I guess is proper VM term): Framework, App Specific, and FFC. Only thing I had to Code Generate back into VFP was the stuff from App Specific. After my first trip through the Wiz without actually reading the instructions closely, I ended up with every single class in one VCX. LOL... Markus those checkboxes in the treeview are a real PITA.

So I went back to the VM, and under my App Specific folder & setup sub folders (yeah I know packages... yeah right) for each of my final destination VCX. Restored the screwed up practice project from VSS and took another stab. Next time around I got the classes in the right vcx (you can only generate for one vcx at a time - my only complaint) BUT it wiped out the CLASSLOC field values in the raw vcx table for my classes that were subclassed from the framework I'm using. My destination VCX ends up in there instead of the real framework vcx. Another messy thing is you loose your class icons in the project window. Plus when I tried to fix CLASSLOC then open the class to check and see if the Code Gen Wiz updates to an existing class were cool Dr. Watson started dogging my heels.

So ok, time to get serious and stop playing. Third time around I created a fresh project and Code Generated out my App Specific VCX's. Still had the CLASSLOC problem but with as much work as I got done conveniently in VM this wasn't a big deal to me. Everything looks great, but I'm still curious to hear Markus' comments about Code Generating over an existing class. I lost my nerve now plus I'm dieing to start coding (yes my modeling career was a nice place to visit, but I wouldn't live there David S).

Real cool part about this Wizard is the last step. You can tell it to either Import, OR Import and Open Class Browser. Now with the CLASSLOC glitch leting the Wiz launch the browser caused an error, but hey nice thought. You also get specify if you want the Wiz to set default property values (missing in VFP5 Wiz I believe), Update the existing model (real handy if it tells you in the next to last step that you have inheritance conflicts), and if you want a log. Turning on the log opens it right up and you have a real nice audit trail type list to double check everything imported correctly.

Nice little tool... but it's gonna take me awhile to do this one vcx at a time. Plus too at one point you get to specify the base class used as default if the model's parent class is unmapped. So maybe I'm stilling being cautious but if my vcx's contain classes with multiple parent classes from the framework, I'm only pulling in one subset at a time. Sure does make me think about class library organization.
Roxanne M. Seibert
Independent Consultant, VFP MCP

Code Monkey Like Fritos
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform