Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form Class keeps switching base class upon compile
Message
From
14/02/2003 17:12:03
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
14/02/2003 17:00:44
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00752241
Message ID:
00753522
Views:
20
>>Are you saying you cannot do this:
>>
>>CREATE CLASSLIB b
>>
>>** Open the "b" classlib and subclass the command button...name it cmdBase.
>>** Close/Save
>>
>>CREATE CLASSLIB a
>>
>>** Add both "a" and "b" to a new project and name the project "x"
>>
>>** From the project open the "a" classlib and subclass the cmdBase class
>>** in "b" (storing it in "a" naming it cmdBase as well.
>>
>>Or are you saying having cmdBase twice in "a" or "b" ?

I've tried it now and it works - didn't work in VFP5:
Create class cmd as commandbutton of clib1
Create class cmd of clib2 as cmd from clib1
OTOH, there's still one limitation - you can't rename a class in class browser to the name of its parent class. It tells "class {parentclassname} of {parent classlib} has identical class name" and refuses to rename. So this means that from the class browser's POV it's not allowable to have a class and subclass with the same name. Also when you do the same in code:
ox=CreateObject("dum")
?ox.class
?ox.parentclass

DEFINE CLASS dum AS custom

ENDDEFINE

DEFINE CLASS dum AS dum

ENDDEFINE
you get an error about the recursive definition.

This is not completely the same, if you have two classes with the same name in two classlibs but not in a parentclass/childclass relationship, but you seem to be running into the same kind of problems.

Try to Set Classlib To {classlib you need} before compiling. Who knows, might even work.

(p.s. don't know how did I insert a blank response between...)

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