Iliad widgets can't update page information

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Iliad widgets can't update page information

Eli Green-3
Odd; I sent this message yesterday but it doesn't seem to have reached GNU's servers...

I think there is a case for calling updatePage: on Widgets in Iliad. I would like to implement a Map control - initially with a Google Maps implementation but it would be cool if the backend could be pluggable so we could also use Microsoft Live (Bing?) maps and Yahoo and whoever else.

Anyway, it involves adding some code to the body onLoad handler and adding some .js files to the header. Is there a way now for a widget to do this or does the Application have to? I think the easiest thing would be to have a list of resources that each widget requires to make sure that they only get included once, rather than forcing the developer of the Application to refer to the correct javascript and CSS files in any application that uses them. I'm sure I could think of instances where somebody would want to maps on the same page.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Iliad widgets can't update page information

Stefan Schmiedl
On Tue, 13 Oct 2009 18:06:21 +0200
Eli Green <[hidden email]> wrote:

> Anyway, it involves adding some code to the body onLoad handler and adding some .js files to the header. Is there a way now for a widget to do this or does the Application have to?

If all else fails, hack, errm override Application>>updatePage: with your own code.
You could then maintain a modifiable collection of things to include.
The widgets could add their dependencies to that collection in their content-method.

There might be some pitfalls with this whole approach, though.

What will happen, if you add a widget requiring an onLoad handler via AJAX
to an existing page? Will onLoad be executed again? Will the widget fail?

s.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk