[xinf] DOM Events?
hank williams
hank777 at gmail.com
Fri Jun 23 17:34:11 CEST 2006
Ok, so I am going to suggest what I said before was my idea as to how to
resolve this issue. Remember Nicolas you promised to listen :). It would
require a change to haxe, but it could solve the problem.
Basically, when a file or project is compiled, an "events identifier"
directory is identified on the command line. The file contains a platform
neutral (XML) description which includes the unique name of all the events
published and all the events subscribed to. Each XML event descriptor has as
a field a name which helps to semantically disambiguate. Each event
descriptor also has all the fields and field types for the data associated
with the event.
So within the events identifier directory there are two folders, one for
published events, and one for subscribed to events. The compiler generates
an error if any event in the subscribers folder has a name that matches a
name in the publishers folder but where the event field types do not match.
This would allow for Nicloas's type checking at compilation time. It would
also allow cross platform communications by allowing other languages to see
what events are available for a given module, and how to communicate with
it. No specialized code would be required for anyone to play here. Of course
your C code isnt going to get the benefit of the type checking without a
preprocessor, but even this is possible.
Of course I havent read the full w3c events spec, but I bet I am just
suggesting something that in some form or another they have already thought
of.
Regards
Hank
On 6/23/06, daniel fischer <dan at f3c.com> wrote:
>
> "hank williams" <hank777 at gmail.com> (on Fri, 23 Jun 2006 10:04:59 -0400):
>
> > I need a way to communicate semantic
> > intent of the event. Your system doesnt do that
>
> seems you are right here. semantics in nicolas' proposal are implied by
> the dispatcher variable "name". i'd prefer explicit "event types" ("what
> happened?") too. i cannot think of anythin better than string, although
> using strings also poses problems...
>
> deadlocked?
>
> -dan
>
> --
> http://0xDF.com/
> http://iterative.org/
>
> --
> xinf is not flash
> http://xinf.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xinf.org/pipermail/xinf/attachments/20060623/9b10981f/attachment.htm
More information about the xinf
mailing list