Search found 9383 matches

by dunbarx
Wed May 04, 2016 9:36 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Div and Mod with Variables
Replies: 33
Views: 17470

Re: Div and Mod with Variables

What do you mean by length? I am trying to make sure that what appears to be a number is indeed a number. The length of "123" is 3. There could not be any hidden invisible chars in that string. NumberFormat is a viewing aid. It does not do anything to the underlying argument: on mouseup get "123.45...
by dunbarx
Wed May 04, 2016 3:35 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Div and Mod with Variables
Replies: 33
Views: 17470

Re: Div and Mod with Variables

Hmmm. You added the line I suggested, and it worked. And then with that VERY SAME variable, div does not work. Hmmm. I could suggest that you write a routine, not hard to do, that translates a decimal like ".9166667" into 11/12, and get your "11" that way. But that is not solving the problem, which ...
by dunbarx
Wed May 04, 2016 3:27 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Basket help
Replies: 48
Views: 24057

Re: Basket help

Hi. You can do what you ask easily. But you need to get more familiar with LC while you are working. Make a few stacks. In each one, place a field or two, and a button that goes to one or the other of those stacks, so you can navigate freely among them. Now do something like "put random(999) into fl...
by dunbarx
Wed May 04, 2016 3:23 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Positioning Cursor at end of combobox
Replies: 2
Views: 2031

Re: Positioning Cursor at end of combobox

Hmmm. I tried several kluges, and none worked. No errors, but no cursors. In a button script somewhere, where the combo is btn 1: on mouseUp get the selectedchunk of btn 1 get word 2 of the selectedLine of btn 1 select after line it of btn 1 end mouseUp These are snippets from several tests, and mea...
by dunbarx
Wed May 04, 2016 2:20 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Div and Mod with Variables
Replies: 33
Views: 17470

Re: Div and Mod with Variables

Hmmm.

What happens if you throw in a line just before the "div" line, where, say, you:

Code: Select all

put tAge + 4 into temp
Does that compute? Because if it does, then:

Code: Select all

put tAge div 4 into temp
will as well.

I cannot wait to find out where the gremlin lies...

Craig
by dunbarx
Tue May 03, 2016 11:45 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Need very precise timings to show a stimulus
Replies: 31
Views: 14057

Re: Need very precise timings to show a stimulus

Hi. No, "wait" is blocking, unless you include "with messages". LC shuts its eyes. So the actual timing is not critical, only consistent timing. I tried holding the "LEFT" in the field for 50 ms, and could read it. Not quite subliminal. I went down gradually, until below about 25 ms I could not read...
by dunbarx
Tue May 03, 2016 11:34 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Div and Mod with Variables
Replies: 33
Views: 17470

Re: Div and Mod with Variables

Did you read Sparkout's post?

If you have a number in tAge, it will work. And if you have tAge itself, it will work.

You are now in the exalted group of those who struggle mightily, and finally discover the tiny flaw in the ointment. Or fly. This includes everyone here...

Craig
by dunbarx
Tue May 03, 2016 9:27 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Div and Mod with Variables
Replies: 33
Views: 17470

Re: Div and Mod with Variables

Hi.

Test tAge and verify it is a number:

Code: Select all

if tAge is a number then keepGoing
Craig
by dunbarx
Tue May 03, 2016 9:22 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Need very precise timings to show a stimulus
Replies: 31
Views: 14057

Re: Need very precise timings to show a stimulus

Hi. How are you determining the accuracy of your actions? "...cd fld"? Are you an old HC guy? Lose "cd". Navigating, or not, is not the issue. Have you tried sending a message in time? With messages? Or setting up a loop that interrogates the milliseconds, and sends a message at designated values? Y...
by dunbarx
Tue May 03, 2016 6:23 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Div and Mod with Variables
Replies: 33
Views: 17470

Re: Div and Mod with Variables

Hi. You have syntax errors, not operator errors. I started reading your code, and threw an error at line 2. You are asking LC to find a handler with the name "tAge". There isn't one. I think you want to: put tAge div 12 into someOtherVariable_EvenIncludingtAgeItselfIfYouWant or somesuch. Try it, mod...
by dunbarx
Tue May 03, 2016 6:15 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: put "G" into item 10 of line 1 of fld 1 strange results
Replies: 2
Views: 2409

Re: put "G" into item 10 of line 1 of fld 1 strange results

jean-Marc.

For what it is worth, both methods give identical results in 6.7.

Craig Newman
by dunbarx
Tue May 03, 2016 2:08 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: adding stacks at stack pane.
Replies: 8
Views: 4798

Re: adding stacks at stack pane.

Just to be certain, the stack files are not substacks, correct? Or if they are, the "move into individual stack files" checkbox has been clicked?

Craig
by dunbarx
Tue May 03, 2016 2:44 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Scale Factor
Replies: 5
Views: 3249

Re: Scale Factor

Hi.

Certainly.

Code: Select all

set the scaleFactor of stack "yourStack" to 0.9356
Craig Newman
by dunbarx
Tue May 03, 2016 2:40 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: adding stacks at stack pane.
Replies: 8
Views: 4798

Re: adding stacks at stack pane.

I am languishing in v. 6.

But are you saying that several stack files (files, not just stacks) are listed in the settings, but that these are not included in the standalone itself?

Craig Newman
by dunbarx
Mon May 02, 2016 3:33 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Typing special characters § and ¶
Replies: 6
Views: 4486

Re: Typing special characters § and ¶

Hi.

I am on a Mac, but I cannot imagine there could be too much of a difference.

If I type "option-6" or "option-7" I get the chars you indicated directly. I assume the "windows" key is the analog?

Craig Newman

Go to advanced search