Re: Mysteries of Me

2018-10-29 Thread Tom Glod via use-livecode
oh...didn't know that syntax would work first thing that jumped out at
me  thought maybe it was as simple as that. :)

On Mon, Oct 29, 2018 at 8:15 PM, Sannyasin Brahmanathaswami via
use-livecode  wrote:

> @tom  go card and go to card same thing.
>
> @ bob
>
> That's what I understand (as you have described it)
>
> -- The behavior is set in the properties of a stack.
> -- the SE suggestions "knows" this and on typing
>   go card...[List of cards in current stack appears... choose one)
>
> # you get:
>
> go card "my-audio-library" of me  #as we would expect
>
> # but it gives an error; will not compile. You have to be explicit:
>
> go card "my-audio-library" of this stack
>
> # then it compiles
>
> -- re: backscript
>
> function isThisTrue() then
> go card "my-audio-library" of me  # as per SE suggestions
># generates an error
> end isThisTrue
>
> # isThisTrue , is part of a back script. It won't compile
> # I wondered it that was causing a reference change
> # because this works
>
> function isThisTrue() then
> go card "my-audio-library" of this stack
> end isThisTrue
>
>
>
>
>
> On 10/29/18 11:59 AM, Bob Sneidar via use-livecode wrote:
> > Me always refers to the object the script belongs to. It doesn't matter
> which handler it is. A script running in a behavior is like running an
> instance of the target object (the object with the behavior set). This
> allows for multiple objects with the same behavior (think datagrids calling
> get the dgData in other dataGrids and you will immediately see why this
> would be necessary). This me refers to the actual behavior object, NOT the
> "instance object" as it were.
> >
> > As far as a backscript, are you saying you have a backscript object with
> a behavior assigned to it??
> >
> > Bob S
>
>
> --
> Svasti Astu, Be Well!
> Brahmanathaswami
>
> Get the SivaSiva app, it's free:
> https://www.himalayanacademy.com/apps/sivasiva
>
> ___
> 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: using the map widget

2018-10-29 Thread William Prothero via use-livecode
Herman made an excellent stack that demos the use of Google Maps. I have a link 
to it here:
http://earthlearningsolutions.org/google-static-maps-demo/ 

You need to get an API key from Google, but the demo shows how to set it up. 
This may  be more useful than the widget, as there is a lot of documentation by 
Google on how to set it up, which is pretty easy.
Best,
Bill

> On Oct 29, 2018, at 7:48 PM, Mike for GDC via use-livecode 
>  wrote:
> 
> I am trying to implement the map widget within my app.  I have entered my
> api code in the inclusions and have looked at the example given in the
> livecode article but so far it has not worked.  Does anyone have an example
> of using it in an app?  What I want is to be able to retrieve the current
> location (lat and long) and then use that to present
> 
> my map in the map widget.  I would have hoped it would be fairly straight
> forward but I have never actually seen an example of script that works..  I
> would appreciate any help anyone might have.
> 
> Thanks.  Mike
> 
> ___
> 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: Continual iOS Simulator Problems

2018-10-29 Thread Roger Guay via use-livecode
Thanks, Brian. I didn’t think of that previously, but I now find that it 
crashes in Xcode. So I guess the problem is there in Xcode, not in LC. Ratz!

Roger

> On Oct 29, 2018, at 8:13 PM, Brian Milby via use-livecode 
>  wrote:
> 
> Have you tried launching the simulator from Xcode first and after it is fully 
> loaded then trying to test from LC?
> 
> Thanks,
> Brian
> On Oct 29, 2018, 9:48 PM -0500, Roger Guay via use-livecode 
> , wrote:
>> Hi Folks,
>> 
>> I’m on a Mac with OS 10.14 and using LC 9.0.0 Indy, and I have the green 
>> square indication in LC prefs with SDK 11.2.
>> 
>> I can’t get the simulator to work with test target set to simulator 11.2. It 
>> simply takes too long to open and then crashes if I persist.
>> 
>> In fact, it seems to me that I’ve had this problem with the simulator not 
>> working in previous versions as well.
>> 
>> Any help or suggestions are greatly appreciated.
>> 
>> Thanks,
>> 
>> Roger
>> ___
>> 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

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

Re: How to find the offset of the last instance of a repeating character in a string?

2018-10-29 Thread Kay C Lan via use-livecode
On Tue, Oct 30, 2018 at 2:33 AM Keith Clarke via use-livecode
 wrote:
>
> I’m trying to separate paths & pages from a list of URLs and so looking to 
> identify the position of the last ‘/‘ character.
>
If that is all you are after then I think setting the itemDelimiter to
"/" and separating the 'item -1' (page) from 'items 1 to -2' (path)
would give you a very simple a readable solution.  The only problem is
if you have the unlikely but not impossible situation where you have
paths that contain no pages.  Because of the known gotcha with LC and
how it counts items when the last item is empty you may need to
include and 'if' statement.

Try this, create a new Stack with a field and a button.

Into the field load the following text:

https://www.my.org/assets/general/february/
https://www.my.org/assets/general/march/
https://www.my.org/assets/general/april/2018.zip
https://www.my.org/assets/general/may/2018.zip
https://www.my.org/assets/general/june/2018.zip
https://www.my.org/assets/general/july/2018.zip
https://www.my.org/assets/general/july/2017.html
https://www.my.org/assets/general/july/2016.text
https://www.my.org/assets/general/july/2015.jpg
https://www.my.org/assets/general/august/2018.zip
https://www.my.org/assets/general/september/2018.zip
https://www.my.org/assets/general/october/2018.zip
https://www.my.org/assets/general/november/
https://www.my.org/assets/general/december/

Into the button load the following script (be careful of line breaks
there are 16 lines of code):

on mouseUp
   put fld 1 into tText
   set the itemDelimiter to "/"
   repeat for each line tLine in tText
  if (char -1 of tLine = "/") then --usual problem with dealing
with empty last items
 put empty into tPath[tLine]
  else
 if (tPath[item 1 to -2 of tLine] = empty) then  --initial entry
put item -1 of tLine into tPath[item 1 to -2 of tLine]
 else  --multiple entries
put tPath[item 1 to -2 of tLine] & cr & item -1 of tLine
into tPath[item 1 to -2 of tLine]
 end if
  end if
   end repeat
   breakpoint
end mouseUp

There is breakpoint at the end so the script will pause and you can
inspect the variables.  You'll see that an array is created with each
unique path as a key and each page its element.  In the case of 'july'
you will see that four pages are all listed, one per line.

From there it should open a world of possibilities to arrange, sort
and sift through the paths.

HTH

___
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: Continual iOS Simulator Problems

2018-10-29 Thread Brian Milby via use-livecode
Have you tried launching the simulator from Xcode first and after it is fully 
loaded then trying to test from LC?

Thanks,
Brian
On Oct 29, 2018, 9:48 PM -0500, Roger Guay via use-livecode 
, wrote:
> Hi Folks,
>
> I’m on a Mac with OS 10.14 and using LC 9.0.0 Indy, and I have the green 
> square indication in LC prefs with SDK 11.2.
>
> I can’t get the simulator to work with test target set to simulator 11.2. It 
> simply takes too long to open and then crashes if I persist.
>
> In fact, it seems to me that I’ve had this problem with the simulator not 
> working in previous versions as well.
>
> Any help or suggestions are greatly appreciated.
>
> Thanks,
>
> Roger
> ___
> 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

Continual iOS Simulator Problems

2018-10-29 Thread Roger Guay via use-livecode
Hi Folks,

I’m on a Mac with OS 10.14 and using LC 9.0.0 Indy, and I have the green square 
indication in LC prefs with SDK 11.2. 

I can’t get the simulator to work with test target set to simulator 11.2. It 
simply takes too long to open and then crashes if I persist.

In fact, it seems to me that I’ve had this problem with the simulator not 
working in previous versions as well.

Any help or suggestions are greatly appreciated.

Thanks,

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

using the map widget

2018-10-29 Thread Mike for GDC via use-livecode
I am trying to implement the map widget within my app.  I have entered my
api code in the inclusions and have looked at the example given in the
livecode article but so far it has not worked.  Does anyone have an example
of using it in an app?  What I want is to be able to retrieve the current
location (lat and long) and then use that to present

my map in the map widget.  I would have hoped it would be fairly straight
forward but I have never actually seen an example of script that works..  I
would appreciate any help anyone might have.

Thanks.  Mike

___
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: Hmmm - no compilation error ?

2018-10-29 Thread Monte Goulding via use-livecode
The parser is often lenient at the end of statements like this. 

In the case of the return statement it first looks for the expression to return 
then checks if the next token is either `for` or `with`. If it isn’t either of 
those it doesn’t look any further or throw an error.

Really we should have a general check for extra stuff after parsing statements 
but we don’t. Stuff like that can also be a bit risky to add as all of a sudden 
a lot of scripts that work perfectly well might not compile.

Cheers

Monte

> On 30 Oct 2018, at 12:00 pm, Alex Tweedly via use-livecode 
>  wrote:
> 
> I accidentally typed the equivalent of
> 
> function x p
>return return p
> end x
> 
> i.e. I had the word "return" in there twice.
> 
> And it didn't give me an error on compilation, and also didn't just ignore 
> the repeated word, it simply returned a blank line.
> 
> Does it seem like this is a bug ?  Is the parser too lenient ?
> 
> (LC 9.0.0, and 8.1.5 tested)
> 
> 
> O - and while testing it out for this email, I tried to type
> 
> ask "a" & x(3) & "b"
> 
> but instead I did
> 
> ask "a"  x(3) & "b"
> (i.e. missing an '&')
> 
> and that too didn't give an error; it simply ignored the extra part of the 
> line. !?
> 
> Thanks
> 
> Alex.
> 
> 
> ___
> 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

Hmmm - no compilation error ?

2018-10-29 Thread Alex Tweedly via use-livecode

I accidentally typed the equivalent of

function x p
   return return p
end x

i.e. I had the word "return" in there twice.

And it didn't give me an error on compilation, and also didn't just 
ignore the repeated word, it simply returned a blank line.


Does it seem like this is a bug ?  Is the parser too lenient ?

(LC 9.0.0, and 8.1.5 tested)


O - and while testing it out for this email, I tried to type

ask "a" & x(3) & "b"

but instead I did

ask "a"  x(3) & "b"
(i.e. missing an '&')

and that too didn't give an error; it simply ignored the extra part of 
the line. !?


Thanks

Alex.


___
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: Mysteries of Me

2018-10-29 Thread Sannyasin Brahmanathaswami via use-livecode
@tom  go card and go to card same thing.

@ bob

That's what I understand (as you have described it)

-- The behavior is set in the properties of a stack.
-- the SE suggestions "knows" this and on typing
  go card...[List of cards in current stack appears... choose one)

# you get:

