Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting object references to forms
Message
De
20/06/2000 19:56:24
 
 
À
20/06/2000 19:26:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00382212
Message ID:
00382490
Vues:
20
>You could help by explaining the advantage of CREATEOBJECT().
You must understand that by using "Do Form" you are not avoiding CreateObject - you are just using a wrapper to get to it. these kind of wrappers almost always inject things into the equation without your knowledge and limit ability to control everything that is happening precisely.

>1. Forms can't be run from the class designer.
are you talking the little exclamation point thing on the standard toolbar? I've never even had the standard toolbar up. - so non issue - I have no reason to run a form out of application context -

>2. PITA to get a return value from a modal form
Not at all - I disagree completely - very easy -

>3. No use of DE
This is a good thing - a very good reason NOT to use DO FORM - VFP DE is a poor way to handle data IMO - especially remote data - so tell me - how do you use the DE with SQL server with a complete SPT model and no VFP database whatsoever?

>4. Showing form is two step process: 1. CREATE, 2. form.Show()
oh - you mean like I can control what happens between instantiation and showing? - yeah - that's real bad

>5. SET CLASSLIB to locate library, or hardcode location with NEWOBJECT
all wrapped in framework - all I ever do is oFrmMgr.Loadform(lib.class)

>6. Forms can be saved as classes, but not vice-versa (subclass, yes, change to, no)
non sequiter - if I don't want forms, why the heck would I want to save a class as a form ? And subclassing? I failed to mention that - but that is a HUGE reason to use classes instead of jumpin through VFP hoops to subclass a form.

>7. Form location/name isn't obvious from looking at file folder (you have to open a vcx)
huh? You mean I might actually have to name forms something that makes sense? and keep my classes organized?

>8. Did I mention that you can't run a form from the class desginer?
you can't type with your mousepad either - I just wouldn't call that a disadvantage

> I think it's a little narrow-minded to call one technique "for beginners only", because you are implying that a whole heck of a lot of people are beginners, whether they are or not.

Perhaps - I overreact to these things - but I feel much the same way about this as I do those who use remote views - it works - it is even "MS-recommended" - but it is a wrapper around functionality to "protect" you from what is really going on. I'm not a low-level code masochist, but if I can control something more granularly without sacrificing ease of use - I'll do it every time.

Ken
Ken B. Matson
GCom2 Solutions
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform