Hello, I was just creating a custom event class (subclass of
CairngormEvent) and as I was adding the "type" property I thought of
something. I generally do:

public static var DO_MY_LAUNDRY_EVENT:String = "doMyLaundry";

but doesn't making it a constant makes more sense?

public static const DO_MY_LAUNDRY_EVENT:String = "doMyLaundry";

It should never be changed, so const seems appropriate. Curious as to
whether I had been doing it wrong all this time I looked at the
CairngormStore app and it is done both ways in that code. So I would
like to confirm that it is mostly just a matter of preference and
irrelevant unless you're worried about some troublemaker coming along
and trying to change your event type. Is this correct?

Thanks,
Ben

Reply via email to