Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How disappointed I am .
Message
From
08/02/2002 04:24:46
 
 
To
08/02/2002 04:08:07
Max Chen
Yx Software
Shunde, China
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00615259
Message ID:
00617161
Views:
27
Hi!

It will add too much confusion about using of classes. I will try you explain so you will understand.

First of all, in OOP the main role is for classes. Such thing as objects containership (as used in VFP for controls on eth form) is not a part of OOP - it is a part of the OOP modelling. So OOP here have nothing to the objects you place on the form and want to add a code to them - in OOP code is added to CLASSES, not to Object (instances of classes).

In case of VFP - it allows much more than OOP breaking some restrictions. As opposite, VFP does not have a lot of things from OOP theory. So the OOP is not an issue here at all, and we should not compare it with OOP at all and think if we need the feature you requested using other criteria.

For you, the main criteria here is comfortable work, as I understood, right? However, think about a huge number of new VFP developers that are not convinient with OOP at all. They even do not know what is classes. Assume your feature already exists in VFP. What this will cause? The more obvious thing for new developers that do nto know OOP well will be adding a code and properties to the controls inside of the form. But this is wrong approach, because in most cases class should be created and re-used on many forms instead of constant adding of code and properties to form components. Now imagine what frustration ne users will have when they will investigate for self that they did it wrong way in most places because they can create classes?

VFP is really flexible tool, but it should not be expanded in directions that will cause confusion for new developers.

I hope you can understand now why this feature is not a good one. Even if MS will add it, I can bet it will be deeply hidden so only experiensed programmers will be able to use it (as now you can use it in classes defined in PRG by DEFINE CLASS).

>Mr Kramek
>
>I think the ability to do that with form designer is
>
>helpful and necessary, And i think it is very easy for foxteam
>
>to implementate that after I have tested the follow code.
>
>They work well. The fox7(or early) may already supports that interior.
>
>
>Do you consider that is breaking the principal of OOP ?
>
>
>PUBLIC o
>o=CREATEOBJECT('form1')
>o.show
>
>?o.command1.Added_Property
>? ''
>? ''
>o.command1.Added_Method()
>
>*-------------------------
>DEFINE CLASS form1 AS form
>
> DoCreate = .T.
> Caption = "Hack in class"
> Name = "Form1"
> autoCenter=.t.
>
> ADD OBJECT command1 AS commandbutton WITH ;
> Top = 10, ;
> Left = 250, ;
> Height = 25, ;
> Width = 100, ;
> Caption = "Command1", ;
> Name = "Command1",;
> Added_Property = 'the value of property '
>
>
> PROCEDURE command1.Added_Method
> ? 'the method does works'
> ENDPROC
>
>ENDDEFINE
>*-----------
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform