Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How PROTECTED PROCEDURE work in class define ?
Message
From
09/11/1997 21:05:06
 
 
To
09/11/1997 20:45:25
Arnold Lee
K&A International Co.,Ltd
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00059212
Message ID:
00059213
Views:
19
If you want to have the same class in all apps and in the same time to customize it for each specific application:

Create your class as generic as you need. This is your base class. Put here all the common code/methods, define here all the common properties.

For each app, subclass the base class. Add here any specific code/properties/methods.

I don't see a use for PROTECTED in this case. PROTECTED is used to hide properties and methods from outside the class. Any subclass can access the PROTECTED prop/meth. If you want to hide properties/methods from subclasses also, you must use the HIDDEN key word.

Vlad

>I have a generalized form class library shared by several applications,I woudl like to customized some method in certain object in order to suite specific application requirement.So I have following code in the end of calling prg of each application like this
>DEFINE CLASS
> PROCEDURE
>
> ENDPROC
>ENDFINE
>
>When I need to assess the class library,I writes
>CREATEOBJECT AS
>
>It works.Method was executed as code written in DEFINE CLASS.But the SAME method was applied on all application even each calling prg have its owen DEFINE CLASS.Methods was KEPT once being modified ?
>I have put PROTECTED before PROCEDURE Procedure Name,but the case was same.
>
>If anybody can be of assistance please let me know.
>
>Thanks in advance.
>
>Arnold
>knaarnd@netvigator.com
Previous
Reply
Map
View

Click here to load this message in the networking platform