Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return DoDefault() surprise
Message
 
To
18/03/2011 12:59:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01504135
Message ID:
01504148
Views:
89
>Some of you probably already knew this, but it caught me off guard...
>

Are you sure that's what's happening? Are you sure your base class always returns a number (and doesn't have some cases where it just does a RETURN out of the code)?

I tried it and it works fine:
o = CREATEOBJECT("TestB")
?o.DoSomething("")

DEFINE CLASS TestA AS Custom
   FUNCTION DoSomething(tcString)
      RETURN 1
   ENDFUNC
ENDDEFINE

DEFINE CLASS TestB AS TestA
   FUNCTION DoSomething(tcString)
      RETURN DODEFAULT(tcString)
   ENDFUNC
ENDDEFINE
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform