Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding properties and methods.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Novell 4.x
Database:
Visual FoxPro
Divers
Thread ID:
01087772
Message ID:
01087855
Vues:
12
>Thanks Fabio, Great suggestion. Most of the work I've done till now has been through the visual designers. I think I'll have to take time to start experimenting with class design and prototyping using PRGs. It appears each way has it's advantages.
>
>
Not true.
PRG have this great advantage, but it have a great disadvantage:
* you can add root members only
   
   ADD OBJECT objname AS objClass

* this don't work on PRG, but it work on VCX

   ADD OBJECT objname.secondlevelMember AS objClass
Then, through a PRG you can reduce the quantity of Methods and Properties defined,
but you have to create a lot of subclasses,
that they will be loaded in memory as template. An useless waste of resources.

VFP is a good idea, but it is incomplete still.

>
>
>>>Can someone clue me in. When working in the form designer, you can add properties and methods to the form through the "form" menu pad option, but you can't do the same for objects contained within the form. You have to first save the contained objects to a class, get out of the form, then go through the class designer to add custom properties and methods. I'm just wondering how come custom properties and methods can't be added to contained objects through the form designer. Is it because it would foster bad design?
>>>
>>>It seems to me building quick prototypes would go much faster if this capability existed in the form designer. Or is my thought process just a??-backwards
>>
>>no , a VCX LOADER limit, only.
>>
>>on prg you can do it
>>
>>PUBLIC oform1
>>
>>oform1=NEWOBJECT("form1")
>>oform1.Show
>>RETURN
>>
>>DEFINE CLASS form1 AS form
>>
>>	proprieta = .F.
>>
>>
>>	ADD OBJECT text1 AS textbox WITH ;
>>		proprieta = .F.,;
>>		Height = 23, ;
>>		Left = 132, ;
>>		Top = 36, ;
>>		Width = 100, ;
>>		Name = "Text1"
>>
>>
>>	PROCEDURE metodo
>>		? "ciao"
>>	ENDPROC
>>
>>
>>	PROCEDURE text1.Click
>>		? this.metodo()
>>	ENDPROC
>>
>>
>>	PROCEDURE text1.metodo
>>	  RETURN "x"
>>	ENDPROC
>>
>>ENDDEFINE
>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform