[Seaside] Is there an easy way to decorate Canvas elements
toincorporate other toolkits?
boris at deepcovelabs.com
Thu May 15 13:45:00 UTC 2008
You could try subclassing WARenderCanvas and overriding,
^(super brush: tag)
dojoType: tag dojoType;
-Boris (via BlackBerry)
----- Original Message -----
From: seaside-bounces at lists.squeakfoundation.org <seaside-bounces at lists.squeakfoundation.org>
To: seaside at lists.squeakfoundation.org <seaside at lists.squeakfoundation.org>
Sent: Thu May 15 05:37:57 2008
Subject: [Seaside] Is there an easy way to decorate Canvas elements toincorporate other toolkits?
I am new to Seaside, and am playing around and kicking the tires.
I wanted to do a demo for some of my colleagues and one of the things we
played around with a few weeks ago was Dojo (which really impressed quite
a few people).
I have read posts about how Dojo is not the way to go - however as part of
my playing around with the technology I wanted to see if I could incoporate
some Dojo look and feel stuff into my simple Seaside tutorial app.
One thing that struck me, is that my app is happily rendering some forms
using things like:
html textInput callback: [:value | self user userName: value]; value:
self user userName]
To get a Dojo look and feel all I need to do is render html that looks a
bit like the following:
<input type="text" length="20" name="first" dojoType="dijit.form.TextBox">
So it occurs to me that the html canvas that I am passing in to my seaside
components could be decorated (or have a different rendering strategy) in
some way so that it outputs things in a different manner.
This sounds like it should be easy - however my first look at the world of
WARenderCanvas doesn't make it look like rendering is done with a strategy
pattern in mind?
While I could add extra dojo methods to the canvas - it seems like I should
be able to plug in a different strategy but code like:
^ self brush: WATextInputTag new
Seems like its all hard coded without this in mind.
Is there some easy way to do this another way? I suppose I could wrap the
Canvas in something else that doesn't forward methods like #textInput and
does something else - but I'm not sure where I hook in to do that.
Any tips or starting points would be greatly appreciated.
seaside mailing list
seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside