Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 To: Mike Yearwood
  Where is Mike Yearwood?
 Toronto
 Canada
 Mike Yearwood
 Tags
Subject: RE: Collection vs _Screen vs Public Variable
Thread ID: 289252 Message ID: 289335 # Views: 39 # Ratings: 0
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Friday, December 31, 2010 12:22:18 AM         
   


> > Hello!
> >
> > I just want to share some new thoughts regarding the title. If you are interested, read it here: http://www.junblogs.com/?p=484
> >
> > I know I am late with this as I believe a lot of members are already using this approach but for those who hasn't yet, then I hope it will be useful to them.
> >
> > http://www.junblogs.com/
> > http://weblogs.foxite.com/sandstorm36/default.aspx
> > http://www.coderisland.com/forum/viewforum.php?f=10
>
> Objects can also be protected from changes, which public vars cannot. You might want to demonstrate that aspect in your class. BTW, if you have a company table and a company object, "company.name" will become vague. I'd go with oCompany for the object name.
>
> Mike Yearwood
> Microsoft MVP Visual FoxPro 2008, 2009
> We have enough youth. We need a fountain of smart!
> There may be many ways to skin a cat, but there are very few right ways to do it.


Hello Mike,

Advance Happy New Year!

Yes I will see if I can implement protected variables inside my classes, very nice suggestion. And regarding that Company object, that is just a sample. :-)

Sadly though, ssToExcel's Collection Class is named ss2Excel and not oss2Excel simply because I believe that is already unique, but then again I think I will change it now before I release the 3rd on version 2. Thanks for reminding me.


* Create a collection
oss2Excel = Newobject("Collection")
oss2Excel.AddProperty("DataSource",'')   && To trap data source
oss2Excel.AddProperty("Proceed",.F.)     && To determine whether user has aborted or not
oss2Excel.AddProperty("ShowGUI",this._showpop)     && To determine whether GUI Popup will be shown or not
oss2Excel.AddProperty("ColumnTotals",ALLTRIM(UPPER(this._totalcols))) && To determine the default columns with totals if any
oss2Excel.AddProperty("CellColor",UPPER(ALLTRIM(this._color)))    && To determine the color to be used on total and headers
oss2Excel.AddProperty("NoBorders",this._noborder)  && To show border lines or not inside excel



http://www.junblogs.com/
http://weblogs.foxite.com/sandstorm36/default.aspx
http://www.coderisland.com/forum/viewforum.php?f=10

ENTIRE THREAD

Collection vs _Screen vs Public Variable Posted by Jun Tangunan @ 12/30/2010 2:46:28 AM
RE: Collection vs _Screen vs Public Variable Posted by Ony Too @ 12/30/2010 10:20:16 AM
RE: Collection vs _Screen vs Public Variable Posted by Jun Tangunan @ 12/30/2010 11:58:43 PM
RE: Collection vs _Screen vs Public Variable Posted by Mike Yearwood @ 12/31/2010 12:11:39 AM
RE: Collection vs _Screen vs Public Variable Posted by Jun Tangunan @ 12/31/2010 12:22:18 AM
RE: Collection vs _Screen vs Public Variable Posted by Ony Too @ 12/31/2010 12:29:58 AM
RE: Collection vs _Screen vs Public Variable Posted by Jun Tangunan @ 12/31/2010 12:39:56 AM
RE: Collection vs _Screen vs Public Variable Posted by Ony Too @ 12/31/2010 3:46:22 AM
RE: Collection vs _Screen vs Public Variable Posted by Jun Tangunan @ 12/31/2010 4:06:01 AM
RE: Collection vs _Screen vs Public Variable Posted by Ony Too @ 12/31/2010 4:14:51 AM