[screenweaver] SWASK (ScreenWeaver ActionScript Kit) alphareleased

Muzak p.ginneberge at telenet.be
Mon Oct 17 18:06:05 PDT 2005


Well, I don't know what's not to like about them.
Makes it more clear what they are (more readable) and helps make the distinction between methods and properties of a class.
And it sometimes recudes the amount of methods a class has (looking from the outside).

.setEnabled()
.getEnabled()
.isEnabled()

Those 3 can be reduced to: .enabled

I've gotten in the habbit of writing implict getter/setters as access points from outside the class, and those (often) call explicit 
getter/setters inside the class, which are usually private.

class someClass {
    private var __dataProvider:Object

    private function setDataProvider(){
        // do stuff with __dataProvider here
    }

    function get dataProvider(){
        return this.__dataProvider;
    }

    function set dataProvider(o){
        this.__dataProvider = o
        this.setDataProvider();
    }
}

regards,
Muzak

----- Original Message ----- 
From: "Romain Ecarnot" <romain.ecarnot at gmail.com>
To: <screenweaver at osflash.org>
Sent: Monday, October 17, 2005 8:51 AM
Subject: Re: [screenweaver] SWASK (ScreenWeaver ActionScript Kit) alphareleased


Hi Muzak,

Any reason why those aren't implemented as implicit getter/setters?
>

I simply don't really like it ;)
I prefer realname getter&setter..developer knows exactly what it does...
But it's very a personnal feeling...I never use implit getter/setter in my
development...

I can add implicits for future release...if many devevlopers fell better
with them ;)

Thanks.
Romain







More information about the screenweaver mailing list