Re: Problem with NW_WIDGET_FACTORY_window and content loading
Mark Anderson <[email protected]>
| Newsgroups | gmane.comp.windows.devel.netwindows |
|---|---|
| Message-ID | <[email protected]> |
> This works like a charm. I'm still miffed about my direct call to
> NW_WIDGET_FACTORY_window, but would like to know what people think about
> adding the two extra (optional) parameters to
> NW_WIDGET_window_create_load_append?
I'm not familiar with that particular function, but in general I believe
all "load"-like functions should make an async completion notification
possible.
I've seen these approaches:
1. pass in an object and methodname (as you've done).
2. pass in a single function (which of course can be a closure to call
some object and method; this is what burst currently does).
3. pass in an object which has to supply various particular methods, including
progress, error, and completion.
4. pass in nothing, but make the API associate the load method with a new
"document" object, and register for named events on that document object
(this is what the draft W3 "Load and Save" spec does).
The problem with 1 and 2 is that they don't provide a means for notification
of events other than completion.
The problem with 3 and 4 is that they are a little awkward for the
programmer to set up.
I think you should certainly go ahead with your plan (1).
In the long term, i think burst will adopt 4, just because that is the W3
model, and when I'm ambivalent i'd rather lean towards what
relevant standards do.
-mda
_______________________________________________
The netWindows developers list: [email protected]
http://netwindows.org/mailman/listinfo/devel_netwindows.org