Page 2 of 2

Posted: Mon May 24, 2010 7:29 pm
by JensAyton
Eric Walch wrote:
Than, in the js script of the splinter I use: message.replace("@1", quantity)
I use not an ascii plist but an XML plist. There quantity is explicit defined as an integer. For some reason it is now replacing the "@1" with the word "true". Currently I have no clue why.
The reason is that the bridge between Objective-C objects and JavaScript values tries to distinguish between boolean and integer NSNumbers, but this distinction does not exist in GNUstep. This is an annoying design decision, but not strictly a bug.

As of r3403 r3404, Oolite no longer tries do this. Instead, the inverse problem will happen: <true/> and <false/> will be converted to 1 and 0 (consistently on all platforms). This is less of an issue because if (1) and if (0) work exactly like if (true) and if (false).

This doesn’t affect OpenStep plists since they have no boolean type.