[Solar-talk] $this->output Discussion
Raymond Kolbe
rkolbe at gmail.com
Wed Sep 12 11:17:22 CDT 2007
Hey all,
So I find it a pain (well not really a PAIN but more...inconvenient)
to have to declare all of my public data members for each view that I
want to use. For example, if I have 5 or 10 different variables I need
to output (I am not sure when I would have THIS many, but work with
me...) I would have to declare each `public` in my class...not a big
deal, but I think a more streamlined way would be nice...
Such as...you would just call `get()` or `set()` to do just that...get
and set your data members.
As I am writing this I am starting to think it would not be a great
idea since you should never have to declare a lot of data members for
output anyways. Most of the text/data that you would want to output
would probably come from other objects.
Anyways, here is what I came up with (straight forward) and I think I
might implement it in one of my projects. Let me know what you all
think -- pros? cons?
http://pastebin.com/m4ac35c79
Thanks,
Raymond Kolbe
More information about the Solar-talk
mailing list