I think mostly it's the worry that you'd end up with some code that assumes
one kind of payload and end up with a payload that's a different type, at
which point you'd get a runtime error, but the compiler never would have
caught it. Using specific events with strongly typed payload data means that
the compiler will check anytime you try to reference the wrong type of data
from the wrong event. Just gives you that one extra warm fuzzy feeling about
knowing you're not going to run into some nasty runtime error.

Doug

On Tue, Sep 16, 2008 at 9:29 PM, Josh McDonald <[EMAIL PROTECTED]> wrote:

>   Some of us are from Java, and we're type-safety-crazy =) But you can
> always use DynamicEvent!
>
> On Wed, Sep 17, 2008 at 9:08 AM, Baz <[EMAIL PROTECTED]> wrote:
>
>>   Whenever I make a custom event it is almost always only to store some
>> sort of payload. For the past few applications I decided that rather than
>> make a million custom events that pass around typed data, why not make a
>> single generic PayloadEvent that can store any payload. It's been treating
>> me well so far but I am a little concerned that I may be over-looking
>> something that will bite me in the a**.
>> Am I?
>> Thanks for your opinions,
>> Baz
>>
>
>
>
> --
> "Therefore, send not to know For whom the bell tolls. It tolls for thee."
>
> http://flex.joshmcdonald.info/
>
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
>  
>

Reply via email to