go card "my-audio-library" of me  #as we would expect

# but it gives an error; will not compile. You have to be explicit:

go card "my-audio-library" of this stack

# then it compiles

-- re: backscript

function isThisTrue() then
go card "my-audio-library" of me  # as per SE suggestions
   # generates an error
end isThisTrue

# isThisTrue , is part of a back script. It won't compile
# I wondered it that was causing a reference change
# because this works

function isThisTrue() then
go card "my-audio-library" of this stack
end isThisTrue
  




On 10/29/18 11:59 AM, Bob Sneidar via use-livecode wrote:
> Me always refers to the object the script belongs to. It doesn't matter which 
> handler it is. A script running in a behavior is like running an instance of 
> the target object (the object with the behavior set). This allows for 
> multiple objects with the same behavior (think datagrids calling get the 
> dgData in other dataGrids and you will immediately see why this would be 
> necessary). This me refers to the actual behavior object, NOT the "instance 
> object" as it were. 
>
> As far as a backscript, are you saying you have a backscript object with a 
> behavior assigned to it?? 
>
> Bob S


-- 
Svasti Astu, Be Well!
Brahmanathaswami

Get the SivaSiva app, it's free:
https://www.himalayanacademy.com/apps/sivasiva

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


Re: How to find the offset of the last instance of a repeating character in a string?

2018-10-29 Thread Alex Tweedly via use-livecode

On 29/10/2018 22:32, Mark Wieder via use-livecode wrote:

On 10/29/2018 08:32 AM, Keith Clarke via use-livecode wrote:

I’m trying to separate paths & pages from a list of URLs and so 
looking to identify the position of the last ‘/‘ character.



How about 

function rightmostSlashOf p
   set the itemdelimiter to "/"
   return  (thenumberofcharsinp) - (thenumberofcharsinitem-1 ofp)
end rightmostSlashOf



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

Re: How to find the offset of the last instance of a repeating character in a string?

2018-10-29 Thread Alex Tweedly via use-livecode

"toplevel/somename/another/somename"


On 29/10/2018 22:32, Mark Wieder via use-livecode wrote:

On 10/29/2018 08:32 AM, Keith Clarke via use-livecode wrote:

I’m trying to separate paths & pages from a list of URLs and so 
looking to identify the position of the last ‘/‘ character.


function rightmostSlashOf pText
   set the itemdelimiter to "/"
   return offset(item -1 of pText, pText)
end rightmostSlashOf




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

Re: How to find the offset of the last instance of a repeating character in a string?

2018-10-29 Thread Bob Sneidar via use-livecode
Oh right you are! 

Bob S


> On Oct 29, 2018, at 16:04 , Mark Wieder via use-livecode 
>  wrote:
> 
> On 10/29/2018 03:55 PM, Bob Sneidar via use-livecode wrote:
>> That will only give him the item, not the character position.
> 
> Nope. It returns the position.
> 
> -- 
> 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


___
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: Is it not possible to write to the user preference folder in Mojave?

2018-10-29 Thread Bob Sneidar via use-livecode
I wonder if they are looged in as administrators?

Bob S


> On Oct 29, 2018, at 16:05 , Matthias Rebbe via use-livecode 
>  wrote:
> 
> I´ve setup a VM with Mojave and my app was able to write the registration 
> data to the preferences folder without a problem.
> 
> So i am not sure what´s going on  on the machine of the customer. But at 
> least i know now that my app is able to access that folder.
> 
> Regards
> 
> Matthias Rebbe

___
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: Is it not possible to write to the user preference folder in Mojave?

2018-10-29 Thread Matthias Rebbe via use-livecode
I´ve setup a VM with Mojave and my app was able to write the registration data 
to the preferences folder without a problem.

So i am not sure what´s going on  on the machine of the customer. But at least 
i know now that my app is able to access that folder.

Regards

Matthias Rebbe

free tools for Livecoders:
https://instamaker.dermattes.de 
https://winsignhelper.dermattes.de 

> Am 28.10.2018 um 23:26 schrieb Matthias Rebbe via use-livecode 
> mailto:use-livecode@lists.runrev.com>>:
> 
> Hi.
> 
> Today i was informed by a customer that my app BRx Converter is not able to 
> write data to the preference folder ~/library/preferences.
> 
> The app normally writes some registration info after successful registration 
> to that folder. After that the app is switched from demo to full mode.
> But under Mojave the app stays in Demo mode.  Is there something special in 
> Mojave?
> 
> Regards,
> 
> 
> Matthias Rebbe
> 
> free tools for Livecoders:
> https://instamaker.dermattes.de 
> https://winsignhelper.dermattes.de
> 
> ___
> 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



Matthias Rebbe

free tools for Livecoders:
https://instamaker.dermattes.de
https://winsignhelper.dermattes.de

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

Re: How to find the offset of the last instance of a repeating character in a string?

2018-10-29 Thread Mark Wieder via use-livecode

On 10/29/2018 03:55 PM, Bob Sneidar via use-livecode wrote:

That will only give him the item, not the character position.


Nope. It returns the position.

--
 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: How to find the offset of the last instance of a repeating character in a string?

2018-10-29 Thread Bob Sneidar via use-livecode
That will only give him the item, not the character position. But it's a start. 
You can now get the number of characters of item 1 to -2 of pText +1. I didn't 
know the text you were searching had regular delimiters, and you were searching 
for the last delimiter. That makes things *much* easier. 

Bob S


> On Oct 29, 2018, at 15:32 , Mark Wieder via use-livecode 
>  wrote:
> 
> On 10/29/2018 08:32 AM, Keith Clarke via use-livecode wrote:
> 
>> I’m trying to separate paths & pages from a list of URLs and so looking to 
>> identify the position of the last ‘/‘ character.
> 
> function rightmostSlashOf pText
>   set the itemdelimiter to "/"
>   return offset(item -1 of pText, pText)
> end rightmostSlashOf
> 
> -- 
> 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

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

Re: How to find the offset of the last instance of a repeating character in a string?

2018-10-29 Thread Mark Wieder via use-livecode

On 10/29/2018 08:32 AM, Keith Clarke via use-livecode wrote:


I’m trying to separate paths & pages from a list of URLs and so looking to 
identify the position of the last ‘/‘ character.


function rightmostSlashOf pText
   set the itemdelimiter to "/"
   return offset(item -1 of pText, pText)
end rightmostSlashOf

--
 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: Is it not possible to write to the user preference folder in Mojave?

2018-10-29 Thread Bob Sneidar via use-livecode
Sounds like more onerous sandboxing. I see why it's necessary, but I have a 
simpler and more elegant solution: Have an international moratorium on all 
malicious hackers where the penalty is a life sentence on the frozen moon Rura 
Penthe. By that I mean hard labor. Until we get tough, and I mean really REALLY 
tough on offenders, and leave them with no place to hide, what we get in the 
end is devices we ourselves are locked out of, and then hackers seem to be able 
to get in anyway. 

Makes me crazy. So much for the golden age of the Internet, where compassion 
and tolerance flows from our mutually gained respect and understanding for all 
cultures and peoples. I like to say that the Internet is less like an 
Information Superhighway, and more like the wild, wild west with bands of 
highwaymen poised to waylay the unarmed and unsuspecting traveler. If I taught 
a computer class, that would be the first thing I would press home about shared 
computing. 

Bob S


> On Oct 28, 2018, at 15:26 , Matthias Rebbe via use-livecode 
>  wrote:
> 
> Hi.
> 
> Today i was informed by a customer that my app BRx Converter is not able to 
> write data to the preference folder ~/library/preferences.
> 
> The app normally writes some registration info after successful registration 
> to that folder. After that the app is switched from demo to full mode.
> But under Mojave the app stays in Demo mode.  Is there something special in 
> Mojave?
> 
> Regards,
> 
> 
> Matthias Rebbe
> 
> free tools for Livecoders:
> https://instamaker.dermattes.de
> https://winsignhelper.dermattes.de
> 
> ___
> 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 to find the offset of the last instance of a repeating character in a string?

2018-10-29 Thread Bob Sneidar via use-livecode
In dBase/Foxpro they had an AT function synonymous (roughly) with our offset 
function. They also had a RAT (Reverse AT) function. I needed something like 
this many moons ago. 

What I did to get all occurrences is I have a "pointer" variable I maintain 
with the position of the first character after the last instance of the string 
found. But to get the actual position in the original text, you have to add the 
pointer to the offset like so:

put 0 into tPointer
repeat
put offset(tVar, tTextChunk, tPointer) into tNextPos
if tNextPos = 0 then exit repeat
add tPointer to tNextPos
put char tNextPos to tNextPos + length(tVar) of tTextChunk into 
aFoundChunks [tNextPos] [length(tVar)]
put tNextPos + length(tVar) +1 into tPointer
end repeat

Something along those lines. Not tested, but you get the idea. 

Bob S


> On Oct 29, 2018, at 08:32 , Keith Clarke via use-livecode 
>  wrote:
> 
> Folks,
> Is there a simple way to find the offset of a character from the ‘right’ end 
> of a string, rather than the beginning - or alternatively get a list of all 
> occurrences?
> 
> I’m trying to separate paths & pages from a list of URLs and so looking to 
> identify the position of the last ‘/‘ character.
> 
> Thanks & regards,
> Keith
> ___
> 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 to find the offset of the last instance of a repeating character in a string?

2018-10-29 Thread Bob Sneidar via use-livecode
Looks like Devin beat me to it. :-)

Bob S


