Re: Having problems with numberformat....
Hi Dar! On 01/11/06, Dar Scott [EMAIL PROTECTED] wrote: By the way, the numberFormat setting is not needed for a level of arithmetic accuracy. The result of arithmetic is always about 15 digits. The numberFormat comes into play the first time the result of arithmetic is used as text. OK The result of arithmetic will also pass as parameters just fine (though converted to text with numberFormat coming into play when passed using send). Great Literals do not need the zeros out to 12 places. So numberFormat is not used until the final result is put into the message box. This should generate the same result: on mouseDoubleUp put 0.006911491563 into projectedWidth get -1 * projectedWidth set the numberformat to #. put it end mouseDoubleUp This is not working. Not in a fresh button in a new stack and AFAIK nothing to do with any libraries (I am using OSX 10.4.8 and Rev 2.7.4). In otherwords the output of this script is: -0.006911 and not: -0.006911491563 I can get around it by adding and empty space as in the following script: on mouseUp put 0.006911491563 into projectedWidth get -1 * projectedWidth set the numberformat to #. put it empty end mouseUp which outputs: -0.006911491563 In previous versions ading zero to the number had the effect of forcing the number to be formatted. Now as you state this only happens when treating the number as a string - ie putting it into a field or doing a string maniplulation. As I am sending it to another application using AppleScript - I got caught. I think this is a bug - no? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Having problems with numberformat....
On Nov 2, 2006, at 3:17 PM, David Bovill wrote: put it empty I think this is a bug - no? Yes. But this might be understandable. It looks as though 'put it' will not (always) apply numberFormat and 'it empty' will. (BTW, the latter is a common way to force numberFormat in computation, so you are on the right track.) It looks as though 'put x' is compiled somewhat like an ordinary command and the number is passed as a parameter without number formatting as would be the case with most commands. The message box is partially implemented in scripts. I'm afraid I don't know how what gets compiled gets translated to some field in a stack. Does 'put it into msg' work? Dar ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Having problems with numberformat....
On 02/11/06, Dar Scott [EMAIL PROTECTED] wrote: Does 'put it into msg' work? No - same. But I need the 12 digit value passed to AppleScript - the message box was just an example. So it looks like I can do this with empty tagged on just before I need the result. Thanks for the help. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Having problems with numberformat....
On Nov 2, 2006, at 4:17 PM, David Bovill wrote: Does 'put it into msg' work? No - same. But I need the 12 digit value passed to AppleScript - the message box was just an example. So it looks like I can do this with empty tagged on just before I need the result. Thanks for the help. OK. Put that into bugzilla when you get a chance and are comfortable with that. Curious. What version and what OS? (should you have time...I can get it from the bug report.) When you create the text for the 'do' you will be using '', so you should not need to do that. But since your stuff is acting weird, I'm not sure. Dar ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Having problems with numberformat....
Well I am stuck. I have not idea why it does not work. I cannot pass these 12 place decimals as parameters and why the script below does not work beats me :( On 01/11/06, David Bovill [EMAIL PROTECTED] wrote: I am puzzled... Im dealing with numbers to 12 decimal places, so when doing maths on them I nedd to set the number format first to deal with this level of accuracy - fine, except I cant figure it - sometimes it is working and sometimes not :( Here is my test script: on mouseDoubleUp set the numberformat to #. put 0.006911491563 into projectedWidth put -1. * projectedWidth end mouseDoubleUp When I pasted this on a new stacks card script and doule click I get: -0.006911 When I paste the 3 lines of the handler into the message box - I get what i would expect: -0.006911491563 Why??? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Having problems with numberformat....
Hi David, I was able to replicate your result, but it seems to be related to putting the value into the message box. If I do this: set the numberformat to #. put 0.006911491563 into projectedWidth put -1. * projectedWidth into field 1 Then field 1 contains -0.006911491563 HTH, Sarah On 11/2/06, David Bovill [EMAIL PROTECTED] wrote: Well I am stuck. I have not idea why it does not work. I cannot pass these 12 place decimals as parameters and why the script below does not work beats me :( On 01/11/06, David Bovill [EMAIL PROTECTED] wrote: I am puzzled... Im dealing with numbers to 12 decimal places, so when doing maths on them I nedd to set the number format first to deal with this level of accuracy - fine, except I cant figure it - sometimes it is working and sometimes not :( Here is my test script: on mouseDoubleUp set the numberformat to #. put 0.006911491563 into projectedWidth put -1. * projectedWidth end mouseDoubleUp When I pasted this on a new stacks card script and doule click I get: -0.006911 When I paste the 3 lines of the handler into the message box - I get what i would expect: -0.006911491563 Why??? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Having problems with numberformat....
On Nov 1, 2006, at 8:57 PM, David Bovill wrote: Well I am stuck. I have not idea why it does not work. I cannot pass these 12 place decimals as parameters and why the script below does not work beats me :( This works fine for me. I'm on PPC OS X 10.4.7 using Rev 2.7.4. I hope that is a clue. Dar ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Having problems with numberformat....
On Nov 1, 2006, at 8:57 PM, David Bovill wrote: Well I am stuck. I have not idea why it does not work. I cannot pass these 12 place decimals as parameters and why the script below does not work beats me :( By the way, the numberFormat setting is not needed for a level of arithmetic accuracy. The result of arithmetic is always about 15 digits. The numberFormat comes into play the first time the result of arithmetic is used as text. The result of arithmetic will also pass as parameters just fine (though converted to text with numberFormat coming into play when passed using send). Literals do not need the zeros out to 12 places. So numberFormat is not used until the final result is put into the message box. This should generate the same result: on mouseDoubleUp put 0.006911491563 into projectedWidth get -1 * projectedWidth set the numberformat to #. put it end mouseDoubleUp Maybe you have some similar handler in a front script or in a button or something that is fooling with this. Dar ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution