Search found 6008 matches

by dunbarx
Mon Jun 24, 2019 3:34 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Random Loops
Replies: 14
Views: 347

Re: Random Loops

Many ways to do things in LC. The "send in time" gadget is powerful indeed, essentially creating a "loop" that as a bonus releases control back to the machine in each iteration. This is something that any of the "repeat" constructions cannot do. That is a lesson in itself. You need to become familia...
by dunbarx
Sun Jun 23, 2019 2:38 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Random Loops
Replies: 14
Views: 347

Re: Random Loops

Richmond.

You don't ever answer your accums?

I have always used "temp" and "accum" for ephemeral variables. Never much latched onto "foo".

Craig
by dunbarx
Sun Jun 23, 2019 1:44 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Random Loops
Replies: 14
Views: 347

Re: Random Loops

I did not look closely at the earlier replies, but something like this? on mouseUp repeat with y = 1 to 1000 put Y into line y of tList --build list of numbers (or use your own) end repeat put the seconds into tStart repeat until the seconds = tStart + 3 get random(the number of lines of tList) put ...
by dunbarx
Sat Jun 22, 2019 8:45 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Using a substack as a library stack
Replies: 7
Views: 223

Re: Using a substack as a library stack

Jacque.

True, certainly.

But the extra line to access the function "the result" is still an extra step, just like having to declare a local variable.

My point being that a function call needs neither. :wink:

Craig
by dunbarx
Sat Jun 22, 2019 2:10 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Livecode Drawing Standalone
Replies: 3
Views: 175

Re: Livecode Drawing Standalone

Why not just this in the card script: on mouseEnter if the tool = "browse tool" and "card" is not in the name of the target then choose pointer tool select the target end mouseEnter on mouseLeave set the cursor to arrow choose browse tool end mouseLeave This does not care which tool is current. But ...
by dunbarx
Fri Jun 21, 2019 11:31 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Livecode Drawing Standalone
Replies: 3
Views: 175

Re: Livecode Drawing Standalone

I implemented a fairly complex drawing module to a stack we use all the time. It isn't CAD, but it looks like it, albeit rather less professional looking than, say, AutoCad or SoldWorks would produce. We send these drawings out daily to clients. They are based on data calculated within the stack, an...
by dunbarx
Fri Jun 21, 2019 6:48 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Using a substack as a library stack
Replies: 7
Views: 223

Re: Using a substack as a library stack

Hi. Know you can return a value from a command call as well as from a function call, but this is rarely done. The "return" control structure works in both. In a function: on mouseUp answer ultimateAnswer (6,9) end mouseUp function UltimateAnswer a,b put a * b into irrelevant return 42 end UltimateAn...
by dunbarx
Fri Jun 21, 2019 4:05 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Using a substack as a library stack
Replies: 7
Views: 223

Re: Using a substack as a library stack

Hi.

Welcome.

There are no stupid questions. Only stupid answers.

Craig
by dunbarx
Thu Jun 20, 2019 8:13 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Setting the linktext of linked text in a field
Replies: 6
Views: 179

Re: Setting the linktext of linked text in a field

Hi.

Without your unstated handler, I couldn't say.

But the variable tURL does indeed contain the contents of the "ask" dialog, and I assume that is a URL. So where does that change to "OK?

Craig
by dunbarx
Thu Jun 20, 2019 6:24 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: My Beetle has a Mental Problem
Replies: 4
Views: 175

Re: My Beetle has a Mental Problem

Richmond. In the real world, that is, the United States, "pull back" means nothing. This is not to say I did not notice something of what you mentioned. I did indeed, as I wrote it. Here we say "pull out", and it is always accompanied by "in time". Americans, sadly, are rarely on time, much less in ...
by dunbarx
Thu Jun 20, 2019 6:04 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: My Beetle has a Mental Problem
Replies: 4
Views: 175

Re: My Beetle has a Mental Problem

Richmond. Without exhaustive testing, the snippet in case "135": subtract 20 from UD subtract 20 from LR move widget "Beetle" to LR, UD causes the widget to pull out of the rect of the heptagon. Something about the loc of the widget when it is in that position, that does not come into play when orie...
by dunbarx
Thu Jun 20, 2019 5:55 pm
Forum: Talking LiveCode
Topic: Error on 'put "My text" into the selection'
Replies: 19
Views: 465

Re: Error on 'put "My text" into the selection' (Solved)

Glad the "Solved" appended to this thread did not close it. May I request of the OP that he remove that word? Paul? @ Richard. All I did was create a new stack, adding a button and a field. I put a few words into the field, and this into the button script: on mouseUp put "XXX" into the selection end...
by dunbarx
Thu Jun 20, 2019 2:03 pm
Forum: Talking LiveCode
Topic: Error on 'put "My text" into the selection'
Replies: 19
Views: 465

Re: Error on 'put "My text" into the selection' (Solved)

Hmmm.

I have a field and a button. The traversalOn of the button is set to "true". The script of the button is:

Code: Select all

  put "XXX" into the selection
I select a word in the field, and then click on the button. "XXX" appears in place of the selectedText

Craig
by dunbarx
Wed Jun 19, 2019 11:36 pm
Forum: Talking LiveCode
Topic: Error on 'put "My text" into the selection'
Replies: 19
Views: 465

Re: Error on 'put "My text" into the selection'

Richard.

I assumed the text was in a field.

Paul?

Craig
by dunbarx
Wed Jun 19, 2019 3:54 pm
Forum: Talking LiveCode
Topic: Error on 'put "My text" into the selection'
Replies: 19
Views: 465

Re: Error on 'put "My text" into the selection'

Hi.

Works for me too, on a Mac. This must be an odd regression.

Craig

Go to advanced search