FMaker is a utility stack to make folders/directories.

2017-09-26 Thread James Hale via use-livecode
Just uploaded to "sample stacks" (button on toolbar in IDE or 


 FMaker is a utility stack to make folders/directories.

It will take a list of files from a directory (or a text file) and create 
folders with the same names as are in the list.

Once loaded:
• the list can be edited within the stack,
• the list entries can have text removed or replaced
* GREP can be used
• if the list comes from a directory listing the files can be moved into the 
  newly created folders.
• it uses a couple of SVG widgets so hopefully you will see them.

I actually use it as a standalone on my Mac.

Origin.
I handle quite a few media files which, after processing, need to be placed in 
a folder having the same (or similar) name.
Given I do this a lot this was definately a task that could be automated in 
some way.

Enjoy!
___
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: Autocomplete toggle?

2017-09-26 Thread Monte Goulding via use-livecode

> On 27 Sep 2017, at 3:45 pm, Monte Goulding via use-livecode 
>  wrote:
> 
>> Here's the whole line. I first added the two hyphens at the front, then 
>> tried to add the trailing hyphenated comment at the end which is where it 
>> went off the rails:
>> 
>> -- pass scrollerDidScroll -- jg: don't pass, it blocks scrolling when there 
>> are nested behaviors

Is it possible that one or the other (or both) of these comments were inserted 
via autocomplete completion? It would have added a comment placeholder that you 
would have needed to delete. I’m wondering if deleting it didn’t clear the 
placeholder right… 

Cheers

Monte
___
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: Autocomplete toggle?

2017-09-26 Thread Monte Goulding via use-livecode

> On 27 Sep 2017, at 3:16 pm, J. Landman Gay via use-livecode 
>  wrote:
> 
> On 9/26/17 8:45 PM, Monte Goulding via use-livecode wrote:
>>> On 27 Sep 2017, at 9:12 am, J. Landman Gay via use-livecode 
>>>  wrote:
>>> 
>>> Apologies Monte, I'm sure autocomplete will be handy at some point, but is 
>>> there a command I can issue in the message box to turn it off for a while?
>> We have added a menu Edit > Options > Autocomplete to toggle it. It’s in 9.0 
>> DP 9 and will be in 8.2 DP 2.
> 
> Fantastic, thank you. I don't see that in the release notes.

Look for 20386

>>> My Android phone was cabled to the Mac and when asked, I clicked "yes" to 
>>> start a remote debugging session. In this case none of my breakpoints 
>>> triggered (not the fault of remote debugging, my breakpoints were in places 
>>> that didn't run) so I quit the app. LC never indicated I had disconnected.
>> Hmm… it should do that when the socket is closed as the app is shutting down…
> 
> I remember it used to, back before it stopped asking me at all. I wonder if 
> it's due to the lack of messages sent with the hardware buttons. There's no 
> notice of any kind for the Home and App Switcher keys. And the Back key is 
> iffy.
> 
> http://quality.livecode.com/show_bug.cgi?id=19420
> http://quality.livecode.com/show_bug.cgi?id=20456 
> 

Hmm…I'm not sure. It needs investigation.
> 
>>> 
>>> I began to edit a script and the phone went to sleep. There was severe lag, 
>>> the script editor started missing keystrokes and would then add them to 
>>> some other place in the line. Every attempted correction caused other 
>>> characters to be inserted somewhere else.
>> Wow that doesn’t sound good. I hope we can get to the bottom of it so it 
>> doesn’t occur again. Are you on 8.2 or 9.0?
> 
> This was in 9.0 dp 9.

OK

> 
>>> I tried to add a comment to a line and autocomplete kept inserting text for 
>>> me though I didn't select any of the suggestions
>> What kind of text? The same as you are entering but added elsewhere too or 
>> something else?
> 
> Here's the whole line. I first added the two hyphens at the front, then tried 
> to add the trailing hyphenated comment at the end which is where it went off 
> the rails:
> 
> -- pass scrollerDidScroll -- jg: don't pass, it blocks scrolling when there 
> are nested behaviors
> 
> It simply wouldn't accept my comment; I ended up typing it in BBEdit and 
> pasting it into the script. If I remember right, it didn't like anything 
> after my initials with the colon. It would miss a keystroke, I'd keep typing, 
> and then notice it had placed a character in the middle of a word a couple of 
> words back. I'd delete the extra character, set the insertion point to where 
> I was typing originally, type the letter again, and it would again insert it 
> back somewhere else. Sometimes it missed keystrokes entirely and they never 
> did show up. Meanwhile the suggestion list was popping up and down repeatedly 
> though I didn't interact with it.
> 
> The lag was severe but intermittent, maybe 2 seconds or so before a keystroke 
> appeared in the script text. That's why I suspected something was going on 
> with the debugging socket. The script I was editing was short, only about 60 
> lines, so it didn't seem like a delay due to text chunking.
> 
> It would put up suggestions when I wanted to type "don't" and then add the 
> "t" a couple of words back. It wasn't possible to type "scrolling". I never 
> did make it to the word "behaviors”,

It really sounds like things were going haywire. Sorry about that! It’s 
feasible there were execution errors on IDE stacks that were obscured by 
gRevDevelopment false.

> I gave up after a few minutes and typed it in BBEdit.

I can see why!

> 
>>> (shouldn't it ignore anything to the right of a comment delimiter?)
>> It should probably only present completions that are suitable within a 
>> comment context. I’ll need to think about that a bit.
> 
> 
> I'd encourage ignoring comments. It's similar to a problem we've had for ages 
> when I want to add a comment like this:
> 
>  doSomething  -- else the world ends
> 
> I have to change those to:
>  doSomething -- otherwise the world ends
> 
> 
>>> Eventually the script got so mangled I just quit without saving. I think if 
>>> I had been able to turn off autocomplete from the message box I could have 
>>> corrected and saved my work.
>> What this sounds like (at least I think it sounds like) is an autocomplete 
>> placeholder got messed up somehow causing typing in one place to also add 
>> the text elsewhere. If that’s the case then turning autocomplete off once 
>> it’s messed up won’t really help. There’s been a bit of movement in this 
>> code since DP 2 so it may be that your issue is fixed already. If you see it 
>> again do you think you could take some screen recording of it and send to me?
> 
> I'd need to find some screen recording software. Preferably fre

Re: Autocomplete toggle?

2017-09-26 Thread J. Landman Gay via use-livecode

On 9/26/17 8:45 PM, Monte Goulding via use-livecode wrote:



On 27 Sep 2017, at 9:12 am, J. Landman Gay via use-livecode 
 wrote:

Apologies Monte, I'm sure autocomplete will be handy at some point, but is 
there a command I can issue in the message box to turn it off for a while?


We have added a menu Edit > Options > Autocomplete to toggle it. It’s in 9.0 DP 
9 and will be in 8.2 DP 2.


Fantastic, thank you. I don't see that in the release notes. I see there 
are several other toggles too, which is cool. Choice is good.



My Android phone was cabled to the Mac and when asked, I clicked "yes" to start 
a remote debugging session. In this case none of my breakpoints triggered (not the fault 
of remote debugging, my breakpoints were in places that didn't run) so I quit the app. LC 
never indicated I had disconnected.


Hmm… it should do that when the socket is closed as the app is shutting down…


I remember it used to, back before it stopped asking me at all. I wonder 
if it's due to the lack of messages sent with the hardware buttons. 
There's no notice of any kind for the Home and App Switcher keys. And 
the Back key is iffy.


http://quality.livecode.com/show_bug.cgi?id=19420
http://quality.livecode.com/show_bug.cgi?id=20456



I began to edit a script and the phone went to sleep. There was severe lag, the 
script editor started missing keystrokes and would then add them to some other 
place in the line. Every attempted correction caused other characters to be 
inserted somewhere else.


Wow that doesn’t sound good. I hope we can get to the bottom of it so it 
doesn’t occur again. Are you on 8.2 or 9.0?


This was in 9.0 dp 9.




I tried to add a comment to a line and autocomplete kept inserting text for me 
though I didn't select any of the suggestions

What kind of text? The same as you are entering but added elsewhere too or 
something else?


Here's the whole line. I first added the two hyphens at the front, then 
tried to add the trailing hyphenated comment at the end which is where 
it went off the rails:


 -- pass scrollerDidScroll -- jg: don't pass, it blocks scrolling when 
there are nested behaviors


It simply wouldn't accept my comment; I ended up typing it in BBEdit and 
pasting it into the script. If I remember right, it didn't like anything 
after my initials with the colon. It would miss a keystroke, I'd keep 
typing, and then notice it had placed a character in the middle of a 
word a couple of words back. I'd delete the extra character, set the 
insertion point to where I was typing originally, type the letter again, 
and it would again insert it back somewhere else. Sometimes it missed 
keystrokes entirely and they never did show up. Meanwhile the suggestion 
list was popping up and down repeatedly though I didn't interact with it.


The lag was severe but intermittent, maybe 2 seconds or so before a 
keystroke appeared in the script text. That's why I suspected something 
was going on with the debugging socket. The script I was editing was 
short, only about 60 lines, so it didn't seem like a delay due to text 
chunking.


It would put up suggestions when I wanted to type "don't" and then add 
the "t" a couple of words back. It wasn't possible to type "scrolling". 
I never did make it to the word "behaviors", I gave up after a few 
minutes and typed it in BBEdit.



(shouldn't it ignore anything to the right of a comment delimiter?)


It should probably only present completions that are suitable within a comment 
context. I’ll need to think about that a bit.



I'd encourage ignoring comments. It's similar to a problem we've had for 
ages when I want to add a comment like this:


  doSomething  -- else the world ends

I have to change those to:
  doSomething -- otherwise the world ends



Eventually the script got so mangled I just quit without saving. I think if I 
had been able to turn off autocomplete from the message box I could have 
corrected and saved my work.


What this sounds like (at least I think it sounds like) is an autocomplete 
placeholder got messed up somehow causing typing in one place to also add the 
text elsewhere. If that’s the case then turning autocomplete off once it’s 
messed up won’t really help. There’s been a bit of movement in this code since 
DP 2 so it may be that your issue is fixed already. If you see it again do you 
think you could take some screen recording of it and send to me?


I'd need to find some screen recording software. Preferably free, if you 
know of anything.



We probably also need a way to turn off remote debugging when we're done with 
it, just in case.


Remote debugging might be a bit of a red herring here. It shouldn’t be doing 
anything unless there’s stuff coming in over the socket.


I could be falsely assigning cause and effect. Most of my session 
involved testing an app on a tethered phone, so debugging was the main 
thing that was different, and I had no trouble editing the script until 
after I started remote deb

Re: A modest proposal for a new property

2017-09-26 Thread hh via use-livecode
> Richard Gaskin wrote:

> > Mark Wieder wrote:
> > That's the point where I stopped trying to do pie charts in LiveCode.
> > Worse: try to set a tooltip showing the percentage under the cursor.
> 
> Multiple graphic objects?

Sadly no. This simply doubles the problem.
The pie chart was the cause I made the mentioned "pointInShape"-stack.
There it is done by computing a math relation for the arc, but would be
easier to see by a points-path, that describeds the outline of the pie.

> Jacqueline LG wrote:
> The original issue that influenced this one was how to provide a larger
> hit zone on an SVG widget. How would this property work for that?

[1] Active from widget:
Enlarge the size of the widget by transparent parts to the wanted hitZone
and react on a hitMessage from the widget which sends to its parent, for
example, "clickedInHitzone clickLoc, otherProps".
Here hitZone is a settable polygonial property, given as path or points,
as QL suggested. (For example you could set the hitzone of a svg icon to
the path of a different svg icon, or build it from the points of a LCS
graphic object or any points list).

OR

[2] Passive from widget:
Make in LCS clickable transparent regions, layer them as you want and
identify (possibly disabled) widgets with it. Then send a hitMessage to
these (possibly disabled) objects. And do the hard job of mixing native
and non-native layers by yourself.

*** Currently, in both cases the hitMessage has to be implemented by
the author of the widget, as sender or as receiver. ***

I have it already *partially* done for case [1] with my (shared) widgets
SVG_Text and OrientedText. There you can react or not on a click on
*transparent* parts of the widget. This would be doable with the same
technique for a big class of polygonial regions -- just as Quentin proposed.

Easy future for part [2]: The public handlers of a widget become really
"public" -- I hope someone of the LC-team comes in to at least that point.
Currently they can (easily) be made public only by the author of the widget.

What you can't currently have is something in LCS that can act on widgets
with a method that is not implememented in the widget. That would be doable
but, TMHO, would be against the 'nature' of LCB-widgets. I would immediately
stop making widgets then.

This is my clear opinion, may sound hard:
If someone wants LCB to imitate features of certain (formatting-)languages
like CSS, then he/she should better do that in that (formatting-)language,
it is easy enough. And not try to make LCB slower by requesting to organize
his/her (possibly chaotic) layout.

OR

[3] The simplest way:
Write your own (upgraded) widget. Then you can have your own hitZones,
may even be of size zero or covering the display of all possibly connected
devices. And you can even hide the widget's rectangular "overflow" by using
"clip to  on ".

___
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: Arrow keys in SE

2017-09-26 Thread J. Landman Gay via use-livecode

That is going to throw me, I use cmd-right arrow a lot. Cmd-left arrow too.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com



On September 26, 2017 6:29:54 PM Devin Asay via use-livecode 
 wrote:


Let me second Richard’s observation, but it’s effects are slightly 
different. On the Mac it is standard to be able to use Cmd + right arrow to 
move to the end of a line of text. With auto complete in the new SE that no 
longer works. Anyone else observing that?


Devin

On Sep 26, 2017, at 3:02 PM, panagiotis merakos via use-livecode 
 wrote:


Hi Richard,

The up and down arrow keys should work as expected for navigating in the
SE, unless you are affected by bug
http://quality.livecode.com/show_bug.cgi?id=20448 (see also its duplicates)

Best,
Panos
--

On Tue, Sep 26, 2017 at 9:53 PM, Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:


With the Auto-complete in the new Script Editor I can't seem to use arrow
keys to navigate in text anymore - the Up and Down keys keep bringing up
the suggestions popup.

Is there a way to use the Up and Down arrow keys for navigation in the SE?

--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web

ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
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


___
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


Devin Asay
Learn to code with LiveCode University
https://livecode.com/store/education/

___
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




___
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: Arrow keys in SE

2017-09-26 Thread Monte Goulding via use-livecode

> On 27 Sep 2017, at 9:27 am, Devin Asay via use-livecode 
>  wrote:
> 
> Let me second Richard’s observation, but it’s effects are slightly different. 
> On the Mac it is standard to be able to use Cmd + right arrow to move to the 
> end of a line of text. With auto complete in the new SE that no longer works. 
> Anyone else observing that?

Ys it has been reported and fixed. The next version will make the autocomplete 
shortcut cmd+option+right.

Cheers

Monte
___
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: A modest proposal for a new property

2017-09-26 Thread J. Landman Gay via use-livecode
The original issue that influenced this one was how to provide a larger hit 
zone on an SVG widget. How would this property work for that?


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com



On September 26, 2017 6:56:56 PM Richard Gaskin via use-livecode 
 wrote:



Colin Holgate wrote:

 > The way that this problem is handled in sort other tools is to have a
 > definable hit area for each control (usually those would be buttons).
 > You can set the idle, over, and pressed versions of the button’s
 > image, and also you can set the hit area image.
 >
 > LiveCode already has a way to do most of that, couldn’t the hit area
 > be another entry I the inspector’s icons section?

This seems like a viable option, easy to use for a wide range of
use-cases and presumably within reasonable cost for the engine team to
implement, since it would be a variant of the existing code used to
calculate hit regions from the alpha channel.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  
  ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
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




___
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: Autocomplete toggle?

2017-09-26 Thread Monte Goulding via use-livecode

> On 27 Sep 2017, at 9:12 am, J. Landman Gay via use-livecode 
>  wrote:
> 
> Apologies Monte, I'm sure autocomplete will be handy at some point, but is 
> there a command I can issue in the message box to turn it off for a while?

We have added a menu Edit > Options > Autocomplete to toggle it. It’s in 9.0 DP 
9 and will be in 8.2 DP 2.
> 
> Yesterday it went amok and I had to quit LC and restart to get normal 
> operation back. In those situations it would be good to be able to turn it 
> off.

Well those situations shouldn’t happen. Sorry about that.

> I don't have a recipe but I think it may have been related to remote 
> debugging. As near as I can remember:
> 
> My Android phone was cabled to the Mac and when asked, I clicked "yes" to 
> start a remote debugging session. In this case none of my breakpoints 
> triggered (not the fault of remote debugging, my breakpoints were in places 
> that didn't run) so I quit the app. LC never indicated I had disconnected.

Hmm… it should do that when the socket is closed as the app is shutting down…
> 
> I began to edit a script and the phone went to sleep. There was severe lag, 
> the script editor started missing keystrokes and would then add them to some 
> other place in the line. Every attempted correction caused other characters 
> to be inserted somewhere else.

Wow that doesn’t sound good. I hope we can get to the bottom of it so it 
doesn’t occur again. Are you on 8.2 or 9.0?

> I tried to add a comment to a line and autocomplete kept inserting text for 
> me though I didn't select any of the suggestions

What kind of text? The same as you are entering but added elsewhere too or 
something else?

> (shouldn't it ignore anything to the right of a comment delimiter?)

It should probably only present completions that are suitable within a comment 
context. I’ll need to think about that a bit.

> 
> Eventually the script got so mangled I just quit without saving. I think if I 
> had been able to turn off autocomplete from the message box I could have 
> corrected and saved my work.

What this sounds like (at least I think it sounds like) is an autocomplete 
placeholder got messed up somehow causing typing in one place to also add the 
text elsewhere. If that’s the case then turning autocomplete off once it’s 
messed up won’t really help. There’s been a bit of movement in this code since 
DP 2 so it may be that your issue is fixed already. If you see it again do you 
think you could take some screen recording of it and send to me?
> 
> We probably also need a way to turn off remote debugging when we're done with 
> it, just in case.

Remote debugging might be a bit of a red herring here. It shouldn’t be doing 
anything unless there’s stuff coming in over the socket.

Cheers

Monte

___
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: A modest proposal for a new property

2017-09-26 Thread Richard Gaskin via use-livecode

Mark Wieder wrote:

> On 09/26/2017 06:02 PM, Richard Gaskin via use-livecode wrote:
>
>> Worse: try to set a tooltip showing the percentage under the
>> cursor.
> >
> > Multiple graphic objects?
> >
>
> Been there.
> When they're stacked on top of each other the transparent part of the
> rect is still the object under the cursor, and so obscures what's
> underneath.

I would consider that a bug.  Polygons work quite nicely in tracking 
only mouse actions over filled area; I can't imagine any reason we 
wouldn't expect the same for all graphics.


Is there a bug report/enhancement request for this?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
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


Offset Referenced Image Data

2017-09-26 Thread Alejandro Tejada via use-livecode
Until LC fills this request, check these options
discussed before:

1) Ink Effects for masking an image within a group

Scott Rossi wrote:
> Try this stack (in your message box):
> go url
"http://www.tactilemedia.com/site_files/downloads/masking_options.rev";

> The reason why a group with ink effects might be a
> preferable masking solution is the image can be
> positioned/resized independently of the mask.
> This is demonstrated in the sample stack.
> As Jacque pointed out, when using a backPattern,
> the image is always drawn from the topLeft of the
> object and is fixed.  Also a backPattern does not
> support translucency, while a group can. But using
> a group can be a bit more work.

2) Hidden Point Technique

Alejandro Tejada wrote:
> Try these scripts too, before using a group:

1) Create a new stack
2) Create a polygon graphic
and set the points of it to:

0,0

34,268
224,268
127,365
34,268

3) import an image into this stack,
put the image in a corner, where it does not
hide the graphic and:

set the backpattern of grc 1 to the id of img 1

(now, the imported image is cropped within
the graphic)

4) set the script of the graphic to this variation
of Scott Rossi script (posted by Bernd) to move
the first point of the graphic and (at the same time)
move the image within the graphic:

local lpoints,tClick,tFirstPoint
-- based on Scott Rossi script for masking images
local sMinX, sMinY

on mouseDown
   put mouseH(),mouseV() into tClick
   put the points of me into lpoints
   put line 1 of lpoints into tFirstPoint
   put line 2 to - 1 of lpoints into tPointLIst
   filter tPointList without ""
   sort tPointList numeric ascending by item 1 of each
   put item 1 of line 1 of tPointList into sMinX
   sort tPointList numeric ascending by item 2 of each
   put item 2 of line 1 of tPointLIst into sMinY
   put "mouseDown" & cr & lpoints & cr & cr into fld 1
end mouseDown

on mouseMove X,Y
   if tClick = "" then exit mouseMove
   put  (X - item 1 of tClick,Y - item 2 of tClick)
   put  (X - item 1 of tClick) + item 1 of tFirstPoint,(Y - item 2 of
tClick) + item 2 of tFirstPoint into line 1 of lpoints
   if item 1 of line 1 of lpoints > sMinX then put sMinX into item 1 of line
1 of lpoints
   if item 2 of line 1 of lpoints > sMinY then put sMinY into item 2 of line
1 of lpoints
   set the points of me to lpoints
end mouseMove

on mouseUp
   put "" into tClick
end mouseUp

on mouseRelease
   put "" into tClick
end mouseRelease
--

Check this thread in:
http://lists.runrev.com/pipermail/use-livecode/2016-March/225312.html

Al
___
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: A modest proposal for a new property

2017-09-26 Thread Mark Wieder via use-livecode

On 09/26/2017 06:02 PM, Richard Gaskin via use-livecode wrote:

>> Worse: try to set a tooltip showing the percentage under the cursor.
>
> Multiple graphic objects?
>

Been there.
When they're stacked on top of each other the transparent part of the 
rect is still the object under the cursor, and so obscures what's 
underneath.


--
 Mark Wieder
 ahsoftw...@gmail.com

___
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


OT: OMGwebsites

2017-09-26 Thread Mark Wieder via use-livecode

I gotta say I feel better about the LC website after reading this:

https://hackernoon.com/for-the-love-of-god-please-tell-me-what-your-company-does-c2f0b835ab92

--
 Mark Wieder
 ahsoftw...@gmail.com

___
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: A modest proposal for a new property

2017-09-26 Thread Richard Gaskin via use-livecode

Mark Wieder wrote:

On 09/26/2017 01:46 PM, hh via use-livecode wrote:


Now solve this simple example:

Make a circular arc showing 70% of a pie and then tell us when clicking
into the oval which part is hit, the 70% or the transparent 30%.


That's the point where I stopped trying to do pie charts in LiveCode.
Worse: try to set a tooltip showing the percentage under the cursor.


Multiple graphic objects?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
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: A modest proposal for a new property

2017-09-26 Thread Mark Wieder via use-livecode

On 09/26/2017 01:46 PM, hh via use-livecode wrote:


Now solve this simple example:

Make a circular arc showing 70% of a pie and then tell us when clicking
into the oval which part is hit, the 70% or the transparent 30%.


That's the point where I stopped trying to do pie charts in LiveCode.
Worse: try to set a tooltip showing the percentage under the cursor.

--
 Mark Wieder
 ahsoftw...@gmail.com

___
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: A modest proposal for a new property

2017-09-26 Thread Richard Gaskin via use-livecode

Colin Holgate wrote:

> The way that this problem is handled in sort other tools is to have a
> definable hit area for each control (usually those would be buttons).
> You can set the idle, over, and pressed versions of the button’s
> image, and also you can set the hit area image.
>
> LiveCode already has a way to do most of that, couldn’t the hit area
> be another entry I the inspector’s icons section?

This seems like a viable option, easy to use for a wide range of 
use-cases and presumably within reasonable cost for the engine team to 
implement, since it would be a variant of the existing code used to 
calculate hit regions from the alpha channel.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
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: A modest proposal for a new property

2017-09-26 Thread Richard Gaskin via use-livecode

hh wrote:

> Now solve this simple example:
>
> Make a circular arc showing 70% of a pie and then tell us when
> clicking into the oval which part is hit, the 70% or the transparent
> 30%.
>
> A one-liner?
>
> The OP's proposal, for example, would define a series of points along
> the outline path of the uncomplete pie as hit-region. Good idea.

I don't have a one-liner for that.

Given a set of coordinates describing the hit region as suggested, what 
would be the one-liner to solve it?


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
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: Arrow keys in SE

2017-09-26 Thread Devin Asay via use-livecode
Let me second Richard’s observation, but it’s effects are slightly different. 
On the Mac it is standard to be able to use Cmd + right arrow to move to the 
end of a line of text. With auto complete in the new SE that no longer works. 
Anyone else observing that?

Devin

> On Sep 26, 2017, at 3:02 PM, panagiotis merakos via use-livecode 
>  wrote:
> 
> Hi Richard,
> 
> The up and down arrow keys should work as expected for navigating in the
> SE, unless you are affected by bug
> http://quality.livecode.com/show_bug.cgi?id=20448 (see also its duplicates)
> 
> Best,
> Panos
> --
> 
> On Tue, Sep 26, 2017 at 9:53 PM, Richard Gaskin via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> With the Auto-complete in the new Script Editor I can't seem to use arrow
>> keys to navigate in text anymore - the Up and Down keys keep bringing up
>> the suggestions popup.
>> 
>> Is there a way to use the Up and Down arrow keys for navigation in the SE?
>> 
>> --
>> Richard Gaskin
>> Fourth World Systems
>> Software Design and Development for the Desktop, Mobile, and the Web
>> 
>> ambassa...@fourthworld.comhttp://www.FourthWorld.com
>> 
>> ___
>> 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
>> 
> ___
> 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

Devin Asay
Learn to code with LiveCode University
https://livecode.com/store/education/

___
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

Autocomplete toggle?

2017-09-26 Thread J. Landman Gay via use-livecode
Apologies Monte, I'm sure autocomplete will be handy at some point, but 
is there a command I can issue in the message box to turn it off for a 
while?


Yesterday it went amok and I had to quit LC and restart to get normal 
operation back. In those situations it would be good to be able to turn 
it off. I don't have a recipe but I think it may have been related to 
remote debugging. As near as I can remember:


My Android phone was cabled to the Mac and when asked, I clicked "yes" 
to start a remote debugging session. In this case none of my breakpoints 
triggered (not the fault of remote debugging, my breakpoints were in 
places that didn't run) so I quit the app. LC never indicated I had 
disconnected.


I began to edit a script and the phone went to sleep. There was severe 
lag, the script editor started missing keystrokes and would then add 
them to some other place in the line. Every attempted correction caused 
other characters to be inserted somewhere else. I tried to add a comment 
to a line and autocomplete kept inserting text for me though I didn't 
select any of the suggestions (shouldn't it ignore anything to the right 
of a comment delimiter?)


Eventually the script got so mangled I just quit without saving. I think 
if I had been able to turn off autocomplete from the message box I could 
have corrected and saved my work.


We probably also need a way to turn off remote debugging when we're done 
with it, just in case.


LC 9.0 dp 9
Mac OS X Sierra

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
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: Arrow keys in SE

2017-09-26 Thread panagiotis merakos via use-livecode
Hi Richard,

The up and down arrow keys should work as expected for navigating in the
SE, unless you are affected by bug
http://quality.livecode.com/show_bug.cgi?id=20448 (see also its duplicates)

Best,
Panos
--

On Tue, Sep 26, 2017 at 9:53 PM, Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:

> With the Auto-complete in the new Script Editor I can't seem to use arrow
> keys to navigate in text anymore - the Up and Down keys keep bringing up
> the suggestions popup.
>
> Is there a way to use the Up and Down arrow keys for navigation in the SE?
>
> --
>  Richard Gaskin
>  Fourth World Systems
>  Software Design and Development for the Desktop, Mobile, and the Web
>  
>  ambassa...@fourthworld.comhttp://www.FourthWorld.com
>
> ___
> 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
>
___
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


Arrow keys in SE

2017-09-26 Thread Richard Gaskin via use-livecode
With the Auto-complete in the new Script Editor I can't seem to use 
arrow keys to navigate in text anymore - the Up and Down keys keep 
bringing up the suggestions popup.


Is there a way to use the Up and Down arrow keys for navigation in the SE?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
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: A modest proposal for a new property

2017-09-26 Thread hh via use-livecode
@Richard G.

Everybody engaged in this thread knows about "within" and "intersect".
They are good and very effective where they are applicable.

Now solve this simple example:

Make a circular arc showing 70% of a pie and then tell us when clicking
into the oval which part is hit, the 70% or the transparent 30%.

A one-liner?

The OP's proposal, for example, would define a series of points along the 
outline path of the uncomplete pie as hit-region. Good idea.
___
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


Offset Referenced Image Data

2017-09-26 Thread Sannyasin Brahmanathaswami via use-livecode
I put this enhancement request in if anyone is interested

http://quality.livecode.com/show_bug.cgi?id=20473

in brief

" We need the ability to have an image object "mask" referenced image data by 
setting the offsets of the image, common use case is "I need this in a square"

But don't want to mess with importing images and clipping via group props.

effectively the same thing as "overflow-hidden" in CSS


___
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: A modest proposal for a new property

2017-09-26 Thread Sannyasin Brahmanathaswami via use-livecode
Though this is not a universal solution… but related..

FWIW we have an enhancement request in for widgets to allow us to set their 
margins. 
The entire area of a widget  is its "hit box" (term from Unity)

So all we need it to be able to set margins. Typical use case might be to have 
a 24 X 24 widget in a box that is 414w x 40 high… set the left margin to 20 and 
the widget effectively aligns left and the entire area across the screen 
becomes a hit box.



On 9/26/17, 9:21 AM, "use-livecode on behalf of Richard Gaskin via 
use-livecode"  wrote:

If you need a rectangular clickable area with an image inside it, what 
you have is a button - you can set the icon of a button to the image you 
want displayed in it.

It's still two objects, but lets you store the image object in a 
separate stack where you can keep all of your image assets together, 
rather than adding an extra object to the UI stack.

Extra bonus points: FWIW when I last tested this (though it's been quite 
some time ago) buttons rendered much faster than images.

___
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

HTML5 - Javascript send text to textarea html object?

2017-09-26 Thread JOHN PATTEN via use-livecode
Hello all,

Is it possible for and HTML5 app to send text from a variable in the HTML5 
stack to a textarea object in, say, a web form via javascript? 

While I’m at it, would it be possible to trigger the web form submit action, 
via javascript in the HTML5 app?

If so, how might that look?

Thank you!

John Patten
SUSD








___
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: A modest proposal for a new property

2017-09-26 Thread Richard Gaskin via use-livecode

Ralph DiMola wrote:

> How would you use the alpha channel to do this? I just had an image
> and the transparent part of the image did not send a mouseup message.
> I put a button behind the image to solve it. Was there a way I could
> have used the alpha channel to get the mouseup message anywhere in
> the image and still retain the transparency?

An image which appears to the user to have empty regions will have those 
regions treated as empty by LC's default hit testing.  If doing your own 
hit testing you can adjust the threshold passed to the intersect 
function, but that's a lot of work compared to just using the best 
object for the job at hand:


If you need a rectangular clickable area with an image inside it, what 
you have is a button - you can set the icon of a button to the image you 
want displayed in it.


It's still two objects, but lets you store the image object in a 
separate stack where you can keep all of your image assets together, 
rather than adding an extra object to the UI stack.


Extra bonus points: FWIW when I last tested this (though it's been quite 
some time ago) buttons rendered much faster than images.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
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: [ANN] Release 9.0.0 DP-9

2017-09-26 Thread panagiotis merakos via use-livecode
Hi Till,

We have not received any reports about missing Dictionary in LC 9.0.0 DP-9
on OSX.

Not sure why you see that issue. I would suggest you delete and reinstall
LC 9.0.0 DP-9.

Please let us know if this fixed the issue for you.

Best,
Panos
--

PS: Just to double-check, you do have enough free space in this machine,
don't you?

On Tue, Sep 26, 2017 at 6:16 PM, William Prothero via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I get the dictionary in this version.
> Bill P
>
> > On Sep 26, 2017, at 7:09 AM, Till Bandi  wrote:
> >
> > Hi Panos
> >
> > the dictionary is again missing
> >
> > the recipes you proposed in your  mail of june 21st do not work (there
> is no  „/Users//Library/Application
> Support/RunRev/Documentation Cache/ folder“
> >
> > The other possibility, to use the TiniyDictionary proposed by Mark
> Wieder doesn’t work either: LiveCard warns „The handler: populateMainField
> has reached the recursion limit of : 40. Execution will be terminated
> to prevent hang“
> >
> > I tried to reinstall LiveCard and restarted the system (macOS Sierra
> Version 10.12.6) but that did not make any difference.
> >
> > Is there an other work around possible?
> >
> > Till
> >
> >> Am 22.09.2017 um 11:38 schrieb panagiotis merakos <
> panos.mera...@livecode.com>:
> >>
> >> Dear list members,
> >>
> >> We are pleased to announce the release of LiveCode 9.0.0 DP-9.
> >>
> >
> >
> > ___
> > livecode-dev mailing list
> > livecode-...@lists.runrev.com
> > http://lists.runrev.com/mailman/listinfo/livecode-dev
>
>
> ___
> 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
___
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: A modest proposal for a new property

2017-09-26 Thread Ralph DiMola via use-livecode
How would you use the alpha channel to do this? I just had an image and the 
transparent part of the image did not send a mouseup message. I put a button 
behind the image to solve it. Was there a way I could have used the alpha 
channel to get the mouseup message anywhere in the image and still retain the 
transparency?

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net


-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of 
Colin Holgate via use-livecode
Sent: Tuesday, September 26, 2017 1:18 PM
To: How to use LiveCode
Cc: Colin Holgate
Subject: Re: A modest proposal for a new property

How do you currently set the alpha channel? The hit area icon I was suggesting 
could be an image with the alpha channel that the button uses. That way you 
could have any shape hit area, it wouldn’t have to be based on the button’s 
icon.

> On Sep 26, 2017, at 1:14 PM, Richard Gaskin via use-livecode 
>  wrote:
> 
> Colin Holgate write:
> 
> > The way that this problem is handled in sort other tools is to have 
> > a definable hit area for each control (usually those would be buttons).
> > You can set the idle, over, and pressed versions of the button’s 
> > image, and also you can set the hit area image.
> >
> > LiveCode already has a way to do most of that, couldn’t the hit area 
> > be another entry I the inspector’s icons section?
> 
> Where would one obtain the list of polygon points?
> 
> Currently the hit region is definable using the alpha channel.


___
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


___
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: A modest proposal for a new property

2017-09-26 Thread Colin Holgate via use-livecode
How do you currently set the alpha channel? The hit area icon I was suggesting 
could be an image with the alpha channel that the button uses. That way you 
could have any shape hit area, it wouldn’t have to be based on the button’s 
icon.

> On Sep 26, 2017, at 1:14 PM, Richard Gaskin via use-livecode 
>  wrote:
> 
> Colin Holgate write:
> 
> > The way that this problem is handled in sort other tools is to have a
> > definable hit area for each control (usually those would be buttons).
> > You can set the idle, over, and pressed versions of the button’s
> > image, and also you can set the hit area image.
> >
> > LiveCode already has a way to do most of that, couldn’t the hit area
> > be another entry I the inspector’s icons section?
> 
> Where would one obtain the list of polygon points?
> 
> Currently the hit region is definable using the alpha channel.


___
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: [ANN] Release 9.0.0 DP-9

2017-09-26 Thread William Prothero via use-livecode
I get the dictionary in this version.
Bill P

> On Sep 26, 2017, at 7:09 AM, Till Bandi  wrote:
> 
> Hi Panos
> 
> the dictionary is again missing
> 
> the recipes you proposed in your  mail of june 21st do not work (there is no  
> „/Users//Library/Application Support/RunRev/Documentation 
> Cache/ folder“
> 
> The other possibility, to use the TiniyDictionary proposed by Mark Wieder 
> doesn’t work either: LiveCard warns „The handler: populateMainField has 
> reached the recursion limit of : 40. Execution will be terminated to 
> prevent hang“
> 
> I tried to reinstall LiveCard and restarted the system (macOS Sierra Version 
> 10.12.6) but that did not make any difference.
> 
> Is there an other work around possible?
> 
> Till
> 
>> Am 22.09.2017 um 11:38 schrieb panagiotis merakos 
>> :
>> 
>> Dear list members,
>> 
>> We are pleased to announce the release of LiveCode 9.0.0 DP-9.
>> 
> 
> 
> ___
> livecode-dev mailing list
> livecode-...@lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/livecode-dev


___
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: A modest proposal for a new property

2017-09-26 Thread Richard Gaskin via use-livecode

Colin Holgate write:

> The way that this problem is handled in sort other tools is to have a
> definable hit area for each control (usually those would be buttons).
> You can set the idle, over, and pressed versions of the button’s
> image, and also you can set the hit area image.
>
> LiveCode already has a way to do most of that, couldn’t the hit area
> be another entry I the inspector’s icons section?

Where would one obtain the list of polygon points?

Currently the hit region is definable using the alpha channel.

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
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: A modest proposal for a new property

2017-09-26 Thread Colin Holgate via use-livecode
The way that this problem is handled in sort other tools is to have a definable 
hit area for each control (usually those would be buttons). You can set the 
idle, over, and pressed versions of the button’s image, and also you can set 
the hit area image.

LiveCode already has a way to do most of that, couldn’t the hit area be another 
entry I the inspector’s icons section?
___
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: A modest proposal for a new property

2017-09-26 Thread Richard Gaskin via use-livecode
Certainly doable in a script, but consider the simplicity of this with a 
polygon as complex and even self-intersecting as you'd like:


on mouseMove
   put within(grc 1, the mouseLoc )
end mouseMove

--
 Richard Gaskin
 Fourth World Systems


hh wrote:

I asked because I thought QL's proposal might be based on a new algorithm?

There are already (partial) solutions to that:

In LCS getting "transparency" clicks of cross-layered objects is hard but
possible for a big class of regions (see stack #47 = "pointInShape" of
the Raspi stacks collection, July 2015).

For LCB I already implemented "transparency clicks" for rotated rectangular
shapes in my last two (already shared) widgets. Just now also for a bit more
complicated shapes (-> LC Global, Nov).

Both methods are based on the subdivison algorithm by MShimrat (Aug 1962).
This algorithm is in LCB/LC 9.0.0-dp9 *very* fast, by the way, usable in a
mouseDown handler for checking regions defined by several hundred points.

For more general regions (closed polygons), as Quentin L. suggests, this
algorithm is also applicable, *without change* as long as the region-polygons
are not self-intersecting.


___
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: A modest proposal for a new property

2017-09-26 Thread hh via use-livecode
I asked because I thought QL's proposal might be based on a new algorithm?

There are already (partial) solutions to that:

In LCS getting "transparency" clicks of cross-layered objects is hard but
possible for a big class of regions (see stack #47 = "pointInShape" of
the Raspi stacks collection, July 2015).

For LCB I already implemented "transparency clicks" for rotated rectangular
shapes in my last two (already shared) widgets. Just now also for a bit more
complicated shapes (-> LC Global, Nov).

Both methods are based on the subdivison algorithm by MShimrat (Aug 1962).
This algorithm is in LCB/LC 9.0.0-dp9 *very* fast, by the way, usable in a
mouseDown handler for checking regions defined by several hundred points.

For more general regions (closed polygons), as Quentin L. suggests, this
algorithm is also applicable, *without change* as long as the region-polygons
are not self-intersecting.


___
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: A modest proposal for a new property

2017-09-26 Thread Richard Gaskin via use-livecode
For many images with alpha layers the returned values would be a complex 
set of points, and for some discontiguous.


If the purpose for obtaining that collection of points is to determine 
whether a click at a specific location would be inside or outside the 
control's region(s), that would require a lot of calculations, taking 
non-trivial development time to write and a fair bit of CPU time to 
execute in script.


It may be simpler and more efficient to let the engine do that 
calculation using existing functions built into the engine.


See the Dictionary entries for:

- "within" function - describes how the clickable region is calculated
   and will serve the majority of use-cases well.

- "intersect" function - which goes further to allow the scripter to
   optionally define an alpha channel threshold.

--
 Richard Gaskin
 Fourth World Systems


Quentin Long wrote:


In the past few List digests, there's been some discussion of practical issues 
regarding when a click does or doesn't count as clicking *on* a particular 
item. So, here's a proposed addition to LiveCode…

=

Name: clickableRegion

Recognized abbreviation: clickReg

"clickableRegion" is a proposed property of anything in a stack that might a 
user might reasonably be expected to click on—controls, that is. We're talking buttons, 
fields, graphics, images, yada yada yada.

The clickableRegion of a control is a return-delimited list of points that 
define a region of the screen. Since clickableRegion is a property of a 
control, the engine's internal representation of these points should probably 
use the location of the control as the origin (the 0,0 point) for the 
clickableRegion's points.

Any click whose clickLoc is within the area defined by a control's 
clickableRegion, will be treated by the engine as if it were a click on that 
control.

The default value of a control's clickableRegion should be determined by that 
control's visible-on-screen pixels—for fields, this should be the field's 
rectangle; for graphics, this should be the points of the graphic; and so on 
and so forth.

The clickableRegion property should be both get-able and set-able. If you clear the 
clickableRegion (such as by setting it to ""), it should revert back to its 
default value.

Since clickableRegion can be set to arbitrary values, it may well happen that 2 
or more controls have overlapping clickableRegions. This may not be a problem 
if the engine can simply make use of whatever magic it does when it handles 
clickLocs which fall within the rects of 2+ overlapping buttons. If the 
engine's existing 'click-disambiguation' machinery does not suffice to 
determine which control an ambiguous click is meant for, go with the control 
that has the highest-value layer property.

=

Thoughts/comments/complaints?



___
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: A modest proposal for a new property

2017-09-26 Thread Bob Sneidar via use-livecode
That won't work. Everything else is screen based, so a conversion of 
coordinates would have to be performed if relating to anything like object 
location. 

Bob S


> On Sep 25, 2017, at 23:24 , Quentin Long via use-livecode 
>  wrote:
> 
> The clickableRegion of a control is a return-delimited list of points that 
> define a region of the screen. Since clickableRegion is a property of a 
> control, the engine's internal representation of these points should probably 
> use the location of the control as the origin (the 0,0 point) for the 
> clickableRegion's points.


___
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: A modest proposal for a new property

2017-09-26 Thread hh via use-livecode
How would you determine that a clickLoc is within such a
"region" or not?
(Say, for simplicity, the region is inside the control's
rectangle)

___
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


Update to Dash "docset" creator stack

2017-09-26 Thread James Hale via use-livecode
I have just updated the Make DocSet stack to version 1.8

This adds:
• Script colorization in the Syntax and Example sections.
• Tidied up some formatting.
• Links to terms and other entries now limited to Summary, Changes, Description 
and Related sections
James
___
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