Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a copy of the existing class
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00994181
Message ID:
00994441
Views:
21
Hi Nadya,
LPARAM lcOClass,lcOClasslib,lcNClass,lcNClasslib
* lcOClass    - Class name
* lcOClasslib - VCX name
* lcNClass    - New class name
* lcNClasslib - New VCX name

LOCAL lcTClasslib
lcTClasslib=SYS(2023)+SYS(2015) && Temp. VCX

lcOClass=ALLT(lcOClass)
lcNClass=ALLT(lcNClass)

CREATE CLASSLIB (lcTClasslib) && Create temp. VCX
* Add class
ADD CLASS (lcOClass) OF (lcOClasslib) TO (lcTClasslib)
IF !UPPER(lcOClass)==UPPER(lcNClass)
   RENAME CLASS (lcOClass) OF (lcTClasslib) TO (lcNClass)
ENDIF
ADD CLASS (lcNClass) OF (lcTClasslib) TO (lcNClasslib)
*CLEAR ALL
DELE FILE (lcTClasslib+".*")
MartinJ

>Hi everybody,
>
>I'm not sure sure what did I wrong, but I keep getting some errors about DataEnvironment. So, I want to start fresh. I want to create a new class and copy all the properties I created for the other class with their comments and initial values and custom methods with the comments and code and add them to this new class.
>
>Do you know utility, which would help me to do this?
>
>Thanks a lot in advance.
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform