from integer to floating point

2009-11-07 Thread Jacques Hausser

Can somebody help me ?

I just got something strange with 4-rc-1 and I would like

I have two successive handlers, shortened here, but the beginning is  
exact:


command changeClimat niveau
   lock screen
   set cursor to busy
   changeCouleur Niveau1,niveau
   -- do something
end changeClimat

command changeCouleur lacarte,depart
   put depart * 4 + 1 into debut
   -- do something
end changeCouleur

well, niveau is an integer, say 1159
depart is also an integer, 1159 as you would expect
... but debut is 4638.568627  (instead of 4637)

The variable names are NOT used anywhere else in the stack. If I past  
and test these handlers in another stack, they work as expected, so it  
is probably due to something in this stack, but what ? I just started  
with it this evening and it contains practically nothing except one  
slider (calling changeclimat with its thumbposition) and six images.


Many thanks for any idea - I have none left...

Jacques

**
Prof. Jacques Hausser
Department of Ecology and Evolution
Biophore / Sorge
University of Lausanne
CH 1015 Lausanne
please use my private address:
6 route de Burtigny
CH-1269 Bassins
tel/fax:++ 41 22 366 19 40
mobile: ++ 41 79 757 05 24
E-Mail: jacques.haus...@unil.ch
***

___
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: from integer to floating point

2009-11-07 Thread stephen barncard
when working with sliders or any time fractional numbers might involved,
it's useful to use the round(  function on such situations.
-
Stephen Barncard
San Francisco
http://houseofcubes.com/disco.irev


2009/11/7 Jacques Hausser jacques.haus...@unil.ch

 Can somebody help me ?

 I just got something strange with 4-rc-1 and I would like

 I have two successive handlers, shortened here, but the beginning is exact:

 command changeClimat niveau
   lock screen
   set cursor to busy
   changeCouleur Niveau1,niveau
   -- do something
 end changeClimat

 command changeCouleur lacarte,depart
   put depart * 4 + 1 into debut
   -- do something
 end changeCouleur

 well, niveau is an integer, say 1159
 depart is also an integer, 1159 as you would expect
 ... but debut is 4638.568627  (instead of 4637)

 The variable names are NOT used anywhere else in the stack. If I past and
 test these handlers in another stack, they work as expected, so it is
 probably due to something in this stack, but what ? I just started with it
 this evening and it contains practically nothing except one slider (calling
 changeclimat with its thumbposition) and six images.

 Many thanks for any idea - I have none left...

 Jacques

 **
 Prof. Jacques Hausser
 Department of Ecology and Evolution
 Biophore / Sorge
 University of Lausanne
 CH 1015 Lausanne
 please use my private address:
 6 route de Burtigny
 CH-1269 Bassins
 tel/fax:++ 41 22 366 19 40
 mobile: ++ 41 79 757 05 24
 E-Mail: jacques.haus...@unil.ch
 ***

 ___
 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: from integer to floating point

2009-11-07 Thread Sarah Reichelt
 The variable names are NOT used anywhere else in the stack. If I past and
 test these handlers in another stack, they work as expected, so it is
 probably due to something in this stack, but what ? I just started with it
 this evening and it contains practically nothing except one slider (calling
 changeclimat with its thumbposition) and six images.

It's an oddity of scrollbars that they appear to produce integers, but
actually they are floating point numbers. Round the thumbPositon
before sending it on and everything should be OK.

Cheers,
Sarah
___
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: from integer to floating point

2009-11-07 Thread Jacques Hausser

Thanks, Sarah and Stephen. It works !
So scrollbars issue bananaskinish integers... useful to know. I did  
never meet this problem till now.


Have a good sunday

Jacques


Le 8 nov. 2009 à 00:22, Sarah Reichelt a écrit :

The variable names are NOT used anywhere else in the stack. If I  
past and

test these handlers in another stack, they work as expected, so it is
probably due to something in this stack, but what ? I just started  
with it
this evening and it contains practically nothing except one slider  
(calling

changeclimat with its thumbposition) and six images.


It's an oddity of scrollbars that they appear to produce integers, but
actually they are floating point numbers. Round the thumbPositon
before sending it on and everything should be OK.

Cheers,
Sarah
___
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


**
Prof. Jacques Hausser
Department of Ecology and Evolution
Biophore / Sorge
University of Lausanne
CH 1015 Lausanne
please use my private address:
6 route de Burtigny
CH-1269 Bassins
tel/fax:++ 41 22 366 19 40
mobile: ++ 41 79 757 05 24
E-Mail: jacques.haus...@unil.ch
***

___
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