Re: lingo-l cd name/listing from director

2002-08-10 Thread Andreas Gaunitz P11

Yea I did it too a while ago.

It's more or less a copy of the Mac folder window/ Windows Explorer 
but with company graphics. It launches applications too, so it can be 
used as a lecture tool at meetings, fairs etc. The user changes the 
contents and headlines by putting files and folders in the 
application's root folder.

-A.


On 8/9/02 11:02 AM, Andreas Gaunitz P11 [EMAIL PROTECTED] decreed
thusly:

  BTW, it's not a simple task to make a file browser =)

  -A.


Nah, but it can be done. I just did something simple with a text member and
recursive fun...

[To remove yourself from this list, or to change to digest mode, go 
to http://www.penworks.com/lingo-l.cgi  To post messages to the 
list, email [EMAIL PROTECTED]  (Problems, email 
[EMAIL PROTECTED]). Lingo-L is for learning and helping with 
programming Lingo.  Thanks!]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



Re: lingo-l cd name/listing from director

2002-08-10 Thread Tab Julius


You can use the CD Pro Xtra to do this - it'll give you a list of CDs, 
including volume name.

http://www.penworks.com/xtras/cdpro



At 04:53 AM 8/10/02, Andreas Gaunitz P11 wrote:
Yea I did it too a while ago.

It's more or less a copy of the Mac folder window/ Windows Explorer but 
with company graphics. It launches applications too, so it can be used as 
a lecture tool at meetings, fairs etc. The user changes the contents and 
headlines by putting files and folders in the application's root folder.

-A.


On 8/9/02 11:02 AM, Andreas Gaunitz P11 [EMAIL PROTECTED] decreed
thusly:

  BTW, it's not a simple task to make a file browser =)

  -A.

Nah, but it can be done. I just did something simple with a text member and
recursive fun...

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



Re: lingo-l A major disaster

2002-08-10 Thread Beertje

Hi Buzz,

I'm sorry, but I am getting no results of any kind with this.

George

- Original Message -
From: Buzz Kettles [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 09, 2002 22:49
Subject: Re: lingo-l A major disaster


 put this script on a button,
 setup the destination member field's member number
 setup the amount you want t
 o display

 
 property theField, amount

 on beginSprite me
theField = member(1) -- set the destination field member
theField.text = 0
amount = $100  -- set the amount you want loaded
 end

 on mouseUp me
if theField.text = 0 then theField.text = amount
else theField.text = 0
 end

 hth

 -Buzz

 At 8:05 PM -0400 8/9/02, you wrote:
 Greetings,
 
 A week or so ago I got some major help from this list and last week I had
a
 major disaster. I lost virtually every director movie I had after a hard
 drive crash. I am now starting all over again and I am trying to find the
 script that allows me to click on a button and place a dollar amount into
a
 field and click on it again and place 0 in that same field. I hope I
 explained this correctly.
 
 Thanks in advance,
 
 George Carlile
 [EMAIL PROTECTED]
 
 PS. Backup is now my key word of the day.
 
 [To remove yourself from this list, or to change to digest mode, go
 to http://www.penworks.com/lingo-l.cgi  To post messages to the
 list, email [EMAIL PROTECTED]  (Problems, email
 [EMAIL PROTECTED]). Lingo-L is for learning and helping with
 programming Lingo.  Thanks!]

 [To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is
for learning and helping with programming Lingo.  Thanks!]


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



Re: lingo-l A major disaster

2002-08-10 Thread Buzz Kettles

If your field is member(1),
Clicking on the button pops a value ($100) into the field  a second 
click pops a zero in.

That's what I thought your description said you wanted.


allows me to click on a button and place a dollar amount into a 
field and click on it again and place 0 in that same field

Did you?
#1 put the script on a button sprite?
#2 change member(1) to be the field member?
#3 choose the amount you wanted (instead of $100)

hth

-Buzz

At 9:10 AM -0400 8/10/02, you wrote:
Hi Buzz,

I'm sorry, but I am getting no results of any kind with this.

George

- Original Message -
From: Buzz Kettles [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 09, 2002 22:49
Subject: Re: lingo-l A major disaster

   put this script on a button,
   setup the destination member field's member number
   setup the amount you want to display
  

  
  property theField, amount

  on beginSprite me
 theField = member(1) -- set the destination field member
 theField.text = 0
 amount = $100  -- set the amount you want loaded
  end

  on mouseUp me
 if theField.text = 0 then theField.text = amount
 else theField.text = 0
  end

  hth

  -Buzz

  At 8:05 PM -0400 8/9/02, you wrote:
  Greetings,
  
  A week or so ago I got some major help from this list and last week I had
a
  major disaster. I lost virtually every director movie I had after a hard
  drive crash. I am now starting all over again and I am trying to find the
   script that allows me to click on a button and place a dollar amount into
a
   field and click on it again and place 0 in that same field. I hope I
  explained this correctly.
  
  Thanks in advance,
  
  George Carlile
  [EMAIL PROTECTED]
  
  PS. Backup is now my key word of the day.
  
  [To remove yourself from this list, or to change to digest mode, go
  to http://www.penworks.com/lingo-l.cgi  To post messages to the
  list, email [EMAIL PROTECTED]  (Problems, email
  [EMAIL PROTECTED]). Lingo-L is for learning and helping with
  programming Lingo.  Thanks!]

  [To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is
for learning and helping with programming Lingo.  Thanks!]


[To remove yourself from this list, or to change to digest mode, go 
to http://www.penworks.com/lingo-l.cgi  To post messages to the 
list, email [EMAIL PROTECTED]  (Problems, email 
[EMAIL PROTECTED]). Lingo-L is for learning and helping with 
programming Lingo.  Thanks!]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



Re: lingo-l A major disaster

2002-08-10 Thread Beertje

Hi Buzz,

I have no idea what I did wrong the first time, but I went back and redid it
and it works fine now. Thank you sir.

George

- Original Message -
From: Buzz Kettles [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, August 10, 2002 16:43
Subject: Re: lingo-l A major disaster


 If your field is member(1),
 Clicking on the button pops a value ($100) into the field  a second
 click pops a zero in.

 That's what I thought your description said you wanted.


 allows me to click on a button and place a dollar amount into a
 field and click on it again and place 0 in that same field

 Did you?
 #1 put the script on a button sprite?
 #2 change member(1) to be the field member?
 #3 choose the amount you wanted (instead of $100)

 hth

 -Buzz

 At 9:10 AM -0400 8/10/02, you wrote:
 Hi Buzz,
 
 I'm sorry, but I am getting no results of any kind with this.
 
 George
 
 - Original Message -
 From: Buzz Kettles [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, August 09, 2002 22:49
 Subject: Re: lingo-l A major disaster
 
put this script on a button,
setup the destination member field's member number
setup the amount you want to display
   
 
   
   property theField, amount
 
   on beginSprite me
  theField = member(1) -- set the destination field member
  theField.text = 0
  amount = $100  -- set the amount you want loaded
   end
 
   on mouseUp me
  if theField.text = 0 then theField.text = amount
  else theField.text = 0
   end
 
   hth
 
   -Buzz
 
   At 8:05 PM -0400 8/9/02, you wrote:
   Greetings,
   
   A week or so ago I got some major help from this list and last week I
had
 a
   major disaster. I lost virtually every director movie I had after a
hard
   drive crash. I am now starting all over again and I am trying to find
the
script that allows me to click on a button and place a dollar amount
into
 a
field and click on it again and place 0 in that same field. I hope I
   explained this correctly.
   
   Thanks in advance,
   
   George Carlile
   [EMAIL PROTECTED]
   
   PS. Backup is now my key word of the day.
   
   [To remove yourself from this list, or to change to digest mode, go
   to http://www.penworks.com/lingo-l.cgi  To post messages to the
   list, email [EMAIL PROTECTED]  (Problems, email
   [EMAIL PROTECTED]). Lingo-L is for learning and helping with
   programming Lingo.  Thanks!]
 
   [To remove yourself from this list, or to change to digest mode, go to
 http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
 [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L
is
 for learning and helping with programming Lingo.  Thanks!]
 
 
 [To remove yourself from this list, or to change to digest mode, go
 to http://www.penworks.com/lingo-l.cgi  To post messages to the
 list, email [EMAIL PROTECTED]  (Problems, email
 [EMAIL PROTECTED]). Lingo-L is for learning and helping with
 programming Lingo.  Thanks!]

 [To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is
for learning and helping with programming Lingo.  Thanks!]


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



lingo-l Crazy numbers

2002-08-10 Thread Beertje

I am using the following script to add the text of field and I am getting
some crazy numbers.

on mouseUp
  put the text of field Cost1 + the text of field Cost2 into field
Total
  updateStage
end

The field Cost1 is 27935 and the field Cost2 is 5500 and field Total is
showing 1236921976.

What am I doing wrong here?

Thanks in advance,

George Carlile
[EMAIL PROTECTED]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



RE: lingo-l Crazy numbers

2002-08-10 Thread Thomas Higgins

George,

 on mouseUp
   put the text of field Cost1 + the text of field Cost2 into field
 Total
   updateStage
 end
 
 The field Cost1 is 27935 and the field Cost2 is 5500 and 
 field Total is showing 1236921976.

Using your exact code I get 33435. in my field member named total (the correct 
answer coverted to a float). Are you sure you don't have multiple members sharing 
names and thus you might be expecting to get the result of 27935+5500 but you're 
actually getting some other numbers resulting in an unexpected value?

Cheers,
Tom

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



Re: lingo-l Crazy numbers

2002-08-10 Thread Buzz Kettles

try using: the value of field

instead of: the text of field

reason:
the text of field is a string
the value of field is the number

you want to add, so you need numbers

hth

-Buzz

At 5:12 PM -0400 8/10/02, you wrote:
I am using the following script to add the text of field and I am getting
some crazy numbers.

on mouseUp
   put the text of field Cost1 + the text of field Cost2 into field
Total
   updateStage
end

The field Cost1 is 27935 and the field Cost2 is 5500 and field Total is
showing 1236921976.

What am I doing wrong here?

Thanks in advance,

George Carlile
[EMAIL PROTECTED]

[To remove yourself from this list, or to change to digest mode, go 
to http://www.penworks.com/lingo-l.cgi  To post messages to the 
list, email [EMAIL PROTECTED]  (Problems, email 
[EMAIL PROTECTED]). Lingo-L is for learning and helping with 
programming Lingo.  Thanks!]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



Re: lingo-l Crazy numbers

2002-08-10 Thread Beertje

I renamed all the fields, changed the names to match in the behavior and now
I get 1236930056.4000. I think my computer is cursed :)))

- Original Message -
From: Thomas Higgins [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, August 10, 2002 17:21
Subject: RE: lingo-l Crazy numbers


 George,

  on mouseUp
put the text of field Cost1 + the text of field Cost2 into field
  Total
updateStage
  end
 
  The field Cost1 is 27935 and the field Cost2 is 5500 and
  field Total is showing 1236921976.

 Using your exact code I get 33435. in my field member named total
(the correct answer coverted to a float). Are you sure you don't have
multiple members sharing names and thus you might be expecting to get the
result of 27935+5500 but you're actually getting some other numbers
resulting in an unexpected value?

 Cheers,
 Tom

 [To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is
for learning and helping with programming Lingo.  Thanks!]


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



Re: lingo-l Crazy numbers

2002-08-10 Thread Beertje

Buzz, you are a genius.

Thanx a bunch.


- Original Message -
From: Buzz Kettles [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, August 10, 2002 17:34
Subject: Re: lingo-l Crazy numbers


 try using: the value of field

 instead of: the text of field

 reason:
 the text of field is a string
 the value of field is the number

 you want to add, so you need numbers

 hth

 -Buzz

 At 5:12 PM -0400 8/10/02, you wrote:
 I am using the following script to add the text of field and I am getting
 some crazy numbers.
 
 on mouseUp
put the text of field Cost1 + the text of field Cost2 into field
 Total
updateStage
 end
 
 The field Cost1 is 27935 and the field Cost2 is 5500 and field Total
is
 showing 1236921976.
 
 What am I doing wrong here?
 
 Thanks in advance,
 
 George Carlile
 [EMAIL PROTECTED]
 
 [To remove yourself from this list, or to change to digest mode, go
 to http://www.penworks.com/lingo-l.cgi  To post messages to the
 list, email [EMAIL PROTECTED]  (Problems, email
 [EMAIL PROTECTED]). Lingo-L is for learning and helping with
 programming Lingo.  Thanks!]

 [To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is
for learning and helping with programming Lingo.  Thanks!]


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



Re: lingo-l Crazy numbers

2002-08-10 Thread Beertje

One last question, how do I keep the decimal points to 2 ?
- Original Message -
From: Buzz Kettles [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, August 10, 2002 17:34
Subject: Re: lingo-l Crazy numbers


 try using: the value of field

 instead of: the text of field

 reason:
 the text of field is a string
 the value of field is the number

 you want to add, so you need numbers

 hth

 -Buzz

 At 5:12 PM -0400 8/10/02, you wrote:
 I am using the following script to add the text of field and I am getting
 some crazy numbers.
 
 on mouseUp
put the text of field Cost1 + the text of field Cost2 into field
 Total
updateStage
 end
 
 The field Cost1 is 27935 and the field Cost2 is 5500 and field Total
is
 showing 1236921976.
 
 What am I doing wrong here?
 
 Thanks in advance,
 
 George Carlile
 [EMAIL PROTECTED]
 
 [To remove yourself from this list, or to change to digest mode, go
 to http://www.penworks.com/lingo-l.cgi  To post messages to the
 list, email [EMAIL PROTECTED]  (Problems, email
 [EMAIL PROTECTED]). Lingo-L is for learning and helping with
 programming Lingo.  Thanks!]

 [To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is
for learning and helping with programming Lingo.  Thanks!]


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



Re: lingo-l Crazy numbers

2002-08-10 Thread Buzz Kettles

Thanks for the compliment, but Tom's also correct -
There's no need to use 'value'
(Director automatically converts for you)

 I get the expected value either way

-Buzz

At 2:34 PM -0700 8/10/02, you wrote:
try using: the value of field

instead of: the text of field

reason:
the text of field is a string
the value of field is the number

you want to add, so you need numbers

hth

-Buzz

At 5:12 PM -0400 8/10/02, you wrote:
I am using the following script to add the text of field and I am getting
some crazy numbers.

on mouseUp
   put the text of field Cost1 + the text of field Cost2 into field
Total
   updateStage
end

The field Cost1 is 27935 and the field Cost2 is 5500 and field Total is
showing 1236921976.

What am I doing wrong here?

Thanks in advance,

George Carlile
[EMAIL PROTECTED]

[To remove yourself from this list, or to change to digest mode, go 
to http://www.penworks.com/lingo-l.cgi  To post messages to the 
list, email [EMAIL PROTECTED]  (Problems, email 
[EMAIL PROTECTED]). Lingo-L is for learning and helping with 
programming Lingo.  Thanks!]

[To remove yourself from this list, or to change to digest mode, go 
to http://www.penworks.com/lingo-l.cgi  To post messages to the 
list, email [EMAIL PROTECTED]  (Problems, email 
[EMAIL PROTECTED]). Lingo-L is for learning and helping with 
programming Lingo.  Thanks!]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



RE: lingo-l Crazy numbers

2002-08-10 Thread Thomas Higgins

George,

 One last question, how do I keep the decimal points to 2 ?

the floatPrecision = 2

Done!

Cheers,
Tom
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



Re: lingo-l Crazy numbers

2002-08-10 Thread Tab Julius


   the floatPrecision =2



At 05:43 PM 8/10/02, Beertje wrote:
One last question, how do I keep the decimal points to 2 ?
- Original Message -
From: Buzz Kettles [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, August 10, 2002 17:34
Subject: Re: lingo-l Crazy numbers


  try using: the value of field
 
  instead of: the text of field
 
  reason:
  the text of field is a string
  the value of field is the number
 
  you want to add, so you need numbers
 
  hth
 
  -Buzz
 
  At 5:12 PM -0400 8/10/02, you wrote:
  I am using the following script to add the text of field and I am getting
  some crazy numbers.
  
  on mouseUp
 put the text of field Cost1 + the text of field Cost2 into field
  Total
 updateStage
  end
  
  The field Cost1 is 27935 and the field Cost2 is 5500 and field Total
is
  showing 1236921976.
  
  What am I doing wrong here?
  
  Thanks in advance,
  
  George Carlile
  [EMAIL PROTECTED]
  
  [To remove yourself from this list, or to change to digest mode, go
  to http://www.penworks.com/lingo-l.cgi  To post messages to the
  list, email [EMAIL PROTECTED]  (Problems, email
  [EMAIL PROTECTED]). Lingo-L is for learning and helping with
  programming Lingo.  Thanks!]
 
  [To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is
for learning and helping with programming Lingo.  Thanks!]
 

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L 
is for learning and helping with programming Lingo.  Thanks!]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



RE: lingo-l Crazy numbers

2002-08-10 Thread Thomas Higgins

 try using: the value of field
 
 instead of: the text of field
 
 reason:
 the text of field is a string
 the value of field is the number
 
 you want to add, so you need numbers

Close. I just got the scoop from Nuuj:

Lingo looks at the line of code, sees that it's a math operation and then decides what 
the resulting data type will be. If all arguments are integers then the result will be 
an integer, if not then the result will be a float. In the case cited, neither 
argument is an integer (they're both strings) and therefore the resulting data type is 
a float and so Director then tries to convert the type of each argument to a float 
(please see my PS about converting strings to floats), in doing so 27935 becomes 
27935.0 and 5500 becomes 5500.0, then the addition is performed add should return 
the correct result.

The above is true no matter what data type you pass into the equation:

x = FALSE + 1
-- first FALSE is converted to an integer
x = 0 + 1
-- both args are ints, no conversion needed so
put x
-- x = 2

y = TRUE + 5.0
-- first TRUE is converted to an integer
y = 1 + 5.0
-- both args are not integers, convert each to a float
y = 1.0 + 5.0
-- do the math now...
put y
-- 6.

z = 3 + 5
-- neither are integers, convert them to floats
z = 3.0 + 5.0
-- do the math
put z
-- 8.

w = 3.0 * 14
-- both args are not integers, convert each to a float
w = 3.0 * 14.0
-- do the math
put w
-- 42.000

I figure that's enough to get the point across, if not then give a holler.

Cheers,
Tom

P.S. When type converting strings in this fashion be careful of things like this:

test = 1 + 4 * 3

This will *not* work as the string is parsed to see if it's a number, as soon as the 
space is found that fails. It would be more optimal to have Lingo _value_ the string 
found instead of parse it, but it doesn't, sorry.
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



RE: lingo-l Crazy numbers

2002-08-10 Thread Thomas Higgins

Also keep in mind that under the hood Director is always tracking floats out to 15 
decimal places, setting the floatPrecision only adjusts how many decimal places are 
used for value display (upon conversion to a string).

Cheers,
Tom

 -Original Message-
 From: Thomas Higgins [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, August 10, 2002 2:50 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: lingo-l Crazy numbers
 
 
 George,
 
  One last question, how do I keep the decimal points to 2 ?
 
 the floatPrecision = 2
 
 Done!
 
 Cheers,
 Tom
 [To remove yourself from this list, or to change to digest 
 mode, go to http://www.penworks.com/lingo-l.cgi  To post 
 messages to the list, email [EMAIL PROTECTED]  (Problems, 
 email [EMAIL PROTECTED]). Lingo-L is for learning and 
 helping with programming Lingo.  Thanks!]
 
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



RE: lingo-l Crazy numbers

2002-08-10 Thread Thomas Higgins

All,

 x = FALSE + 1
 -- first FALSE is converted to an integer
 x = 0 + 1
 -- both args are ints, no conversion needed so
 put x
 -- x = 2

Pardon the idiotic Tom Math, x would be 1 after this. :P

Doh!

Cheers,
Tom
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



Re: lingo-l Crazy numbers

2002-08-10 Thread g r i m m w e r k s

On 8/10/02 5:12 PM, Beertje [EMAIL PROTECTED] decreed thusly:

 on mouseUp
 put the text of field Cost1 + the text of field Cost2 into field
 Total
 updateStage
 end

on mouseUp
  put int(the text of field Cost1) + int(the text of field Cost2) into
field
Total
  updateStage
end

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



Re: lingo-l Crazy numbers

2002-08-10 Thread Buzz Kettles

int()?:)

(I know you probably meant integer()

-Buzz

At 7:42 PM -0400 8/10/02, you wrote:
On 8/10/02 5:12 PM, Beertje [EMAIL PROTECTED] decreed thusly:

  on mouseUp
  put the text of field Cost1 + the text of field Cost2 into field
  Total
  updateStage
  end

on mouseUp
   put int(the text of field Cost1) + int(the text of field Cost2) into
field
Total
   updateStage
end

[To remove yourself from this list, or to change to digest mode, go 
to http://www.penworks.com/lingo-l.cgi  To post messages to the 
list, email [EMAIL PROTECTED]  (Problems, email 
[EMAIL PROTECTED]). Lingo-L is for learning and helping with 
programming Lingo.  Thanks!]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]



RE: lingo-l Crazy numbers

2002-08-10 Thread Buzz Kettles

At 3:03 PM -0700 8/10/02, you wrote:
   x = 0 + 1
   put x
   -- x = 2

Tell the truth Tom -
you've been workin' on the side for Enron or WorldCom, right?
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]