Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Utility to convert table to a class.
Message
From
10/10/1999 14:41:46
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
10/10/1999 14:23:36
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00274695
Message ID:
00274780
Views:
36
>>>>>I was going to write a utility program that generates skeleton code to convert/map table attributes to a class but though maybe someone has already done this that I could steal and save time 8-)
>>>>>
>>>>>At the very least it needs to map each table column with equivalent class property with both assign and access methods and create generic default methods like Save(), Delete(), Fetch(), Search(), etc. Think in terms of a "Class Template".
>>>>>

>I just don't think it tackles the question. The quest is a shortcut to creating table template classes, with methods for specific functionality for each field in the form of Access/Assign methods.
>
>There is no built in way in VFP to add custom methods programmatically. You'd have to hack the vcx.

He doesn't need to do anything with "adding custom methods programmatically" - he may just have a generic property called record=.null., and then use
scatter name this.record
, and have a generic GetValue and SetValue methods, which would return .null. for nonexistent fields, and .f. for writes into nonexistent fields.

Furthermore, he may have an array of this.records[n], so the object may keep the whole grid (but then why was the table buffering invented at all?).

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