Re: What do we know about LC 10?

2018-08-30 Thread Geoff Canyon via use-livecode
Maybe? I haven't explored LCB at all. I'm much more interested in extending
Livecode Script, if that ever becomes possible.

On Thu, Aug 30, 2018 at 9:42 PM Brian Milby via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Isn’t this somewhat possible in LCB now? I know there isn’t really any
> documentation on how to write the syntax, but there are the examples of the
> built in libraries. But, the added syntax would only work in LCB code.
>
> Thanks,
> Brian
>
___
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 do we know about LC 10?

2018-08-30 Thread Erik Beugelaar via use-livecode
In my opinion the focus should be on performance which has been slow down 
approx. 9 times compared to version 6.
You can build as much as “features” as you want but this should never hit the 
performance of the product. 
Just my two cents.




On 31/08/2018, 06:41, "use-livecode on behalf of Brian Milby via use-livecode" 
 wrote:

>Isn’t this somewhat possible in LCB now? I know there isn’t really any 
>documentation on how to write the syntax, but there are the examples of the 
>built in libraries. But, the added syntax would only work in LCB code.
>
>Thanks,
>Brian
>On Aug 30, 2018, 11:31 PM -0500, Geoff Canyon via use-livecode 
>, wrote:
>> On Thu, Aug 30, 2018 at 2:42 PM Martin Koob via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>
>> > I wonder if Open Language will get some attention..
>> >
>>
>> Open Language was always my favorite feature. I'd still like to be able to
>> grow/morph the syntax.
>> ___
>> 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: What do we know about LC 10?

2018-08-30 Thread Brian Milby via use-livecode
Isn’t this somewhat possible in LCB now? I know there isn’t really any 
documentation on how to write the syntax, but there are the examples of the 
built in libraries. But, the added syntax would only work in LCB code.

Thanks,
Brian
On Aug 30, 2018, 11:31 PM -0500, Geoff Canyon via use-livecode 
, wrote:
> On Thu, Aug 30, 2018 at 2:42 PM Martin Koob via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > I wonder if Open Language will get some attention..
> >
>
> Open Language was always my favorite feature. I'd still like to be able to
> grow/morph the syntax.
> ___
> 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: What do we know about LC 10?

2018-08-30 Thread Geoff Canyon via use-livecode
On Thu, Aug 30, 2018 at 2:42 PM Martin Koob via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I wonder if Open Language will get some attention..
>

Open Language was always my favorite feature. I'd still like to be able to
grow/morph the syntax.
___
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


Mobile Rotation Redux

2018-08-30 Thread Brian Milby via use-livecode
I finally installed Android Studio.  I have API 28, 26, and 15 installed.
Everything else was pretty much the defaults.  (Hint: you don't need to
move the sdk directory out of your Library, just create an alias and put it
on your desktop.  When you select the alias, LC will resolve it and store
the actual path.)

I couldn't get the (slow) emulators to launch.  Finding AVD in Studio is
somewhat of a pain (had to create a project to get the menu option).  Log
had some complaint about a file not being in the right place.

I decided to try to build a simple app and put it on my 5th Gen Fire (Fire
OS 5.6.1.0).  Ended up putting the apk on Dropbox, then copying it to the
SD card on the Fire, then installing the app (for some reason trying to
install directly from Dropbox didn't want to work).

Stack has 3 objects on the only card:  field "label", field "log", and
widget "Browser"
Objects all resize and move based on the rect (log and browser positions
change when rotated to landscape).  In LC, the stack is saved as 320x480 to
be sure that it has to resize.

I'll post the stack file if anyone wants to see it.  On the one Android
device I have available it works correctly.  Resizestack handlers fire
correctly.  So I guess I need to find something with a later OS to test
against to see the problems others are seeing on the Android side.

I linked the label field to open the r9 demo stack from the other thread
and it worked fine as well.

Here is the stack script:
---
on preOpenStack
   logRects "stack preOpenStack"
   pass preOpenStack
end preOpenStack

command logRects pText
   put pText & lf & \
 "   stack rect" && the rect of this stack & lf & \
 "   screenrect" && the screenrect & lf \
 after field "log" of card id 1002 of me
end logRects


Here is the card script:
---
on preOpenStack
   if the environment is "mobile" then
  local tOrientations
  put "portrait,portrait upside down,landscape left,landscape right"
into tOrientations
  mobileSetAllowedOrientations tOrientations
   end if
   --
   logRects "card preOpenStack"
   pass preOpenStack
end preOpenStack

on preOpenCard
   logRects "card preOpenCard"
end preOpenCard

on openCard
   logRects "card openCard"
end openCard

on resizeStack pNewWidth, pNewHeight, pOldWidth, pOldHeight
   logRects "resizeStack" && pNewWidth & slash & pNewHeight & \
 slash & pOldWidth & slash & pOldHeight

   local tMid
   if pNewWidth > pNewHeight then
  -- landscape
  put round(pNewWidth/2) into tMid
  set the rect of field "log" of me to 24,48,tMid-12,pNewHeight-24
  set the rect of widget "Browser" of me to
tMid+12,48,pNewWidth-24,pNewHeight-24
   else
  -- portrait
  put round(pNewHeight/2) into tMid
  set the rect of field "log" of me to 24,48,pNewWidth-24,tMid-12
  set the rect of widget "Browser" of me to
24,tMid+12,pNewWidth-24,pNewHeight-24
   end if
   set the rect of field "label" of me to 24,12,pNewWidth-24,48
end resizeStack


This is probably a good basic stack that could be used to gather
information on when events are firing and when values are getting updated.
For example, a send in time could be used to check the rects a certain
amount of time after the openCard finished.
___
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: LiveCode 1.6.1 docset now available

2018-08-30 Thread James At The Hale via use-livecode
Mike asked...
> James,
> Talk about why dash.

I mainly use my iPad to read my email. When reading LC stuff there have been 
times when I wanted to check the dictionary. Unfortunately for quite some time 
(almost as far back as the Kickstarter) to online API has not been friendly to 
a touch interface.

When the tiny dictionary was being discussed it occurred to me that it might be 
a good project to port over to iOS and give me back access to the API. Around 
the same time DASH, which had been removed from the app store for some reason 
was returned. Curious I looked into it and found that it offered access to a 
very wide range of documentation sets AND allowed you to write your own!
Furthermore, it had a MAC version but, more importantly, an iOS version.
As an added bonus the iOS version was free!

Having done some of the code for tiny dictionary I thought I would give writing 
a LC docset a go. Looking into the structure of a docset exposed another 
advantage. The docset could also include the “guides” that come with LC.

Thus the “make docset” stack was born.

Other bonuses were having other API’s close at hand (regex, css, html,markdown) 
for my occasional forays into their realm.

So I have Dash both on my Mac and my iPad. 

Dash also supplies a snippet manager on the Mac version which I have yet to 
explore.
It also has hooks which allow me to look up terms from other apps, e.g. writing 
a script in ATOM and I need to check the API, it is a right click away.

So, that’s why DASH for me.

Given there are readers of docsets for other platforms, I announce updates here 
in case others want to use it (or its siblings.)

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: How to get word offset all instances of a string in a chunk of text?

2018-08-30 Thread Curry Kenworthy via use-livecode



Jim:

> This just doesn’t work in all cases

That's the key though, don't repeat when it's not necessary! A day with 
no repeats is an efficient day. ;)


Best wishes,

Curry Kenworthy

Custom Software Development
LiveCode Training and Consulting
http://livecodeconsulting.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: Turn off .lc Web-browser Caching?

2018-08-30 Thread Tom Glod via use-livecode
try using javascript by doing "do in widget"

https://www.ajaymatharu.com/how-to-prevent-image-from-caching-in-javascript/

i bet that javascript may be your best chance at controlling the browser
widget in any kind of detail.  good luck let us know if you got it.

On Thu, Aug 30, 2018 at 5:51 PM Rick Harrison via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi there,
>
> I know this has come up before but
> looking through the old archives didn’t
> seem to turn up a working answer.
>
> Is there a good way to prevent a web-browser
> from re-displaying an image in it’s cache?
>
> I tried using a random number after the .lc URL
> such as:
>
> http://www.mysite.com/destination.lc?r=39923959 <
> http://www.mysite.com/destination.lc?r=39923959>
>
> I have also tried:
>
> put ""
> put ""
> put "”
>
> and that doesn’t seem to work either.
>
> Did anyone ever come up with a good solution?
>
> Thanks,
>
> Rick
> ___
> 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 get word offset all instances of a string in a chunk of text?

2018-08-30 Thread Jim Lambert via use-livecode
> I wrote:
> 
> Then there is also this repeat-less approach using arrays and filter:

> function findWordOffsets pText, pSearchTerm
>   put replaceText(pText,"\W+"," ") into pText
>   split pText by space
>   combine pText with cr and tab
>   filter pText with "*" & tab & pSearchTerm
>   sort numeric pText
>   return pText
> end findWordOffsets

This just doesn’t work in all cases because splitting by space does not assure 
one is splitting by true words.
:(
Sorry about that.

Jim Lambert

___
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 get word offset all instances of a string in a chunk of text?

2018-08-30 Thread Jim Lambert via use-livecode
> On 30/08/2018 10:24, Keith Clarke via use-livecode wrote:
>> Folks,
>> Is there a single-pass mechanism or more efficient way of returning the 
>> wordOffset of each instance of ?the? in ?the quick brown fox jumped over the 
>> lazy dog? than to use two passes through the text?

Then there is also this repeat-less approach using arrays and filter:

function findWordOffsets pText, pSearchTerm
put replaceText(pText,"\W+"," ") into pText
split pText by space
combine pText with cr and tab
filter pText with "*" & tab & pSearchTerm
sort numeric pText
return pText
end findWordOffsets

put "Then the quick brown fox jumped over "The" very,

very lazy

red dog on the sofa.” into temp   — note the extra spaces and line breaks.

put findWordOffsets(temp, “the”)   
returns:
2   the
8   The
15  the

Jim Lambert



___
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

Turn off .lc Web-browser Caching?

2018-08-30 Thread Rick Harrison via use-livecode
Hi there,

I know this has come up before but
looking through the old archives didn’t
seem to turn up a working answer.

Is there a good way to prevent a web-browser
from re-displaying an image in it’s cache?

I tried using a random number after the .lc URL
such as:

http://www.mysite.com/destination.lc?r=39923959 


I have also tried:

put ""
put ""
put "”

and that doesn’t seem to work either.

Did anyone ever come up with a good solution?

Thanks,

Rick
___
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 do we know about LC 10?

2018-08-30 Thread Martin Koob via use-livecode
I wonder if Open Language will get some attention..

It was on the Road Map in 2014.

https://livecode.com/the-present-and-future-livecode/
>Open Language: With the core refactoring almost complete (LiveCode 7.0)
we’ve started to turn our attention
>to the final aspect of this project which is to open up the language for
extension by anyone. We have been
>prototyping for quite some time now and plans are in place to move this
project forward at a rapid pace once
>LiveCode 7.0 is released. We will complete network, socket and database
libraries with easy to use English like
>syntax as part of the development and testing of this feature. This is
currently slated as one half of our next >major release, currently
imaginatively named “8.0”.

There was a long thread about it in Oct 2015 in the forums "What is Open
Language."

http://lists.runrev.com/pipermail/use-livecode/2015-October/220332.html


Did Open Language just serve as the foundation for Widgets or was there a
more substantial feature in the roadmap?

>Theme / Widgets: Another important prototype we’ve invested time in is
codenamed “Widgets”. Our aim is to
>provide a means for any LiveCode developer to extend the control set. This
builds on “Open Language” making
>it possible for any developer to extend the language and the UI. While
still in its infancy, we are really excited
>about the results which will make LiveCode 8.0 a groundbreaking release.

I thought it would something that would allow developers to extend the
language using more english like form rather than just using a function with
parameters.

i.e.  instead of using a call like this.

AWSS3GetPresignedURL(pBucket,pObject,pExpires)

You could extend the language allowing the parser to understand something
like

Get AWS3 PresignedURL for [tObject] in [tBucket] expiring in [tTime]
[seconds|milliseconds|minutes]

LiveCode has been gaining many features but the code gets less and less
English like and less readable.  It would be great if the big mystery behind
the LiveCode 10 banner is a way to get back as much as possible to following
the principle of human readable code.

Martin






Bob Sneidar via use-livecode wrote
> Hey folks,
> 
> What do we know about whats coming in LC 10?
> 
> My only hint was the smile on Kevin's face when he mentioned it when him
> and Chris were here  in March on the develop yourself trip.  But he didn't
> give a single hint.
> 
> I'm assuming big improvements to widgets and LC builder. I know there is
> also a store & improved sharing mechanism for developers.
> 
> Isn't it time to announce the plans sometime soon?  :)
> 
> What do you guys know?
> ___
> use-livecode mailing list

> use-livecode@.runrev

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





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

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

XML Handler Conflict

2018-08-30 Thread Bob Sneidar via use-livecode
Bug report https://quality.livecode.com/show_bug.cgi?id=21544

Bob S


___
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 do we know about LC 10?

2018-08-30 Thread Richard Gaskin via use-livecode

Tom Glod wrote:

> We have to remember  the engine and the IDE are two distinct
> projects.
> The problems are mostly in the IDE. I;m finding the engine to be
> very solid.

The one thing every LiveCode scripter has in common is that they can use 
LiveCode Script.


The more IDE scripting fixes the community takes care of the more engine 
work the team can do.


https://livecode.org/contribute/

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

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


Re: What do we know about LC 10?

2018-08-30 Thread Mike Kerner via use-livecode
Mark tends to complain about the engine, but they also inherited the engine
when they bought it from MetaCard.  He has said that it is difficult to
work on.

On Thu, Aug 30, 2018 at 2:57 PM Tom Glod via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Kevin seemed pretty pumped about it.
>
> We have to remember  the engine and the IDE are two distinct projects.
> The problems are mostly in the IDE. I;m finding the engine to be very
> solid.
>
> On Thu, Aug 30, 2018 at 2:29 AM Erik Beugelaar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > James, considering the previous upgrade steps to major upgrades (eg. 5.x
> > -> 6.x -> 7.x -> 8.x -> 9.01) I think it will take at least a year or so
> we
> > can expect an major upgrade to LiveCode 10. Who knows? Kevin for sure ;-)
> >
> > Cheers,
> > Erik
> >
> >
> >
> >
> > On 30/08/2018, 01:59, "use-livecode on behalf of James At The Hale via
> > use-livecode"  > use-livecode@lists.runrev.com> wrote:
> >
> > >I am all for seeing where things might be headed, but I am really more
> > interested in getting to where they WERE headed first.
> > >We still have the completion of Infinite Livecode to be delivered (the
> > fully documented examples etc), we still have DG2 to be completed.
> > >Given the time being taken to finally deliver on these I wouldn’t hold
> my
> > breathe for promises about a mythical 10.
> > >
> > >___
> > >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



-- 
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: What do we know about LC 10?

2018-08-30 Thread Tom Glod via use-livecode
Kevin seemed pretty pumped about it.

We have to remember  the engine and the IDE are two distinct projects.
The problems are mostly in the IDE. I;m finding the engine to be very solid.

On Thu, Aug 30, 2018 at 2:29 AM Erik Beugelaar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> James, considering the previous upgrade steps to major upgrades (eg. 5.x
> -> 6.x -> 7.x -> 8.x -> 9.01) I think it will take at least a year or so we
> can expect an major upgrade to LiveCode 10. Who knows? Kevin for sure ;-)
>
> Cheers,
> Erik
>
>
>
>
> On 30/08/2018, 01:59, "use-livecode on behalf of James At The Hale via
> use-livecode"  use-livecode@lists.runrev.com> wrote:
>
> >I am all for seeing where things might be headed, but I am really more
> interested in getting to where they WERE headed first.
> >We still have the completion of Infinite Livecode to be delivered (the
> fully documented examples etc), we still have DG2 to be completed.
> >Given the time being taken to finally deliver on these I wouldn’t hold my
> breathe for promises about a mythical 10.
> >
> >___
> >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: fullscreenmode and rect of a substack on mobile device ?

2018-08-30 Thread Ludovic THEBAULT via use-livecode

> Le 30 août 2018 à 17:14, Sannyasin Brahmanathaswami via use-livecode 
>  a écrit :
> 
> Ludovic
> 
> Can you copy that whole handler to the list?
> 
> round((item 4 of the screenrect*the systemscale)/2)-theight // +theight 
> 
> only seems partial?

Hello,

You can download my test stack here :
https://www.dropbox.com/s/iwwm2syiqzqamtg/testsubstack2.livecode?dl=0 


Note : my script doesn’t work properly : i tested it on an android tablet and 
the result is not accurate.
___
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: fullscreenmode and rect of a substack on mobile device ?

2018-08-30 Thread Brian Milby via use-livecode
In the above code, I don't see a "local sRect" declaration which would need
to be outside the handlers to work as intended.

What about just hard coding the rect as a test?  If you can set the stack
rect to what you know the screen to be that way, then we can proceed to
figure out why that value isn't getting there properly.  If setting the
rect manually doesn't work, then there is an issue that is deeper than just
knowing what the rect needs to be.

>From earlier in the thread it appears that on Android, the first
"resizestack" is not getting sent.  You don't get one until you rotate the
device.  What I'm not clear about is whether you can set the rect of the
stack to the known screen rect and have it display correctly.

I don't think Ludovic's code will help this particular issue since you are
having a problem getting the screen rect.  If you have the screen rect, you
shouldn't need to do anything with the scale.  You are doing everything
with logical pixels.

