Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CreateObject() vs NewObject()
Message
De
23/08/2007 10:33:39
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
23/08/2007 09:45:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Divers
Thread ID:
01249678
Message ID:
01249854
Vues:
28
>>>>Newobject() with 2nd parameter
>>>>con:
>>>>- if you move a class, all the newobject() calls need to be edited (or you should use a factory)
>>>
>>>Not really -- if you add the visual class to a project, then in the parameter only specify the name of the file and not the path. The visual class will be part of the built application and will be found regardless of the file location at build time.
>>
>>But if you move the class into another library (say you saw the need to reorganize your libs because a select few grew too much), you still have to hunt it down in each newobject() call and put the name of the new classlib.The path is not relevant here - it's quite likely to remain the same, or be completely absent.
>
>Agreed on the path, but would that not be true for both; that is, the moving of the class into another lib? When moving you have to update the references anywhere used -- forms, other classes, etc.

For createobject(), you don't. But for contained objects, oh yes - you pretty much have to hack the ?cx files to get the references right.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform