Re: Reading and writing globals by script

2019-08-10 Thread dunbarxx via use-livecode
however cool the machinations of massaging a global under script control, why
do this at all? This is what custom properties are for; they also are
"global", and even better, they survive sessions.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Should the scope of WholeMatches be expanded?

2019-08-09 Thread dunbarxx via use-livecode
Hi.

Not sure, because I have never used one, but would a "trueWordOffset" help?

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Help with an algorithm...

2019-08-05 Thread dunbarxx via use-livecode
Hmmm. I had mentioned earlier:

"You cannot just find matching lines between the two lists, because some
children 
AND some parents may be present in both...

 The discussion has focused on array lore, and that is fine, but are we all
in agreement that the main task is to isolate the parents, regardless of
whether the names of those parents might be duplicated?  I mention this
because everything depends on the reliability of those spaces. The parsing
of parent "groups", in one way or another, is essential.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Help with an algorithm...

2019-08-05 Thread dunbarxx via use-livecode
I saw your post preceded my second one.

Besides the fact that this works as well and is faster:

   repeat for each line tLine in tAll
  put tLine into myArray[ tLine]
   end repeat

The array thing is the easy part. The real working of this gadget depends on
being able to isolate the children, and the only way I can see doing that
easily to rely on those spaces. This may be fragile, depending on how
consistent that format sticks.

You cannot find matching lines between the two lists, because some children
AND some parents may be present in both, and you would not know which
"class" of data you were dealing with. I would format such lists in the
future more robustly, perhaps with tabs.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Help with an algorithm...

2019-08-05 Thread dunbarxx via use-livecode
I really do not like the use-list. It is difficult to format one's answers.

Here is a handler that places a few pieces of data into two variables. These
would be the two isolated lists of children derived from the parents as
described earlier. There is one difference between the two lists, the child
"xxx'.

on mouseUp
   put "aaa" & return & "bbb" & return & "ccc" into tNew
   put "aaa" & return & "xxx" & return & "ccc" into tOld
   put tOld & return & tnew into tAll
   
   repeat with y = 1 to the number of lines of tAll
  put line y of tAll into myArray[ line y of tAll]
   end repeat
  breakpoint
end mouseUp

Straightforward array stuff. The final list has four children, "xxx" being
added to the mix, as can be seen in the debugger at the breakpoint.

Craig




--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: breakpoint conditions scrambled

2019-07-29 Thread dunbarxx via use-livecode
Hi.

Do you mean that if you have:

if  then breakpoint

does not fire? The handler proceeds past that line without  stopping? Have
you made sure the conditional is valid:

if  then answer 'XYZ"
if  then breakpoint

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Rename object

2019-07-04 Thread dunbarxx via use-livecode
Richmond.

 (pseudo)

Duplicate object
set the name of last object to the short name of the last object & the
number of thatObjectType + 1

Note that as of v.8, and this is an known issue, the keyword "last" may not
support groups. I am not sure if this has been fixed in v.9.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: Draw a line that follows an object

2019-06-30 Thread dunbarxx via use-livecode
If you add points to a line graphic, which of course starts off with only two
lines of points (its endpoints) it will take on the attributes of a polygon.
Is that what you did? But either ought to do, no?

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Draw a line that follows an object

2019-06-28 Thread dunbarxx via use-livecode
Bad formatting. Which is why I so like the forums. Anywa:
local pointsList

on mouseDown
   show btn 1 at "200,200"
   set the points of grc 1 to "0,0" & comma & the loc of btn 1
   put the points of grc 1 & return into pointsList
   trackButton
end mouseDown

on trackButton
  if the optionKey is down then exit to top -- exit here
  set the loc of btn 1 to the mouseLoc
 
  put the loc of btn 1 & return after pointsList
  set the points of grc 1 to pointsList
  send "trackButton" to me in 1
end trackButton



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Script Editor CTD

2019-06-27 Thread dunbarxx via use-livecode
CTD?

Church–Turing–Deutsch principle?

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Draw a line that follows an object

2019-06-26 Thread dunbarxx via use-livecode
Hi.

Not sure what you really want, but maybe try this. On a new card create a
button and a line graphic. Put this into the button script:

on mouseDown
  trackButton
end mouseDown

on trackButton
   if the optionKey is down then exit to top -- exit here
   set the loc of btn 1 to the mouseLoc
   set the points of grc 1 to "10,10" & return & item 1 of the loc of btn 1
& "," & item 2 of the loc of btn 1
   send "trackButton" to me in 1
end trackButton

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Groups do not receive mouseEnter messages?

2019-06-25 Thread dunbarxx via use-livecode
i thought we are talking about ignoring the controls owned by the group. They
have real zest appeal.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Groups do not receive mouseEnter messages?

2019-06-25 Thread dunbarxx via use-livecode
Devin.

"That is what the "target" is for."

"Right, but when you click on an empty space in a group, it is the target,
and if you only want to script the child objects you would have to
specifically exclude the parent group."

The target in this case is the card. Assuming, of course, that no "real"
control underlies the group. You can always filter out any targets that have
the word "card" in them.

I can appreciate that we do not want to introduce anything that would break
existing stacks. So it is a point that we not simply change the way a group
works by merely modifying an existing property. A new one would be called
for.

We can agree to disagree on the structure of the use-list. 

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Groups do not receive mouseEnter messages?

2019-06-25 Thread dunbarxx via use-livecode
"I would suggest an enhancement to LiveCode to add a property to Groups 
that toggle between: "

Setting the "opaque" of the group ought to be the property that permits
mouse messages.

"If the group did get mouse click messages, it would complicate things in
situations where you want to know which child object was clicked on."

That is what the "target" is for.

This all may be an edge case. After all, it only recently came up. It just
seems to me an anomaly.

--
On another note, I find it difficult to use the use-list. One cannot tell
who is writing, there is no easy way to isolate handlers, there is no easy
way to isolate quotes. All this just happened.  The forum is SO much more
accessible and useful.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Groups do not receive mouseEnter messages?

2019-06-25 Thread dunbarxx via use-livecode
I suppose as long as one knows how it works, it can be dealt with.

But there is an issue here, in that a group is not really a control, despite
what the dictionary says. A group has a rect, and one can tell if the
mouseLoc, say, is within that rect (and not necessarily within the rect of a
child control), but one cannot rely on any "ordinary" LC thinking to hold at
all.

I understand that a group is merely a group of controls. If it was a
ghostLike object that only did that, then well and good.

But since it interacts with those controls intrinsically (as, for example,
the way radio buttons behave "natively") and owns most "ordinary" control
properties, well then, dammit, if one makes it opaque and green, it ought to
respond to mouse events.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Help with drawing in LiveCode...

2019-06-20 Thread dunbarxx via use-livecode
Hi.

Untested, but this is kluge time.

Something like this in the card script, though I bet it can be made cleaner
and more robust:

on mouseLeave
   set the liveHandles of this cd to the  name of the target
   select empty
end mouseLeave

on mouseEnter
   do "select" &&  the liveHandles of this cd
end mouseEnter

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Date and time

2019-06-06 Thread dunbarxx via use-livecode
Feel like I am overdoing this, but a bit more compact:

on mouseUp
   put "06-Jun-2019;09:05:21" into rawTime -- your formatted moment here
   
   set the itemDel to "-"
   put item 1 of rawTime into tDay
   put  itemOffset(item 2 of
rawTime,"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec") into tMonth
   put item 3 of rawTime into temp
   set the itemDel to ";"
   put item 1 of temp into tYear
   delete item 1 of temp
   set the itemDel to ":"
   put item 1 of temp into tHour
   put item 2 of temp into tMinutes
   put item 3 of temp into tSeconds
   
   put tYear & "," & tMonth & "," & tDay & "," & tHour & "," & tMinutes &
"," & tSeconds & "," & tDay into standardFormat
   convert standardFormat from dateItems to seconds
   answer standardFormat
end mouseUp

Brute force for sure. My favorite.

Craig




--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Date and time

2019-06-06 Thread dunbarxx via use-livecode
And we should not be sloppy about using a function to display the answer,
rather to return a value and let the calling handler do that. But I was
avoiding actually working when I snuck this in, so I was typing from under
my desk.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Date and time

2019-06-06 Thread dunbarxx via use-livecode
OF course you would need a little better than the last, so the DOW is not
just entered by me for testing:

on mouseUp
   put "06-Jun-2019;09:05:21" into rawTime
   put dissectRawTime(rawTime)  into tSeconds
   convert rawTime to seconds
end mouseUp

function dissectRawTime rawtime
   get the long date ; convert it to dateItems
   
   set the itemDel to "-"
   put item 1 of rawTime into tDay
   put getMonth(item 2 of rawTime) into tMonth
   put item 3 of rawTime into temp
   set the itemDel to ";"
   put item 1 of temp into tYear
   delete item 1 of temp
   set the itemDel to ":"
   put item 1 of temp into tHour
   put item 2 of temp into tMinutes
   put item 3 of temp into tSeconds
   
   put tYear & "," & tMonth & "," & tDay & "," & tHour & "," & tMinutes &
"," & tSeconds & "," & tDay into standardFormat
   convert standardFormat from dateItems to seconds
   answer standardFormat
end dissectRawTime

function getMonth tMonth
   return
itemOffset(tMonth,"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec")
end getMonth



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Date and time

2019-06-06 Thread dunbarxx via use-livecode
Try this in a button script somewhere"

on mouseUp
   put "06-Jun-2019;09:05:21" into rawTime
   put dissectRawTime(rawTime)  into tSeconds
   convert rawTime to seconds
end mouseUp

function dissectRawTime rawtime
   get the long date ; convert it to dateItems
   
   set the itemDel to "-"
   put item 1 of rawTime into tDay
   put getMonth(item 2 of rawTime) into tMonth
   put item 3 of rawTime into temp
   set the itemDel to ";"
   put item 1 of temp into tYear
   delete item 1 of temp
   set the itemDel to ":"
   put item 1 of temp into tHour
   put item 2 of temp into tMinutes
   put item 3 of temp into tSeconds
   
   put tYear & "," & tMonth & "," & tDay & "," & tHour & "," & tMinutes &
"," & tSeconds & "," & "5" into standardFormat
   convert standardFormat from dateItems to seconds
end dissectRawTime

function getMonth tMonth
   return
itemOffset(tMonth,"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec")
end getMonth



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Date and time

2019-06-06 Thread dunbarxx via use-livecode
Hi.

Write a simple function that dissects the string you gave. (Pseudo)

function dissectOddFormat
  use itemDelimeters to isolate "06", "Jun", "2019", "09", "05" and "21"
  reform these strings into the date/time format local to your part of the
planet
  convert that new string to seconds or ticks


Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: repeat with times

2019-05-21 Thread dunbarxx via use-livecode
Hi.

What Ludovic suggests is not just a shortCut. You can say:

repeat 5

or repeat 5 times

but you could never say:

repeat with y =1 to 5 times

It is not a regression, that is, something in the latest v.9 build, it is
bad syntax.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Open Printing to PDF

2019-04-23 Thread dunbarxx via use-livecode
Hi.

Are you saying the "open printing to pdf" command itself does not work, or
that you get blank output? In other words, in the stack that does NOT work,
what happens if you:

  open printing to pdf "yourFilePathHere/xxx.pdf"
 revPrintText "Hello world" 
  close printing

This will eliminate any of the issues Scott mentioned, since you are using
simple text. But does a pdf appear on the desktop, and does it contain
"Hello World"?

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Saving a tab formatted field to a file and retaining its formatting

2019-04-08 Thread dunbarxx via use-livecode
I am usually very good at describing problems.

I am not so good at describing solutions.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Saving a tab formatted field to a file and retaining its formatting

2019-04-08 Thread dunbarxx via use-livecode
Aha. TabStops.

Unless I am missing something, is it that the data in a tabStop formatted
field is to be copied somehow, so that if loaded into a brand new field, the
tabStops property is also "loaded" into that field?


But that is a property of a field, not of text, and I do not think such
information can be similarly "transmitted", regardless of how that text is
formatted.

I could be wrong.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Saving a tab formatted field to a file and retaining its formatting

2019-04-08 Thread dunbarxx via use-livecode
Hi.

I am always missing something. Why is there an issue retaining tabs in a
body of ordinary text?

I have a table field with "A" & tab & "B" & tab & "C" in it. If I write that
text into a file on my desktop and then load it back into the second line of
that field:

on mouseUp
   get fld 1
   
   open file  "/users/craignewman/desktop/xxx" for text write
   write it to file  "/users/craignewman/desktop/xxx"
   close file "/users/craignewman/desktop/xxx"
   
   open file  "/users/craignewman/desktop/xxx" for read
   read from file  "/users/craignewman/desktop/xxx" until EOF
   close file  "/users/craignewman/desktop/xxx"
   
   put it into line 2 of fld 1