> On Oct 29, 2018, at 08:49 , Devin Asay via use-livecode 
>  wrote:
> 
> On Oct 29, 2018, at 9:32 AM, Keith Clarke via use-livecode 
>  wrote:
>> 
>> Folks,
>> Is there a simple way to find the offset of a character from the ‘right’ end 
>> of a string, rather than the beginning - or alternatively get a list of all 
>> occurrences?
>> 
>> I’m trying to separate paths & pages from a list of URLs and so looking to 
>> identify the position of the last ‘/‘ character.
>> 
>> Thanks & regards,
>> Keith
> 
> 
> There was a discussion on this topic on the list a few years ago, and I saved 
> these functions in my script library:
> 
> From Peter Brigham:
> These are utility functions I use constantly for text processing. 
> Offsets(str,cntr) returns a comma-delimited list of all the offsets of str in 
> ctnr. Lineoffsets(str,cntr) does the same with lineoffsets. Then you can 
> interate over the list of offsets to do whatever you want to each instance of 
> str in cntr. I keep them in a utility stack that is in the stackinuse, so it 
> is available to all stacks. I don't use regex, as I have never gotten the 
> regex syntax to stick in my head firmly enough to find it natural, and in any 
> case doing it by script turns out to be as fast or faster.
> 
> Peter's lineOffsets function returns a line number for each found char 
> offset. I added a function that returns only unique line numbers.
> 
> function offsets str,cntr
>-- returns a comma-delimited list of
>-- all the offsets of str in cntr
>put "" into oList
>put 0 into startPoint
>repeat
>put offset(str,cntr,startPoint) into os
>if os = 0 then exit repeat
>add os to startPoint
>put startPoint & "," after oList
>end repeat
>if oList = "" then return "0"
>return item 1 to -1 of oList
> end offsets
> 
> function lineOffsetsAll str,cntr
>-- returns a comma-delimited list of
>-- all the lineoffsets of str in cntr
># (returns a line number for ALL instances)
>put offsets(str,cntr) into charList
>if charList = "0" then return "0"
>put the number of items of charList into nbr
>put "" into oList
>repeat for each item n in charList
>put the number of lines of (char 1 to n of cntr) \
>& "," after oList
>end repeat
>return item 1 to -1 of oList
> end lineOffsetsAll
> 
> # added by Devin Asay
> function lineOffsets pStr,pSearchTxt
># (returns only unique line numbers)
>put empty into tList
>put 0 into tStartLine
>repeat 
>put lineOffset(pStr,pSearchTxt,tStartLine) into tLineNum
>if tLineNum = 0 then exit repeat
>add tLineNum to tStartLine
>put tStartLine & "," after tList
>end repeat
>if tList is empty then return "0"
>return item 1 to -1 of tList
> end lineOffsets
> 
> Hope this helps.
> 
> Devin
> 
> Devin Asay
> Director
> Office of Digital Humanities
> Brigham Young University
> 
> ___
> 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: Mysteries of Me

2018-10-29 Thread Bob Sneidar via use-livecode
Me always refers to the object the script belongs to. It doesn't matter which 
handler it is. A script running in a behavior is like running an instance of 
the target object (the object with the behavior set). This allows for multiple 
objects with the same behavior (think datagrids calling get the dgData in other 
dataGrids and you will immediately see why this would be necessary). This me 
refers to the actual behavior object, NOT the "instance object" as it were. 

As far as a backscript, are you saying you have a backscript object with a 
behavior assigned to it?? 

Bob S


> On Oct 29, 2018, at 08:14 , Sannyasin Brahmanathaswami via use-livecode 
>  wrote:
> 
> I thought I had a grip on "me"


___
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: Numbering lines

2018-10-29 Thread Bob Sneidar via use-livecode
Next goal, trying to be magnificant. :-)

Bob S


> On Oct 28, 2018, at 21:17 , J. Landman Gay via use-livecode 
>  wrote:
> 
> Well, at least I have finally become "splendid" at something.


___
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: Standalone issue ... was starting the Project Browser

2018-10-29 Thread Bob Sneidar via use-livecode
That interferes with the standalone builder, specifically auto detecting 
addons/plugins. It may cause other issues as well. It's a catch 22. 

Bob S


> On Oct 27, 2018, at 12:56 , J. Landman Gay via use-livecode 
>  wrote:
> 
> I'd be happy with a simple toggle that lets me turn on lockmessages before 
> building. I've been accomodating that behavior for years.


___
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: Mysteries of Me

2018-10-29 Thread Tom Glod via use-livecode
the first version said "go card" not "go to card" :)

On Mon, Oct 29, 2018 at 11:14 AM, Sannyasin Brahmanathaswami via
use-livecode  wrote:

> I thought I had a grip on "me"
>
> But in a script that is assigned to a stack, one assumes that "me"
> refers to stack itself.
> But the auto-suggestion on the SE popup menu generates an error on the
> following line:
> *
> on openstack
>put url ("binfile:" & path_Modules()& "listen/collection.json") into
> tContainer
>put JSONToArray(tContainer) into sCollectionA
>
># must have net connection, otherwise take to My Audio
>if not connectivity_PingServer() then
>   dialog_CustomMsg "No internet connection? Going to off-line library."
>   [ERROR:}go card [on tab on auto-suggestion] "listen-my-audio" of me
>end if
> end openstack
>
> # I have to use:
> *
> **on openstack
>put url ("binfile:" & path_Modules()& "listen/collection.json") into
> tContainer
>put JSONToArray(tContainer) into sCollectionA
>
># must have net connection, otherwise take to My Audio
>if not **connectivity_PingServer()** then
>   dialog_CustomMsg "No internet connection? Going to off-line library."
>   go to card "listen-my-audio" of this stack
>end if
> end openstack
>
> #Then the SE will compile the script*
> # Why is "me" generating an error?
> # It should not be a suggestion if it is.
>
> Dictionary says:
>
> *"The *me* keyword is a reference to the object whosescript contains the
> current handler. If *me* is executed in behavior script, then *me*
> refers to the object that is executing the behavior script."
>
> on openStack ... "me" ... one would think, refer to cards in the stack?
>
> Could it be that the function
>
>  **connectivity_PingServer()
>
> is called from a back script -- which has no binary "cards" such**
>
> BR
>
>
>
>
> ___
> 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: ?Make Docset? updated to 3.1, DASH docset for LC now at 1.7.1

2018-10-29 Thread Mike Kerner via use-livecode
I'm going to wait on both until later today and see if they auto-update.
The ipad auto-updated for me on Saturday.

On Sat, Oct 27, 2018 at 10:27 PM James Hale via use-livecode <
use-livecode@lists.runrev.com> wrote:

> From Mike
> > First of all, thanks a lot for doing this.  Dash is now my default way to
> > access the docs, on both my ipad and mac.  I love it.
> > Second, I have auto-updates turned on for both platforms, but they both
> > show the LC docs at 1.6.1
>
> I am glad it is useful. I to really like the presentation of Dash,
> especially on my ipad.
>
> It is now actually version 1.7.2
>
> As for the update.
> It would seem that updates to user contributions are not quite automatic.
> (This could be as I leave one previous version in place.)
>
> On the Mac go to Preferences.
> Click on the "Check and Install Now" button at the bottom to jog an update
> OF THE LISTING.
> Select the "User-Contributions" section in the lefthand pane.
> In the search area above the list of user contributed docsets, type
> "livecode".
> On the right of the entry for LivCode there is a popup menu which allows
> you to choose which docset to install.
>
> On the iPad go to "Settings" and click on "User Contributed docsets" and
> then on the "Update" button at the top of the screen.
> At least on the iPad it seems to grab the latest (one with the higher
> version number.)
>
> I am still getting all the "Associations" links to work so there will be a
> 1.7.3 in the near future.
>
>
> 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
>


-- 
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: How to find the offset of the last instance of a repeating character in a string?

2018-10-29 Thread Keith Clarke via use-livecode
Perfect, thanks Devin - I was hoping to see ‘offsets’ in the docs under 
‘offset’, so this will do nicely! :-)
Best,
Keith   

> On 29 Oct 2018, at 15:49, Devin Asay via use-livecode 
>  wrote:
> 
> On Oct 29, 2018, at 9:32 AM, Keith Clarke via use-livecode 
>  wrote:
>> 
>> Folks,
>> Is there a simple way to find the offset of a character from the ‘right’ end 
>> of a string, rather than the beginning - or alternatively get a list of all 
>> occurrences?
>> 
>> I’m trying to separate paths & pages from a list of URLs and so looking to 
>> identify the position of the last ‘/‘ character.
>> 
>> Thanks & regards,
>> Keith
> 
> 
> There was a discussion on this topic on the list a few years ago, and I saved 
> these functions in my script library:
> 
> From Peter Brigham:
> These are utility functions I use constantly for text processing. 
> Offsets(str,cntr) returns a comma-delimited list of all the offsets of str in 
> ctnr. Lineoffsets(str,cntr) does the same with lineoffsets. Then you can 
> interate over the list of offsets to do whatever you want to each instance of 
> str in cntr. I keep them in a utility stack that is in the stackinuse, so it 
> is available to all stacks. I don't use regex, as I have never gotten the 
> regex syntax to stick in my head firmly enough to find it natural, and in any 
> case doing it by script turns out to be as fast or faster.
> 
> Peter's lineOffsets function returns a line number for each found char 
> offset. I added a function that returns only unique line numbers.
> 
> function offsets str,cntr
>-- returns a comma-delimited list of
>-- all the offsets of str in cntr
>put "" into oList
>put 0 into startPoint
>repeat
>put offset(str,cntr,startPoint) into os
>if os = 0 then exit repeat
>add os to startPoint
>put startPoint & "," after oList
>end repeat
>if oList = "" then return "0"
>return item 1 to -1 of oList
> end offsets
> 
> function lineOffsetsAll str,cntr
>-- returns a comma-delimited list of
>-- all the lineoffsets of str in cntr
># (returns a line number for ALL instances)
>put offsets(str,cntr) into charList
>if charList = "0" then return "0"
>put the number of items of charList into nbr
>put "" into oList
>repeat for each item n in charList
>put the number of lines of (char 1 to n of cntr) \
>& "," after oList
>end repeat
>return item 1 to -1 of oList
> end lineOffsetsAll
> 
> # added by Devin Asay
> function lineOffsets pStr,pSearchTxt
># (returns only unique line numbers)
>put empty into tList
>put 0 into tStartLine
>repeat 
>put lineOffset(pStr,pSearchTxt,tStartLine) into tLineNum
>if tLineNum = 0 then exit repeat
>add tLineNum to tStartLine
>put tStartLine & "," after tList
>end repeat
>if tList is empty then return "0"
>return item 1 to -1 of tList
> end lineOffsets
> 
> Hope this helps.
> 
> Devin
> 
> Devin Asay
> Director
> Office of Digital Humanities
> Brigham Young University
> 
> ___
> 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 to find the offset of the last instance of a repeating character in a string?

2018-10-29 Thread Devin Asay via use-livecode
On Oct 29, 2018, at 9:32 AM, Keith Clarke via use-livecode 
 wrote:
> 
> Folks,
> Is there a simple way to find the offset of a character from the ‘right’ end 
> of a string, rather than the beginning - or alternatively get a list of all 
> occurrences?
> 
> I’m trying to separate paths & pages from a list of URLs and so looking to 
> identify the position of the last ‘/‘ character.
> 
> Thanks & regards,
> Keith


There was a discussion on this topic on the list a few years ago, and I saved 
these functions in my script library:

From Peter Brigham:
These are utility functions I use constantly for text processing. 
Offsets(str,cntr) returns a comma-delimited list of all the offsets of str in 
ctnr. Lineoffsets(str,cntr) does the same with lineoffsets. Then you can 
interate over the list of offsets to do whatever you want to each instance of 
str in cntr. I keep them in a utility stack that is in the stackinuse, so it is 
available to all stacks. I don't use regex, as I have never gotten the regex 
syntax to stick in my head firmly enough to find it natural, and in any case 
doing it by script turns out to be as fast or faster.

Peter's lineOffsets function returns a line number for each found char offset. 
I added a function that returns only unique line numbers.

