Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add properties and methods for any objects
Message
From
08/02/2002 05:02:36
 
 
To
08/02/2002 04:42:12
Max Chen
Yx Software
Shunde, China
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00617168
Message ID:
00617174
Views:
28
This message has been marked as the solution to the initial question of the thread.
Hi!

See my answer to your another thread. Take a look also to the FAQ#845 about assigning code in run-time that use simlar approach.

This is not a bug and not a feature in VFP. This is a left-over of the usual VFP functionality for loading classes from class libraries. When you curious, try to look into the VCX or SCX file by opening it as a table. It is recommended to do with grid control on the form with some columns that contain code for header, column and control. You will see exactly the same syntax. Now open VCX or SCX in the class browser and click button to view source. DEFINE CLASS structure generated also looks the same.

I guess all this is by design prepared for usual VFP functionality. Extra things like you mentioned and like described in the FAQ#8124 are not predicted in VFP and as a result, probably not supported at all and not advertised as a features.

Hope this will make things clear for you.

>The following PRG works. Does it undocument ?
>And will it be supported in the new version ?
>
>
>*-----------------------
>PUBLIC o
>o=CREATEOBJECT('form1')
>o.show
>
>?o.command1.Added_Property
>o.command1.Added_Method()
>
>*---
>DEFINE CLASS form1 AS form
>
> DoCreate = .T.
> Caption = "form1"
> 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
Reply
Map
View

Click here to load this message in the networking platform