Good point. I agree, write-only properties are rare, but I just wanted to check to see if there was another reason they should not be used. The only case I can think of off of the top of my head would be some password/security value where you wanted to allow a value to be set but not retrievable elsewhere in the code. Or in the case where a data conversion needed to happen to the data that was being set so a getter would not be necessary. That said, I don't think I have ever used a write-only property...
Thanks, Kevin --- In [email protected], "Gordon Smith" <[EMAIL PROTECTED]> wrote: > > Technically, there is no problem in AS3 with writing a setter without a > getter to implement a write-only property. But I consider write-only > properties to be poor API design. Being able to set something -- but not > ask later what it was you set -- is weird. If I need to know the value > that I set, I shouldn't have to store it myself. > > > > Gordon Smith > > Adobe Flex SDK Team > > > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Kevin > Sent: Thursday, April 24, 2008 6:53 AM > To: [email protected] > Subject: Re: [flexcoders] passing parameters to components > > > > I am wondering why this is weird? Could there be a case where someone > wanted to have a write-only property? I agree that it is pretty > uncommon, but I am wondering if it problematic from an architecture > standpoint? > > > > - Kevin > > > > On Apr 22, 2008, at 8:37 PM, Gordon Smith wrote: > > > > > > (BTW, setters without getters are weird.) >