end mouseUp

The identical text is now in line 2, all tabs intact. No rtf stuff needed.

I am always missing something.

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Remain on First Card Whilst Sending Messages to Second Card

2019-03-18 Thread dunbarxx via use-livecode
Roger.

Maybe make sure that screen locking is disabled everywhere, and step through
a few handlers that might be the culprit?

I have seen this in my travels over the years. It was always me.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Remain on First Card Whilst Sending Messages to Second Card

2019-03-18 Thread dunbarxx via use-livecode
Hi.

There is no way that LC navigates to the other card at all, unless you have
done something that tells it to.

I make a new stack with two cards, with a handler in the card script of cd
2. On cd 1 I have a button that sends a message to cd 2, invoking that
handler, and I can see the results. All well and good. All happens with cd 1
staring at me.

This is normal, always has been. There is no "automatic" navigation.

What are you doing?

Craig Newman




--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Format text data records for processing in Livecode

2019-02-26 Thread dunbarxx via use-livecode
I am missing the point of using an ephemeral and unknown string as an
itemDelimiter. The whole point of such a gadget is that it can be used at
another time to undo, or redo, whatever data parsing was done earlier.

Is it that the delimiter is stored somewhere, and just for security it is
generated in an unpredictable way? But that it still can be recalled as
needed? But then, as described, that several unique delimiters in quick
succession may be created and used, are these stored as well for future use?

In other words, if a delimiter is created somehow, and data is parsed into
items defined by that delimiter, is there any purpose in NOT saving it
somewhere?

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Format text data records for processing in Livecode

2019-02-26 Thread dunbarxx via use-livecode
Hi.

Since you may have any number and kind of characters in any of the fields in
each record, I would append a character that is unlikely ever to appear in
any context. I like numToChar(202), but others like numToChar(3) or
numtoChar(8).

Then you can set the itemDelimiter to that char, and be sure that you are
parsing the totality of each field within any record.

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: How to tell if a field is "closed"?

2019-02-05 Thread dunbarxx via use-livecode
I think you had it right when you mentioned that you should redesign the
interface. There are many threads, especially on the forum, debating the
merits of live validation of user input as opposed to anything else at all.

I always, always recommend never letting invalid data be typed or pasted,
whatever, into a field where such data will break something down the road.

Rewrite. I bet is not too onerous a task.

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Should I forget HC? Honestly?

2019-01-26 Thread dunbarxx via use-livecode
Yet one more take.

Years ago, when I first started LC, I still mainly used HC for business and
pleasure. I still do.

I was one of those die-hard nostalgia types that accepted LC, but all the
while stubbornly stuck to, and extolled, my HC roots. Revolutionaries die
hard.

I regularly update and modify the dozen or so HC stacks, running on a
peer-to-peer network, that still form an important part of my business.

When I do that work in HC, I have to unlearn LC, and that process made me
long ago realize that I had changed to a LC revolutionary, almost without my
realizing it. The unlearning, in every respect, shows me that LC does it
better, more elegantly, more natively and, well, better.

HC is, I am embarrassed to say, embarrassing. I would never tell anyone
that, of course. This is not its fault. It is just old, and though it once
was miraculous, it is now, relatively, feeble.

Treat it like a grandfather. Love it, but do not discard your cell phone and
install a wall phone in your kitchen. You know, the one with the six foot
cord. That was a miracle too, in its day.

Craig Newman





--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Script Editor Performance

2019-01-22 Thread dunbarxx via use-livecode
Hi.

Something you must consider. 

On the forum "Jerky Script Editor Scrolling".

Some fonts scroll far smoother than others.

Craig Newman




--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Get RGB color of a specific screen location

2019-01-07 Thread dunbarxx via use-livecode
A kluge, but couldn't you:

on mouseUp
   set the screenMouseLoc to "200,200"
   answer the mouseColor
end mouseUp

I just threw this together, so you might want to restore the original
mouseLoc, and locking the screen might be useful.

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Refactoring is your friend / moving from 6.x to 9.x

2018-12-31 Thread dunbarxx via use-livecode
Not sure if this is still relevant in LC, but in HC, lock screen commands
were queued. So the fix, so that one did not have to count the number of
locks through perhaps several handlers, was:

repeat until the lockScreen is false
  unlock screen
end repeat

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Max number of columns in a datagrid?

2018-11-27 Thread dunbarxx via use-livecode
What really needs to happen is that the DG or table field visual display is
loaded under script control. So the idea of jumping from a display of
columns 1-10 over to 6000-6010 is managed live, using the scrollbarDrag
message as the thumb is moved. What the user sees during that process is a
matter of style.

This would be a useful tool; it would effectively obviate the limits we have
been discussing.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Max number of columns in a datagrid?

2018-11-26 Thread dunbarxx via use-livecode
All:

It is certainly possible that one might need an enormous DG or table field.
It never happens that one must view such a beast all at once, or even a
large part of it; that is not the issue. The point is that one cannot have
such a control at all, and that seems unfair.

If one is looking at the first ten columns, and it is desired to jump over
to columns 6000-6010, well, you cannot. Surely the dataSet can be stored in
a field or custom property, and loaded as needed, but that requires a
significant amount of pre-processing. The whole point of DG's and
tableFields is that they can be navigated with virtually unconscious
well-worn user actions.

The limit may be intrinsic. It at least should be published.

Craig





--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Max number of columns in a datagrid?

2018-11-21 Thread dunbarxx via use-livecode
People with wide monitors?



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Max number of columns in a datagrid?

2018-11-21 Thread dunbarxx via use-livecode
I tested with a table field. It can hold far many more columns, but it, too,
will go haywire if the tabStops are wide and the number of columns exceeds
about 1500.

I was surprised that the number of columns matters. Certainly they are not
all drawn at once, but rather "exposed" based on internal workings and the
current thumbPos.

This really needs a response from the team.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Max number of columns in a datagrid?

2018-11-20 Thread dunbarxx via use-livecode
Hi.

Never thought about this. But I made a DG, and put this into a button:
on mouseup
   repeat 300
put random() & tab after temp
   end repeat
   set the dgText of grp 1  to temp
end mouseup

No problem. With a horizontal scrollbar, I can zoom to each side of the DG.

But If I try to change the count to more than 300, the DG loses its hScroll,
and it seems that many separate numbers appear overlapped in column 1.
Further, a lot of time is spent while the DG is digesting this new property
change.

Trevor is the one to address this, assuming anything I just did makes sense.

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Selecting text in non-focused field

2018-11-19 Thread dunbarxx via use-livecode
Have you tried selecting the foundChunk?

If you are going to write a routine that checks all the fields on a card and
catalog them, you can avoid the standard "find" command, and roll your own.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Selecting text in non-focused field

2018-11-19 Thread dunbarxx via use-livecode
Ah.  Maybe the point is that you can continue typing, finding other strings
as you go. OK.

But my search field, with its "enterInField" handler:
on enterinField
   find me
end enterinField

will find any text in any field, and continue to find as you either continue
typing or delete what you already have. The search field retains focus.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Selecting text in non-focused field

2018-11-19 Thread dunbarxx via use-livecode
Hi.

Not sure exactly what you mean.

You have a ("search") field that you type into, and the text in that field
is then found in another field?

How different is that process from this? On a card with two fields, in fld 1
type some text that already exists in fld 2. Then in a button script:
on mouseUp
   find the text of fld 1 in fld 2
end mouseUp

The "search" field retains focus.

The same if there is an "enterInField" handler in the search field. The
search field retains focus.

But what is the point of keeping focus? What can you do if that happens,
that you cannot do if focus is lost? And how are you working this, that the
search field loses focus in the first place

Craig Newman

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Reading data from Google Sheets

2018-11-15 Thread dunbarxx via use-livecode
No good. Somewhere the last char of the text of a google sheet is inserted
three times in the body of the html  tag suite. So adding a delimiting char
of any kind is futile.

I still think I am overthinking this.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Reading data from Google Sheets

2018-11-15 Thread dunbarxx via use-livecode
Well, heck. Even I know that the string "><" is ubiquitous in html tag sets.

Wasn't thinking.

So for now, I have to include an arcane char at the end of my sheet file,
and lose it in LC.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Reading data from Google Sheets

2018-11-15 Thread dunbarxx via use-livecode
Thanks, Colin. I found my way through that setting.

Now I do indeed get the data in the sheet, but followed by a massive array
of tags. This would not be an issue, except that the very start of that tag
dataSet is appended the the text in the last cell of the actual sheet data.

In other words, if the bottomMostCell in my data is a "W", then the tab
delimited text that comes over in that cell reads as:

W"><" is both reliable and
unique in what is appended to actual the sheet information, and I could set
the itemDel to that. But I suspect there is a better way.

Thanks again...

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Reading data from Google Sheets

2018-11-14 Thread dunbarxx via use-livecode
Hi.

Thanks for taking the time with me.

I did indeed paste the url into a separate private window in Safari, and it
asked me to sign in. I did, and the sheet popped up. A standard window goes
directly, without issue.

This is not a forum for teaching me how to use google sheets. But do you
know how I change the sharing properties?

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Reading data from Google Sheets

2018-11-14 Thread dunbarxx via use-livecode
All.

I tried the sample stack on a simple google sheet, and it returns a universe
of tags, not the actual contents of the sheet. 

What am I doing wrong? I only changed the target url to point to the sheet I 
created.

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Reading data from Google Sheets

2018-11-13 Thread dunbarxx via use-livecode
Hi.

well the (very) short answer is that you can:

put url "yourWebpageAddressHere" into temp

What you get is the entirety of the html contents of a page. Others will
tell both of us how to get the "visible" text, that is, the tab and return
delimited data, buried in all those tags.

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Script works but still cast an error?

2018-11-01 Thread dunbarxx via use-livecode
Hmmm.

I made a group with a subgroup and some fields. I placed a "start
editing..." line in one of the fields and the subgroup. No issues with
either upon mouseEnter.  Have you looked at  "the result" in each handler?

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Sorting search results - solution needed

2018-10-23 Thread dunbarxx via use-livecode
I am missing the rules of the game.

But in any event I agree that the only way to sort a mixed bag of numbers,
punctuation and alpha chars is to pre-parse and sort repeatedly by items, or
some other, er, sort of chunk.

But I do not see the "hierarchy" among spaces, periods, decimal numbers,
etc. Are there such rules?

Craig Newman





--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: setProp question

2018-10-16 Thread dunbarxx via use-livecode
"...Well, I just gave up on using custom properties completely. Probably not 
the right thing to do, but it works for me. "

Alex.

Really? You abandoned custom properties? I cannot live without them, though
I rarely use the setProp and getProp control structures.

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Breakpoints Failing / Crashes

2018-10-05 Thread dunbarxx via use-livecode
Except that the "Red dot" breakpoints cannot be trusted at all, the
"breakpoint" command has never failed in v8. or earlier.  Must be a v9
issue, but I am surprised nobody has mentioned it till now.

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Will it ever be possible place controls over browser widget?

2018-10-04 Thread dunbarxx via use-livecode
Bob.

Overlying, no?

And all objects are smoke and mirrors, in that they are chimeras that we
"see", "drawn" on a "screen", when in reality they are just a list of
certain transistors locked in a certain state.

I get that widgets are different. But I do not like at all that they break
fundamental rules. Who do they think they are, taking over real estate with
air rights?

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Will it ever be possible place controls over browser widget?

2018-10-04 Thread dunbarxx via use-livecode
The browser object sits atop everything else, or rather it is "drawn" over
everything else...

Hmmm.

OK,this even though the browser object sits in layer 1, and the overlying
button sits in layer 2. 
So there is a breakdown in the layer paradigm?

Messages are prevented from being generated if a browser widget rect
encloses the clickLoc in any way. LC "knows" there is a widget there, eh?
And reserves that rect against any and all messages.

Hmmm.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Will it ever be possible place controls over browser widget?

2018-10-04 Thread dunbarxx via use-livecode
"...But with a browser widget, the message is generated only if the extent of 
the button is outside the extent of the underlying widget. 

I may not have been clear. If I click on a portion of the overlying button
that is outside the rect of the underlying widget, then a mouseUp message is
generated. If I click on a portion of the button that is inside the widget
rect, no message,

Again, how do it know?

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Will it ever be possible place controls over browser widget?

2018-10-04 Thread dunbarxx via use-livecode
Hi.

Odd, I tried this with other widgets overlain by a button, and a mouseUp
message was generated without issue anywhere I clicked on the button.

But with a browser widget, the message is generated only if the extent of
the button is outside the extent of the underlying widget. 

How do it know?

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Stacks whose names start with "rev"

2018-09-27 Thread dunbarxx via use-livecode
Jacque.

Do you remember I had this same issue (thread in the forums) about two
months ago? All the "destroy" stuff in the world did not prevent that dialog
from coming up. It never caused a problem, only a nuisance.

And oddly, though it occurred continuously over the better part of a year,
it has not come up in the last month or so. I had actually forgotten about
it.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Stacks whose names start with "rev"

2018-09-27 Thread dunbarxx via use-livecode
I hurriedly put the funnyChar in the wrong place. I know you get this,
assuming it is at all possible.

But for my own curiosity, would this work? You would have to explcitly
manage the pathNames as:

"re" & numToChar(funnyChar) & "v". The question is, assuming you can make
this work, is will the several OS's bark at all?

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Stacks whose names start with "rev"

2018-09-27 Thread dunbarxx via use-livecode
Jacque.

Can you include an invisible, unprintable char between the "R" and the "E"?

Then the file name would appear to read as "rev" but would actually be "re"
& funnyChar & "v".

There are several such chars in the standard ASCII set.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Intersect Function

2018-09-24 Thread dunbarxx via use-livecode
I believe the OP was talking about two arbitrary  lines, likely graphic
objects, that intersect each other. Not rectangles with points within them,
or two rectangles.

I think the only way to do this is as per the first four posts in this
thread.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Intersect Function

2018-09-24 Thread dunbarxx via use-livecode
Well and good.

I repeat that in a computer screen, with fixed pixel coordinates, you will
likely need just a bit of rounding forgiveness when doing the math. You need
to write a bit of code, in other words, that will accept close matches
between the string of pixels and the calculated "points" along the line.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Intersect Function

2018-09-24 Thread dunbarxx via use-livecode
Hi.

No.

But you can determine the points of a line graphic, and calculate all the
pixels it "contains" from its starting point to its ending point. Do the
same for a second line.

Then you can determine the point that seems to be common to both lines. I
say seems, because when you do the math, that is, using the slope of each
line and calculating the points using that information, you may find that
there are no exact matches. But you can allow a small differential, and the
closest pair of points will be the one you want.

Can you do the math?

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: When is suspendStack sent?

2018-09-21 Thread dunbarxx via use-livecode
Hi.

"...For instance, I can click the window of the mainstack while in a
substack and I get the suspendStack message. Subsequent clicks however do
NOT get sent."

Now I am not sure what you mean. If I have a mainstack with a suspendStack
handler in the stack script, and one or more sub stacks, that handler will
fire whenever I navigate among any of them. In your example above, you would
have suspended the subStack when you clicked on the main stack. But repeated
clicks in any one stack will not, as expected, fire that hander. There has
been no navigation, and therefore no suspension.

But is that what you meant by "subsequent clicks", that is, subsequent
clicks on the same stack?

In other words, is that handler in the message path of the stacks that you
are navigating among? I have never seen any anomalies with that message
during navigation from stack to stack, as long as the handler is in the
message path.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: When is suspendStack sent?

2018-09-20 Thread dunbarxx via use-livecode
Hmmm.

Not sure of your setup, of course, but if I try an experiment, it always
works. Can you check the topStack each time you return to the, er, topStack?
You may indeed need to place that handler in a backScript or stack in use in
order to do so.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: When is suspendStack sent?

2018-09-20 Thread dunbarxx via use-livecode
Bob.

Is the suspendStack handler in the stack script of some stack? If so, it
will only fire when leaving that stack.

You can always place the handler in a backScript, or something similar, so
that all stacks will have to listen to it.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Creating Array - Auto Numeric

2018-09-18 Thread dunbarxx via use-livecode
Also, be careful. The string:

"Cut the apple. Cut the banana" 

contains only one word.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Forums misbehaving

2018-09-18 Thread dunbarxx via use-livecode
Never seen this. Richmond, are you on a computer or a portable device?

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Creating Array - Auto Numeric

2018-09-18 Thread dunbarxx via use-livecode
Hi.

Is this what you want?

on mouseUp
   repeat with y = 1 to the number of words of fld 1
  select word y of fld 1
  put the selectedLoc into wordLocationA[y][word y of fld 1]
   end repeat
end mouseUp

I suspect not. Is it that you want the output to be:

WordLocationA["Cut"][100,320]
WordLocationA["the"][1][200,320]
WordLocationA["apple"][500,320] 
WordLocationA["Cut"][300,320] 
WordLocationA["the"][400,320] 
WordLocationA["banana"][500,320]

If so, why use an array? Just:

on mouseUp
   repeat with y = 1 to the number of words of fld 1
  select word y of fld 1
  put word y of fld 1 &","& the selectedLoc & return after locList
   end repeat
end mouseUp

Craig Newman




--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Set the backgroundcolor of all lines a field to null

2018-08-23 Thread dunbarxx via use-livecode
We are all happy with the speedy "repeat for each..." construction.

But there are times when the good ol' "repeat with..." construction, which
manages a counting index internally, is just the right way to do things. The
line number is at the ready with each iteration.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Surprise...

2018-08-20 Thread dunbarxx via use-livecode
Hi.

Not sure the code snippet you supplied is complete. There are no variables
"T" or "tVar", and so all your nested repeat loops are just time expenders.
In other words, you could have just:

repeat 100

That said, it seems that assembling the nonexistent array variable
repeatedly is slower that assembling the nonexistent ordinary variable
repeatedly. Others may comment on this.

But you have not really "used" an array, only built one, er , repeatedly, if
you understand what I mean. Is that what you were concerned with?

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Repeat for each element failing

2018-08-10 Thread dunbarxx via use-livecode
My error. I meant:

Are you speaking of the "warm" in myFavoriteColors["warm"]["red"] 

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Repeat for each element failing

2018-08-10 Thread dunbarxx via use-livecode
Bob wrote:

"Is it legal to have arrays for the elements, or is it restricted to values?
"

Are you speaking of the "red" in myFavoriteColors["warm"]["red"]

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Too fundamental to be a bug, so what's wrong?

2018-07-30 Thread dunbarxx via use-livecode
Going down the declaration path further, do you have "strict compilation"
set?

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: drawing a Barcode without a Barcode font

2018-07-19 Thread dunbarxx via use-livecode
Hi.

Curious.

So you are creating your own barcode, er, code? That is, you are, say,
making three thin lines with thin spaces, and then three thick lines with
thick spaces, and storing that pattern somewhere?

And then you read that pattern and look up what it refers to?

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: TextAlign not working in fields

2018-07-18 Thread dunbarxx via use-livecode
Hi.

I made a field with lots of long lines of text in it. I set the align all
over the place. Both vertical and horizontal scrolling seem to work smoothly
all the way from beginning to end.

I read the bug report. Can you give an explicit recipe?

Mac OS 10.13  LC 8.1.9

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Sender of send in time

2018-07-12 Thread dunbarxx via use-livecode
Hi.

Would the "executionContexts" be of use here?

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: doMenu

2018-07-10 Thread dunbarxx via use-livecode
Hi.

I would go to the forums and read this all the way to the end:

doMenu not finding the menu
  

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Align baselines of 2 fields

2018-06-20 Thread dunbarxx via use-livecode
So I played around just a little. 

Make a new field and set its Textheight property. For the first line, this
will be a certain number of pixels below the top of the field. Each
subsequent line will be a multiple of that value. So if you know the
baseLine of any line of text, and you know the top, you can either position
the field so that the baseLine attains a certain Y value, or you can adjust
the baseline to any Y value.

Do the same for the other field, and you can align the text.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Align baselines of 2 fields

2018-06-20 Thread dunbarxx via use-livecode
Right. I do not think there is a "baseLine" property.

But again, if you play around with the properties I mentioned above, all of
which are in pixels, I bet you can create a handler that will determine the
"baseLineV" of any text in a field, and you can then match two fields
together.

This would be useful, since the fields could have different textSizes and
such, and still match their vertical value.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Align baselines of 2 fields

2018-06-20 Thread dunbarxx via use-livecode
I am sure that with the margins, textHeight and textSize properties you can
calculate how to set the text baseline of one field to that of another. A
small textSize will require a smaller third margin, for example, and that
must take into account the textHeight as a further component.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Align baselines of 2 fields

2018-06-20 Thread dunbarxx via use-livecode
Hi.

Do you mean the bottom of the field control, or the baseline of the text?
All are doable.

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: The Cat ate my mouse

2018-06-16 Thread dunbarxx via use-livecode
Richmond.

Say you have a field 1 with text in it.

on mouseUp
   select after char 12 of fld 1
  put the number of words of char 1 to (word 2 of the selectedChunk)of fld 1
into numWords
  select before word numWords of fld 1 -- or after
end mouseUp



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode