Re: What speed advantage comes from a private handler?

2016-11-08 Thread Monte Goulding

> On 9 Nov. 2016, at 12:44 pm, Phil Davis  wrote:
> 
> function app_helperAppPath pAppName
>dispatch function ( "_helperAppPath_" & the platform ) to me with pAppName
>return the result
> end app_helperAppPath
> 
> 
> function _helperAppPath_MacOS pAppName
>-- Mac-specific app path discovery code
> end _helperAppPath_MacOS
> 
> 
> function _helperAppPath_Win32 pAppName
>-- Windows-specific app path discovery code
> end _helperAppPath_Win32

Hmm… I guess that is a use case where support for private handlers in dispatch 
would be helpful. I’d probably need to see an example that could be so easily 
refactored away with a control structure to be sure on that though.
___
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: What speed advantage comes from a private handler?

2016-11-08 Thread Phil Davis
Actually here's another situation where I've used 'dispatch' simply to 
avoid a 'do'. But I could as easily use 'send' to get the job done:



function app_helperAppPath pAppName
dispatch function ( "_helperAppPath_" & the platform ) to me with 
pAppName

return the result
end app_helperAppPath


function _helperAppPath_MacOS pAppName
-- Mac-specific app path discovery code
end _helperAppPath_MacOS


function _helperAppPath_Win32 pAppName
-- Windows-specific app path discovery code
end _helperAppPath_Win32


Phil Davis



On 11/8/16 5:27 PM, Monte Goulding wrote:

On 9 Nov. 2016, at 12:23 pm, Phil Davis  wrote:

Use case: You use 'dispatch' as a coding style preference.

(That's all I could come up with.)

;-)

Actually thinking on it I can imagine a use case but it fails if you are 
wanting to dispatch a private handler:

dispatch “SomethingOverridableInABehaviorInstance” to me

command SomethingOverridableInABehaviorInstance
— default implementation
end SomethingOverridableInABehaviorInstance
___
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


--
Phil Davis


___
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: What speed advantage comes from a private handler?

2016-11-08 Thread Monte Goulding

> On 9 Nov. 2016, at 12:23 pm, Phil Davis  wrote:
> 
> Use case: You use 'dispatch' as a coding style preference.
> 
> (That's all I could come up with.)

;-)

Actually thinking on it I can imagine a use case but it fails if you are 
wanting to dispatch a private handler:

dispatch “SomethingOverridableInABehaviorInstance” to me

command SomethingOverridableInABehaviorInstance
   — default implementation
end SomethingOverridableInABehaviorInstance
___
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: What speed advantage comes from a private handler?

2016-11-08 Thread Phil Davis

Use case: You use 'dispatch' as a coding style preference.

(That's all I could come up with.)

Phil


On 11/8/16 5:00 PM, Monte Goulding wrote:

On 9 Nov. 2016, at 11:52 am, Phil Davis  wrote:

You also can't execute a private handler with the "dispatch" command.

I guess that’s true but what use case is there for dispatch within the same 
script?
___
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


--
Phil Davis


___
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: What speed advantage comes from a private handler?

2016-11-08 Thread Monte Goulding

> On 9 Nov. 2016, at 11:52 am, Phil Davis  wrote:
> 
> You also can't execute a private handler with the "dispatch" command.

I guess that’s true but what use case is there for dispatch within the same 
script?
___
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: What speed advantage comes from a private handler?

2016-11-08 Thread Monte Goulding

> On 9 Nov. 2016, at 11:31 am, James Hale  wrote:
> 
> Can someone explain why making a handler private speeds up a script?

Private handlers are called directly rather than giving all the frontscripts a 
chance to handle them.

> Should I be making more of my handlers private?

If you only ever need or want to call a handler from the same script then make 
it private.

One thing to watch out for though is at the moment the pending messages queue 
does not have a sender reference which means that you can’t send in time 
private handlers or use private handlers for socket callbacks (which are sent 
via pending messages).

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

What speed advantage comes from a private handler?

2016-11-08 Thread James Hale
In a reply to a post on loop speed Mark made this aside...
> the aData array (also making sure explodeRow is private will help too)
Can someone explain why making a handler private speeds up a script?
Should I be making more of my handlers private?

Really intrigued. 

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


Re: iPad Pro screenshots?

2016-11-08 Thread Alan
Thanks Ralph, Phil, Colin

So the interim solution (until I upgrade my systems to get access to iPad Pro 
Simulator) is to take a Retina screenshot and scale up (this is to satisfy that 
AppStore requirements) and hope that's good enough...! :-)

cheers

Alan

On 9 Nov 2016, at 4:03 am,  
 wrote:

> From: "Ralph DiMola" 
> Subject: RE: iPad Pro screenshots?
> 
> I create all my screen shots in the IDE. I resize the screen for each 
> resolution and then export a screen shot to a png. The status bar is missing 
> but one click export of all resolutions makes up for that.
> 
> 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 Phil Jimmieson
> Sent: Tuesday, November 08, 2016 11:03 AM
> Subject: Re: iPad Pro screenshots?
> 
> The screen size is bigger, and Apple now expect you to provide at least one 
> screenshot in that size. I did it for a recent App update using the iPad Pro 
> simulator in Xcode 8 on iOS 10.11.6 on a retina iMac. The previous time I did 
> it for an App update I took a standard iPad retina screenshot and scaled it 
> up in Preview - the reviewer in the App Store didn?t notice it was very 
> slightly blurry...
> 
> 
> 
>> On 8 Nov 2016, at 15:20, Colin Holgate  wrote:
>> 
>> All iPad apps work on iPad Pro. What would you achieve if you could simulate 
>> it, that you can?t already do?
>> 
>> 
>>> On Nov 8, 2016, at 6:50 AM, Alan  wrote:
>>> 
>>> Thanks for the replies Peter, Stephen, Terry... but I guess I didn't 
>>> explain myself well enough.
>>> 
>>> The problem is that, AFAIK, the iPad Pro isn't supported with OSX 10.9.5?  
>>> i.e. I can't install the required xCode that will provide the necessary 
>>> simulator and/or support for building for iPad Pro (if I had a physical one 
>>> to test on).
>>> 
>>> Is that correct and, if so, is there a work-around? If I'm wrong, what can 
>>> I install to support iPad Pro simulator on OSX 10.9.5?
>>> 
>>> Thanks!


___
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: property inspector lock 2

2016-11-08 Thread Mike Kerner
What I'm seeing is if I unlock the PI, then I ask for a PI on something
else (say an object on a separate card), the unlocked PI becomes up locked
with the new object.  I did think  about the location being the same, so I
checked that, but no joy.  Same token:  If I lock the PI, it doesn't always
seem to stick, either, and I end up with extra windows when I want one.

On Tue, Nov 8, 2016 at 2:52 PM, stephen barncard <
stephenrevoluti...@barncard.com> wrote:

> I've noticed that inspector windows stack perfectly on top of each other,
> and the 'new' inspector falls directly on top of the locked one, giving the
> visual feedback of being replaced, when actually the locked one is behind
> the new one. Some UI designs make sure 'new' windows will be offset
> slightly, revealing the obfuscated window.
>
> Stephen Barncard - Sebastopol Ca. USA -
> mixstream.org
>
> On Tue, Nov 8, 2016 at 11:08 AM, Mike Kerner 
> wrote:
>
> > Since the original thread was hijacked,
> > Any idea how to make the lock on the property inspector stick?  If I
> select
> > the property inspector for an object and hit the lock, it does not seem
> to
> > stick. So for example, pick A.  Unlock PI.  Pick B.  PI is now locked.
> > Unlock PI.  Repeat - PI lock doesn't seem to stick.
> >
> > --
> > On the first day, God created the heavens and the Earth
> > On the second day, God created the oceans.
> > On the third day, God put the animals on hold for a few hours,
> >and did a little diving.
> > And God said, "This is good."
> > ___
> > 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
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
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: Lock moves is not working when objects are moved to the points of an other graphic

2016-11-08 Thread hh
Tore.

Did you notice the difference in Craig's post?
We can't use
'from point A to the points of'
but either 'from point A to point B' or 'to the points of'.

Hermann

___
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: Lock moves is not working when objects are moved to the points of an other graphic

2016-11-08 Thread hh
'Lock moves' or 'set lockmoves to true'
works here as it should with LC 8.1.1 and 9.0.0-dp1 on MacOS 10.12.1.

___
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: property inspector lock 2

2016-11-08 Thread stephen barncard
I've noticed that inspector windows stack perfectly on top of each other,
and the 'new' inspector falls directly on top of the locked one, giving the
visual feedback of being replaced, when actually the locked one is behind
the new one. Some UI designs make sure 'new' windows will be offset
slightly, revealing the obfuscated window.

Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Tue, Nov 8, 2016 at 11:08 AM, Mike Kerner 
wrote:

> Since the original thread was hijacked,
> Any idea how to make the lock on the property inspector stick?  If I select
> the property inspector for an object and hit the lock, it does not seem to
> stick. So for example, pick A.  Unlock PI.  Pick B.  PI is now locked.
> Unlock PI.  Repeat - PI lock doesn't seem to stick.
>
> --
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>and did a little diving.
> And God said, "This is good."
> ___
> 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: property inspector lock 2

2016-11-08 Thread Richard Gaskin

Mike Kerner wrote:

> Any idea how to make the lock on the property inspector stick?  If I
> select the property inspector for an object and hit the lock, it does
> not seem to stick. So for example, pick A.  Unlock PI.  Pick B.  PI
> is now locked. Unlock PI.  Repeat - PI lock doesn't seem to stick.

UTR here, works as expected in v9 on Ubuntu.

--
 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


property inspector lock 2

2016-11-08 Thread Mike Kerner
Since the original thread was hijacked,
Any idea how to make the lock on the property inspector stick?  If I select
the property inspector for an object and hit the lock, it does not seem to
stick. So for example, pick A.  Unlock PI.  Pick B.  PI is now locked.
Unlock PI.  Repeat - PI lock doesn't seem to stick.

-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
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: property inspector lock

2016-11-08 Thread J. Landman Gay
The easiest way, without a menu item, is from the message box: "clone this 
card".


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



On November 8, 2016 11:36:12 AM Marc Siskin  wrote:


Ralph,

Does typing “Copy this card to this stack” work in the message box?

Marc
On Nov 8, 2016, at 12:33 PM, Ralph DiMola 
> wrote:


How does one duplicate a card in v8? I can't seem to select a card in the
IDE. "duplicate card" is no longer displayed. I guess this have been
replaced by the "duplicate" text. If I select the card in the property
inspector the copy and duplicate edit options are grayed out. Also after
selecting the card in the property inspector the click on the code button
the stack script not the card script is opened. What am I missing here? How
do I select a card?

Thanks

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


___
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

---
Marc Siskin
Manager, Modern Language Resource Center
Carnegie Mellon University
msis...@andrew.cmu.edu



___
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: Duplicating a card in v8

2016-11-08 Thread Randy Hengst
Ralph,

In a button use either of these statements:
copy card  “ymCardToCopy" of this stack to this stack 

copy card "ymCardToCopy" of this to stack "DemoStack” ---assuming DemoStack 
stack is open


be well,
randy

Randy Hengst
www.classroomFocusedSoftware.com



> On Nov 8, 2016, at 11:35 AM, Ralph DiMola  wrote:
> 
> How does one duplicate a card in v8? I can't seem to select a card in the
> IDE. "duplicate card" is no longer displayed. I guess this have been
> replaced by the "duplicate" text. If I select the card in the property
> inspector the copy and duplicate edit options are grayed out. Also after
> selecting the card in the property inspector the click on the code button
> the stack script not the card script is opened. What am I missing here? How
> do I select a card?
> 
> Thanks
> 
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net
> 
> 
> ___
> 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: property inspector lock

2016-11-08 Thread Ralph DiMola
Sorry, I had a "hot key nightmare" and sent it with the wrong subject line. I 
resent with correct subject.

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 
Mike Kerner
Sent: Tuesday, November 08, 2016 12:50 PM
To: How to use LiveCode
Subject: Re: property inspector lock

Thanks for hijacking my thread, guys.  GET YOUR OWN THREAD!

On Tue, Nov 8, 2016 at 12:35 PM, Marc Siskin  wrote:

> Ralph,
>
> Does typing “Copy this card to this stack” work in the message box?
>
> Marc
> On Nov 8, 2016, at 12:33 PM, Ralph DiMola  mailto:rdim...@evergreeninfo.net>> wrote:
>
> How does one duplicate a card in v8? I can't seem to select a card in 
> the IDE. "duplicate card" is no longer displayed. I guess this have 
> been replaced by the "duplicate" text. If I select the card in the 
> property inspector the copy and duplicate edit options are grayed out. 
> Also after selecting the card in the property inspector the click on 
> the code button the stack script not the card script is opened. What 
> am I missing here? How do I select a card?
>
> Thanks
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net
>
>
> ___
> 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
>
> ---
> Marc Siskin
> Manager, Modern Language Resource Center Carnegie Mellon University 
> msis...@andrew.cmu.edu
>
>
>
> ___
> 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
>



--
On the first day, God created the heavens and the Earth On the second day, God 
created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
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: property inspector lock

2016-11-08 Thread Mike Kerner
Thanks for hijacking my thread, guys.  GET YOUR OWN THREAD!

On Tue, Nov 8, 2016 at 12:35 PM, Marc Siskin  wrote:

> Ralph,
>
> Does typing “Copy this card to this stack” work in the message box?
>
> Marc
> On Nov 8, 2016, at 12:33 PM, Ralph DiMola  mailto:rdim...@evergreeninfo.net>> wrote:
>
> How does one duplicate a card in v8? I can't seem to select a card in the
> IDE. "duplicate card" is no longer displayed. I guess this have been
> replaced by the "duplicate" text. If I select the card in the property
> inspector the copy and duplicate edit options are grayed out. Also after
> selecting the card in the property inspector the click on the code button
> the stack script not the card script is opened. What am I missing here? How
> do I select a card?
>
> Thanks
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net
>
>
> ___
> 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
>
> ---
> Marc Siskin
> Manager, Modern Language Resource Center
> Carnegie Mellon University
> msis...@andrew.cmu.edu
>
>
>
> ___
> 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
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
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: property inspector lock

2016-11-08 Thread Marc Siskin
Ralph,

Does typing “Copy this card to this stack” work in the message box?

Marc
On Nov 8, 2016, at 12:33 PM, Ralph DiMola 
> wrote:

How does one duplicate a card in v8? I can't seem to select a card in the
IDE. "duplicate card" is no longer displayed. I guess this have been
replaced by the "duplicate" text. If I select the card in the property
inspector the copy and duplicate edit options are grayed out. Also after
selecting the card in the property inspector the click on the code button
the stack script not the card script is opened. What am I missing here? How
do I select a card?

Thanks

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


___
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

---
Marc Siskin
Manager, Modern Language Resource Center
Carnegie Mellon University
msis...@andrew.cmu.edu



___
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: Lock moves is not working when objects are moved to the points of an other graphic

2016-11-08 Thread Tore Nilsen
Yes, this is what does not work in 8.1.0. I've tried it both on my Macbook and 
on my iMac, and the second movement only start once the first is finished.
I should probably look for a bug report/file a bug report if no other report 
exists.

Tore
> 8. nov. 2016 kl. 17.16 skrev dunbarx :
> 
> Hi.
> 
> Do you mean something like this:
> 
> on mouseUp
> set lockmoves to true
> move grc "Oval1" to the points of grc 3 in 350 milliseconds without waiting
> move grc "Oval2" to the points of grc 4  in 2 seconds without waiting
> set lockmoves to false
> end mouseUp
> 
> Works fine here in v 6.7, so I assume the issue is with v8.
> 
> Craig
> 
> 
> 
> --
> View this message in context: 
> http://runtime-revolution.278305.n4.nabble.com/Lock-moves-is-not-working-when-objects-are-moved-to-the-points-of-an-other-graphic-tp4710197p4710201.html
> Sent from the Revolution - User mailing list archive at Nabble.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


Duplicating a card in v8

2016-11-08 Thread Ralph DiMola
How does one duplicate a card in v8? I can't seem to select a card in the
IDE. "duplicate card" is no longer displayed. I guess this have been
replaced by the "duplicate" text. If I select the card in the property
inspector the copy and duplicate edit options are grayed out. Also after
selecting the card in the property inspector the click on the code button
the stack script not the card script is opened. What am I missing here? How
do I select a card?

Thanks

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


___
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: property inspector lock

2016-11-08 Thread Ralph DiMola
How does one duplicate a card in v8? I can't seem to select a card in the
IDE. "duplicate card" is no longer displayed. I guess this have been
replaced by the "duplicate" text. If I select the card in the property
inspector the copy and duplicate edit options are grayed out. Also after
selecting the card in the property inspector the click on the code button
the stack script not the card script is opened. What am I missing here? How
do I select a card?

Thanks

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


___
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


property inspector lock

2016-11-08 Thread Mike Kerner
Any idea how to make the lock on the property inspector stick?  If I select
the property inspector for an object and hit the lock, it does not seem to
stick. So for example, pick A.  Unlock PI.  Pick B.  PI is now locked.
Unlock PI.  Repeat - PI lock doesn't seem to stick.

-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
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


8 datagrid text properties

2016-11-08 Thread Mike Kerner
I guess I haven't had to work any text properties in dg's in 8, because I
don't see how to change either the header or the body text props.

-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
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: Stack name conflicts resolved?

2016-11-08 Thread Richard Gaskin
I made no reference to stack ID; I'm familiar with its role as a 
container for the ID incrementer.


The short name of a stack is not the only distinguishing attribute.  Its 
file path is also available.


Indeed, topstack returns the path as a part of the stack reference, but 
apparently does not check the path when resolving that reference.


I wrote an example function showing how this can be handled in script 
using information we have available today, included in Comment 1 in the 
bug report I filed on this:

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

Of course the engine could do that far more efficiently, and indeed it 
would require fixing this in the engine because LiveCode doesn't provide 
a means of overriding built-in functions.


Once fixed, we'll be able to open up old copies of our stacks to check 
or copy things, or open up another project that happens to have a stack 
named something common like "About" which we may have in the one we're 
working on, or any number of other cases which have given rise to 
discussions of workarounds here.  Many such workflows would become as 
graceful as the language itself.


SuperCard had no such limitation, and IIRC neither did OMO, Gain 
Momentum, Tookbook, or even HyperCard.


Indeed, the LiveCode engine itself has no such prohibition:  it allows 
opening stacks with the same name, and any references using a stack's 
short name are resolved using a simple and predictable rule:


The stack containing the script is checked first, and if not found it 
checks stacks in the order they were loaded during the current session.


The only limitation with this is what Ben pointed me to, problems 
copying and pasting objects or other actions dependent on topstack or 
other things related to the stack reference resolution topstack relies 
on, like default stack.


Topstack is normally the stack with the highest layer of the lowest mode.

But in the current engine resolution, when given a short name it appears 
to use load order only, without taking into account window layer.


Since two different stack files will have different paths (as Mark 
Waddingham reminded us, file systems enforce that very consistently for 
us), most issues with working on multiple stacks with the same value in 
the name property go away once the stack resolution uses available path 
information to return a more accurate value.



Given the long history of the IDE and engine development, I can 
understand how we got where we are.  The IDE has been owned by LiveCode 
Ltd. far longer than the engine, and back then prohibiting stacks from 
have the same name value was by far the simpler option. And once that 
was in place, it was no longer possible to explore the issue further, so 
it's remained that way so long we've all just come to accept that it's 
just how things are.


But once I experimented with disabling the IDE block, I was at last able 
to explore the engine behaviors in isolation.  They're generally pretty 
good, in almost all respects as flexible as what SuperCard provides, 
with the sole exception of an incomplete algorithm used for internal 
resolution of the stack reference.


And since that can be done in script, it would seem reasonable to at 
least suggest looking into how this might be refined in the engine.


--
 Richard Gaskin
 Fourth World Systems


Bob Sneidar wrote:


As he said, the stack ID is not really it's ID. In other words LC does not use the stack 
ID to identify it. Think of the stack ID as "the next ID to be assigned to a new 
object" much like SQL maintains a value in a master table of some sort with the next 
unique ID for each unique numerical column.

So unlike any other object whose unique-ness can be determined by it's ID, a 
stack can only be differentiated by it's name.

Bob S



On Nov 5, 2016, at 11:28 , Richard Gaskin  wrote:

I've grown weary of stack name conflict over the years, and this morning 
decided to take some time to assess where we're really at with that and see if 
perhaps there's a way to handle things more liberally than how the IDE does now.

TL/DR version:  It seems there's actually no real problem at all.

Long version:


Setup
-
I checked revfrontscriptlibrary and found that preOpenStack calls 
revIDEHandleNewStack, which resides in revbackscriptlibrary.

In that handler I found this line #3199, which I commented out:

 revCheckStackCollision tStackName

That handler is apparently the one that compares the stacks in the stack file 
being opened against a list of stacks already open, and if any stack of the 
same name is found it brings up the stack name conflict warning.

After commenting it out I made two stacks:

mainstack:  tA
substack:  foo

mainstack   tB
substack:  foo

On each mainstack is a button with:

 on mouseUp
toplevel "foo"
 end mouseUp

Each foo substack contains an object to distinguish the stacks from one 
another, so I can tell which foo stack is which at a glance.

With that prep out of the 

Re: Lock moves is not working when objects are moved to the points of an other graphic

2016-11-08 Thread dunbarx
Hi.

Do you mean something like this:

on mouseUp
set lockmoves to true
move grc "Oval1" to the points of grc 3 in 350 milliseconds without waiting
move grc "Oval2" to the points of grc 4  in 2 seconds without waiting
set lockmoves to false
end mouseUp

Works fine here in v 6.7, so I assume the issue is with v8.

Craig



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Lock-moves-is-not-working-when-objects-are-moved-to-the-points-of-an-other-graphic-tp4710197p4710201.html
Sent from the Revolution - User mailing list archive at Nabble.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: iPad Pro screenshots?

2016-11-08 Thread Ralph DiMola
I create all my screen shots in the IDE. I resize the screen for each 
resolution and then export a screen shot to a png. The status bar is missing 
but one click export of all resolutions makes up for that.

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 
Phil Jimmieson
Sent: Tuesday, November 08, 2016 11:03 AM
To: How to use LiveCode
Subject: Re: iPad Pro screenshots?

The screen size is bigger, and Apple now expect you to provide at least one 
screenshot in that size. I did it for a recent App update using the iPad Pro 
simulator in Xcode 8 on iOS 10.11.6 on a retina iMac. The previous time I did 
it for an App update I took a standard iPad retina screenshot and scaled it up 
in Preview - the reviewer in the App Store didn’t notice it was very slightly 
blurry...



> On 8 Nov 2016, at 15:20, Colin Holgate  wrote:
> 
> All iPad apps work on iPad Pro. What would you achieve if you could simulate 
> it, that you can’t already do?
> 
> 
>> On Nov 8, 2016, at 6:50 AM, Alan  wrote:
>> 
>> Thanks for the replies Peter, Stephen, Terry... but I guess I didn't explain 
>> myself well enough.
>> 
>> The problem is that, AFAIK, the iPad Pro isn't supported with OSX 10.9.5?  
>> i.e. I can't install the required xCode that will provide the necessary 
>> simulator and/or support for building for iPad Pro (if I had a physical one 
>> to test on).
>> 
>> Is that correct and, if so, is there a work-around? If I'm wrong, what can I 
>> install to support iPad Pro simulator on OSX 10.9.5?
>> 
>> Thanks!
>> 
>> On 8 Nov 2016, at 9:30 pm,  
>>  wrote:
>> 
>>> From: Alan 
>>> To: "use-livecode@lists.runrev.com" 
>>> Subject: iPad Pro screenshots?
>>> Message-ID:
>>> 
>>> >> outlook.com>
>>> 
>>> Content-Type: text/plain; charset="us-ascii"
>>> 
>>> Does anyone know of a way I can get an iPad Pro screenshot using OSX 
>>> 10.9.5?  i.e. using a Simulator?
>>> 
>>> I think it's not possible and that I'll have to upgrade my system, XCode 
>>> etc in order to make this screenshot for an about-to-be released app?  But 
>>> I'd rather not go down that route, if at all possible!
>>> 
>>> Thanks for any tips!
>>> 
>>> cheers
>>> 
>>> Alan
>> 
>> 
>> ___
>> 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

--
Phil Jimmieson  p...@liverpool.ac.uk  (UK) 0151 795 4236  (Mobile) 07976 983164 
Computer Science Dept., Liverpool University, Ashton Building, Ashton Street
Liverpool L69 3BX  http://www.csc.liv.ac.uk/~phil/
I used to sit on a special medical board... ...but now I use this ointment.





___
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: iPad Pro screenshots?

2016-11-08 Thread Phil Jimmieson
The screen size is bigger, and Apple now expect you to provide at least one 
screenshot in that size. I did it for a recent App update using the iPad Pro 
simulator in Xcode 8 on iOS 10.11.6 on a retina iMac. The previous time I did 
it for an App update I took a standard iPad retina screenshot and scaled it up 
in Preview - the reviewer in the App Store didn’t notice it was very slightly 
blurry...



> On 8 Nov 2016, at 15:20, Colin Holgate  wrote:
> 
> All iPad apps work on iPad Pro. What would you achieve if you could simulate 
> it, that you can’t already do?
> 
> 
>> On Nov 8, 2016, at 6:50 AM, Alan  wrote:
>> 
>> Thanks for the replies Peter, Stephen, Terry... but I guess I didn't explain 
>> myself well enough.
>> 
>> The problem is that, AFAIK, the iPad Pro isn't supported with OSX 10.9.5?  
>> i.e. I can't install the required xCode that will provide the necessary 
>> simulator and/or support for building for iPad Pro (if I had a physical one 
>> to test on).
>> 
>> Is that correct and, if so, is there a work-around? If I'm wrong, what can I 
>> install to support iPad Pro simulator on OSX 10.9.5?
>> 
>> Thanks!
>> 
>> On 8 Nov 2016, at 9:30 pm,  
>>  wrote:
>> 
>>> From: Alan 
>>> To: "use-livecode@lists.runrev.com" 
>>> Subject: iPad Pro screenshots?
>>> Message-ID:
>>> 
>>> 
>>> 
>>> Content-Type: text/plain; charset="us-ascii"
>>> 
>>> Does anyone know of a way I can get an iPad Pro screenshot using OSX 
>>> 10.9.5?  i.e. using a Simulator?
>>> 
>>> I think it's not possible and that I'll have to upgrade my system, XCode 
>>> etc in order to make this screenshot for an about-to-be released app?  But 
>>> I'd rather not go down that route, if at all possible!
>>> 
>>> Thanks for any tips!
>>> 
>>> cheers
>>> 
>>> Alan
>> 
>> 
>> ___
>> 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

--
Phil Jimmieson  p...@liverpool.ac.uk  (UK) 0151 795 4236  (Mobile) 07976 983164
Computer Science Dept., Liverpool University, Ashton Building, Ashton Street
Liverpool L69 3BX  http://www.csc.liv.ac.uk/~phil/
I used to sit on a special medical board... ...but now I use this ointment.





___
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: Stack name conflicts resolved?

2016-11-08 Thread Bob Sneidar
As he said, the stack ID is not really it's ID. In other words LC does not use 
the stack ID to identify it. Think of the stack ID as "the next ID to be 
assigned to a new object" much like SQL maintains a value in a master table of 
some sort with the next unique ID for each unique numerical column. 

So unlike any other object whose unique-ness can be determined by it's ID, a 
stack can only be differentiated by it's name. 

Bob S


> On Nov 5, 2016, at 11:28 , Richard Gaskin  wrote:
> 
> I've grown weary of stack name conflict over the years, and this morning 
> decided to take some time to assess where we're really at with that and see 
> if perhaps there's a way to handle things more liberally than how the IDE 
> does now.
> 
> TL/DR version:  It seems there's actually no real problem at all.
> 
> Long version:
> 
> 
> Setup
> -
> I checked revfrontscriptlibrary and found that preOpenStack calls 
> revIDEHandleNewStack, which resides in revbackscriptlibrary.
> 
> In that handler I found this line #3199, which I commented out:
> 
>  revCheckStackCollision tStackName
> 
> That handler is apparently the one that compares the stacks in the stack file 
> being opened against a list of stacks already open, and if any stack of the 
> same name is found it brings up the stack name conflict warning.
> 
> After commenting it out I made two stacks:
> 
> mainstack:  tA
> substack:  foo
> 
> mainstack   tB
> substack:  foo
> 
> On each mainstack is a button with:
> 
>  on mouseUp
> toplevel "foo"
>  end mouseUp
> 
> Each foo substack contains an object to distinguish the stacks from one 
> another, so I can tell which foo stack is which at a glance.
> 
> With that prep out of the way, I began my experiment:
> 
> 
> Experiment 1
> 
> I started a fresh session in LC, and opened tA.
> 
> Then I opened tB.
> 
> And since I'd commented out revCheckStackCollision, no warning was presented.
> 
> So then in stack tA I clicked the button, and it opened the foo substack 
> belonging to it.
> 
> Then I clicked the button in stack tB, and it opened the foo substack 
> belonging to it.
> 
> 
> Experiment 2
> 
> I created a third stack file, and added a button with the same script as 
> above.
> 
> When clicked, it opens the foo window belonging to the stack file which had 
> been opened first.
> 
> 
> 
> Results
> ---
> It would appear that the resolution of substack names follows a logical path 
> that looks for matching stacks in this order:
> 
> 1. Within the same stack file as the script referring to it.
> 
> 2. Within another stack file, in the order in which they were opened during 
> the session.
> 
> This seems more or less what I've been hoping to find for years:
> http://quality.livecode.com/show_bug.cgi?id=1061
> 
> Unless there's something here that I've missed, it would appear that stack 
> name resolution is nearly as logical and useful across stack files as icon ID 
> resolution.
> 
> And just as we don't need to go through contortions to ensure that every icon 
> ID is unique across all stacks, as long as we remember the resolution rule we 
> can safely use stacks of the same name within the current session.
> 
> That is, once we modify the IDE to allow it.
> 
> Is there something I've missed here?
> 
> -- 
> 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


Lock moves is not working when objects are moved to the points of an other graphic

2016-11-08 Thread Tore Nilsen
In LC 8.1.0 on a Mac with macOS 10.12, I have encountered some problems when 
trying to move several objects simultaneously. The script below works as 
expected:

on mouseUp

set lockmoves to true

move grc "Oval1" from 50,60 to 1200,60 in 350 milliseconds without waiting

move grc "Oval2" from 50,200 to 1280,200 in 2 seconds without waiting

set lockmoves to false

end mouseUp


However, is a try to substitute the startPoint/endPoint with a reference to 
different graphics, the first move is completed, without anything happening 
with the second move. Once the first move is completed, the second object is 
moved to a point along the path that seems to be consistent with where it 
should have been by this time, and the animation then starts from there. Has 
anyone else noticed this?

Regards

Tore
___
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: iPad Pro screenshots?

2016-11-08 Thread Colin Holgate
All iPad apps work on iPad Pro. What would you achieve if you could simulate 
it, that you can’t already do?


> On Nov 8, 2016, at 6:50 AM, Alan  wrote:
> 
> Thanks for the replies Peter, Stephen, Terry... but I guess I didn't explain 
> myself well enough.
> 
> The problem is that, AFAIK, the iPad Pro isn't supported with OSX 10.9.5?  
> i.e. I can't install the required xCode that will provide the necessary 
> simulator and/or support for building for iPad Pro (if I had a physical one 
> to test on).
> 
> Is that correct and, if so, is there a work-around? If I'm wrong, what can I 
> install to support iPad Pro simulator on OSX 10.9.5?
> 
> Thanks!
> 
> On 8 Nov 2016, at 9:30 pm,  
>  wrote:
> 
>> From: Alan 
>> To: "use-livecode@lists.runrev.com" 
>> Subject: iPad Pro screenshots?
>> Message-ID:
>>  
>> 
>>  
>> Content-Type: text/plain; charset="us-ascii"
>> 
>> Does anyone know of a way I can get an iPad Pro screenshot using OSX 10.9.5? 
>>  i.e. using a Simulator?
>> 
>> I think it's not possible and that I'll have to upgrade my system, XCode etc 
>> in order to make this screenshot for an about-to-be released app?  But I'd 
>> rather not go down that route, if at all possible!
>> 
>> Thanks for any tips!
>> 
>> cheers
>> 
>> Alan
> 
> 
> ___
> 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: iPad Pro screenshots?

2016-11-08 Thread Colin Holgate
In the simulator the File menu only has one entry, Save Screen Shot. Maybe that 
would do?


> On Nov 8, 2016, at 1:22 AM, stephen barncard 
>  wrote:
> 
> On Mon, Nov 7, 2016 at 10:21 PM, stephen barncard <
> stephenrevoluti...@barncard.com> wrote:
> 
>> can't you just take a screenshot on the iPad?  home button plus that
>> 'hold' button on the side.
>> 
> 
> oh. on a simulator.
> 
> Stephen Barncard - Sebastopol Ca. USA -
> mixstream.org
> ___
> 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: How can we dynamically create variable names from changing value "x" on a loop?

2016-11-08 Thread Mike Bonner
Very interesting discussion!  I'm still curious though.  Since the op
already takes the json based file and turns it into an array ( probably
using an existing json library.)  Since this step is already done, and the
array esists, is there an actual benefit to then breaking that array into
separate variables using do?  If so, why? (perhaps this has already been
covered, but information overload is making my brain melt)

On Tue, Nov 8, 2016 at 5:46 AM, Ben Rubinstein  wrote:

> Hi Mark,
>
> There's a reason why I haven't posted the code of explodeRow... but I'm
> sure it _could_ be efficient!
>
> Thanks for reminding me about split with one delimiter - I never use that.
>
> I think when I first encountered it I was so annoyed by the thought that
> it was pointless, because what I was looking for was for it have the
> opposite effect (key on the chunk text, value being the index) that I never
> considered it again. But of course it makes a lot of sense in a context
> where dipping into indexed items repeatedly is going to be expensive - I'll
> try to remember its use in the future.
>
> Ben
>
>
> On 08/11/2016 12:23, Mark Waddingham wrote:
>
>> Apologies - I clicked the wrong button in my email client and managed to
>> send
>> a partially composed message. Here is the correct version!
>>
>> On 2016-11-08 12:48, Ben Rubinstein wrote:
>>
>>> The point is that in my first pattern, I have outside the loop
>>> assigned column (item) indices to named variables (based on the items
>>> of the first, header, row). In the loop LC then has to locate the
>>> indexed items in an individual data row.
>>>
>>
>> In the first pattern:
>>
>> repeat for each line tRec in tTSVdata
>>   doSomething item viUserID of tRec, item viUserName of tRec
>>   ...
>> end repeat
>>
>> The 'item  of tRec' expressions cause the engine to iterate
>> through
>> tRect until it has found the relevant item. This means that this single
>> line
>> will be looking through the tRec string twice from the start - the first
>> time
>> up until the viUserID'd item, the second time up to the viUserName'd
>> item. The
>> speed of this will largely depend on how large the item indicies are, and
>> how
>> large tRec is (and where the items fall in tRec).
>>
>> If the item indices are small, close and near to the start, and tRec is
>> small,
>> and you don't use 'item ... of tRec' anywhere else in the loop, then it
>> will
>> likely be faster than anything else.
>>
>> In the second pattern, the code which happens to be in a function for
>>> neatness has to create a new empty array, and chunk both the data row
>>> and the header row in order to get column names and values to put into
>>> the array. You can loop over one set of items, but not both, so LC
>>> still has to locate indexed items in at least one case.
>>>
>>
>> put line 1 of tTSVdata into tColumnNames
>> delete line 1 of tTSVdata
>> repeat for each line tRec in tTSVdata
>>   put explodeRow(tRec, tColumnNames) into aData
>>   doSomething aData["User ID"], aData["User Name"]
>>   ...
>> end repeat
>>
>> The performance will largely depend on the implementation of explodeRow
>> and
>> (as you said subsequently) how many columns you want from the row.
>>
>> If you only want 2 then unless each tRec is very long and you are
>> fetching two
>> items near the end then the non-array version will likely be faster. If,
>> however, the two items are near the end of the row or you are wanting to
>> access lots of items then this will be faster than either:
>>
>> repeat for each line tRec in tTSVdata
>>   split tRec by tab
>>   doSomething tRec[viUserID], tRec[viUserName]
>>   ...
>> end repeat
>>
>> The difference here is that with the 'item' approach the speed will reduce
>> quadratically with the length of tRec and the max(viUserId, viUserName);
>> with
>> the 'split' approach the speed will reduce linearly with the length of
>> tRec.
>>
>> Depending on the average lengths of tRec and values of viUserId /
>> viUserName,
>> at somepoint the 'item' approach will start to be significantly slower
>> than
>> the 'split' version.
>>
>> The explodeRow approach sounds like it has lots of overhead. A fair
>> amount of
>> the overhead could probably be eliminated by doing 'split tColumnNames by
>> tab', and then using array access in explodeRow to form the aData array
>> (also
>> making sure explodeRow is private will help too).
>>
>> Just my two pence.
>>
>> Mark.
>>
>>
>
>
>
> ___
> 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: How can we dynamically create variable names from changing value "x" on a loop?

2016-11-08 Thread Ben Rubinstein

Hi Mark,

There's a reason why I haven't posted the code of explodeRow... but I'm sure 
it _could_ be efficient!


Thanks for reminding me about split with one delimiter - I never use that.

I think when I first encountered it I was so annoyed by the thought that it 
was pointless, because what I was looking for was for it have the opposite 
effect (key on the chunk text, value being the index) that I never considered 
it again. But of course it makes a lot of sense in a context where dipping 
into indexed items repeatedly is going to be expensive - I'll try to remember 
its use in the future.


Ben

On 08/11/2016 12:23, Mark Waddingham wrote:

Apologies - I clicked the wrong button in my email client and managed to send
a partially composed message. Here is the correct version!

On 2016-11-08 12:48, Ben Rubinstein wrote:

The point is that in my first pattern, I have outside the loop
assigned column (item) indices to named variables (based on the items
of the first, header, row). In the loop LC then has to locate the
indexed items in an individual data row.


In the first pattern:

repeat for each line tRec in tTSVdata
  doSomething item viUserID of tRec, item viUserName of tRec
  ...
end repeat

The 'item  of tRec' expressions cause the engine to iterate through
tRect until it has found the relevant item. This means that this single line
will be looking through the tRec string twice from the start - the first time
up until the viUserID'd item, the second time up to the viUserName'd item. The
speed of this will largely depend on how large the item indicies are, and how
large tRec is (and where the items fall in tRec).

If the item indices are small, close and near to the start, and tRec is small,
and you don't use 'item ... of tRec' anywhere else in the loop, then it will
likely be faster than anything else.


In the second pattern, the code which happens to be in a function for
neatness has to create a new empty array, and chunk both the data row
and the header row in order to get column names and values to put into
the array. You can loop over one set of items, but not both, so LC
still has to locate indexed items in at least one case.


put line 1 of tTSVdata into tColumnNames
delete line 1 of tTSVdata
repeat for each line tRec in tTSVdata
  put explodeRow(tRec, tColumnNames) into aData
  doSomething aData["User ID"], aData["User Name"]
  ...
end repeat

The performance will largely depend on the implementation of explodeRow and
(as you said subsequently) how many columns you want from the row.

If you only want 2 then unless each tRec is very long and you are fetching two
items near the end then the non-array version will likely be faster. If,
however, the two items are near the end of the row or you are wanting to
access lots of items then this will be faster than either:

repeat for each line tRec in tTSVdata
  split tRec by tab
  doSomething tRec[viUserID], tRec[viUserName]
  ...
end repeat

The difference here is that with the 'item' approach the speed will reduce
quadratically with the length of tRec and the max(viUserId, viUserName); with
the 'split' approach the speed will reduce linearly with the length of tRec.

Depending on the average lengths of tRec and values of viUserId / viUserName,
at somepoint the 'item' approach will start to be significantly slower than
the 'split' version.

The explodeRow approach sounds like it has lots of overhead. A fair amount of
the overhead could probably be eliminated by doing 'split tColumnNames by
tab', and then using array access in explodeRow to form the aData array (also
making sure explodeRow is private will help too).

Just my two pence.

Mark.






___
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 can we dynamically create variable names from changing value "x" on a loop?

2016-11-08 Thread Mark Waddingham
Apologies - I clicked the wrong button in my email client and managed to 
send a partially composed message. Here is the correct version!


On 2016-11-08 12:48, Ben Rubinstein wrote:

The point is that in my first pattern, I have outside the loop
assigned column (item) indices to named variables (based on the items
of the first, header, row). In the loop LC then has to locate the
indexed items in an individual data row.


In the first pattern:

repeat for each line tRec in tTSVdata
  doSomething item viUserID of tRec, item viUserName of tRec
  ...
end repeat

The 'item  of tRec' expressions cause the engine to iterate 
through tRect until it has found the relevant item. This means that this 
single line will be looking through the tRec string twice from the start 
- the first time up until the viUserID'd item, the second time up to the 
viUserName'd item. The speed of this will largely depend on how large 
the item indicies are, and how large tRec is (and where the items fall 
in tRec).


If the item indices are small, close and near to the start, and tRec is 
small, and you don't use 'item ... of tRec' anywhere else in the loop, 
then it will likely be faster than anything else.



In the second pattern, the code which happens to be in a function for
neatness has to create a new empty array, and chunk both the data row
and the header row in order to get column names and values to put into
the array. You can loop over one set of items, but not both, so LC
still has to locate indexed items in at least one case.


put line 1 of tTSVdata into tColumnNames
delete line 1 of tTSVdata
repeat for each line tRec in tTSVdata
  put explodeRow(tRec, tColumnNames) into aData
  doSomething aData["User ID"], aData["User Name"]
  ...
end repeat

The performance will largely depend on the implementation of explodeRow 
and (as you said subsequently) how many columns you want from the row.


If you only want 2 then unless each tRec is very long and you are 
fetching two items near the end then the non-array version will likely 
be faster. If, however, the two items are near the end of the row or you 
are wanting to access lots of items then this will be faster than 
either:


repeat for each line tRec in tTSVdata
  split tRec by tab
  doSomething tRec[viUserID], tRec[viUserName]
  ...
end repeat

The difference here is that with the 'item' approach the speed will 
reduce quadratically with the length of tRec and the max(viUserId, 
viUserName); with the 'split' approach the speed will reduce linearly 
with the length of tRec.


Depending on the average lengths of tRec and values of viUserId / 
viUserName, at somepoint the 'item' approach will start to be 
significantly slower than the 'split' version.


The explodeRow approach sounds like it has lots of overhead. A fair 
amount of the overhead could probably be eliminated by doing 'split 
tColumnNames by tab', and then using array access in explodeRow to form 
the aData array (also making sure explodeRow is private will help too).


Just my two pence.

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
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: How can we dynamically create variable names from changing value "x" on a loop?

2016-11-08 Thread Mark Waddingham

On 2016-11-08 12:48, Ben Rubinstein wrote:

The point is that in my first pattern, I have outside the loop
assigned column (item) indices to named variables (based on the items
of the first, header, row). In the loop LC then has to locate the
indexed items in an individual data row.


In the first pattern:

repeat for each line tRec in tTSVdata
doSomething item viUserID of tRec, item viUserName of tRec
...
end repeat

The 'item  of tRec' expressions cause the engine to iterate 
through tRect until it has found the relevant item. This means that this 
single line will be looking through the tRec string twice from the start 
- the first time up until the viUserID'd item, the second time up to the 
viUserName'd item. The speed of this will largely depend on how large 
the item indicies are, and how large tRec is (and where the items fall 
in tRec).


If the item indices are small, close and near to the start, and tRec is 
small, and you don't use 'item ... of tRec' anywhere else in the loop, 
then it will likely be faster than anything else.



In the second pattern, the code which happens to be in a function for
neatness has to create a new empty array, and chunk both the data row
and the header row in order to get column names and values to put into
the array. You can loop over one set of items, but not both, so LC
still has to locate indexed items in at least one case.


put line 1 of tTSVdata into tColumnNames
delete line 1 of tTSVdata
repeat for each line tRec in tTSVdata
put explodeRow(tRec, tColumnNames) into aData
doSomething aData["User ID"], aData["User Name"]
...
end repeat

The performance will largely depend on the implementation of explodeRow 
and (as you said subsequently) what



So in short, the function is doing what the inline code is, plus a
whole lot more. (Not to mention that in many cases the 'do something'
code only acts on a subset of the items in each row, whereas the array
of necessity is built out of all of them.) It may or may not be
significantly slower; but it definitely is slower.

Ben


___
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


--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
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 can we dynamically create variable names from changing value "x" on a loop?

2016-11-08 Thread Ben Rubinstein


On 07/11/2016 18:05, Richard Gaskin wrote:

I wouldn't care to hazard a guess as to the relative speed of
"aData[x]"  versus "item x": but it's the overhead of the function
which creates the array on that I don't want to pay *on every row*.


The function call itself has very small overheard.  Whether the definition of
that function takes more time than walking through the characters for the
chunk expression can't be known without testing.


Not to flog this horse, but in this case it definitely does.

The point is that in my first pattern, I have outside the loop assigned column 
(item) indices to named variables (based on the items of the first, header, 
row). In the loop LC then has to locate the indexed items in an individual 
data row.


In the second pattern, the code which happens to be in a function for neatness 
has to create a new empty array, and chunk both the data row and the header 
row in order to get column names and values to put into the array. You can 
loop over one set of items, but not both, so LC still has to locate indexed 
items in at least one case.


