The get function is invoked when you want to read it:

object.someproperty;

The set function is invoked when you set it:

object.someproperty = "semi";

"semi" is the val parameter.

Also, search in the Flex documentation for "getter setter".
--- In flexcoders@yahoogroups.com, "shemeshkale" <[EMAIL PROTECTED]> wrote:
>
> tnx, this works great.
> but i m still confused with this set/get.
> where can i read about it? questions like:
> - who and when invoke each one?
> - which happens first?
> - the return on the 'get' is returning where?
> .
> .
> .
>
> --- In flexcoders@yahoogroups.com, "gotgoose09" thegoosmans@ wrote:
> >
> > Rename checkState to _checkState.
> >
> > private var _checkState:String;
> >
> > public function get checkState():String
> > {
> >     return _checkState;
> > }
> > public function set checkState(val:String):void
> > {
> >     // make sure val is a valid value
> >     if (val == "true" || val == "semi" || val == "false")
> >     {
> >        _checkState = val;
> >     }
> > }
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to