Sorry - hit send before I meant to!

Hi All

I've not been using the data object in my cairngorm events but have
been jsut creating properties within the event and populating these in
the contructor:

package com.v.apt.events
{
    import com.v.apt.control.Controller;
    import com.adobe.cairngorm.control.CairngormEvent;

    public class GetAPTStatusEvent extends CairngormEvent
    {
        public var cred_prep:String;

        public function GetAPTStatusEvent(pCred_prep:String) : void
        {
            super( Controller.EVENT_GETAPTSTATUS );

            cred_prep = pCred_prep;
        }
    }
}

for a start is my syntax what I shoudl be doing for the parameter / class
property. I put p (fopr parameter) in fron of the name to distinguish the
parameter from the class property. I could do this instead:

        public var cred_prep:String;

        public function GetAPTStatusEvent(cred_prep:String) : void
        {
            super( Controller.EVENT_GETAPTSTATUS );

            this.cred_prep = cred_prep;
        }
which is best?

Secondly I've seen people using the data property and adding the event
properties to the newly created data property rather than having the
properties directly in the event class.
Can I ask why? Surely this just makes codeing harder as when you type
eventName. the IDE won't bring up all the availiable properties. Using
dynamic properties of a data object you (and the compiler) don't know what
properties an event has.

Thanks
Giles.

On 10/8/07, Giles Roadnight <[EMAIL PROTECTED]> wrote:
>
>   Hi All
>
> I've not been using the data object in my cairngorm events but have
> been jsut creating properties within the event and populating these in
> the contructor
>
>  
>



-- 
Giles Roadnight
http://giles.roadnight.name

Reply via email to