So in short, the function is doing what the inline code is, plus a whole lot 
more. (Not to mention that in many cases the 'do something' code only acts on 
a subset of the items in each row, whereas the array of necessity is built out 
of all of them.) It may or may not be significantly slower; but it definitely 
is slower.


Ben


___
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: iPad Pro screenshots?

2016-11-08 Thread Alan
Thanks for the replies Peter, Stephen, Terry... but I guess I didn't explain 
myself well enough.

The problem is that, AFAIK, the iPad Pro isn't supported with OSX 10.9.5?  i.e. 
I can't install the required xCode that will provide the necessary simulator 
and/or support for building for iPad Pro (if I had a physical one to test on).

Is that correct and, if so, is there a work-around? If I'm wrong, what can I 
install to support iPad Pro simulator on OSX 10.9.5?

Thanks!

On 8 Nov 2016, at 9:30 pm,  
 wrote:

> From: Alan 
> To: "use-livecode@lists.runrev.com" 
> Subject: iPad Pro screenshots?
> Message-ID:
>   
> 
>   
> Content-Type: text/plain; charset="us-ascii"
> 
> Does anyone know of a way I can get an iPad Pro screenshot using OSX 10.9.5?  
> i.e. using a Simulator?
> 
> I think it's not possible and that I'll have to upgrade my system, XCode etc 
> in order to make this screenshot for an about-to-be released app?  But I'd 
> rather not go down that route, if at all possible!
> 
> Thanks for any tips!
> 
> cheers
> 
> Alan


___
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 can we dynamically create variable names from changing value "x" on a loop?

2016-11-08 Thread Kay C Lan
On Mon, Nov 7, 2016 at 1:21 AM, Mark Wieder  wrote:
> But maybe Bramanathaswami has some special use case?

Assuming that is the case then 'do' is the answer and you'll find an
example in the Dictionary under the 'local' command; the last example.

Unfortunately the example is a bit of negative learning and the use of
'local' inside a 'do' statement is unlikely to behave the way you
expect. A discussion, with an excellent explanation by Mark Waddingham
is available on the List under the Subject "local and do  -
what NOT to do" dated 18Feb16.

Sorry I don't know how to link to old posts.

___
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