-gus
> --
> JSCocoa: http://inexdo.com/JSCocoa
> Source: http://github.com/parmanoir/jscocoa/tree/master
> Docs: http://code.google.com/p/jscocoa/
> Group: http://groups.google.com/group/jscocoa
> Unsubscribe: jscocoa+u...@googlegroups.com
>
--
August 'Gus' Mueller
Flying Meat Inc.
http://flyingmeat.com/
> Thanks for the suggestion! Switching autoCall off and using
> context.textPreferences().tabString() oddly gets me the same response
> as before. What revision of JSCocoa are you using?
Whatever the latest is. I recently screwed up our module support, so you'll just have to checkout the source.
-gus
> Nevermind! No need for you to test anything, because I located the
> cause of the problem. There's some logic that checks strings to see
> if they are just a number and returns the number if so, and it was
> improperly setup to ignore whitespace
Ugh, that's sounds horrible :)
Where in the code is this? And I'm wondering if it can be turned on/off?
Gus : the conversion happens only on request during valueOf().
In Javascript, '4'*2 = 8.
Without that conversion, [NSString stringWithString:4]*2 fails. With it, NSString emulates standard Javascript behaviour. It is not dependent on autocall or anything else.
But it you want a switch to turn it off, I'm happy to oblige :)
if the comment attached to the function is correct
> Gus : the conversion happens only on request during valueOf().
> In Javascript, '4'*2 = 8.
> Without that conversion, [NSString stringWithString:4]*2 fails. With it, NSString emulates standard Javascript behaviour. It is not dependent on autocall or anything else.
>
> But it you want a switch to turn it off, I'm happy to oblige :)
If it's standard JS behavior- let's keep it in. It seems to do the right thing for '4' + 3, ('43'), but then gives 12 for '4'*3. Odd. JS. Whatever :)