Getter and setter functions are a way of implementing public properties in a way that gives you control over what happens when a value is set or gotten.
Since it is a function, you not only set the value of the internal private value holding variable, but you can also do "other stuff". Tracy ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, October 30, 2007 11:26 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] How do I set a panel title Paul Andrews wrote:> > > > > so I tried > > myPanel set title("This is the new title" ); > > > > I didn't really expect it to work > > I got this error > > Error: Syntax error: expecting rightbrace before set. > > > > How do I do this ? > > myPanel.title="This is the new title"; > > What you are seeing is the syntax for a setter function. > > Paul Ok thanks, now I faintly remember that the getter makes the simple a=b syntax possible. But I thought the whole idea was so the property could be private. The title is public . . > >