You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jeremy Quinn <je...@apache.org> on 2006/11/14 12:46:43 UTC
toSource() function missing from FlowScript ?
Hi All
On the Users list :
http://marc.theaimsgroup.com/?l=xml-cocoon-
users&m=116114940529489&w=2
We were having a discussion about the easiest way to send FlowScript
Objects as JSON data to the client.
I suggested using the Object.toSource() function explained here :
http://developer.mozilla.org/en/docs/
Core_JavaScript_1.5_Reference:Global_Objects:Object:toSource
TBH I had not actually tried it when I sent that advice, now I am
trying it, I find that toSource() is not implemented in the version
of Rhino used in FlowScript.
According to the docs above, toSource was added in Javascript 1.3.
Can anyone explain what is going wrong ?
thanks
regards Jeremy
Re: toSource() function missing from FlowScript ?
Posted by Jeremy Quinn <je...@apache.org>.
On 14 Nov 2006, at 14:26, Jason Johnston wrote:
> Jeremy Quinn wrote:
>> Hi All
>> On the Users list :
>> http://marc.theaimsgroup.com/?l=xml-cocoon-
>> users&m=116114940529489&w=2
>> We were having a discussion about the easiest way to send
>> FlowScript Objects as JSON data to the client.
>> I suggested using the Object.toSource() function explained here :
>> http://developer.mozilla.org/en/docs/
>> Core_JavaScript_1.5_Reference:Global_Objects:Object:toSource TBH I
>> had not actually tried it when I sent that advice, now I am trying
>> it, I find that toSource() is not implemented in the version of
>> Rhino used in FlowScript.
>> According to the docs above, toSource was added in Javascript 1.3.
>
>
> According to the Rhino changelog[1], toSource/uneval support was
> added in Rhino 1.5R5. Cocoon 2.1.x uses a forked 1.5R4, so yes it
> would be missing support. Cocoon trunk uses Rhino 1.6 so support
> should be there.
>
> [1] http://www.mozilla.org/rhino/rhino15R5.html
Many thanks for the explanation.
best regards
Jeremy
Re: toSource() function missing from FlowScript ?
Posted by Jason Johnston <co...@lojjic.net>.
Jeremy Quinn wrote:
> Hi All
>
> On the Users list :
>
> http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=116114940529489&w=2
>
> We were having a discussion about the easiest way to send FlowScript
> Objects as JSON data to the client.
>
> I suggested using the Object.toSource() function explained here :
>
>
> http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object:toSource
>
>
> TBH I had not actually tried it when I sent that advice, now I am trying
> it, I find that toSource() is not implemented in the version of Rhino
> used in FlowScript.
>
> According to the docs above, toSource was added in Javascript 1.3.
According to the Rhino changelog[1], toSource/uneval support was added
in Rhino 1.5R5. Cocoon 2.1.x uses a forked 1.5R4, so yes it would be
missing support. Cocoon trunk uses Rhino 1.6 so support should be there.
[1] http://www.mozilla.org/rhino/rhino15R5.html