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: 2251
- Fri May 06, 2011 3:47 pm
- Forum: iOS Deployment
- Topic: keydown on script?
- Replies: 1
- Views: 2461
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 ac...
- Sat Jan 01, 2011 8:03 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Math problem with DIV?
- Replies: 11
- Views: 8650
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: 8650
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: 8650
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 to make a...
- Sat Jan 01, 2011 6:10 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Math problem with DIV?
- Replies: 11
- Views: 8650
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)" && ret...
- Thu Apr 08, 2010 6:59 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Multi-threading a button action?
- Replies: 20
- Views: 15970
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't t...
- Wed Apr 07, 2010 11:44 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Multi-threading a button action?
- Replies: 20
- Views: 15970
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 8...
- Wed Apr 07, 2010 11:36 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Multi-threading a button action?
- Replies: 20
- Views: 15970
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: 15970
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 for...
- Wed Apr 07, 2010 7:51 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Multi-threading a button action?
- Replies: 20
- Views: 15970
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: 15970
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 additiona...
- Wed Apr 07, 2010 3:59 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Multi-threading a button action?
- Replies: 20
- Views: 15970
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, the...
- Wed Apr 07, 2010 3:51 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Multi-threading a button action?
- Replies: 20
- Views: 15970
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 mouseup sets isReadin...
- Wed Apr 07, 2010 1:39 pm
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Multi-threading a button action?
- Replies: 20
- Views: 15970
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. Whe...