-
Notifications
You must be signed in to change notification settings - Fork 820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataEvent class #48
Comments
Hi Philippe, |
Yep I mean a simple flash.events.DataEvent class in the startling API. It's better to dispatch a string value than check the target object to know what it's about. |
Hm, I have never used that event class manually -- only when built-in classes (like XMLSocket) dispatch them. But in principle, you want just an event that you can attach a string to, right? That would work perfectly fine with a "DataEvent" class that has a "data" property of type "Object" -- and then, people could attach a dictionary, as well (I know several developers who are too lazy to always create custom Event-subclasses with properties, LOL!) Would that help? |
Well it sounds reasonable to allow passing any object as the data instead of just a string. I'm using it a lot for instance for navigation actions: |
Makes sense, thanks for the suggestion! I'll make it so! =) |
As a side note I suggest you use the * type (data:*). |
The "data" property is now part of any Starling event object. That should settle this! =) |
Hello,
I know it's trivial, but while you're reimplementing the event dispatching model in Starling API you might as well include a DataEvent class.
The text was updated successfully, but these errors were encountered: