[Seaside] Problem with JSScript vs JSObject
Mariano Martinez Peck
marianopeck at gmail.com
Fri Jan 13 21:58:26 UTC 2017
Maybe it is because it's already Friday afternoon but I am failing to see
something obvious probably.
I render a div this way:
id: self chartId;
script: (chart wholeScriptOn: html).
And the method #wholeScriptOn: does:
wholeScriptOn: html | script chart | script := JSScript new. chart := self
makeChartOn: html. script << chart. ^ script
The method #makeChartOn: answers an instance of Highstock (subclass of
If I let the code as above, I get a client side error:
VM4229:1 Uncaught SyntaxError: Unexpected token $ in JSON at position 0
However...if I change wholeScriptOn: to be:
wholeScriptOn: html ^ self makeChartOn: html
So...what the hell is going on? As an instance of Highstock it works but as
a JSScript it doesn't?
Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside