Re: VFP6 & OOP - newbie question

Author: Anders Altberg, anders.altberg@swipnet.se

Posted: 1999-09-14 at 10:45:21

That's how VFP works. Userdefined code is always overridden unless the

superclass code is called with :: or dodefault(). Baseclass behavior is

never overridden unless stopped with NODEFAULT. Other OOP implementations

work the other way around. There's no one right way.

-Anders

----- Original Message -----

From: AMS Computing <computing@dial.pipex.com>

To: Multiple recipients of ProFox <profox@leafe.com>

Sent: tisdag den 14 september 1999 15:22

Subject: VFP6 & OOP - newbie question

| Okay so I am thick, but does the Polymorphism donkey upset Inheritance

cart?

|

| Using an example from a book to explain Poly...

|

| *****

| DEFINE CLASS xPoly AS custom

| PROC show

| WAIT WINDOW 'This is the root class'

| ENDPROC

| ENDDEFINE

|

| DEFINE CLASS xPolyChild AS xPoly

| PROC show

| ? 'This is the child of xPoly'

| ENDPROC

| ENDDEFINE

|

| SET PROC TO ...

| oTest = CREATEOBJECT('xPolyChild')

| oTest.Show()

| ****

|

| Only shows the child not the parent, unless I included DODEFAULT() in

| xPolyChild.Show

| Is this correct, it does make sense?

|

| regards

|

| Stuart Hurley

| ams_ltd@dial.pipex.com

|

|

|

©1999 Anders Altberg, anders.altberg@swipnet.se