On Thu, Aug 30, 2018 at 10:36 AM Ralph DiMola via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I don't use a sub-stack to move from the splash to the main GUI stack. My
> stub-stack (after using my hack to display the splash card correctly) does
> 1: load all library stacks, sets all behaviors/back scripts,... 2: a send
> in
> 10 ticks to a handler that opens the GUI stack. After that there is no
> issues with getting the correct card rect. The splash stack sits invisible
> in the background and houses the engine and any inclusions/extensions... Of
> course in the IDE the splash stack remains open and visible, but who cares?
>
> 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 Sannyasin Brahmanathaswami via use-livecode
> Sent: Thursday, August 30, 2018 10:16 AM
> To: How to use LiveCode
> Cc: Sannyasin Brahmanathaswami
> Subject: Re: fullscreenmode and rect of a substack on mobile device ?
>
> Ha! One has to thank our community for "never giving up!"  That spirit
> alone
> is worth it weight in gold -- the Indy License!
>
> @ Brain  "Gee, why didn't I think of that!"
>
> Not calling as substack; I use this as navigation between mainstack (the
> splash screen and that has the stack files  is always open but hidden)
>
>
> command portal_GoStack cardOrStackObject
>
> # save where we are coming from locally
>
> put the short name of this stack into oStackName
>
> [snip]
>
> # Attempt to fix Android by dealing with mobile controls
>
> # and Accelereated Rendering from here
>
> # We deal with the each stack case
>
> if oStackName <> empty then
>
> # this is not the first run boot of portal
>
> deleteAllMobileControls # will destroy all except audioPlayer
>
> end if
>
> --> Variations on stack transition methods.
> --> timing is important, else android crashes
>
> set the acceleratedRendering of stack oStackName to false
>
> go cardOrStackObject
>
> # e.g go "gems" (or this string) go card 3 of "gems"
>
> wait 20 milliseconds with messages
>
> close stack oStackName
>
> wait 20 milliseconds with messages
>
> ## this does not work! -->
>
> ## go to cardOrStackObject in window oStackName
>
> end portal_GoStack
>
> So, since the whole app is running I could get the screenrect when the
> "portal" (index, TOC of the whole app) loads. And save to a local in main
> lib_SIvaSiva.livecodescript (always open)
>
> but still, I don't think screenRect will register in LC RAM *without*
> running "resizestack" so how would I force that?
>
> (thinking out loud) just running a handler to check may suffice to get the
> coords of the phone.
>
> local sMobileRect
> ...
> send "mobileRectSet" to me in 1 second
> end  portal_GoStack
>
> command mobileRectSet
>   put the screenRect into sMobileRect
> end mobileRectSet
>
> function mobileRectGet
> return sMobileRect
> end mobileRectGet
>
> I will try it
>
> @ Ralph
>
> Wow! That is quite a hack. I may try it. If the above  does not work.
>
> BR
>
>
> On 8/29/18 10:09 AM, Brian Milby via use-livecode wrote:
>
> Aren't you calling this as a sub-stack?  If so, could you capture the
> screen
> rect before the switch and pass in the data or cache to the file system and
> read it in?
>
> ___
> 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

Re: Tree View Values

2018-08-30 Thread Brian Milby via use-livecode
There is already a PR merged into 9.1 that will auto select the text of any
field in the PI when you enter it via tab.  This also selects the key field
in the Custom Properties inspector when the highlight changes.  If you tab
into the value, then the value is selected.

Changing the logic to select a non-empty value field in the PI probably
wouldn't be that hard, but would then introduce a difference in behavior
that may not always be desirable.

Having a new key when added get selected is the next thing I'm working on,
but that is proving to be a little bit more of a challenge.  Having the
tree widget highlight a new sub-key was easy.  Top level keys are proving
to be a little more difficult.  The current PI code doesn't like the
highlight change though.

Brian

On Thu, Aug 30, 2018 at 11:50 AM Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Brian.
>
> Actually for my purposes I need the last key of the array node. For
> example, if I have an array:
>
> myArray [level1] [level2] [level3]
>
> and the value is "Test1"
>
> then I need to return an array:
>
> aArrayNode [level3]
>
> I worked it out using my method so I'm not asking for a modification to
> your method, this for informational purposes only. What I am actually
> creating is an XML editor using a tree view, and also I am creating a
> method for solving the Property Inspector issue some have raised, where
> clicking a tree node does not hilite the node name or the value if there is
> one.
>
> What I am doing is almost identical to what the the property inspector
> does. I've worked it out so that hiliting a tree node whose value is an
> array puts the name of the hilited node into the Key field, selects the
> text of the key field, and puts empty into the Value field. If however the
> value of the hilited node is a value, it puts the value into the Value
> field and selects the text of the value field. This IMHO is the way the
> property inspector *ought* to work.
>
> Bob S
>
>
> > On Aug 30, 2018, at 07:41 , Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Oh there you go! That works.
> >
> > Bob S
> >
> >
> >> On Aug 29, 2018, at 13:58 , Brian Milby via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >>
> >> Here is another way to do it:
> >>
> >> function getHilightedValue pTreeWidgetReference
> >>  local tElement, tArray
> >>  put the arrayData of pTreeWidgetReference into tArray
> >>  put the hilitedElement of pTreeWidgetReference into tElement
> >>  split tElement by comma
> >>  return tArray[tElement]
> >> end getHilightedValue
>
> ___
> 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: Handler Conflict

2018-08-30 Thread Bob Sneidar via use-livecode
I will ina bit. I'm on conference calls until lunch. 

Bob S


> On Aug 29, 2018, at 16:35 , Monte Goulding via use-livecode 
>  wrote:
> 
>> On 30 Aug 2018, at 1:15 am, Bob Sneidar via use-livecode 
>>  wrote:
>> 
>> Just a heads up for anyone using Trevor's excellent XML library, the 
>> ConvertXMLToArray function has a counterpart in the Android library, and 
>> they produce different results! I suspect the ConvertArrayToXML also has a 
>> counterpart. 
> 
> Could you open a bug report about that Bob? We should make the ones in 
> revSaveAsAndroidStandalone` private or give them a decent prefix to avoid 
> conflict.
> 
> Cheers
> 
> Monte


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


Re: Tree View Values

2018-08-30 Thread Bob Sneidar via use-livecode
Hi Brian. 

Actually for my purposes I need the last key of the array node. For example, if 
I have an array:

myArray [level1] [level2] [level3]

and the value is "Test1"

then I need to return an array:

aArrayNode [level3]

I worked it out using my method so I'm not asking for a modification to your 
method, this for informational purposes only. What I am actually creating is an 
XML editor using a tree view, and also I am creating a method for solving the 
Property Inspector issue some have raised, where clicking a tree node does not 
hilite the node name or the value if there is one. 

What I am doing is almost identical to what the the property inspector does. 
I've worked it out so that hiliting a tree node whose value is an array puts 
the name of the hilited node into the Key field, selects the text of the key 
field, and puts empty into the Value field. If however the value of the hilited 
node is a value, it puts the value into the Value field and selects the text of 
the value field. This IMHO is the way the property inspector *ought* to work. 

Bob S


> On Aug 30, 2018, at 07:41 , Bob Sneidar via use-livecode 
>  wrote:
> 
> Oh there you go! That works.
> 
> Bob S
> 
> 
>> On Aug 29, 2018, at 13:58 , Brian Milby via use-livecode 
>>  wrote:
>> 
>> Here is another way to do it:
>> 
>> function getHilightedValue pTreeWidgetReference
>>  local tElement, tArray
>>  put the arrayData of pTreeWidgetReference into tArray
>>  put the hilitedElement of pTreeWidgetReference into tElement
>>  split tElement by comma
>>  return tArray[tElement]
>> end getHilightedValue

___
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: fullscreenmode and rect of a substack on mobile device ?

2018-08-30 Thread Ralph DiMola via use-livecode
I don't use a sub-stack to move from the splash to the main GUI stack. My
stub-stack (after using my hack to display the splash card correctly) does
1: load all library stacks, sets all behaviors/back scripts,... 2: a send in
10 ticks to a handler that opens the GUI stack. After that there is no
issues with getting the correct card rect. The splash stack sits invisible
in the background and houses the engine and any inclusions/extensions... Of
course in the IDE the splash stack remains open and visible, but who cares?

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 Sannyasin Brahmanathaswami via use-livecode
Sent: Thursday, August 30, 2018 10:16 AM
To: How to use LiveCode
Cc: Sannyasin Brahmanathaswami
Subject: Re: fullscreenmode and rect of a substack on mobile device ?

Ha! One has to thank our community for "never giving up!"  That spirit alone
is worth it weight in gold -- the Indy License!

@ Brain  "Gee, why didn't I think of that!"

Not calling as substack; I use this as navigation between mainstack (the
splash screen and that has the stack files  is always open but hidden)


command portal_GoStack cardOrStackObject

# save where we are coming from locally

put the short name of this stack into oStackName

[snip]

# Attempt to fix Android by dealing with mobile controls

# and Accelereated Rendering from here

# We deal with the each stack case

if oStackName <> empty then

# this is not the first run boot of portal

deleteAllMobileControls # will destroy all except audioPlayer

end if

--> Variations on stack transition methods.
--> timing is important, else android crashes

set the acceleratedRendering of stack oStackName to false

go cardOrStackObject

# e.g go "gems" (or this string) go card 3 of "gems"

wait 20 milliseconds with messages

close stack oStackName

wait 20 milliseconds with messages

## this does not work! -->

## go to cardOrStackObject in window oStackName

end portal_GoStack

So, since the whole app is running I could get the screenrect when the
"portal" (index, TOC of the whole app) loads. And save to a local in main
lib_SIvaSiva.livecodescript (always open)

but still, I don't think screenRect will register in LC RAM *without*
running "resizestack" so how would I force that?

(thinking out loud) just running a handler to check may suffice to get the
coords of the phone.

local sMobileRect
...
send "mobileRectSet" to me in 1 second
end  portal_GoStack

command mobileRectSet
  put the screenRect into sMobileRect
end mobileRectSet

function mobileRectGet
return sMobileRect
end mobileRectGet

I will try it

@ Ralph

Wow! That is quite a hack. I may try it. If the above  does not work.

BR


On 8/29/18 10:09 AM, Brian Milby via use-livecode wrote:

Aren't you calling this as a sub-stack?  If so, could you capture the screen
rect before the switch and pass in the data or cache to the file system and
read it in?

___
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: fullscreenmode and rect of a substack on mobile device ?

2018-08-30 Thread Sannyasin Brahmanathaswami via use-livecode
I tried it.

Sure, I get the screenrect in advance; I put an answer sRect in a one stack 
opencard script...

I get an answer...

but this does not work on the stack the has browser...

so I now suspect to browser widget is blocking "registration" the screen rect. 
Now only that it may be blocking openCard handler.


on preopencard

if isMobile() then

put mobileRectGet() into sRect

send "setUpStackRect" to me in 500 milliseconds

end if

end preopencard

on opencard

answer sRect with "OK"  # does not fire...

end opencard


openstack

On 8/30/18 4:24 AM, Sannyasin Brahmanathaswami via use-livecode wrote:

but still, I don't think screenRect will register in LC RAM *without* running 
"resizestack" so how would I force that?

(thinking out loud) just running a handler to check may suffice to get the 
coords of the phone.

local sMobileRect
...
send "mobileRectSet" to me in 1 second
end  portal_GoStack

command mobileRectSet
  put the screenRect into sMobileRect
end mobileRectSet

function mobileRectGet
return sMobileRect
end mobileRectGet

I will try it

___
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: fullscreenmode and rect of a substack on mobile device ?

2018-08-30 Thread Sannyasin Brahmanathaswami via use-livecode
Ludovic

Can you copy that whole handler to the list?

round((item 4 of the screenrect*the systemscale)/2)-theight // +theight 

only seems partial?

On 8/19/18 6:11 PM, Ludovic THEBAULT via use-livecode wrote:
> But i found i can get the « real » top and bottom with : round((item 4 of the 
> screenrect*the systemscale)/2)-theight // +theight (for the bottom)
> where theight is the height of my stack before fullscreenmode.



___
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: Tree View Values

2018-08-30 Thread Bob Sneidar via use-livecode
Oh there you go! That works.

Bob S


> On Aug 29, 2018, at 13:58 , Brian Milby via use-livecode 
>  wrote:
> 
> Here is another way to do it:
> 
> function getHilightedValue pTreeWidgetReference
>   local tElement, tArray
>   put the arrayData of pTreeWidgetReference into tArray
>   put the hilitedElement of pTreeWidgetReference into tElement
>   split tElement by comma
>   return tArray[tElement]
> end getHilightedValue


___
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: fullscreenmode and rect of a substack on mobile device ?

2018-08-30 Thread Sannyasin Brahmanathaswami via use-livecode
Ha! One has to thank our community for "never giving up!"  That spirit alone is 
worth it weight in gold -- the Indy License!

@ Brain  "Gee, why didn't I think of that!"

Not calling as substack; I use this as navigation between mainstack (the splash 
screen and that has the stack files  is always open but hidden)


command portal_GoStack cardOrStackObject

# save where we are coming from locally

put the short name of this stack into oStackName

[snip]

# Attempt to fix Android by dealing with mobile controls

# and Accelereated Rendering from here

# We deal with the each stack case

if oStackName <> empty then

# this is not the first run boot of portal

deleteAllMobileControls # will destroy all except audioPlayer

end if

--> Variations on stack transition methods.
--> timing is important, else android crashes

set the acceleratedRendering of stack oStackName to false

go cardOrStackObject

# e.g go "gems" (or this string) go card 3 of "gems"

wait 20 milliseconds with messages

close stack oStackName

wait 20 milliseconds with messages

## this does not work! -->

## go to cardOrStackObject in window oStackName

end portal_GoStack

So, since the whole app is running I could get the screenrect when the "portal" 
(index, TOC of the whole app) loads. And save to a local in main 
lib_SIvaSiva.livecodescript (always open)

but still, I don't think screenRect will register in LC RAM *without* running 
"resizestack" so how would I force that?

(thinking out loud) just running a handler to check may suffice to get the 
coords of the phone.

local sMobileRect
...
send "mobileRectSet" to me in 1 second
end  portal_GoStack

command mobileRectSet
  put the screenRect into sMobileRect
end mobileRectSet

function mobileRectGet
return sMobileRect
end mobileRectGet

I will try it

@ Ralph

Wow! That is quite a hack. I may try it. If the above  does not work.

BR


On 8/29/18 10:09 AM, Brian Milby via use-livecode wrote:

Aren't you calling this as a sub-stack?  If so, could you capture the
screen rect before the switch and pass in the data or cache to the file
system and read it in?

___
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 get word offset all instances of a string in a chunk of text?

2018-08-30 Thread Curry Kenworthy via use-livecode



hh:

> Sadly LC 9 is at about 10 times slower
> than LC 6 with such fast scripts.

Yes, I've been doing some benchmarks and LC 9 usually takes anywhere 
from 2x to 8x as long to perform a job. With or without text being 
involved. It is a serious problem that should not be neglected across 
multiple major versions of LC. I'll share a test stack and video with 
some examples when I have a little time. (Including one test where LC 9 
held its own.)


Meanwhile, optimize scripts! Then hopefully a serious boost once the 
engine itself is optimized.


Best wishes,

Curry Kenworthy

Custom Software Development
LiveCode Training and Consulting
http://livecodeconsulting.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: LiveCode 1.6.1 docset now available

2018-08-30 Thread Mike Kerner via use-livecode
James,
Talk about why dash.
___
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 get word offset all instances of a string in a chunk of text?

2018-08-30 Thread hh via use-livecode
> Alex T. wrote:
> 
> put 0 into tOffset
> repeat for each trueWord W in tSource
>add 1 to tOffset
>if W = myWord then
>   put tOffset & comma after tOffsetList
>end if
> end repeat

This is (whether trueWord or word chunks used) probably the fastest
method for an offset counting of one (true)word.

Possibly it is for a large tSource (say 4 MByte) better to use CR
instead of comma as delimiter for the list:
Else, when putting tOffsetList into a field, LC may cut the result
or even hang (LC 9) because the maximum pixel size of a line gets
exceeded.

___
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 get word offset all instances of a string in a chunk of text?

2018-08-30 Thread hh via use-livecode
For a more general context see

http://www.runrev.com/pipermail/use-livecode//2004-February/032280.html

Sadly LC 9 is at about 10 times slower than LC 6 with such fast scripts.
For example LC 6.7.11 needs at about 500 ms to evaluate a 1 MByte string,
LC 9.0.0 needs at about 5 seconds.

___
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 get word offset all instances of a string in a chunk of text?

2018-08-30 Thread Alex Tweedly via use-livecode
OK, this time I'm just typing into email - havent tested these 
suggestions :-)



On 30/08/2018 10:24, Keith Clarke via use-livecode wrote:

Folks,
Is there a single-pass mechanism or more efficient way of returning the 
wordOffset of each instance of ‘the’ in ‘the quick brown fox jumped over the 
lazy dog’ than to use two passes through the text?

Yes. For a single word myWord

put 0 into tOffset
repeat forever
  put trueWordOffset(myWord, tSource, tOffset) into tmp
  if tmp > 0 then
    put tmp & comma after tOffsetList
    put tmp into tOffset
  end if
end repeat

BUT there's a chance that this performs poorly, becuase of repeated 
skipping, so I would also benchmark the simpler

put 0 into tOffset
repeat for each trueWord W in tSource
  add 1 to tOffset
  if W = myWord then
 put tOffset & comma after tOffsetList
  end if
end repeat

Pass-1. Count the instances of ‘the’ into an array and then
Pass-2. Repeat for the count of instances using wordOffset, with a wordsToSkip 
variable derived from the previous loop’s offset

I’m I’m wondering if there’s something I’ve not yet learned about (nested?) arrays 
that might extend the unique word counter code that Alex, Paul & others helped 
me to fix a few days ago, to add a sub-array of wordOffset alongside word count?

I'm not entirely sure what you want here, or what the 'N' below are.
Do you want a count and an offsetList for each word ? If so, no need for 
nested arrays.


Then I'd change your second loop below to:

repeat for each trueWord W in tSource
   add 1 to tOffset
   if tANoise[W] then next repeat
   add 1 to tAWordCount[W]
   put tOffset & comma after tAWordOffsets[W]
end repeat

and of course the third loop to

repeat for each key K in tAWordCount
   put k && tAWordCount[K] & CR after tmp
end repeat
sort lines of tmp descending numeric by word 2 of each
put tmp into fld "Words"
 


If I've misunderstood what you want, please say so and I'll try again :-)

Alex.



# Prepare noisewords array

repeat for each trueWord W in tNoiseWords

put true into tANoise[W]

end repeat


# Build unique words array

repeat for each trueWord W in tSource

if tANoise[W] then next repeat

add 1 to tAWords[W][N]

end repeat


# Convert unique words array to list


repeat for each key K in tAWords

put K && tAWords[K][N] & CR after fld "Words"

end repeat


sort lines of field "Words" descending numeric by word 2 of each


end repeat

Any ideas or steer towards a lesson / worked example greatly appreciated.
Best,
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

How to get word offset all instances of a string in a chunk of text?

2018-08-30 Thread Keith Clarke via use-livecode
Folks,
Is there a single-pass mechanism or more efficient way of returning the 
wordOffset of each instance of ‘the’ in ‘the quick brown fox jumped over the 
lazy dog’ than to use two passes through the text?
Pass-1. Count the instances of ‘the’ into an array and then
Pass-2. Repeat for the count of instances using wordOffset, with a wordsToSkip 
variable derived from the previous loop’s offset

I’m I’m wondering if there’s something I’ve not yet learned about (nested?) 
arrays that might extend the unique word counter code that Alex, Paul & others 
helped me to fix a few days ago, to add a sub-array of wordOffset alongside 
word count? 

# Prepare noisewords array

repeat for each trueWord W in tNoiseWords

put true into tANoise[W]

end repeat


# Build unique words array

repeat for each trueWord W in tSource

if tANoise[W] then next repeat

add 1 to tAWords[W][N]

end repeat


# Convert unique words array to list


repeat for each key K in tAWords

put K && tAWords[K][N] & CR after fld "Words"

end repeat


sort lines of field "Words" descending numeric by word 2 of each


end repeat

Any ideas or steer towards a lesson / worked example greatly appreciated.
Best,
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