Re: define class xx twice

Author: Fernando D. Bozzo

Posted: 2016-11-18 at 02:57:13

Yes, this is the same behaviour as for procedures, the last defined or

loaded overwrites the previous.

This is because there can't be more than one procedure/class with the same

name on memoty at the same time.

In the case of classes you can use NewObject to select from which library

instantiate a class definition, but for multiple objects this is more

slower than createobject.

2016-11-18 9:34 GMT+01:00 Thierry Nivelet <tnivelet@foxincloud.com>:

> Hi,

>

> Just to be sure, would this behavior always be true wherever both DEFINE

> CLASS are located?

>

> dupClassTest = CreateObject('dupClassTest')

>

> ? dupClassTest.dupClassTest && 'duplicate'

>

> DEFINE CLASS dupClassTest as Custom

> dupClassTest = 'original'

> enddefine

>

> DEFINE CLASS dupClassTest as Custom

> dupClassTest = 'duplicate'

> enddefine

>

> --

>

> Thierry Nivelet

> FoxInCloud

> Give your VFP app a second life in the cloud

> http://foxincloud.com/

>

>

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/CAGQ_Ju=S0b87f1nmdNMVVaqnZDgYm+woOEP+_W2CWUazL0u7-g@mail.gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2016 Fernando D. Bozzo