Hi,
Does Split return the number of elements in the array it created? If not what is the typical way to determine how long the array is?
Thanks,
Shawn
Search found 18 matches
- Mon Jul 11, 2011 3:28 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Does Split return number of elements
- Replies: 1
- Views: 2652
- Fri May 06, 2011 3:47 pm
- Forum: iOS Deployment
- Topic: keydown on script?
- Replies: 1
- Views: 2902
keydown on script?
Hi,
I have the commercial version of Livecode for desktop apps. I'm thinking about a simple IOS app but before I spend money on a development environment I wanted to confirm if something can be done on IOS first.
On the card or stack script can you look for keydown without having the IOS keyboard ...
I have the commercial version of Livecode for desktop apps. I'm thinking about a simple IOS app but before I spend money on a development environment I wanted to confirm if something can be done on IOS first.
On the card or stack script can you look for keydown without having the IOS keyboard ...
- Sat Jan 01, 2011 8:03 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Math problem with DIV?
- Replies: 11
- Views: 10314
Re: Math problem with DIV?
Bernd,
Sure, but if you have LiveCode multiple 2.30 * 100 and give you the answer it gives you an integer.
It is confusing and inconsistent that what it tells you the answer is isn't really what it is using for the answer in later calculations.
Thanks again for the help,
Shawn
Sure, but if you have LiveCode multiple 2.30 * 100 and give you the answer it gives you an integer.
It is confusing and inconsistent that what it tells you the answer is isn't really what it is using for the answer in later calculations.
Thanks again for the help,
Shawn
- Sat Jan 01, 2011 7:28 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Math problem with DIV?
- Replies: 11
- Views: 10314
Re: Math problem with DIV?
Added the round function like in your example and it seems to work now. It is kind of odd that the math engine isn't coming up with a whole number for 2.30 * 100.
Thanks,
Shawn
Thanks,
Shawn
- Sat Jan 01, 2011 7:14 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Math problem with DIV?
- Replies: 11
- Views: 10314
Re: Math problem with DIV?
Bernd,
Even if I convert everything to cents (so all integer math) DIV still works inconsistently. Works properly starting with:
put "1.30" into change
change that to
put "2.30" into change
and it doesn't work again.
put "1.30" into change
put change * 100 into change -- convert to pennies ...
Even if I convert everything to cents (so all integer math) DIV still works inconsistently. Works properly starting with:
put "1.30" into change
change that to
put "2.30" into change
and it doesn't work again.
put "1.30" into change
put change * 100 into change -- convert to pennies ...
- Sat Jan 01, 2011 6:10 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Math problem with DIV?
- Replies: 11
- Views: 10314
Math problem with DIV?
Anyone else seen problems with DIV when used with decimals? I am using it to break an amount of money into change. It seems to mishandle the pennies on occasion.
Try the following code....
put "1.30" into change
put change div 20 into temp
if temp > 0 then
put temp && " Twenty Dollar Bill(s ...
Try the following code....
put "1.30" into change
put change div 20 into temp
if temp > 0 then
put temp && " Twenty Dollar Bill(s ...
- Thu Apr 08, 2010 6:59 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Multi-threading a button action?
- Replies: 20
- Views: 18686
Re: Multi-threading a button action?
"Just curious, which 4th level language offers threading?"
No idea, I don't care what others can or can not do. I care what Revolution can or can not do.
If no others do that is all the more reason why Revolution should, it would differentiate itself from others. If others can and Revolution can ...
No idea, I don't care what others can or can not do. I care what Revolution can or can not do.
If no others do that is all the more reason why Revolution should, it would differentiate itself from others. If others can and Revolution can ...
- Wed Apr 07, 2010 11:44 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Multi-threading a button action?
- Replies: 20
- Views: 18686
Re: Multi-threading a button action?
"Rev is not multi-threaded. But as Richard and implicitly all others pointed out you can construct almost all your script in ways that are non-blocking, which of course is not multi-threaded since the commands are interwoven."
Not being threaded is just shocking for any sort of current system, the ...
Not being threaded is just shocking for any sort of current system, the ...
- Wed Apr 07, 2010 11:36 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Multi-threading a button action?
- Replies: 20
- Views: 18686
Re: Multi-threading a button action?
"Exactly, Bernd, that's why I'm interested in seeing Shawn's script. Maybe he is doing more than just speaking."
It is, it is also highlighting the word as it is being read and keeping some statistics on the useage.
Shawn
It is, it is also highlighting the word as it is being read and keeping some statistics on the useage.
Shawn
- Wed Apr 07, 2010 7:58 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Multi-threading a button action?
- Replies: 20
- Views: 18686
Re: Multi-threading a button action?
Mark,
"I think that the actual problem is in the button script, which takes several seconds to complete. Would it be possible to change this script, to make it "multi-threaded", allowing for handling key strokes? Perhaps you could post your button script here?"
The application is a screen reader ...
"I think that the actual problem is in the button script, which takes several seconds to complete. Would it be possible to change this script, to make it "multi-threaded", allowing for handling key strokes? Perhaps you could post your button script here?"
The application is a screen reader ...
- Wed Apr 07, 2010 7:51 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Multi-threading a button action?
- Replies: 20
- Views: 18686
Re: Multi-threading a button action?
Craig,
You flush works but it is discarding all keypresses, I just want to ignore one specific keypress. For future use I'd also really need the ability to thread so I could respond to multiple keypresses and trigger multiple events that would run concurrently.
Shawn
You flush works but it is discarding all keypresses, I just want to ignore one specific keypress. For future use I'd also really need the ability to thread so I could respond to multiple keypresses and trigger multiple events that would run concurrently.
Shawn
- Wed Apr 07, 2010 4:01 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Multi-threading a button action?
- Replies: 20
- Views: 18686
Re: Multi-threading a button action?
Craig,
"Another thought. On a mac at least, the time it takes for the additional messages to be sent are set by the "delay until repeat" setting. The time between repeat events by the "key repeat rate"."
The additional space bar hits are not due to the key repeat of the OS, but from actual ...
"Another thought. On a mac at least, the time it takes for the additional messages to be sent are set by the "delay until repeat" setting. The time between repeat events by the "key repeat rate"."
The additional space bar hits are not due to the key repeat of the OS, but from actual ...
- Wed Apr 07, 2010 3:59 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Multi-threading a button action?
- Replies: 20
- Views: 18686
Re: Multi-threading a button action?
"perhaps simpler to set a flag when that action is performed which is checked at the start of the action - if the flag is set the action isn't performed."
That is exactly what I am doing now, it doesn't work because of the single threading. The key is pressed, the button is trigger, flag is set ...
That is exactly what I am doing now, it doesn't work because of the single threading. The key is pressed, the button is trigger, flag is set ...
- Wed Apr 07, 2010 3:51 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Multi-threading a button action?
- Replies: 20
- Views: 18686
Re: Multi-threading a button action?
I grab the space bar with the following code in the card script:
on keydown theKey
Global isReading
if isReading = 0 Then
if TheKey = " " Then
send mouseup to button singleswitch
end if
End If
if TheKey <> " " Then
pass keydown
End If
end keydown
The button when it receives the ...
on keydown theKey
Global isReading
if isReading = 0 Then
if TheKey = " " Then
send mouseup to button singleswitch
end if
End If
if TheKey <> " " Then
pass keydown
End If
end keydown
The button when it receives the ...
- Wed Apr 07, 2010 1:39 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Multi-threading a button action?
- Replies: 20
- Views: 18686
Multi-threading a button action?
Does RunRevolution support multi-threading?
I have an application that when a specific key (space) is pressed that in turn sends a message to a button. The button performs an action that takes several seconds. While that is occurring it appears that revolution is buffering the space key presses ...
I have an application that when a specific key (space) is pressed that in turn sends a message to a button. The button performs an action that takes several seconds. While that is occurring it appears that revolution is buffering the space key presses ...