Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tool to create a superclass?
Message
From
14/12/2020 13:16:33
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
14/12/2020 12:57:43
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01677529
Message ID:
01677571
Views:
65
>>>>>I have two classes that are subclasses of a common parent, but have realized that I really need to add another level in the hierarchy to be the parent of these two, but not of the other children of the common parent. That is, I want to insert a class into the class hierarchy.
>>>>>
>>>>>Wondering if someone has a tool that can take the original two classes and create the common parent with all the shared PEMs that are new in these classes. (That is, if both classes have a new property called Fred, I want to put a property called Fred in the new parent.)
>>>>>
>>>>>Yes, I know I could write my own (and started scribbling in this direction today), but if someone's already done it, then I don't want to reinvent the wheel.
>>>>>
>>>>>Tamar
>>>>
>>>>Isn't that what Thor's tool "Copy for comparing..." and "Compare with copied..." are for? I remember reading your white paper recently.
>>>>
>>>>http://www.tomorrowssolutionsllc.com/Articles/Try%20Thors%20Terrific%20Tools%20Part%202.pdf
>>>
>>>They actually give the opposite of what I'm looking for, a list of differences. I want the matching PEMs and only those added at that level. Even better, I want a tool that would take the two classes as input and create the new parent class with all the common PEMs added there.
>>>
>>>Tamar
>>
>>Sounds like a nice job. How long can you wait? The classes are vcx based?
>
>If no one has a tool to recommend, I'll just get the work done, using the code I've already written to get the list.
>
>Tamar

The problem here is how many, with what frequency. For a small number I would use FoxBin2Prg to create two files, a comparison tool to merge, rename the result class and FoxBin2Prg to create the VCX. For a single one once a week I copy one of both into a different classlib, change uniqueid (foxref uses this) and copy and paste it from there. _bowser to change the parent class. Bit boring, but different work.
I tend to use two instances of VFP side by side both with PEM Editor - quick'n'dirty work.
Since I must check it anyway (to much chance to hickup something in a fast coded machine, you know, visibility, comments, different defaults ...), this works fine for me.
To start with something using code - several tens of classes at once.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform