1

Konu: Class structure

Cetin, you said in a message to me:

--------------------
...

Or create a derived class and do modification there (harder to implement and follow but fits into OOP better). Something like this:

Create class ;
   HansLocatorGrid of FoxyClasses.vcx ;
AS ;
   LocatorGrid from FoxyClasses.vcx


Or if you want to separate the classlib too:

Create class ;
   HansLocatorGrid of HansFoxyClasses.vcx ;
AS ;
   LocatorGrid from FoxyClasses.vcx


PS: If you apply the last case, be careful some class code have "this.ClassLib" as a reference to its own classlib to create another class from within that library. You may need to copy that class too.
-------------------

If I apply the first alternative (and maybe the second?), and I have this in every "main" file in applications ...

SET CLASSLIB TO "D:\...\Foxy Classes.vcx
SET CLASSLIB TO "D:\...\HansFoxyClasses.vcx

... can I then have only the classes I want in HansFoxyClasses.vcx, for instance, in HansDateTimeCtrls.VCX, only handdtcontrol and hansperiodpicker (and it will still work)?

That is, I leave out datepick. datetimepick, dttextbox, edtexpand, olecalendar, periodselector and timepick from HansFoxyClasses.vcx, but since these are in Foxy Classes.vcx, it will still work?

The advantage with this would be that only handdtcontrol and hansperiodpicker would show up in "View Classes" in the Form Controls Bar.

Regards,

Hans L

2

Re: Class structure

Yes that would work:)

Instead of:

Visual Fox Pro
SET CLASSLIB TO "D:\...\Foxy Classes.vcx 

SET CLASSLIB TO "
D:\...\HansFoxyClasses.vcx

I prefer:

Visual Fox Pro
local oSomeObject as SomeClass of "D:\...\HansFoxy Classes.vcx"

oSomeObject = NewObject("SomeClass", "D:\...\HansFoxy Classes.vcx")

That is because in case you have 2 class libraries with the same name then (if you use set classlib to ...) VFP have no mechanism to differentiate which one you want. That is a rare case but that happens (and I know it because I were one of those victims who saw it happen:) Just FYI.

PS: You were lucky I logged in and saw this:) For the last 10 days or so I can't allocate more than a few minutes a day for browsing the forums. Take care and visit us more often, need not be about Foxyclasses.

3

Re: Class structure

Thank you, Cetin. One has to have some luck sometimes :-)

Regards,

Hans L