function offsets str,cntr
-- returns a comma-delimited list of
-- all the offsets of str in cntr
put "" into oList
put 0 into startPoint
repeat
put offset(str,cntr,startPoint) into os
if os = 0 then exit repeat
add os to startPoint
put startPoint & "," after oList
end repeat
if oList = "" then return "0"
return item 1 to -1 of oList
end offsets

function lineOffsetsAll str,cntr
-- returns a comma-delimited list of
-- all the lineoffsets of str in cntr
# (returns a line number for ALL instances)
put offsets(str,cntr) into charList
if charList = "0" then return "0"
put the number of items of charList into nbr
put "" into oList
repeat for each item n in charList
put the number of lines of (char 1 to n of cntr) \
& "," after oList
end repeat
return item 1 to -1 of oList
end lineOffsetsAll

# added by Devin Asay
function lineOffsets pStr,pSearchTxt
# (returns only unique line numbers)
put empty into tList
put 0 into tStartLine
repeat 
put lineOffset(pStr,pSearchTxt,tStartLine) into tLineNum
if tLineNum = 0 then exit repeat
add tLineNum to tStartLine
put tStartLine & "," after tList
end repeat
if tList is empty then return "0"
return item 1 to -1 of tList
end lineOffsets

Hope this helps.

Devin

Devin Asay
Director
Office of Digital Humanities
Brigham Young University

___
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

How to find the offset of the last instance of a repeating character in a string?

2018-10-29 Thread Keith Clarke via use-livecode
Folks,
Is there a simple way to find the offset of a character from the ‘right’ end of 
a string, rather than the beginning - or alternatively get a list of all 
occurrences?

I’m trying to separate paths & pages from a list of URLs and so looking to 
identify the position of the last ‘/‘ character.

Thanks & regards,
Keith
___
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

Mysteries of Me

2018-10-29 Thread Sannyasin Brahmanathaswami via use-livecode
I thought I had a grip on "me"

But in a script that is assigned to a stack, one assumes that "me"
refers to stack itself.
But the auto-suggestion on the SE popup menu generates an error on the
following line:
*
on openstack
   put url ("binfile:" & path_Modules()& "listen/collection.json") into
tContainer
   put JSONToArray(tContainer) into sCollectionA   
   
   # must have net connection, otherwise take to My Audio
   if not connectivity_PingServer() then
  dialog_CustomMsg "No internet connection? Going to off-line library."
  [ERROR:}go card [on tab on auto-suggestion] "listen-my-audio" of me
   end if
end openstack

# I have to use:
*
**on openstack
   put url ("binfile:" & path_Modules()& "listen/collection.json") into
tContainer
   put JSONToArray(tContainer) into sCollectionA   
   
   # must have net connection, otherwise take to My Audio
   if not **connectivity_PingServer()** then
  dialog_CustomMsg "No internet connection? Going to off-line library."
  go to card "listen-my-audio" of this stack
   end if
end openstack

#Then the SE will compile the script*
# Why is "me" generating an error?
# It should not be a suggestion if it is.

Dictionary says:

*"The *me* keyword is a reference to the object whosescript contains the
current handler. If *me* is executed in behavior script, then *me*
refers to the object that is executing the behavior script."

on openStack ... "me" ... one would think, refer to cards in the stack?

Could it be that the function

 **connectivity_PingServer()

is called from a back script -- which has no binary "cards" such**

BR

 


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


Re: how to properly use the fullscreenmode and screen scaling

2018-10-29 Thread Colin Holgate via use-livecode
That’s fair enough. Rotating a phone so the bottom of the portrait phone is now 
to the right, is a right-handed way of thinking I guess! So yes, avoid the 
right middle too, for the benefit of left-handed people.

> On Oct 29, 2018, at 10:31 AM, Alex Tweedly via use-livecode 
>  wrote:
> 
> On 29/10/2018 14:18, Colin Holgate via use-livecode wrote:
>> On top of all that you may well want to place some things using code, but 
>> remember that the later Android phones, and the iPhone X, have a notch, so 
>> don’t place things at the far left center of a landscape app.
>> 
> Should that be "far left center" or "far-left or right center" ?
> Are people consistent enough about rotating 90'  anti-clockwise, or do they 
> (like me) sometimes rotate the other way ?
> [ I've never used a phone with a notch, so don't know if that leads to 
> greater consistency ]
> 
> Thanks
> Alex.


___
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: Is it not possible to write to the user preference folder in Mojave?

2018-10-29 Thread Paul Dupuis via use-livecode
We make and sell a couple of research applications developed in
LiveCode. Increasingly, on both OSX and Windows, we are running into to
customers who's permissions prevent out app from writing to locations
that were once (in older OS versions) writable. In some cases, this has
been due to changes the OS manufacturer (Microsoft, Apple) have made and
in more cases,, institutions, business, universities, etc. are locking
down computers on their networks even more than in the past. In the
cases of increased institutional lock down, local IT staff have often
been able to adjust the permissions. Increasingly (as with the next
release of our main app) we have moved to creating a folder in
specialFolderPath("Documents") for our company and placing all app files
in their as it is the one of the only fully cross platform places to be
both read and writable.


On 10/28/2018 6:26 PM, Matthias Rebbe via use-livecode wrote:
> Hi.
>
> Today i was informed by a customer that my app BRx Converter is not able to 
> write data to the preference folder ~/library/preferences.
>
> The app normally writes some registration info after successful registration 
> to that folder. After that the app is switched from demo to full mode.
> But under Mojave the app stays in Demo mode.  Is there something special in 
> Mojave?
>
> Regards,
>
>
> Matthias Rebbe
>
> free tools for Livecoders:
> https://instamaker.dermattes.de
> https://winsignhelper.dermattes.de
>
> ___
> 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


[ANN] This Week in LiveCode 152

2018-10-29 Thread panagiotis merakos via use-livecode
Hi all,

Read about new developments in LiveCode open source and the open source
community in today's edition of the "This Week in LiveCode" newsletter!

Read issue #152 here: https://goo.gl/RDvo1H

This is a weekly newsletter about LiveCode, focussing on what's been
going on in and around the open source project. New issues will be
released weekly on Mondays. We have a dedicated mailing list that will
deliver each issue directly to you e-mail, so you don't miss any!

If you have anything you'd like mentioned (a project, a discussion
somewhere, an upcoming event) then please get in touch.



-- 
Panagiotis Merakos 
LiveCode Software Developer

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 to properly use the fullscreenmode and screen scaling

2018-10-29 Thread Alex Tweedly via use-livecode

On 29/10/2018 14:18, Colin Holgate via use-livecode wrote:

On top of all that you may well want to place some things using code, but 
remember that the later Android phones, and the iPhone X, have a notch, so 
don’t place things at the far left center of a landscape app.


Should that be "far left center" or "far-left or right center" ?
Are people consistent enough about rotating 90'  anti-clockwise, or do 
they (like me) sometimes rotate the other way ?
[ I've never used a phone with a notch, so don't know if that leads to 
greater consistency ]


Thanks
Alex.

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

Re: how to properly use the fullscreenmode and screen scaling

2018-10-29 Thread Colin Holgate via use-livecode
No comment about the main code you showed, but what you said about showAll 
isn’t quite right. All of the card will always be visible. On devices wider 
than the horizontal ratio of the card, extra content will be revealed from off 
of the left and right of the card, the height of the card will fill the height 
of the device screen. On devices that are a narrower ratio than the horizontal 
ratio of the card, extra content is revealed from off of the top and bottom of 
the card, the width of the card will fill the width of the device screen. No 
combination should ever crop into the card area.

The easiest way to use showAll is to have all of the important things within 
the card window, then have enough extra stuff off all edges. Until recently I 
would make the card window be 16:9, and have enough content above and below the 
card to cope with iPad. That approach worked well for all devices from iPhone 5 
to iPad (16:9 to 4:3, using landscape as an example). With the super wide 
recent Samsung phones (and Pixel 3 too), and the even wider iPhone X, the ratio 
gets as high as 19.5:9.

Now my approach is to have a 16:9 card, extra content up to 4:3 as before, but 
now extra content off the left and right to reach a ratio of 20:9. My typical 
16:9 size is 1024x576, and 20:9 gives a familiar looking 1280x576.

So, card window of 1024x576 and all important objects within that space, extra 
background above and below the card, to give 1024x768, and extra content off 
the left and right to give 1280x576. You could of course have backgrounds that 
are 1280x768, that would do no harm. The parts in the corners will never be 
seen.

On top of all that you may well want to place some things using code, but 
remember that the later Android phones, and the iPhone X, have a notch, so 
don’t place things at the far left center of a landscape app.
___
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: Numbering lines

2018-10-29 Thread Alex Tweedly via use-livecode
Yeah, I said something that was wrong - and I did apologize and will 
happily do so again. And I managed to get "two people with one stone" 
and mis-describe both your and Geoff's valuable inputs.


So I apologize again to both of you, and anyone else I inadvertently 
knocked on the way past.


But, as you say, the important thing is that David got a couple of good 
answers, and anyone searching this thread in a few years time will see 
the answer, and not the human frailty of communication :-)


Alex.

On 29/10/2018 02:15, hh via use-livecode wrote:

Alex,

you and JLG are important LiveCoders. What you say has double weight.
 From that alone you should double check what you claim to be true.

Wrong assertions are no argument against a method but speed is one,
of course.

Anyway, it is fine that David G. has now a fast way to do his work.
___
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: Numbering lines

2018-10-29 Thread David V Glasgow via use-livecode
Thanks to everyone who helped me on this.  Apologies if I misdirected the 
discussion, but even that was very instructive.

My mouth hung open when I saw the cost of updating the progress bar every time 
through a loop.  

I guess I have become sloppy about time saving because most operations seem 
‘quick enough’ to me …and also it seems counterintuitive that adding a 
conditional line inside the loop would speed things up.  Useful information on 
arrays too.

Cheers,

David G
___
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: Numbering lines

2018-10-29 Thread hh via use-livecode
> JLG wrote:
> 
> > hh wrote:
> > Alex, 
> > you and JLG are important LiveCoders. What you say has double weight. 
> > From that alone you should double check what you claim to be true. 
> 
> Well, at least I have finally become "splendid" at something.
> 
> I can't decide whether you are being rude or just misunderstanding how
> your words appear in a different culture. To an American, the above is
> either an insult or a lecture.

The first two sentences are a praise, in every culture.

The third sentence is a simple advice, no "lecture".
If it is an insult for you (or Alex) then I deeply apologize.

Although I don't understand what's "insulting" with that.
It can't be the fact that I gave that advice: What's objectively
wrong that's wrong, no matter who said it.

> You should probably not assign so much weight to what I say here. 
> Sometimes I'm just human.

You don't really want that ...


___
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