renggli at gmail.com
Tue Jul 22 19:47:30 UTC 2008
> > If you put a String there, it is serialized as a String as well. Use
> > SUStresm on: 'alert("foo")'
> Just curious - would this be the more common usage? Would it make sense to
> have ST strings convert to JS expressions (unquoted)? Should be easy to add
> the quotes if that is what is desired.
For me it is the only logical usage. The following Smalltalk objects
Character, Collection, Color, Date, Dictionary, Duration, Interval,
complicated right now. This could be simplified by adding a converter
message to String. I haven't found the perfect name of this message
yet, but something along
^ SUStream on: self
I also agree that putting a String into an event handler does not make
sense in any case. This could be resolved by adding something along
(all event handler automatically call #asFunction on the event
^ (SUStream on: self) asFunction
However this would mean that depending on the context where an object
is used it gets converted to something else. I don't know if this is
good or bad? Up to now I decided against doing it, but since
discussion came up it is maybe time to change? What do you think?
More information about the seaside