#updateRoot: for children of #WABrush?

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

#updateRoot: for children of #WABrush?

Rick Flower
Just curious if I've got a class derived from WABrush, is there a way to
force some javascript to be spit out similar to what you get with the
#updateRoot: method available in WAComponent object tree?  I looked at
the listed of implementors for #updateRoot: but didn't see anything
horribly interesting..  Anyway, just thought I'd ask.. time for bed.. my
brain is getting too sleepy.. (8->
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: #updateRoot: for children of #WABrush?

Lukas Renggli
> Just curious if I've got a class derived from WABrush, is there a way to
> force some javascript to be spit out similar to what you get with the
> #updateRoot: method available in WAComponent object tree?  I looked at
> the listed of implementors for #updateRoot: but didn't see anything
> horribly interesting..  Anyway, just thought I'd ask.. time for bed.. my
> brain is getting too sleepy.. (8->

If you have loaded Scriptaculous:

    self script: 'alert("from the brush")'

If you don't:

   WACurrentSession value addLoadScript: 'alert("from the brush")'

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: #updateRoot: for children of #WABrush?

Rick Flower
Lukas Renggli wrote:

>> Just curious if I've got a class derived from WABrush, is there a way to
>> force some javascript to be spit out similar to what you get with the
>> #updateRoot: method available in WAComponent object tree?  I looked at
>> the listed of implementors for #updateRoot: but didn't see anything
>> horribly interesting..  Anyway, just thought I'd ask.. time for bed.. my
>> brain is getting too sleepy.. (8->
>
> If you have loaded Scriptaculous:
>
>    self script: 'alert("from the brush")'
>
> If you don't:
>
>   WACurrentSession value addLoadScript: 'alert("from the brush")'
>
Lukas --

Thanks!  I'll check it out..
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: #updateRoot: for children of #WABrush?

Rick Flower
In reply to this post by Lukas Renggli
Lukas Renggli wrote:

> If you have loaded Scriptaculous:
>
>    self script: 'alert("from the brush")'
>
> If you don't:
>
>   WACurrentSession value addLoadScript: 'alert("from the brush")'

By the way-- I ended up using the following which also works great and
puts the script in the head and not inline with the regular HTML stuff :

    app := WACurrentSession value application.
   (app libraries includes: MyScripts) ifFalse:
      [ app addLibrary: MyScripts ].

Works like a charm.. Thanks again for the suggestion!
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside