Re: Remote URL Not Available

2018-06-27 Thread Sannyasin Brahmanathaswami via use-livecode
"it" almost always containa data.

e.g contains "404 Page Not Found"  

I wondering if we have to parse it for all possible errors?

Or, if there is  just *one* thing that is true, for all "I found the file, here 
it is" cases



J. Landman Gay wrote:

I've used this:

  get url tURL
  put the result into tNetworkErr
  put it into tData

If the result isn't empty then there has been an error. Otherwise, you 
can do something with the data in the "it" variable.



___
use-livecode mailing list
use-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: IOS 11.4 -- Stuck

2018-06-22 Thread Sannyasin Brahmanathaswami via use-livecode
That would go good news. But

LC 8.1.10
Xcode 9.3
Build for iPod,IPhone,iPad.  8.0 or later

(can you make the error dialog box so we can copy it to the clipboard?)

"Unable to build app for device: 394,1260,1" (screen shot here)
http://wiki.hindu.org/screenshots/iOSErr2018--06-22.png

Now, possibly something else is the cause

1) because of getting a screenrect of 0,0,375,667 (even though I had all 
screens needed and size correctly) instead of 0,0,414,736.  (from all my stand 
alone, it is not stack specific) And while the team in Scotland kept getting, 
0,0,414,735 in the simulator

That implied an Xcode problem that was local to my machine, (possibly?) and I 
could get the Simulator run either 

2) So I delete Xcode (9.2 and 9.3.1) and installed 9.3 to run with  8.1.10

Now this problem arose... one anomaly is that Xcode did not ask to download 
"extra extensions" as it usually does.

Now I'm stumped on two front:

Can't get the right screen to from iOS and can't even build one

Ha! Life With Apple

BR 

On 6/22/18, 12:16 PM, "use-livecode on behalf of panagiotis merakos via 
use-livecode"  wrote:

Hi Brahmanathaswami,

You should still be able to deploy iOS apps to your iOS 11.4 device. This
does NOT depend on the Xcode version you use to build the app. It depends
only on the dropdown in the iOS standalone settings. For example, if you
choose "8.0 or later" then your app will run on any iOS device as long as
the device runs iOS >= 8.0.

Best,
Panos
--



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

8.1.10 Reporting the ScreenSize of a iPhone7: 0,0,375,667

2018-06-22 Thread Sannyasin Brahmanathaswami via use-livecode
Never mind.. I had to run (since I did a fresh install of Xcode)

sudo xcode-select -s  /Applications/Xcode.app

But now my Simulator works!  So we back the screenRect problem

Wow... one step close to the gremlin (hehe)

And, as Panos says it has nothing to do with 11.4 ... its deeper that than

1) set the fullScreenMode of this stack to "showAll"
-- Simulator I get a screenrect of 0,0,414,736
-- Build test/target to actually phone 7 plus ...
answer screenRect returns 0,0,375,667   

2) With exactFit  
-- Simulator I get a screenrect of 0,0,1242,2208 
-- but on the actual phone it get   
0,0,1125,2001...which is a factor 3x(0,0,375,667)

So the difference is  (obviously): 

Scotland does not have an iPhone 7Plus, they were using a Simulator
But here, using the actual device, it report a screenrect different then the 
actual device.

Hmmm. Is it  LiveCode problem, or an Apple/Xcode problem?  

Perhaps it should file a bug... How many other devices are not registering 
their actual screenRect? Can be a "disaster" for attempts at  responsive design.

BR


On 6/22/18, 3:38 PM, "use-livecode on behalf of Sannyasin Brahmanathaswami via 
use-livecode"  wrote:

That would go good news. But

LC 8.1.10
Xcode 9.3
Build for iPod,IPhone,iPad.  8.0 or later

(can you make the error dialog box so we can copy it to the clipboard?)



___
use-livecode mailing list
use-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: IOS 11.4 -- Stuck

2018-06-22 Thread Sannyasin Brahmanathaswami via use-livecode
sudo xcode-select -s  /Applications/Xcode.app

that did it 

Now back on the screenRect thread. 

Mysterious new results


Brahmanathaswami
 

On 6/22/18, 3:38 PM, "use-livecode on behalf of Sannyasin Brahmanathaswami via 
use-livecode"  wrote:

That would go good news. But

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

IOS 11.4 -- Stuck

2018-06-22 Thread Sannyasin Brahmanathaswami via use-livecode
Without thinking about it, I said "yes" to a iOS upgrade.

11.4

Now it seems that I am lock out from making standalones.

Any hope in 9.1 coming out soon?




___
use-livecode mailing list
use-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: 8.1.10 Reporting the ScreenSize of a iPhone7: 0,0,375,667

2018-06-23 Thread Sannyasin Brahmanathaswami via use-livecode
OK there are lot issues at the QA center relating to landscape

I added the test stack to

https://quality.livecode.com/show_bug.cgi?id=19465

so that you can test on the latest build (await release, 9.1)

I don't want to have 9.1 come out only to find it does not work.

BR

Hi Brahmanathaswami,

I think I have found the culprit.

___
use-livecode mailing list
use-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: 8.1.10 Reporting the ScreenSize of a iPhone7: 0,0,375,667

2018-06-23 Thread Sannyasin Brahmanathaswami via use-livecode
Geesh! (He bangs his head on the desk...ha!)  that fixed it!

I don't when I turn on Zoom mode... possibly last year! And it has been 
carrying that setting forward through all updates. It actually does a "reset" 
on the phone to change to "standard mode"

I suppose it good that you found this, finally. 

But does it not lead to an "enhancement" request?

Something like:

=
On iOS, if the use has the mode set as  "Zoomed Mode" then return the 
screenRect at the "zoom mode" size.
=

??

Otherwise we cannot build a "responsive" interface.  

But, my goal is met. I will turn the stack in as a test  for Android to try to 
get in working the say way before you send out 9.1

Somehow I scripted this, first time ever in less than 100 lines without using a 
single resize handler or messing with the GM?  Thanks to 

mobileSetFullScreenRectForOrientations "portrait,portrait upside 
down",sPortraitRect
mobileSetFullScreenRectForOrientations "landscape left,landscape 
right",sLandscapeRect

and, if in work on Android, I deprecate nearly 1400 lines for code that is 
"impenetrable" for the human mind (created by someone who DID get it to work on 
Android, only God knows how...) 

I wonder it you were to use resize handler, could you do with even less code? 
OR would the resize handler report the actual Zoomed In rect?   Have to test 

Current iteration is here "

Go url stack "http://wiki.hindu.org/uploads/BrowserLandscapeTest_r3.livecode;

BR


On 6/22/18, 11:44 PM, "use-livecode on behalf of panagiotis merakos via 
use-livecode"  wrote:

Hi Brahmanathaswami,

I think I have found the culprit. I don’t have a Plus device to check, but
the differences you see between the iPhone 7 Plus device and simulator is
probably because you have enabled the "Zoomed Mode" in the device.

If you have "Zoomed Mode" enabled in the iPhone 6+/7+/8+ device, it reports
the screenrect of iPhone 6/7/8 (this is how Zoomed Mode works)

1. Launch the iOS Settings app.
2. Scroll down and select Display & Brightness.
3. Select the View option under the Display Zoom section.
4. If you have "Zoomed mode", change this to "Standard mode".
5. Test again and you should now see the expected screenrect (0,0,414,736)

Does that fix the problem?

Best,
Panos

___
use-livecode mailing list
use-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: 8.1.10 Reporting the ScreenSize of a iPhone7: 0,0,375,667

2018-06-23 Thread Sannyasin Brahmanathaswami via use-livecode
I enter a new handler into stack script

on resizestack pNewWidth, pNewHeight, pOldWidth, pOldHeight
put pNewWidth  &&  pNewHeight  && pOldWidth &&  pOldHeight into it
answer it with "OK"
 end resizestack

1) on switch on portrait to landscape (turn sideways) I get a resizeStack 
answer.
2) on switch on landscape back to portrait (turn phone upright)
   -- I get the same information as before (wrong...) tNewWidth is 736 when is 
should now to 414.
  -- just adding the resize hander break the screen redraw! 

 Working version:

Go stack url "http://wiki.hindu.org/uploads/BrowserLandscapeTest_r3.livecode;

  Not working:

go stack url "http://wiki.hindu.org/uploads/BrowserLandscapeTest_r4.livecode;

so, this goes back in @Jacque comments a few days ago...and it is not only on 
Android, 

" This is what I have:

on resizeStack x,y
   ANSWER X & Y
   setupUI x,y
end resizeStack

The answer dialog appeared once on my first test (with no x,y values)
and all test builds after that never showed an answer dialog at all. The
setupUI handler also has an answer dialog for testing and I haven't seen
it even once.
"
 It not only does show the correct rect, it breaks (on iOS) the screen 
redraw


BR wrote

I wonder it you were to use resize handler, could you do with even less 
code? OR would the resize handler report the actual Zoomed In rect?   Have to 
test

___
use-livecode mailing list
use-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: 8.1.10 Reporting the ScreenSize of a iPhone7: 0,0,375,667

2018-06-23 Thread Sannyasin Brahmanathaswami via use-livecode
Now that we know "Zoomed Mode" has an effect...

The card rect "source of authority" in all case uses the screenRect 

1) Oddly, with Zoomed Mode set, it gave the right reading 0,0,414,736

And it set up in portraitUI correctly!

2) Caveat though: passing that rect to these handlers  
(in a function that results sPortraitRect and sLandscapeRect)

Results on "mis-drawings" the widget "body" (a browser) on landscape.

mobileSetFullScreenRectForOrientations "portrait,portrait upside 
down",sPortraitRect
mobileSetFullScreenRectForOrientations "landscape left,landscape 
right",sLandscapeRect

---
I believe I have "exhausted" all that I can do with this. I'll turn over to 
Scotland, there are too many "gotchas" which we hope we have exposed for them.

I back to building new content.

Brahmanathaswami
 

 J. Landman Gay 

Do you get the same results if you get the rect of the card?

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

Mastering TS Net

2018-07-01 Thread Sannyasin Brahmanathaswami via use-livecode
I really need to get my head around TSNet, so began experiments.

This is the documentation for tsNetGetFile

" local tHeaders, tResult

put tsNetGetFile("1", "/path/to/downloaded/file.dat", \
"ftp://user:p...@ftp.example.com/file.dat;, tHeaders, \
"transferComplete") into tResult

on transferComplete pID, pResult, pBytes, pCurlCode
local tData, tHeaders
if pCurlCode is not 0 then
answer tsNetRetrError(pID)
else
a   nswer "File has been downloaded"
end if
tsNetCloseConn pID
end transferComplete

# but my first attempt to "get it" ... ran into this error. 

Are there any good lessons on all TSNet functions?
 I am not looking forward to wading into this blind as a bat.

# variable watcher

tResult  --tsneterr: ID already in use

what is strange is this, the IDE gives the error even before tracing the 
mouseup.

So I did not even get off home plate.


local tHeaders, tResult

on mouseup 
# put a break here... the IDE show an error *before* stepping into the next 
statement
# I can't even close the connection with:
   tsNetCloseConn "1"
   put empty into tResult
   put fld aURL into pURL
   put empty into fld "fldHTTPHeader"
   put empty  into fld "tHTMLfield"
   set the itemDel to "/" 
   put item -1 of pURL into tFileName
   put ("~/Desktop/") into tLocalFile
   put tsNetGetFile("1",tLocalFile,pURL,tHeaders,"transferComplete") into 
tResult
 
   --  put libURLLastHTTPHeaders() into fld "fldHTTPHeader" 
end mouseup

on transferComplete pID, pResult, pBytes, pCurlCode
   if pCurlCode is not 0 then
  answer tsNetRetrError(pID)
   else
  answer "File has been downloaded"
  put tHeaders into fld "fldHTTPHeader"
   end if
   tsNetCloseConn pID
end transferComplete

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: Mastering TS Net

2018-07-02 Thread Sannyasin Brahmanathaswami via use-livecode
I looked at the lesson. Quite good!

I think one more lesson may be useful. 

In my case I will use a "slide show"  as a use case.

(But there others, thinking of streaming music playlist)

1) Assume you have the URLs for a slideshow; 
2) you fetch this by calling JSON/Text file with the urls for a slide show 
which exists on the server.
3) Let say you have 100 slides/URLs
4) Galleria (our web app jquery/html5) uses "lazyload 3" parameter, which 
asynchronously loads the next the 3 slides (besides the one you are viewing) in 
the background, then users view the next slide (already downloaded) -there is 
no delay.

So, with TSNetGet

How would set this up Livecode?

You don't want to "overwhelm" the phone with async calls to 100 
connections/slide. (Galleria suggests "3")

But there is the advantage of taking the call back message,  get 3 at a time, 
store them in the documents folder, finally the user has the slides show on his 
phone, later he can view it off line. 

At the retrieval of the 100th slide, then we informed the user "Slideshow is 
download complete."

It the user "bails" on slide 36, when he comes back again. TSNetGet starts over 
but the only which slide 37.

That last part may not want to part of your lessons. Though it would be easy 
enough to check "these is a file" and if it is true, then TSGetNet, so "next 
repeat" without downloading.

I could work this out myself, but is such a common use case, everyone would 
benefit from it.

Brahmanathaswami
 

On 7/1/18, 3:40 PM, "use-livecode on behalf of Charles Warwick via 
use-livecode"  wrote:

If you can’t quite find an example lesson that answers what you need, let 
me know and I will get one organised.

___
use-livecode mailing list
use-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: Mastering TS Net

2018-07-02 Thread Sannyasin Brahmanathaswami via use-livecode
Charles: Mysteries

I booted Livecode fresh the morning, and used the same script. But I no longer 
get 

tResult  --tsneterr: ID already in use.

Dictionary script works as expected "File downloaded" 

local tHeaders, tResult

on mouseup
   tsNetCloseConn "1"
   put empty into tResult
   put fld aURL into pURL
   put empty into fld "fldHTTPHeader"
   put empty  into fld "tHTMLfield"
   set the itemDel to "/" 
   put item -1 of pURL into tFileName
   put ("/Users/brahmanathaswami/Desktop/") into tLocalFile
   put tsNetGetFile("1",tLocalFile,pURL,tHeaders,"transferComplete") into 
tResult
  
   --  put libURLLastHTTPHeaders() into fld "fldHTTPHeader"
   
end mouseup

on transferComplete pID, pResult, pBytes, pCurlCode
   
   if pCurlCode is not 0 then
  answer tsNetRetrError(pID)
   else
  answer "File has been downloaded"
  put tHeaders into fld "fldHTTPHeader"
   end if
   tsNetCloseConn pID
end transferComplete

># variable watcher
> 
> tResult  --tsneterr: ID already in use

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


Re: Script Only Stack Behaviors and Nesting

2018-07-03 Thread Sannyasin Brahmanathaswami via use-livecode
Just a side note, that for "parent" behaviors which have been "nested" as the 
behavior of multiple "children" ... we are "blinded sided" to this, as the 
designation is in the first comment of the script with doesn't appear in the 
IDE, SE

The only other place to see it is in the PB in 9+, that is obscure and is shows 
a "dot" nothing more.

If you are using text editor, no problem. But I have taken a convention for 
every child behavior, to make the first comment on the script declare:

-> ## this script has a parent: behavior_ListenUI  

So I can see it in IDE script editor

Coming to the "script local" problem. Jacque was misquoted. She  said scripts 
that are not attached to an object (there is no "this me") globals are 
required.

One solution is to use a single global as an array..

Global sConfigA # with keys needed

This doesn’t solve the problem of "who set that value" when tracing; but I 
found it convenient to have a single global to check out at any point this I 
want to use it. And the keys are like "custom properties" of global array.

 Still, if could lead to "untraceable" code if I  used that one array for too 
much.

Would be nice to solve it somehow. I found myself using  a "setter" command  
from  parent script creating a child local script local.  And then a function 
to called that back...into parent.  Then a few days, later, thinking 

"I need that local value in this other child. geez - this backwards! Parent 
has to check "down the message path"?The parent script wants to have 
everything!  UhOH! I'm on the edge of snake pit here. Maybe I should not go 
down that road?"

So I put plans for all the cool stuff I could do in "parent script" (of other 
children which actually have object) aside for now.  Mostly use for UI stuff, 
like keep a mouseup handler, and if wanted it called from the child, just pass 
it in the child

On mouseUp
  pass mouseUp 
# goes to parent behavior_ListenUI
# because it has to have an object in the UI
# it will *not* be passed in the message path...unless you do this. 
End mouseup

BR

"I too am still trying to figure it out"

 Bob Sneidar wrote:

I'm getting heavily into behaviors and script only stacks now (in 
preparation for Levure Framework) because my project has become complex enough 
to make it almost inevitable. I have perhaps 20 or so substacks in a mainstack. 

___
use-livecode mailing list
use-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: Optimizing for small Android devices

2017-12-30 Thread Sannyasin Brahmanathaswami via use-livecode
This looks very useful . 

I think we need to wait until HQ weighs in on my bug report. Regardless of the 
fact that it works on iOS and Oreo, one has to wonder how on earth we can close 
a stack which is set to destroy on close, turn acceleratedRendering to false 
(assume previously cached controls are  cleared); open a new stack and *still* 
see the old stack behind the new, one, as if they two are still fighting for 
the pixel map…. even if the old one "loses" on iOS and Oreo…and the new stack 
"wins" the display.. .the old one could still be in the heap.

So if this indicates a failure at garbage collection (my very un-informed 
guess) the app will run out of RAM very fast. So however hard we work to 
optimize any script…it will get us nothing, 5 minutes into using the app, 
moving from stack to stack, crash is imminent.

That said the new script profiler in 9 is awesome (when it runs…often I start 
it, stop it and it is empty…)

e.g. I found a repeat loop that keeps setting the left of a large parent group  
being build up from copying child groups run time…everytime a child group is 
added (100 times) and this one task of setting the left of group "item-list" to 
0 on every loop, even with lockscreen on, was taking 80% of the time needed to 
do the job. it was this developer's (not me) attempt to overcome the challenge 
issue of the coords/ ect of the group constantly being lost despite use of 

on layoutGroup pNum
   -- general list group stuff
   set the lockupdates of group "item list" to true
   set the lockupdates of me to true

the coords still keep getting lost…and require resetting the parent group so 
that 0,0, us actually "known" to the subgroup being appended as a "row" at the 
bottom.  

Me thinks we are working too hard at this one… and I'm noodling a refactor… it 
will be interesting if DataGrid2 represents a "leap" forward for this kind of 
graphically complex list group.  I have stayed away from it as more complex 
than needed… OTOH if DataGrid2 will be more performant, then we should use it.

Meanwhile, other operations, like fetch data from the database, setting props 
on the next-copied subgroup  etc. which I thought (wrongly) would be costly 
were all profiling in at 1 millisecond.. So this new tool is going to be really 
helpful … I just have to figure out why it so often appear blank after running 
scripts.






 Richard Gaskin wrote:

While looking for one of the URLs I included in my last post, I came 
across this:

How we reduced our Android app’s memory footprint by 50%



I have no idea if those strategies would make sense in LC's internals, 
or whether LC is already doing some of that sort of bitmap reuse.  But 
an interesting read just the same.



___
use-livecode mailing list
use-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: LC Server - MySQL - update about 2000 rows/records of a table

2017-12-30 Thread Sannyasin Brahmanathaswami via use-livecode
Ditto what Mike said: 

" On mysql..  can't you prebuild your multi-command transaction in a variable"

I periodically do this kind of thing. assuming the transaction is exactly the 
same… one way is to build a single SQL query from your data.

Assume you need something like this, getting and SQL query into a string, from 
raw data with LC's text processing tools is easy:

INSERT INTO `mytable` (item,quantity,amount)
VALUES
('Oranges',3,5.00)
('Apples',10,6.00)
#etc..
#(no problem doing 2000 of these)
;

and then do the insert as a single query/transaction and let the dBase handle 
it.
BR




On 12/29/17, 3:05 PM, "use-livecode on behalf of Mike Bonner via use-livecode" 
 wrote:


(with a beginning and ending to the transaction) and then use revexecutesql
with a single call for the one big transaction?

___
use-livecode mailing list
use-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: Optimizing for small Android devices

2017-12-30 Thread Sannyasin Brahmanathaswami via use-livecode
Reading this in depth. yes, reallocation of bit map space is beyond the 
developer's realm… 

I spotted this too… RGB 565… 

Anyone using this and getting smaller files sizes ver current jpgs? I'm not 
seeing this as an option in Photoshop on Mac.



 How we reduced our Android app’s memory footprint by 50%



___
use-livecode mailing list
use-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: Dissolve/Transitions Very Costly

2017-12-30 Thread Sannyasin Brahmanathaswami via use-livecode
So: if the effectRate defaults to 2000 (which is what I'm seeing here on 
desktop) and you have
--
Show image "grand-canyon" with visual effect dissolve very fast
---
# theoretically 1/5 of 2000 = 400 milliseconds

why is the script profiler saying this line takes 4765 milliseconds top execute?

The dictionary has two methods: if you look up "show" it appears you should be 
able to perform this "directly"

But, under the visual effect command the suggested method is to lock screen, 
make the change then unlock the screen with visual effect.  And we get 
different results, various conditions where the effect just does not happen 
anyway…no fadein as expected… there is a delay… screen is "stuck" and suddenly 
the image changes.

hopefully this all improves very soon as CSS Animation which is fast and 
smooth… now dominates UI everywhere, even for small inconsequential UX ops… 
designers are expect all kinds of "oozing" warp,slide,fade away etc.

Frankly I'm sure users care that much, and if you have a very strong content 
component, it's a lot more compelling than having your address book "zip up" 
when you close it.  And what I'm here is that the most important thing is 
stability and performance. So, I may just remove all these dissolves.


Richard wrote:

Effect durations can be normalized and fine-tuned using the effectRate 
global property.



___
use-livecode mailing list
use-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: Optimizing for small Android devices

2017-12-29 Thread Sannyasin Brahmanathaswami via use-livecode
FYI here is Aravind's from Kerala comments today.

To what extent we can realistically fit this app onto a phone with only 1GB of 
RAM… I don't know.

Perhaps this is useful for other Android developers looking for a broad base in 
Asia, although this may be all "old news" to most of you… here it is.

one issue we have is: we cannot overlay any other controls over the browser 
widget.. so even if we can't use TSNet for this but monitor the 
browserDocument* msgs… we still need a way to communicate on the UI… I'll need 
to fiddle with that.. I suppose the only option is to "raise a toast" from the 
bottom while at the same dynamically shrinking the height of the browser 
widget.  Any ideas there?

Meanwhile, another app we have that is HTML five, he says "runs fine" but it 
never fetches content from the web.


Device (my Samsung Galaxy A7)  is using an internet connection(3G) which have a 
practical download at a maximum rate of 300kb/s(but speed test shows 2mb/s 
download speed). but sometimes during peak time the speed drastically reduces. 

The app may be set for an ideal condition. 

suggestion:  A message window in between the request and displaying download 
content showing "Downloading please wait". 
If net is slow , allow to abort by giving a message "Slow Internet, will take 
more time, Please close any other app(if any) using internet or abort." give 
buttons "wait" and "abort".
if net is fast enough, message won't be seen.

so the app will have better control and userfrienliness.

More over here there are new phones with 1Gb ram. so we need to optimise the 
app. 
The app must sense the screen resolution(seems only less than 10 standard 
resolutions). and usually all other parameters are relative to that. there are 
certain rare exceptions also. Another is three Ram options (1,2 and 3 or more).
In apple there is only 5 iphones(4,5,6,7,8). 
SivsSiva is a great app and hope it should reach the masses, especially in 
India.

see the spec of this new phone with Oreo OS(about Rs.7000/-) 
https://www.gsmarena.com/nokia_2-8513.php

 Samsung A7(exynos) may be slower then MotoG4 plus(snapdragon). Or May differ 
in some other specs.



 

On 12/28/17, 4:13 PM, "use-livecode on behalf of J. Landman Gay via 
use-livecode"  wrote:

That's a different model than Google gave me. This one has better specs. 
I'm not sure how the CPU compares to the Snapdragon but in general it seems 
sufficient.

___
use-livecode mailing list
use-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: Optimizing for small Android devices

2017-12-29 Thread Sannyasin Brahmanathaswami via use-livecode
I certainly did not mean to imply by "only" that pointed to the market share of 
phones with 1 GB ram.

OT: I was just reading Quora about how US overwhelming Germany with sheer 
numbers of tanks and jets that had much lower specs than German made 
tanks/planes. But we won on our sheer industrial power to produce numbers.  

so that's happening in Asia… but it's intereseting to see in your graph  that 
in India 2GB phones are approaching 1 GB phones..and other indicators for my 
target markey which are middle class youth primarily.. would put them in the 
2-3GB phone market… but even this one is complaining about the app on Galaxy 
with 3 GB of RAM (Jacque he was not referring to his own phone but to others) 
FYI I mentioned this before… it's being driven by demonitization. every farmer 
and street seller needs a $20.00 smart phone just to seel his fish on the 
street. But that's not our audience.

and the article you linked to puts the "blame" (if you will), on the OS… 

"While 2GB of RAM is enough for iOS to work smoothly, Android devices need more 
memory."

Musings: 

So that make one wonder, how far should we expect LiveCode to optimize (and 
possibly compromise) it's stack, to work on Android?  Versus pushing for better 
displays transitions -- see Scott Rossi's incredioble "looking forward" on LC 
Global… the LC engine is really need to going to grow, change scale to stay in 
the game, easy rounded corners everywhere,, i.e. engine features that support 
our drive for more and better content. 

We don't built utilities here, we build "culture" so I have to ask myself if we 
want to move forward creating our little "disney world on a phone" or if we 
need to rachet back to "simple caddy shack to hold a few clubs and golf balls." 
Frankly the latter is just not an option, our brains/production don't track 
like that at all.

End Musings:  back to ground:

I would not even know where to start to understand what to what extent an app 
is overloading RAM on Android.  How do we measure this stuff. At least on a 
linux web server I have TOP and easy I/O tools to tell us exactly what is 
happening. We need this for LC, ideally without our having to reinvent a 
monitoriing system.

I suppose the new script profiler should help us? but I don't really know where 
to begin.   

At least, dealing with a lot internet connection is a "no brainer" but bigger 
questions leave us in the dark

Data Grid 2 versus a field, vs a group with sub-groups with many child object, 
built dynamically on the fly from a mySQL dbase. Does it make more sense to 
cache the data as an LC array vs MySql Query? and how do you measure what is 
going on… What is the most efficient way to fetch 150 k Plain text and style it 
on the fly, for display. (H1 heads,  lists, bold, space before and after… etc) 
in a field? 

I feeding everything to the support team on this round… so they are getting to 
see it all. 

Stay tuned… now back to building more content and studying out the script 
profiler….









 

On 12/29/17, 12:30 PM, "use-livecode on behalf of Richard Gaskin via 
use-livecode"  wrote:

> To what extent we can realistically fit this app onto a phone with
> only 1GB of RAM… I don't know.

"Only"?  That's a lot of phones




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

Dissolve/Transitions Very Costly

2017-12-29 Thread Sannyasin Brahmanathaswami via use-livecode
Appropo optimization thread, I'll dig in on specific issues

The script profiler is showing this

for a script that runs super fast until:

1433 868 show image "gems-image" with visual effect dissolve very fast

So this was pertty long but I suppose reasonable enough…

then, I  ran it again.


1433 2526  show image "gems-image" with visual effect dissolve very fast

Yikes!  2.5 seconds for dissolve very fast on a 120k image…

given the new look and feel of apps where transitions are *everywhere* … this 
takes waaay to long…

is there any way to optimize this?







___
use-livecode mailing list
use-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: Optimizing for small Android devices

2017-12-31 Thread Sannyasin Brahmanathaswami via use-livecode
Mark: Wow, yes, it does help! I hope you had a great Christimas and are 
refreshed ready to face all of us again (smile)

Your entire email should be posted to some knowledge base somewhere!

As for speed optimization:

-
Alternate images

I will make 1 X images right away for my home "portal" screens heros which are 
now 2 X and rename the current ones to 

Looks like that should be
h...@medium.jpg  # exact size of the image object as defined in points/pixel in 
LC.
hero@extra-high # for the 2X version

Prepare (command):  yes this could help in a number of instances, I will try 
it. 

--

Further questions

… you are right, we are not doing a lot of intensive data processing. My quick 
run with script profiler showed that some operations I thought we hurting the 
app were in fact taking a trivial amount of time. which means we can focus on 
the graphics, clearly the "problem." . I scoured the dictionary, but could not 
find any method determine amt device RAM, which I suppose is mute since the 
user could open as many apps as he likes and push the device to the wall, 
leaving little for LC… and there is nothing we can do about that.   

RE: image cache?  This is new info to me… Very unlikely we would exceed the 
default 64 MG for mobile. But that default makes one wonder. Because we are 
told that the max RAM allotted to an app on Android is 57MB…so if the total MB 
of images used on a card < 64… and we navigate to another stack or card in the 
same stack… does the cache retain images from the previous card, stack? If so 
then eventually the cached images will overtake the available RAM on the device 
if we leave it at the default.  is that correct?  If so,  then it means we 
*should* be doing some calculations and lowering the cache limit for Android. 
which again is "new info…."  

Also what if you are heading into a module/stack which is graphic intensive ?  
Like our word puzzle in the app and other possible "mini games in a stack" …  
if all previous images are cached, would it make sense to deliberately flush 
the cache before we start creating our puzzle (takes snap shots of fields, 
saves these as images and then distributes them as "tiles" across the card… )  
if so, how does one do that? I don't see a flush cache command…

RE: Multiple Instances of same graphic/image on Card?  OK we are generating 
"lists" using a Parent Group with subgroups as "rows" (like DataGrid) where 
these Rows" contain image… in some case we are using a SVG Widget to show a few 
icons in the row.. these are attached to a template group on card 2… replicated 
over and over again down the screen dynamically on cd 1… There may be contexts 
where the repeated grc is  
a) a button with file on disk assigned as icon 
b) or just an image referenced by the template group that is on disk.

OK so now the card has 100 rows… with multiple instances of the exact same: SVG 
icon (as widget the same one icon) OR multiple button(s) with the same img file 
as icon OR a small image which has multiple instances on the card but each 
references the same, one only file on disk.  I presume this question applies to 
the DataGrid as well. (which I have yet to use…) 

I think the question is obvious: are all these little visual reps of a single 
graphic a) occupying only the value of (1 X (their un compressed size) in RAM  
or does the RAM now hold ( N (number of appearances on the card) X (their 
uncompressed size) as a cumulative total in RAM?

RE: images streamed to the app from a server in advance with "Load" ? ….  are 
these cached automatically or should we load and prepare each one after it 
arrives?

RE:  acceleratedRendering, Navigation across stacks and Redraw issues?

please see  

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

which is rather urgent as we went live on Google Play and I need an update that 
fixes this asap.

FWIW here is the entire handler that does almost all the work of navigation 
across many modules(stacks) (and many more to come)  could you re-write this 
for us to what you would consider the optimal SOP/ best practice, using Go in 
window… where 

AcceleratedRending is 
a) one in the stack we are closing
 b) needs to be turned on in the stack we are opening…

I could try myself, but frankly, I would rather you give us the "bottom line" 
method here if you would not mind as I'm getting a bit tired of wrestling with 
this on Android (over a year now!) impossible to debug when script run fine an 
d is works on iOS and desktop…

command portal_GoStack cardOrStackObject  

   put the short name of this stack into oStackName

   put "Siva-Siva-App,Journal,view_SivaSivaBrowser"  into tNoGoBackStacks

   if (sLastStack="Journal") AND (cardOrStackObject <> "Journal") then 
  # it means we are launching activity and we are not actually going
  # to the view the journal, in which case we have to be sure it closes
  put "Journal" into oStackName
   end if
   if (not  (oStackName is among the 

Re: Go in Window (not working) Go in A window "working"

2018-01-04 Thread Sannyasin Brahmanathaswami via use-livecode
FWIW:

Seems my error was (not in dict) that I should have been doing 

put the ID of the topstack into tWindowID
go to cardOrStackObject in window id tWindowID

   
Well I've been tinkering testing this for two days… made the mistake of making 
too many changes, then threw out that branch… went back to a working branch and 
start just toggling between this

   --go  cardOrStackObject  # e.g   go "gems" (or this string)  go card 3 
of "gems"   
   --wait 100 milliseconds with messages  
   --close stack oStackName   
   --wait 100 milliseconds with messages  

versus this, where the top stack short name is already known by  ourhandler. So 
we really only need this

go to cardOrStackObject in window oStackName

And this works on Mobile, in fact it seems a bit more responsive… 

BUT  there is a rendering failure on leaving any stack whose main control is 
the browser widget… we have "go back" icons that close the stack with the 
browser widget… and go back ot he stack that "launched'' the view web stack. 
and the whole bottom navigation group disappears.

It seems like the fullScreenMode "showAll" is only registering the width of the 
stack but now the height of the stack is now too high… and (I am guessing) the 
bottom navigation group is below screen.  This "smells" like old issue with the 
browser rect on mobile…using showAll 

This does not happen if we just (using the above code that is commented out) 
open the "new" stack and wait 100 milliseconds and *then* close the "old" 
stack.  but, as already bug reported.. this is failing to render properly also 
on some Android devices.

which leaves only option to beg/pray for resolution of this bug

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


BR  wrote:

"Something is wrong"  

This works on desktop,  but fails on iOS. Nothing happens at all. it stays 
on the same, open stack and does not navigate to/open the new stack declared in 
"go

  put the windowID of stack oStackName into tWindowID  # current open stack 
  go to cardOrStackObject  in window tWindowID

# where "cardOrStackObject" is a string in the form of .e.g
# stack "gems  OR card 2 of stack "gems"  OR card "video" of stack surprise



___
use-livecode mailing list
use-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: Two new videos about using Navigator with LiveCode

2018-01-04 Thread Sannyasin Brahmanathaswami via use-livecode
Geoff

wow this is the tool I've been waiting for!

I just fixed a series of fields on 8 cards that carried that old single blank 
line script that used to be saved in by default… using Navigator it was so easy.

FYI" the script handler's for a long script on ly stack are being filtered to 
show only functions.  all the commands to not appear in your handler list.

How do you want bug reports sent?

Do we need to clean up the old navigator… at first the on-board 2.* showed up 
but then after downloading and putting into my Plug'ss folder the latest 4.5 
beta 2 is the default.  But I wonder if some prefs or something might be saved 
that would block the appearance of commands in the list of handlers.

I can send you the script off list if you want… we have a lot of comments in 
there… possibly breaking your look up..?

BR

On 1/3/18, 6:26 PM, "use-livecode on behalf of Geoff Canyon via use-livecode" 
 wrote:

The Script Menu: https://youtu.be/25q-D8k_z2s
Lets you easily copy and paste scripts into objects. Displays all the
handlers from both an object and its behavior. Select any handler to edit
the script and jump to that handler. Lets you call any handler, function,
getProp, or setProp, including passing in parameters, and for functions and
getProp displays the result/property so you can see/copy 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

Local Image Paths in HTML for Browser Widget Fails

2018-01-06 Thread Sannyasin Brahmanathaswami via use-livecode
I'm trying to send some local html to the browser widget to display a local 
loading GIF until the page "comes down" from the cloud. This needs to work on 
mobile too.

the directory structure

main app folder
   /assets
  /img
  /global-icons
  ajax_loader_big.gif"
  /info
web-loading.html
views
   view_Browser.livecode # Card 1 has the browser widget…

I have this in the preopenstack handler

setWebURL

command setWebURL
   put path_Assets() & "info/web-loading.html" into tLocalPath
   put url ("binfile://" & tLocalPath) into tLoader
   put path_Assets() & "img/global-icons/ajax_loader_big.gif" into imgPath
   replace "##IMAGE-PATH##" with imgPath in tLoader
   set the htmlText of widget "body" to tLoader   # html is set, but img 
not found
   put tLoader # let's see what we are getting..
end setWebURL

path_Assets() function returns the  specialFolderPath("resources") & "assets/"

it is working for the html itself, but inside html both of these fail

# full URL from "root"  which would translate correctly on mobile to the app 
package…



# I manually tried a relative path





The html is found because we see in the browser widget the broken image icon 
with the name "ajax_loader_big" so the path function works, html is set as 
expected, but the browser widget can't find the image locally.

I can "proof" this locally by moving a copy of web-loading.html into the same 
folder as the stack..
drag and drop onto a browser from that location, which is the same location as 
the stack with the browser widget…

both of these work

src="/Users/Brahmanathaswami/Documents/_Siva-Siva-App/assets/img/global-icons/ajax_loader_big.gif"
src="../assets/img/global-icons/ajax_loader_big.gif"

I could have sworn I had this working last year, but not today.  At that time 
we were working right in the same directory… so I tried this:

views
   /img
   ajax_loader_big.gif
   view_Browser.livecode
   web-loading.html

src="img/ajax_loader_big.gif"  in the html for the browser widget but it still 
can't find it

What am I missing?  Why can't the browser widget find the image?

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

Editing library script with TSNet "running"

2017-12-21 Thread Sannyasin Brahmanathaswami via use-livecode
If I try to edit handlers in a global backscript that has some TSNet callback 
handlers… I always get

stack "lib_SivaSiva": execution error at line 1547 (Object: can't set scxript 
while it is executing), char 1

I have no way now to change this script, except to exit, quit LC and edit by 
hand, then reboot… cmd period doesn't help us. the IDE just  beeps

if I shut down and comment out my call back (which is set by another 
script/behavior that init's the whole framework)

# command netWorkTransferStatus
# put "transfer identifier,status,downloaded,total download,uploaded,total 
upload" into tNetStatusItems
# # see dictionary entry for definitions these are the 6 params passed by TSNet 
to the call back.
# # for now we are just monitoring problems in param 2 - status
# put param(2) into tRequestStatus
# put "error,timeout" into tNetConnectionIssues
# if tRequestStatus is among the items of tNetConnectionIssues then
# put "You have connection issues: " & tRequestStatus into tNetUpdate
# dialog_CustomMsg tNetUpdate
# end if
# end netWorkTransferStatus

then I can freely edit the script.  The above is also causing some lock ups on 
iOS. but now that I'm "back" in 8.1.7 RC1  we don't have remote debugging… so 
what I thought was going to be easy it now obscure.

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: TS Net Documentation

2017-12-23 Thread Sannyasin Brahmanathaswami via use-livecode
Ali Lloyd  wrote:

Check out
/Contents/Tools/Ext/tsNet.../api.lcdoc for all the tsNet
things in one file - hopefully that's roughly what you're looking for

Happy Winter Solstice to the team!

Yes, Ali, that’s perfect… "awesome"  simple plain text…

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: TS Net Documentation

2017-12-23 Thread Sannyasin Brahmanathaswami via use-livecode
In case anyone else is interested

Completely unadorned unstyled PDF (well, Minion Pro serif at least) with 
extraneous lines/info removed, 
double column 36 pages, 18 sheets from and back. for easy 'armchair reading" 

http://wiki.hindu.org/uploads/TsNetApi_2017-12-23.pdf

Enjoy…

On 12/23/17, 11:56 AM, "use-livecode on behalf of Sannyasin Brahmanathaswami 
via use-livecode" <use-livecode-boun...@lists.runrev.com on behalf of 
use-livecode@lists.runrev.com> wrote:

Check out
/Contents/Tools/Ext/tsNet.../api.lcdoc for all the tsNet
things in one file - hopefully that's roughly what you're looking for

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

Remote Debugging on iOS

2017-12-23 Thread Sannyasin Brahmanathaswami via use-livecode
I made a few changes to a stack that was some working, and still works on 
desktop, but hangs on iOS. I think I even have recipe for the UX/UI 
tapping-navigation across handlers/stacks/screens that will cause the app to 
crash in iOS.

I used to only dev test SA's on Android because if it worked on Android it 
*always* worked on iOS, but not the other way around, and it's so fast to 
deploy interations to an Android device. But my little Nexus 5 died (made in 
2013) and I have a Pixel (used) on it's way to replace but not here yet…

Does remote debugging (in 9.*) only fire on Android? I added it to my 
standalone/inclusions set a break point in a script  and save the script and 
tested with my iPhone as a target… the app ran but did not break the break 
point. (9 DP11

now I'm stuck with only my iPhone 7…So how do we debug on iOS? Seems like a 
black box.

I know there is a way to get the crash reports off the phone but I don't think 
they are going to be transparent enough to tell precisely where in the script 
the app hangs/crashes. And since it is working on desktop, no runtime errors… 
I'm in the dark.

Perhaps worth it to extract the crash reports from the phone (via xCode) and 
send those in to HQ…

moving back to 8.1.9…

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: Remote Debugging on iOS

2017-12-24 Thread Sannyasin Brahmanathaswami via use-livecode
jacque wrote:

Remote debugging doesn't work with script-only stacks (I had to ask here
on the list myself a while back.) The breakpoint has to be saved with the
standalone, and script-only stacks don't have properties so breakpoints
can't be saved.

Hmm OK, so that means we have to drop one at a trigger point in the stack like 
"on mouseup"  but now, some of my stacks/cards are "pure views" with *narry* a 
drop of code in them… So I suppose a "hack" could be to add, in the 
button,card, stackscript

on mouseup
breakpoint
pass mouseup
end mousup

At least, once we start stepping through then at least we are looking lines in 
the script only libs/behaviors.

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: Android package installer hangs (Oreo)

2017-12-24 Thread Sannyasin Brahmanathaswami via use-livecode
I tried building for Android on 9.0 dp 11 yesterday and got some weird font 
mapping issues.

Pixel arrived (wow! iOS, seems a bit primitive now…) used, unlocked, (looks 
brand new) no sim… I got wi-fi. immediate prompted me to upgrade to 8.1, which 
I did.

in LC 8.1.9 I can't see it in the test menu, no matter what I do, reboot, 
restart LC, with phone plugged, unplugged.

But I got a neat droid transfer app for Mac… go to connected devices, switch 
USB to transfers (I guess you do that already with Drop Box..) So I can turn 
the phone into a "volume" that appears inside the app like a finder window…  
and copy the apk from my LC builds folder into Downloads on the phone and then 
install.  

So, that's working… 

Sadly the rendering fixes in 8.1.9 are not resolving all issues we had before… 
sure, we can now leave the app via Home or App switcher, and come back without 
the app stopping, but switching between stacks which require accelerated 
rendering is still full of bugs…all works perfectly on iOS (sigh) so back to 
debugging-android challenges.

iMac high Sierra:  

On 12/23/17, 2:29 PM, "use-livecode on behalf of J. Landman Gay via 
use-livecode"  wrote:

Is anyone else here running Android 8.1/Oreo? My test app is hanging the 
package installer right near the end of the process. This happens both 
when running Test in the IDE (requiring a force-quit) and also if I 
build a standalone and move it via Dropbox. Installing from Dropbox, the 
progress bar goes about 9/10 of the way, and everything freezes. Only 
the Home button gets me out. The app is not shown in the app drawer.

If I try to install again, I'm asked if I want to update the current app 
(which didn't really install) and the install completes. I can open and 
run the app. When I go back to Dropbox, the frozen installer window from 
the first try is still there. I have to go to settings and force quit 
the package installer to get rid of it.

I can't tell if there is something about the LC build itself or a bug in 
Oreo. The same apk installs fine on my Samsung running 6.0.1. Play Store 
apps install okay too.

Nothing on Google about it.

LC 9.0 dp 11, Java 1.8, Mac OS X Sierra

___
use-livecode mailing list
use-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: Local Image Paths in HTML for Browser Widget Fails

2018-01-08 Thread Sannyasin Brahmanathaswami via use-livecode
Nope… no way. On mobile, there are major issues with certain mobile controls. 
e.g. scrolling group becomes a mobile scroller on a phone… this "lies on top of 
everything" and I believe the browser is also generating a mobile control 
instance as well. I don't understand it 100% (not even 10%) but my guess is the 
pixel map for the rect of the display, for some mobile controls, cannot accept 
input from another object, within those same bounds/coords.

Especially on Android "all hell breaks" loose on the screen. You would have to 
see some of the bizarre abstract art that suddenly appears on the screen, very 
wild "early cubist" stuff with squares-tiles of colors and blocks 


On 1/7/18, 6:16 PM, "use-livecode on behalf of Mike Bonner via use-livecode" 
 wrote:

ok, nevermind, you can't overlay the browser widget I guess.  Is there a
way?



___
use-livecode mailing list
use-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: Local Image Paths in HTML for Browser Widget Fails

2018-01-07 Thread Sannyasin Brahmanathaswami via use-livecode
@ Mike… thanks…

duh! (as he slaps himself on the side of the head)  I was mixing up the props 

the htmltext # with
the url

this is all static content so all that was needed was, 

assets
   /info
  web-loading.html



 

and then this

command setWebURL
   put path_Assets() & "info/web-loading.html" into tLocalPath
   set the uirl of widget "body"  to tLocalPath 
end setWebURL


"of course"

@ HH, thanks for the base64 method… I can use that in other instances.

@ All, this really doesn’t get me what I want though, because as soon as we set 
the URL of the browser widget to the intended remote web page, our local page 
is of course "disconnected" the loader image is gone and the user is *still* 
staring at a blank screen waiting.

I must have been working too late and didn't see either of these to things, 
which, are of course obvious.  I'll start another thread on loading web 
pages/user notifications.

On 1/6/18, 10:15 AM, "use-livecode on behalf of Mike Bonner via use-livecode" 
 wrote:

Then load the file as a url appearing like so..

"file:///path/to/your/html/file/myfile.html"

At this point the browser widget has a path location so any relative
addressing should 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

Notifying users of Web Delays in Browser Widget

2018-01-07 Thread Sannyasin Brahmanathaswami via use-livecode
Where

1) we cannot use TSNet to "listen" to the socket being used by the Browser 
widget

2) We cannot overlay a browser with any kind of control/dialog on mobile (or 
desktop)

3) the browser widget takes the whole card screen on mobile phone, except 
bottom nav bar which is native LC control 50px high

4) it doesn't help to load your own local page with a loader give because this 
is "supplanted" by the remote URL and the browser widget goes blank while 
waiting for the remote page to load

5) we want to inform the user after 5 seconds that this is taking a long time 
and perhaps they may like to abort.

has anyone here wrapped this use case already?

I can think of various scenarios. but I'm loath to mess with the screen too 
much as we already having issues on Android with the browser widget. if we can 
hide the browser widget on mobile and we *can* over lay a control then we can 
load a native LC image with our loader animated GIF.. the it's a no-brainer to 
use this algorithm

check browserDocumentLoadComplete
on send in time every 500 milliseconds
if elapsed time > 5 seconds then
inform user, offer choices… if complete then hide our image and show the 
browser widget.

I am already doing the above and raising a small "snackbar" at the bottom of 
the screen that says "loading"…  that is <50 px high and since that area is not 
occupied by the browser widget, this works… but I would rather have a more "in 
your face" dialog for the user who is, say in mangroves of Bengal with 
Android/3G and is waiting, waiting and waiting for a page to load from some 
Cloud Flare server in Chennai, Delhi or Bangkok… (no kidding I actually have 
some users in that context)  my beta tester in Kerala wants some better 
notification for this situation.

But before I go down this road, I'm wondering what anyone else may have come to 
for a UI/UX for this that works we on both iOS and Android.

or boil down to a single question: Anyone having issues with hiding/showing the 
browser widget on Android? and using that space for native controls while it's 
hidden?

BR

OT: Throttling bandwidth on test devices seems to be a common requirement, if 
you are stuck with highspeed WIFI.. what to do?  A quick search, yes, lots of 
hits, but no  easy options… for either iOS or Android. Have you found one? For 
now I'm just switching to airplane mode, commenting out our 
"pingForConnection/Abort" handlers in test builds… but this is a nuisance…





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

OT: Why I Probably Will Never, Ever Learn HTML%

2018-01-10 Thread Sannyasin Brahmanathaswami via use-livecode
Maybe it is just age… or whatever.

But every time I get the idea of "maybe I might see if I will do something in 
HTML5"

I go to a page like this, I start to get a headache and walk away.

https://reactjs.org/docs/integrating-with-other-libraries.html

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: Anyone else got two-monitor issues with LC9 on Mac?

2018-01-14 Thread Sannyasin Brahmanathaswami via use-livecode
BR: I'm late to this party, but FWIW

Graham wrote: Does anyone else see this or know of any report? 

BR: yes, all the time, no recipe but it's so bad I don't *ever* put any 
liveCode stack on my MacBook Pro monitor -- which is designated as the 
secondary monitor when hooked up to the 31" curved LG giant display. And screen 
sharing is a pain because you want to show the small screen, not the big one, 
but nothing works on the small one.

So often I will try to show some stack or the script editor on the MacBook 
Pro…(designated as secondary) but typically the main symptom is: it is 
non-responsive to mouse events… 

Would love to find a solution. 

@ Mark W.

My screen rects are:

0,0,3440,1440
-1440,0,0,900



___
use-livecode mailing list
use-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: Anyone else got two-monitor issues with LC9 on Mac?

2018-01-14 Thread Sannyasin Brahmanathaswami via use-livecode
Mark wrote:

screenRects: the first is primary and the rest are relative to that.  Any 
engine issue will likely be to do with those rects as that is the basis of its 
display coord to LiveCode coord mapping.

with screenrects at

0,0,3440,1440
-1440,0,0,900

tops are aligned… and …hmmm… things are working now.

on the MacBook "little" monitor. Let's hope this remains true.   will test 
later with screens shifted… Or possibly setting screen sharing in SKYPE messes 
internally with the OS screen coords… 

TBD

BR








On 1/14/18, 7:02 AM, "use-livecode on behalf of Mark Waddingham via 
use-livecode"  wrote:



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

Drag And Drop Rows

2018-01-14 Thread Sannyasin Brahmanathaswami via use-livecode
I was examining the API for Datagrid2 in 9 dp 11

Swiping looks interesting, but I'm also looking for " drag-to-arrange"  for 
mobile

With similar "cool" UI animation behavior where if you drag a sub-mini-group, 
which comprises a row of a large vertically or horizontal scrolling parent 
group, there is some delta which, when entered, if the row being dragged up or 
down, or left and right, pausem and suddenly the two underlying rows separate 
and allow you to drop the drag-row to this new location. The better designed 
ones, the underlying rows are reacting during the drag until the user drops.

Has anyone build such a thing? If so, can you share?

use cases: Like in Spotify, where album covers with titles and artists names 
are subgroups and these would be on a left to right scrolling group that the 
user could rearrange. In "My Book Library" data grid is vertical, user wants to 
re-arrange to manually sort her/his titles vertically. Re-arrange "Favorites"  
list (made up of complex subgroups with icons text and other data in a row) 
etc.  Rearrange an outline, etc… many similar scenarios.

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: Crazy script-only stack question

2018-01-26 Thread Sannyasin Brahmanathaswami via use-livecode
Jacque wrote:

If you're just using red-dot breakpoints then it isn't as difficult to 
remove them, you can just use the "remove all breakpoints" menu item.

I wonder if a case could be made for the IDE to also search and line in any 
script that = 

breakpoint

and either comment or delete it out?

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: Creating .ipa now that iTunes has depreciated apps.

2018-01-11 Thread Sannyasin Brahmanathaswami via use-livecode
Or (shameless promotion) 

If you have a select group of registered iOS devices in your profile and you 
don't want to deal with iTunes connect at all for beta testing 

pay Jacque the reasonable fee for her AirLaunch  "be done with it" 

http://www.hyperactivesw.com/airlaunch/index.html

Then enjoy your IPA while AirLaunch makes Apple's IPA and the web page you send 
to your beta testers to open on Safari on their phones… "No Apple Corp in 
between" [sic] 

On 1/10/18, 12:08 PM, "use-livecode on behalf of Bob Sneidar via use-livecode" 
 wrote:

I love a balanced IPA. ;-)

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: Artifacts on screen from closed stacks on Android

2018-01-29 Thread Sannyasin Brahmanathaswami via use-livecode
Unfortunately, it is worse than that… see these screenshots from the Galaxy A7 
running Nougat

http://wiki.hindu.org/uploads/20171227_104835.jpg


The entire "portal" stack remains rendered in the background, in this case, on 
card "home" even though 

a) it was closed

b) destroyStack/destroyWindow (what's the difference?) are set to true

c) Stack "surprise" opens to card 3 which has a background texture with an 
image overlayed… only the image object from what is now the "topstack"  is 
rendered. The rest of the card is not.

similar case here where stack "gems" was closed and stack "Surprise" is opened 
but only the image object on the card renders while the entirely of the card of 
the close stack remains on screen in the background.

http://wiki.hindu.org/uploads/20171227_095851.jpg


 

On 1/29/18, 5:54 AM, "use-livecode on behalf of Bob Sneidar via use-livecode" 
<use-livecode-boun...@lists.runrev.com on behalf of 
use-livecode@lists.runrev.com> wrote:

I hide background images and then set the background fill of the card to 
that image id. Not sure if that would help. 

Bob S


>On Jan 28, 2018, at 19:06 , J. Landman Gay via use-livecode 
<use-livecode@lists.runrev.com> wrote:
>On 1/28/18 8:25 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
>>BR: But we are talking about entire stacks… and the offending object 
wants to disappear completely across the entire screen, not be redrawn
>I think the problem in SivaSiva is the background image in most cases, the 
one that extends beyond the card width. So I'd try hiding that image on 
closestack and showing it on preopenstack.

___
use-livecode mailing list
use-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: Artifacts on screen from closed stacks on Android

2018-01-28 Thread Sannyasin Brahmanathaswami via use-livecode
J. Landman Gay wrote:

We really do need a "redraw card" command, but for now you 
can force a redraw by either hiding and then showing the offending 
object, or by resetting it. 


BR: But we are talking about entire stacks… and the offending object wants to 
disappear completely across the entire screen, not be redrawn

This works on desktop, but there's a serious performance it..

   lock screen
   hide stack oStackName
   go to cardOrStackObject in window oStackName
   close stack oStackName
   show the topstack
   unlock screen

vs this which is relatively fast ( but leaves artifacts on android)

   go  cardOrStackObject  # e.g   go "gems" (or this string)  go card 3 of 
"gems"   
   wait 100 milliseconds with messages  
   close stack oStackName   
   wait 100 milliseconds with messages  

This is also very fast on desktop

   go to cardOrStackObject in window oStackName
   # would this possibly eliminate artifacts?
   # downside is user might see a "scary Picasso" briefly 
   hide stack oStackName  # hopeful the amazing abstract will go away?
   close stack oStackName

If it does not crash my pixel (because there are no waits) I'll do a beta test 
for Aravind to test on his Galaxy..

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

Artifacts on screen from closed stacks on Android

2018-01-28 Thread Sannyasin Brahmanathaswami via use-livecode
We are getting reports (and screen shot and screen videos) from some Android 
users that show artifacts from a previously opened Stack A, when opening Stack B

where

Stack A is explicitly closed and has both destroyStack and destroyWindow set to 
true.

In the absence of being able to reproduce these residual closed-destroyed stack 
artifacts issues on my Pixel (and HQ can't either) I am wondering if there is 
some hack, that will not affect performance too much, to forcibly clear out the 
pixels of the previously opened stack?  Details below:

There is bug report on this already

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

You can see screen shots there from a Galaxy A7 (2017) running Nougat… this is 
not an underpowered phone..

but it's hanging  under "Pending Followup" --  this was a mid-holiday report… 
so perhaps now that we are all "back at it" we ca work on this.

Two examples are

1) least offensive scenario:

Stack A may have a background image set 1028 X 1028… a lo-res image, centered 
so that regardless of the device width or height, using fullScreenMode, this 
background will fill..

Then we open a stack that has no such background and is constrained to 414 
wide… if the device screen ration is a bit off then this will be pillar boxed… 
some stripes, left and right… and these are filled with the image of the 
previous stack A. Even Though Stack A, and it's window is destroyed.

2) worst case scenario

Entire image map of Stack B is not fully rendered.. even get some bizarre tiles 
or squares with odd colors or image data from Stack A, and only one area of 
Stack B is rendered like some weird inlay or overlay on top of the pixel map of 
Stack A.

Again, all stacks have their stack and window set to destroy and are explicitly 
closed after Stack B is opened. You must have a stack open and visible on 
Mobile or the app will crash, so that's why we leave Stack A open and only 
close it *after* Stack B is opened.

I have no recipe for this, and so HQ is at a loss. we also don't see this on 
our Pixel. Though I think I did occasionally see #1 above, but never #2.

I have yet to issue an update using "go in window" which Mark W. has 
recommended. But apparently we still need to explicitly close Stack A even if 
we "go  "Stack B" in window "Stack A"  and rather than issue this update, only 
to find it doesn't help.. I was fishing for a "clean up the video display ram" 
solution…

And side question:

What is the difference between destroyStack and destroyWindow. From the 
dictionary definitions, they appear to do the same thing, but we have them as 
separate props in the PI, so I presume they are not synonyms but have separate 
functions. Mute, because I set both to true for all stacks.. but still 
wondering the difference?

BR







Svasti Astu, Be Well
Brahmanathaswami
www.himalayanacademy.com Get SivaSiva App 
Today--It's Free!

iOS: https://itunes.apple.com/us/app/sivasiva/id1271260502?mt=8
Android: 
https://play.google.com/store/apps/details?id=com.himalayanacademy.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: Feature proposal: mobileActualAllowedOrientations?

2018-01-27 Thread Sannyasin Brahmanathaswami via use-livecode
J. Landman Gay wrote:

If the alternative is to only have a tiny 
misrepresentation of a landscape-only stack, do we want the behavior 
changed? How do other apps, like some games, handle this situation?

What Ralph said: Android bug… I think the question then becomes  "how do other 
apps, like some games, handle this situation on Android?" My guess is (to say 
the obvious) they will render "sideways"  at the time they are opened and 
regardless of orientation. 

Confirmed here with our puzzle on iOS. I just locked my phone to portrait. 
tapped on the link to open the puzzle and it auto set to full landscape (0,0 at 
lower left corner) and rendered vertically with the left side of the stack on 
the bottom of the screen.  And yes, on my pixel, it renders left to right in a 
"tiny" form.. until you actually turn your phone sideways.

@Richard, I confirmed at bug 20916, 

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 of Serialize Behavior in Script Only Stack

2018-02-12 Thread Sannyasin Brahmanathaswami via use-livecode
Can some else elucidate this:

" This patch adds a 'with behavior' clause to the header of a script
only stack.

# this is clear

The clause is emitted if the stack has a behavior property which
references a stack.

# this unclear; "references [binary] a stack"

When a script-only-stack with such a clause is loaded, the behavior
is set as part of the loading.

# this is clear



___
use-livecode mailing list
use-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: Segmented Control Bugs?

2018-02-14 Thread Sannyasin Brahmanathaswami via use-livecode
Thanks, but for now I completely removed it and went back to the "old 
fashioned" way: three buttons in a group
side by side…catch the target. Works like a charm for this use case,  not quite 
as perfect native look and feel on devices, but still looks quite good.

Side thoughts on native look and feel… I sometimes wonder about the huge effort 
going having the entire interface be some perfect match for iOS or 
MaterialDesign. If you are trying to do a utilitarian app, that needs to fit 
that genre of apps, maybe that would be ideal; but I've even started 
deprecating the native picker and use a translucent field or buttons in a 
group, instead, for short sets of choices.

Sometimes the native look and feel doesn't "match" with the look and feel of 
the app. I also don't buy that attitude (I could be wrong) where someone 
comments that "that's not the way apple does it" -- users don't really seem to 
care and we can make it "prettier"  and users actually think that, having it 
work differently is more cool and "lovely"

Fortunately, LC makes this easy.

BR



 

On 10/7/17, 5:59 AM, "use-livecode on behalf of Brian Milby via use-livecode" 
 wrote:

I've posted a PR that should address this issue:
https://github.com/livecode/livecode/pull/6044
I created a stack with a segmented control with a substack with a segmented
control.  As you described, the hiliteChanged message was dispatched for
both controls upon opening the stack.  In my case, I observed the substack
message coming first and then the parent stack message.  If you would like
assistance testing to see if the change corrects your situation, let me
know (there should just be 2 files that need to be replaced in your DP9
install).

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

AcceleraterRendering - when to turn off

2018-02-20 Thread Sannyasin Brahmanathaswami via use-livecode
I have a heck a time with our new app on android

One stack works fine.

But we going one stack to another, (not in iOS) is a problem.

Seems to be subtle issues with one the follow
(although on the surface they seem to be same)

1) it is better to

set the acceleratedRendering of this stack to false

-- on closeCard
-- on closeStack
-- on library stack, used to close one stack and one open another

Go window did not work, as it never gets the handler that set stack to 
landscape.

so it back to

go cardOrStackObject # e.g go "gems" (or this string) go card 3 of "gems"
wait 100 milliseconds with messages
close stack oStackName
wait 100 milliseconds with messages

it "wait" is android issue

2) The issue is the same with mobile controls.
When is a safe delete them?

-- on closeCard
-- on closeStack
-- on library stack, used to close one stack and one open another

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


AcceleraterRendering - when to turn off/on

2018-02-21 Thread Sannyasin Brahmanathaswami via use-livecode
Having a heck a time with our new app on android

One stack works fine.

But we are going one stack to another, (not in iOS) is a problem.

Seems to be subtle issues with one of the follow

(although on the surface they seem to be same)

1) it is better to

set the acceleratedRendering of this stack to false

-- on closeCard
-- on closeStack
-- on library stack, used to close one stack and one open another

Go window did not work, as it never gets the handler that set stack to 
landscape.

So it back to

go cardOrStackObject # e.g go "gems" (or this string) go card 3 of "gems"
wait 100 milliseconds with messages
close stack oStackName
wait 100 milliseconds with messages

"wait" is android issue. I don’t need it for iOS

2) The issue is the same with mobile controls.
When is a safe delete them?

-- on closeCard
-- on closeStack
-- on library stack, used to close one stack and one open another

BR


Svasti Astu, Be Well
Brahmanathaswami
www.himalayanacademy.com Get SivaSiva App 
Today--It's Free!

iOS: https://itunes.apple.com/us/app/sivasiva/id1271260502?mt=8
Android: 
https://play.google.com/store/apps/details?id=com.himalayanacademy.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

Just Checking in my posts made it

2018-02-21 Thread Sannyasin Brahmanathaswami via use-livecode
Checking

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


[ANN] SivaSiva App on Google Play

2017-12-25 Thread Sannyasin Brahmanathaswami via use-livecode
Jai Ganesha!

My new Pixel arrived the day before Pancha Ganapati amidst a 72 hour solo code 
sprint, working with the new 8.1.9 to get an Android version done. At the last 
minute I solved rendering issues on Android (not happening on Desktop or iOS)  
and with a little help from Jacque, today got the app up on Google play.

https://play.google.com/store/apps/details?id=com.himalayanacademy.sivasiva=en

I want to thank the team in Edinburgh for the hard work that got us here and 
all the support from this community, especially Jacqueline and Andre and all of 
you who have been so patient and generous with your time and answering and 
sharing your knowledge.

FWIW:

Our app opens and closes stacks aka "modules"…. we had a serious rendering 
issue with our "Journal" module… this reads  data from a dbase that tracks 
users history, lets her mark favorites etc. It uses a template "subgroup" on 
card 2… which includes a few widget icons. The "layout" command deletes the 
parent group "item list" on card 1 and then locks the screen and adds subgroups 
to the main group… as many as 50-100.  AcceleratedRendering is required for 
scrolling  this "beast" of a parent group. going to the journal consistently 
locked up the screen  on Android, cause quits and strange ghastly images on 
screen…  until I changed the order and timing of events, which, in the end, is 
just "logical"
This works:

1) we turn off accelerated Rendering of Stack A, but leave it open (You have to 
have a stack open all the time)

2) Open stack "journal" and in the preopenstack handler, delete any existing 
"item list" (will not exist on mobile, but does during dev)

3) the key was DO NOT set the acceleratedRendering, and issue the layout 
command (which fetches and builds the parent group dynamically.   in either the 
preopenstack NOR the preopenCard handler!

my gut is telling me there is a conflick on mobile between Stack A being open 
while Stack B tries to open and run stuff in the preopen handlers, but I just 
guessing.

4) What works is: open the journal Stack B, our navigation system will the 
close Stack A. I throw up a small busy indicate and a bottom toast (hardly 
needed) saying "Loading Entries"
5) Now, *after* the card is open and Stack A is closed, on openCard, set the 
acceleratedRendering to true, lock the screen, run the layout routine which 
build the giant parent group with subgroups and unlock the screen.

After doing getting this to work… it seemed just so obvious the best practice 
order of events…

It's just that on desktop and iOS, it did not seem to matter what you did 
first, or in what order or whether you did stuff in the preopenstack handler 
(where we were issuing the layout command before)

but now it works. We still have some crashes here and there and there seems to 
be a regression in the browser widget in 8.1.9 when you rotate the phone to 
landscape if the video has not been loaded yet from YouTube.  (only on Android) 
But otherwise the app is running pretty well, given all the arms and legs it 
has.

Cheers and Happy Solstice/New Year to all!

Brahmanathaswami





___
use-livecode mailing list
use-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: Optimizing for small Android devices

2017-12-28 Thread Sannyasin Brahmanathaswami via use-livecode
Great pointer's Andy, I will try those browser checks… TS Net does not interact 
with either the browser or a mobile play that streams audio, so we are "on our 
own… " to Monitor those.


Meanwhile this is from London, happy new user

---
"So far so good. No problems, everything running smoothly. … I am on a Moto G4 
plus. Android version 7.0"


So, "weird" … Galaxy Samsung  A7 in India running Android version 7.0… --- 
problems

Moto G4 Plus, London Android 7 -- users says it works just fine

??  Hmm, yes, this could be related to the browser because our London "market" 
has very high speed access to our content which is served from Cloud Flare./ 
not so in Cochin… 

  wrote:

Also are you making sure the destroyStack to true. 
This should be automatically done but there is no harm in forcing it.

set the destroyStack of this stack to true

It might also be useful to monitor these events in the browser widget
and set a timer between the browserDocumentLoadBegin and
browserDocumentLoadComplete to see if there is a bottle neck?

browserDocumentLoadBegin pUrl
browserDocumentLoadComplete pUrl
browserDocumentLoadFailed pUrl, pError



-
Andy Piddock 


My software never has bugs. It just develops random features. 

TinyIDE  a Free alternative minimalist IDE Plugin for LiveCode 


Script editor Themer for LC http://2108.co.uk  

PointandSee is a FREE simple but full featured under cursor colour picker / 
finder.
http://www.pointandsee.co.uk  - made with 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


___
use-livecode mailing list
use-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: Optimizing for small Android devices

2017-12-28 Thread Sannyasin Brahmanathaswami via use-livecode
This is the Galaxy Samung A7 2017 

http://www.samsung.com/in/smartphones/galaxy-a7-2017-sm-a720f/SM-A720FZDDINS/

pertainly doesn't seem under powered…how is a "2017" two years old?... do they 
just pump out the same device and slap new date on it? but the 
hardward/components are the same as they were?
 

On 12/28/17, 1:22 PM, "use-livecode on behalf of J. Landman Gay via 
use-livecode" <use-livecode-boun...@lists.runrev.com on behalf of 
use-livecode@lists.runrev.com> wrote:

On 12/28/17 4:50 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
>So, "weird" … Galaxy Samsung  A7 in India running Android version 7.0… --- 
problems
>Moto G4 Plus, London Android 7 -- users says it works just fine

The Moto is 2 years newer, has a faster CPU, and double or triple the 
memory depending on configuration. That's got to help.

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

Go in Window (not working) Go in A window "working"

2018-01-01 Thread Sannyasin Brahmanathaswami via use-livecode
Mark recommends using "go in window" on Mobile,
saying this closes stack A while going to open stack B

This works on desktop

put ("stack " & quote & gems & quote) into tDestination
go tDestination  # but stack A remains open.


but this fails in a backscript

put ("stack " & quote & gems & quote) into tDestination;
go to tDestination in window

Script error,  though the dictionary seems to indicate this is correct syntax.

so that I test in the msg box…and also passing by ref which we need to do.
the problem is not using "a"

put ("stack " & quote & gems & quote) into tDestination; go tDestination in 
window # fails
put ("stack " & quote & gems & quote) into tDestination; go tDestination in a 
window  # works But stack A is still open…(on desktop)

thinking it was because this was being called from a library, text only script 
(which has no window)

I created a button the top of the main stack

on mouseup
   go to stack "gems" in window
end mouseup

# also fails

on mouseup
   go to stack "gems" in a window  # this worked…but stack A remains open on 
desktop
end mouseup


but doesn't this entry indicate "a" is optional?

go [invisible] [to] card [of stack] [{as mode 
|in [a] new window|in window}]

and in any case.  the firs stack stays open so the goal of only keeping one 
stack in memory is "defeated" either way..

so … back to this:

go cardOrStackObject # e.g go "gems" (or this string) go card 3 of "gems"
wait 100 milliseconds with messages
close stack oStackName
wait 100 milliseconds with messages

Any clues to using Go in window to close stack 1 and open stack 2?










___
use-livecode mailing list
use-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: Go in Window (not working) Go in A window "working"

2018-01-02 Thread Sannyasin Brahmanathaswami via use-livecode
Hmmm 

how simple. 

   go stack  in window tID

needs to be added to the dictionary… as an example… 

I did read the entry text description of the Window param, but missed it, 
still..

lets see if this helps on Android.

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: [ANN] SivaSiva App on Google Play

2017-12-26 Thread Sannyasin Brahmanathaswami via use-livecode
Thanks Andy for the review.

all your observations will be taken into account, we were wrestling sooo long 
with the core rendering issues that I wasted a lot of time testing instead of 
working on refinements, for which the list is very long.

I will look at your screen recordings in depth…

And we can all look forward to my wailing and knashing of teeth with questions 
on how to improve performance on Android.

I already have feedback from a young scientist in Kerala… Samsung Galaxy A7 
with a list of place where the app hangs and stops.

I was working on using TS Net to provide better control over the flow of data 
when the use is accessing content on the net. But what was simple at first 
became challenging and I had to bail and just get this out the door and printed 
promotions were already telling the world the Android version was ready 
(marketing  ahead of engineering!)

Some of the strange rendering issues on Android persist (e.g. the download 
screen for the audio) 

Happy New Year to all.


Brahmanathaswmai



 

On 12/26/17, 2:01 AM, "use-livecode on behalf of AndyP via use-livecode" 
 wrote:

Congratulations a very nice app.

I've done a quick review that you might be useful.

*Phone *
Nokia 6 
Android version 7.1.2
Internal Memory 32GB Free 22.6GB
SD Card 64GB
Data connection via WIFI

Instead of doing a full step by step usage review I thought having a screen
recording of Installation and Usage might be more useful for you as you can
see the speed of operation in real time followed by a short observational.

*Screen recording here*

http://2108.on-rev.com/nextcloud/index.php/s/HygyiLnMTraoZiQ
  

*Observasions*

Installation was smooth with no problems.

Liked the general layout and the use of background images.

Navigation was logical although I did find myself having to remember where I
was in the app as it is so expansive.

Liked the rounded text content boxes and scrolling of the text was good and
responsive. Noticed that the AppNews differed in this layout scheme?

The search function worked though I wasnt sure what to search for.. thats
just my ignorance of the subject.

*Problems encountered*

In the Songs section about 6:00 in the video the app seemed to hang and I
received a Not Responding message, chose to respond with Wait and all then
continued to work OK.

I had problems dismissing the Share bar at about 10:40 in the video.

Some of the text was a little slow to load but not overly so.

Hope you find this useful, again a very nice app, well done to all involved.




-
Andy Piddock 


My software never has bugs. It just develops random features. 

TinyIDE a Free alternative minimalist IDE Plugin for LiveCode
TinyIDE 


Script editor Themer for LC http://2108.co.uk  

PointandSee is a FREE simple but full featured under cursor colour picker / 
finder.
http://www.pointandsee.co.uk  - made with 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


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

Optimizing for small Android devices

2017-12-26 Thread Sannyasin Brahmanathaswami via use-livecode
Our new SivaSiva app expects a lot of horse power. If we want to optimize for 
smaller devices, I'm not sure where to begin.

We can't really shrink graphics below 55k png for small thumbs… so if we have 8 
of these on a card and a hero image around 200 K… we are talking about ~700K 
image data on a single card + fields, buttons and other controls..

It this *really* too much for a small phone?

Putting the question another way: what exactly starts causing slow down's in 
terms of RAM/ScreenResolution/CPU.

I would not even know where to begin to get capacity/capability "measurements" 
for our code to have so that we can work on some AI algorithms for optimizing 
behavior on the fly for smaller devices…

Any thoughts in this area?

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: Optimizing for small Android devices

2017-12-27 Thread Sannyasin Brahmanathaswami via use-livecode
@ Andy (cc support) 

Yes, I used tinyPng I have paid for their 50 image at a time option, awesome 
tool, I think we will get a site license of photoshop plug in…

The home card(s) (navigation "portals) on the app are one big parent scrolling 
parent group with some subgroups. max 8 "rows) with the mobile scroller set to 
scroll the group.

Of course a lot of libs have been put into memory with "start using" so besides 
the ~650K of images on the card there's another X number of lines of code.

But my gut says: something has to be wrong in the engine… 

these crashes are coming from a Samsung Galaxy A7 , 2017 running 7.0

Android 6.0.1 (Marshmallow), upgradable to 7.0 (Nougat)
Chipset Exynos 7880 Octa
CPU Octa-core 1.9 GHz Cortex-A53
GPU Mali-T830MP3
Memory  Card slot   microSD, up to 256 GB (dedicated slot)
Internal32 GB, 3 GB RAM
Camera  Primary 16 MP (f/1.9, 27mm), autofocus, LED flash, check quality
FeaturesGeo-tagging, touch focus, face detection, panorama, HDR
Video   1080p@30fps, check quality
Secondary   16 MP, f/1.9, 1080p
 
The beta tester in Kerala who has the above phone is sending me detailed 
reports on crash scenarios, and thanks to your tip, videos also.

Each stack we put into memory, after removing/closing the previous one, has 
very different requirements. We swap in and out a background graphic for almost 
all stacks, but these are less than 120K each for the whole card backgrounds…

One issue seems to be with the browser widget and low internet bandwidth… 
causing crashes…on iOS we just see a white screen "like forever…." 

Of course we can do a better job (I tried by failed on first attempt) to use TS 
Net to monitor and help with that area… connectivity… but still  I just find it 
hard to believe that the stacks + images + code  we are deploying are 
overloading the hardware on a device with this much horsepower. 

I'll need to do a deep dive into Aravind's reports and see if we can pin point 
more specifically what is happening. I just replicated a crash on iOS where the 
link to open a card with the browser widget caused a crash on iOS also… but 
can't reproduce it now…but I do smell a "little mouse" down around webKit 
somewhere… 

but I can "hammer" like a teenager(amazing to watch how fast these kids tap and 
swipe on their devices) on my Pixel and the app never dies… So, another route 
is: take Aravind's recommendation and set the hardware requirements to 8.1 
"Requires Oreo" and let the rest of the Android world wait/catch up… Not ideal, 
but with Google pushing so hard now on security and deadlines for new apps to 
run on the latest Android… it won't be long… 

BR



On 12/26/17, 11:57 PM, "use-livecode on behalf of AndyP via use-livecode" 
 wrote:

Do you compress your png images?

If not give this a try. 

https://tinypng.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: Optimizing for small Android devices

2017-12-27 Thread Sannyasin Brahmanathaswami via use-livecode
I am going thru Aravind's reports. His phone is top of the line Android… 
Samsung Galaxy A7 (3GB RAM)   7.0 Nougat, 

It appears that 8.1.9 RC 1 did not fix all the Android rendering issues… yes, 
the problem of leaving the app via home or app switch and coming back to the 
app, yes, that is solved, but there is something else going on here:

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

check out his screen shots.

http://wiki.hindu.org/uploads/20171227_095851.jpg
http://wiki.hindu.org/uploads/20171227_095835.jpg

what appears "behind" is a screen from previous stacks that were opened and 
closed.

 our navigation library is pretty straight forward, when it gets to this point
---
if oStackName <> empty then # this is not the first run boot of portal
  deleteAllMobileControls # will destroy all except audioPlayer
  set the accelereratedRendering of the topstack to false 
end if
 
   go  cardOrStackObject 
 # e.g   go Stack "b"  "gems" (or whatever this string)  go card 3 of "gems"   
whatever it is
# this stack might turn on acceleratedRendering in it's openCard Handler… 

   wait 100 milliseconds with messages  

   close stack oStackName
# closed ! but not gone… a visual "rep" of this stack is still retained, 
# and not only that, possibly many others of previously closed stacks

   wait 100 milliseconds with messages  
---
that's not mysterious… we know from previous tests that the wait 100 
milliseconds is mission critical. Without those, even on my Pixel.. we get 
serious rendering issues.

So… guessing that entire screen representation(s) of closed stacks are 
appearing behind the newly opened surprise.livecode stack… and not only that, 
this could be images of the screens of different stacks that were opened 
several steps back… so only Ganesha knows how many representations of the 
screen(s) that have gone by and closed by our code are still being retained in 
RAM until the app dies. or some kind of caching is happening that needs 
flushing… At least that's how it looks here.  

BR









 

 

On 12/27/17, 5:37 PM, "use-livecode on behalf of J. Landman Gay via 
use-livecode"  wrote:

If you limit your user base to Android 8.1 almost no one can use it. Right 
now it has a very tiny user base, I think only Pixel users have that 
version. It was just pushed to Pixels a little while ago. A whole lot of 
devices are still waiting for Android 7.



___
use-livecode mailing list
use-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: Optimizing for small Android devices

2017-12-27 Thread Sannyasin Brahmanathaswami via use-livecode
7 installs end of day one..yesterday 
End of today, up to 21

But with 61 crashes already! Yikes.

So I expect it will get hit pretty hard... I put signs up around here and we 
are getting about 400 visitors a day… I expect about 50% of them are on Android…

I'll have to keep the promotion quiet until we see if we can fix some of these

Google's Crash reporting is pretty awesome

43 crashes on Android 7.0  
8 crashes on Android 8.1 (probably my own phone - pixel)
3 crashes in Android 7.1


signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
librevandroid.so

Ouch…. 

I put in a support call to HQ……  

On 12/27/17, 10:39 AM, "use-livecode on behalf of J. Landman Gay via 
use-livecode" <use-livecode-boun...@lists.runrev.com on behalf of 
use-livecode@lists.runrev.com> wrote:

Besides the memory footprint, there could be stress on the CPU when 
running scripts that aren't tightly optimized. You might see what can be 
pared down there. Big job, I know, with a project this large.

On 12/26/17 11:04 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
>Our new SivaSiva app expects a lot of horse power. If we want to optimize 
for smaller devices, I'm not sure where to begin.




___
use-livecode mailing list
use-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: Analyzing Crashes on iOS Apps

2017-12-20 Thread Sannyasin Brahmanathaswami via use-livecode
Well, what we see in iTunes connect "90 crashes" is not reflected in xCode for 
the same app which only shows what appears to be, 6 reports.

The only option offered is for me to symbolicate these and then I was able to 
get these six report out as text files, zipped and sent to you view support 
email.

from Stack Overflow:

"Oh, Apple always knows how to make our lives harder... 
Thanks, unfortunately it appears you can only get 2 weeks of crashes this way."

BR
 

 

On 12/19/17, 11:22 PM, "use-livecode on behalf of Mark Waddingham via 
use-livecode"  wrote:

If you can extract the text file versions of the logs (like you get from 
CrashReporter on Desktop), zip them up and attach them to a bug report 
then we can try and symbolicate them and take look to see what is 
causing the crash(es) your users are experiencing.

___
use-livecode mailing list
use-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: Analyzing Crashes on iOS Apps

2017-12-20 Thread Sannyasin Brahmanathaswami via use-livecode
FWIW

I learned why iTunes connect show 90 crashes, but xcode only give me 6:

That's because they only offer the crash files from the past two weeks.

I guess this makes sense in a way… crashes from previous builds may not be that 
relevant.


 

On 12/19/17, 11:22 PM, "use-livecode on behalf of Mark Waddingham via 
use-livecode"  wrote:

If you can extract the text file versions of the logs (like you get from 
CrashReporter on Desktop), zip them up and attach them to a bug report 
then we can try and symbolicate them and take look to see what is 
causing the crash(es) your users are experiencing.



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

TS Net Documentation

2017-12-21 Thread Sannyasin Brahmanathaswami via use-livecode
an old theme "I want a printed dictionary…"

As I peruse the dictionary TSNet is *huge* and complex…. Hunt and peck for what 
you have no clue will serve your needs gets tiring. Sometimes good 
old-fashioned "study for your exams" approach is a better way to go.

And no, I don't want anything electronic. see the long discussion thread last 
year in October/November on this…

But -- the PDF User Guide does not have a TS Net section

I found this

/Applications/LiveCode Business 8.1.9 (rc 
1).app/Contents/Tools/Documentation/html_viewer/resources/data/api/api.sqlite

and if I open the api.sqlite  file in a DB browser… the entry data are binary 
blobs (What are those? LC array stores)

And this:

/Applications/LiveCode Business 8.1.9 (rc 
1).app/Contents/Tools/Documentation/html_viewer/resources/data/api/distributed_api.js

Not particularly user friendly for converting to a printed document: 112,014 
lines of JSON data…but still hackable.

but, before I write some jsonToArray + TSNet filter -> to text…  to extract 
TSNet commands from the distributed_api.js

@Charles do you have a PDF with all the TSNet commands and functions like we 
see in the dictionary?
Or has anyone written widget to dump text form the dictionary? I'm not looking 
for anything fancy…


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: Go in Window (not working) Go in A window "working"

2018-01-03 Thread Sannyasin Brahmanathaswami via use-livecode
"Something is wrong"  

This works on desktop,  but fails on iOS. Nothing happens at all. it stays on 
the same, open stack and does not navigate to/open the new stack declared in "go

  put the windowID of stack oStackName into tWindowID  # current open stack 
  go to cardOrStackObject  in window tWindowID

# where "cardOrStackObject" is a string in the form of .e.g
# stack "gems  OR card 2 of stack "gems"  OR card "video" of stack surprise

Since I had made other changes since my last commit… I did commented out my new 
lines and used the old method and ran the stand alone again and it works

  -- put the windowID of stack oStackName into tWindowID  # current open stack
   
go  cardOrStackObject  # e.g   go "gems" (or this string)  go card 3 of "gems"  
 
wait 100 milliseconds with messages  
close stack oStackName   
wait 100 milliseconds with messages  
   
  --go to cardOrStackObject  in window tWindowID

# where we open the other, new stack first and *then* close the old one.

On 1/2/18, 10:31 PM, "use-livecode on behalf of Mark Waddingham via 
use-livecode" <use-livecode-boun...@lists.runrev.com on behalf of 
use-livecode@lists.runrev.com> wrote:

On 2018-01-03 05:55, Sannyasin Brahmanathaswami via use-livecode wrote:
>Hmmm
>how simple.
>go stack  in window tID
>needs to be added to the dictionary… as an example…
>I did read the entry text description of the Window param, but missed
>it, still..
>lets see if this helps on Android.

You don't need to indirect through the 'windowId'. You can do:

   go stack "NewStack" in window "OldStack"

i.e. 'window' can either be a stack name, or 'the windowId' of an 
existing stack.

Warmest Regards,

Mark.

P.S. If you could file a bug about the dictionary deficiency, that would 
be great!

-- 
Mark

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

Android Java Virtual Machines

2018-02-26 Thread Sannyasin Brahmanathaswami via use-livecode
I was using java jdk1.8.0_121.jdk

Even though documentation says it should work (any above 1.6 should work)

It an attempt of get to jdk1.8.0_152.jdk, I had installed Java 9, inadvertently.

To make a long story short, I installed sdkman to manage my Java

(very cool, http://sdkman.io/)

Any ended with up

/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk

No, I am wondering if my built on a Pixel is different from when it was 
jdk1.8.0_121.jdk.

Does anyone have two JDK installed to found out?
I nervous about messing with my Java script set up.
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: 8.1.10 Reporting the ScreenSize of a iPhone7: 0,0,375,667

2018-06-21 Thread Sannyasin Brahmanathaswami via use-livecode
1) have had the 1242 X 2208 loaded in the Phone 6 Plus "slot" from the 
beginning of this tread!
2) In now suspect Xcode mis-configuration (I keep going on 9.2. to 9.3 and set 
the Xcode select from terminal_ 
3) With Elanor help just needed to add 

mobileSetAllowedOrientations "portrait,portrait upside down,landscape 
left,landscape right"

and

case "landscape right"
 send "landscapeUI" to me in 0 milliseconds
 break   

to my switch and she says it is working!

Can you please (if you have iPhone 7 Plus that is be best)  try on your iPhone

Go stack url "wiki.hindu.org/uploads/BrowserLandscapeTest_r2.livecode" 

We been good if I hear "confirmed, worked on my iPhone XX" from several 
people... if so,  we have a test stack to give engineering to test on Android.

The footer nav should show on portrait, disappear on when you turn phone side 
ways. Then appear again what you go portait.  And you should in the reported 
(answer) the correct rect of the screen and *any* iPhone size.

Any we do not need resize handler!

@jacqueline there is no " setupUI"  handler

I think you meant PortratUI handler

Try it now android:  the " orientationChanged" was not happening because I did 
not put in mobileSetAllowedOrientations.

But now the "rect" on android it off, it does show the footer/nav .. I think is 
visible, but off screen.

Now, solving my Xcode confirguration, is a different problem.

BR 
 

On 6/19/18, 11:40 AM, "use-livecode on behalf of J. Landman Gay via 
use-livecode"  wrote:

This is what I have:

on resizeStack x,y
   ANSWER X & Y
   setupUI x,y
end resizeStack

The answer dialog appeared once on my first test (with no x,y values) 
and all test builds after that never showed an answer dialog at all. The 
setupUI handler also has an answer dialog for testing and I haven't seen 
it even once.

___
use-livecode mailing list
use-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: Checking if internet is connected using tsNet?

2018-07-27 Thread Sannyasin Brahmanathaswami via use-livecode
Well the use case differences are obvious, but to say the obvious

I am connecting with

a) our own server
b) YouTube

that’s it. 

AND I want to know if the URL in the app is correct (silly typo in a JSON in 
the app OR misfiled media on out server...etc), so I would always to get the 
header of the actual media being called. We can traps errors, send to the 
MotherShip the URL that failed and fix it... etc.

That different from (Klaus's ?) "am I connected or not"

BR

On 7/27/18, 12:44 PM, "use-livecode on behalf of Mark Wieder via use-livecode" 
 wrote:

> if  (tResult < 400) then
>return true
> else
>return false
> end if

I'd be a little wary of that "< 400" result though. You may (or may not) 
want to follow redirects, and if you get a 418 you may want a cuppa .

and due to the extra hops involved, I probably wouldn't try for 
"https://www.google.com;. DNS resolution will add tens to over a hundred 
milliseconds to a web command, so if you're going to go that route 
instead of opening a socket I'd go straight to "http://8.8.8.8:53;.

curl -v --trace-time 8.8.8.8:53
20 milliseconds

curl -v --trace-time www.google.com
50 milliseconds

But otherwise, yes... there is no way of checking for the internet 
without connecting to the internet.

___
use-livecode mailing list
use-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: Getting Started with DataGrid

2018-08-02 Thread Sannyasin Brahmanathaswami via use-livecode
Thank Bob for the tips...

Actually this is  for a YouTube index, and all the "rows" would behave the same 
way.

The only thing changing on each row would be

1. https://i.ytimg/#/hddefault.jbg (the thumbnail) 
2. Metadata for our date base (SQlite on the mobile app) Title, description. 
Etc. appear in a field.
3. Click on a row and drives the user to a Browser by setting the YouTube as 
the HTML source.

I am starting here:

https://livecode.com/docs/9-0-0/components/livecode-data-grid/

of a course a test stack..

What do you all think of  "A Slug on the Road"  Data Grid Helper?

Brahmanathaswami
 

On 8/2/18, 4:59 AM, "use-livecode on behalf of Bob Sneidar via use-livecode" 
 wrote:

I can give you a "not to do". DO NOT send selectionChanged to a datagrid in 
the middle of processing a selectionChanged message already. This will crash LC 
to desktop. 

I have not used form style datagrids, which is what you are talking about 
methinks, but the idea is fairly simple. Instead of every row behaving exactly 
the same way, form datagrids allow each row to behave independently, as though 
they were individual "forms" stacked in a column. You change the look of the 
rows in the row behavior script, and alter the overall look of the rows by 
modifying the rowTemplate. 

In the datagrid properties window data grid tab, change the style of the 
datagrid to "Form" and the options for editing these become available. The Row 
template is just a group so you can modify it like any other group. If you edit 
the script, you can see that there are already handlers defined, like 
fillInData, layoutControl etc. And since V9 other messages that can be used are 
in the left pane of the script editor to give you some idea on what you can do. 

I would say open a new stack, drag a datagrid to it, change the type to 
Form and dig in. You cannot damage your existing project that way.  

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: iOS 12 compatibility

2018-08-02 Thread Sannyasin Brahmanathaswami via use-livecode
Wow (www.classroomFocusedSoftware.com) 

Yes great job!

Brahmanathaswami
 

 Stephen Barncard via use-livecode"  wrote:

follow the links.

___
use-livecode mailing list
use-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: Getting Started with DataGrid

2018-08-02 Thread Sannyasin Brahmanathaswami via use-livecode
I loaded DataGrid in stack

Now I wonder if is tool of choice for 

http://wiki.hindu.org/screenshots/data-grid-candidate.png

There needs to alternate rows, with the "alt" row as blank and showing the card 
.?? before I go down the path:

Yes or No  -- can data grid to this?

Brahmanathaswami
 


___
use-livecode mailing list
use-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: Getting Started with DataGrid

2018-08-02 Thread Sannyasin Brahmanathaswami via use-livecode
Aloha "Zryip"

At $45.00 (cheap) and with your own endorsement (knowing that it is maintained)

I'll get it!

Brahmanathaswami

Ps do you have a real name?
 
On 8/2/18, 12:01 PM, "use-livecode on behalf of zryip theSlug via 
use-livecode"  wrote:

Dear Swami,

We have some free material about datagrids form or table.

1. A tutorial written long time ago before I created DGH, exploring the
very basic concepts of the datagrid control (form and table):
http://www.aslugontheroad.com/download/category/3-tutorials

2. Some demo stacks created for demonstrating datagrid's possibilities such
as drag and drop, calculation, etc
http://www.aslugontheroad.com/download/category/4-lab

3. About your screenshot, a datagrid form will be your better option in my
opinion.

4. And about Data Grid Helper, I can not answer objectively to your
question, for sure. All I can say is the tool has regular updates for
supporting the new versions of LiveCode. A new  major (nothing to do with
our friend Klaus :) (I prefer to specify because he made me the joke on the
livecode forum, haha :) )) 2.5 version has been released in June supporting
dg2 properties, widgets, custom headers, etc. A blog article has been
published about it, with some available screenshots of the new features:
https://livecode.com/data-grid-helper-2-5-adds-support-for-datagrid-2/

Now, if someone in the List want to add a comment about DGH, positive or
not, he / she is welcome. :)


Best Regards,



___
use-livecode mailing list
use-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: acceleratedRendering

2018-08-02 Thread Sannyasin Brahmanathaswami via use-livecode
Next week will be fine __

Brahmanathaswami
 

On 8/2/18, 1:23 PM, "use-livecode on behalf of Monte Goulding via 
use-livecode"  wrote:

Given it’s Friday and these patches have yet to be reviewed I very much 
doubt we will be releasing an RC 2 with them in this week. We do have a service 
providing access to nightly builds I believe but I don’t know the full details 
(cost ect) so you could contact support about that if it is of interest.

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

2018-08-02 Thread Sannyasin Brahmanathaswami via use-livecode
I don't know if it would work on a iOS 12, but we has an issue with a complex 
dynamic "draw" on screen..

So we turned of acceleratedRendering  to false temporarily

Then set to back when the drawing was finish

on createWordPuzzle
   if (the acceleratedRendering of this stack is true ) then
  set the acceleratedRacceleratedRendering on createWordPuzzle
   end if
   stopTimer
   hide widget "context"
   loadNewBgImg
   [snip]

# later 

set the acceleratedRendering  of this stack to true

end createWordPuzzle


Brahmanathaswami
 

 Randy Hengst wrote:

I’ve been messing with this slowdown issue … there is a connection between 
having acceleratedRendering set to true… and my objects that move set to 
dynamic. I see the slowdown in the IDE and on the iPad. 

Using LC 9.0.1 RC1 still.

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

Home Screen Icon Not Rendered on iOS

2018-07-30 Thread Sannyasin Brahmanathaswami via use-livecode
Apple continues to give us grief…Anyone else have this context.

Mac OS High Sierra 10.13.6
LC: 9.0.1 RC1
Xcode 9.4.1
iOS (on phone) 11.4.1

No matter what I do, I can't get the Home screen icon to render on the phone. 
It always "generic"

All icons are entered into SA at correct dimensions. Whether  we use 
"prerendered" on not, still doesn't work.
No entitlements issues, build goes through with no error. Just no proper icon.

Previously, in Xcode 9.3 this same problem was solved by saying  "Yes" to 
Apple's Dialog on Xcode start up

"Do You Want to Install Additional Components?"

After that, restarting Xcode, restart LC and the icon rendered.

But Xcode 9.3 will not build for iOS 11.4.1. AND XCode 9.4.1. invokes no dialog 
for "Additional Components"  -- it opens "silently" and on Apple's developer 
site there are no additional component for 9.4.1? (in downloads) I tried 
manually adding the 9.3 Components (little applications that I put the Xcode 
applications folder). but still no go…

I am stumped.

I can still build and get my beta testers to check the app - minus a proper 
home screen icons. But sure would be nice to solve this one.

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

Failed to Build iOS Versions in 9.0.1 RC1

2018-07-28 Thread Sannyasin Brahmanathaswami via use-livecode
1) Since working with 9.0.1. RC1 I have not been able to get a home screen icon 
to show.  I get something generic... Everything is set in the SA settings…

Well, I kept on with development, saying "I'll worry about the icon later" 

Then today I added some devices to my Apple Developer Profile and downloaded 
the new provisioning profile. 

Nothing has changed (that I can see).

Now I am getting a new error..

===
Unable to build for device : codesigning failed with
/private/var/folders/t8 snip]/SivaSiva.app:errSecInternalComponent.

OK
+++

So I took a look at the /private folder  went digging ...it did not fine 
the error. But I do find

tmp.12344.OXz0SohK
   / AppIcon.appiconset
Contents.json
icon-app-57...@1x.png
icon-app-57...@2x.png
icon-app-60...@2x.png
icon-app-60...@3x.png
icon-app-72...@1x.png
icon-app-72...@2x.png
icon-app-76...@1x.png
icon-app-76...@2x.png
icon-app-83.5x8...@2x.png
itunesartw...@2x.png

I really don't know if the latest error on iOS build is related or not... but 
something myterious in going on?

I can see what so many developers opt out of building for iOS are all!  Too 
much pain with Apple...

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: Home Screen Icon Not Rendered on iOS

2018-07-30 Thread Sannyasin Brahmanathaswami via use-livecode
All the icons have RGB change, Red, Green, Blue

I found one (1024x1024) that was set to "index" 
I re-exported from Illustrator, 

Still did  help

Brahmanathaswami
 

On 7/30/18, 5:53 AM, "use-livecode on behalf of panagiotis merakos via 
use-livecode"  wrote:

Do the icons have an alpha channel? I *think* they are not allowed to have
one.



___
use-livecode mailing list
use-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: Getting Started with DataGrid and another datagrid form

2018-08-05 Thread Sannyasin Brahmanathaswami via use-livecode
I slowly studying as much as we can on the datagrid,and "digging" in it with an 
first attempt to build a form.

One thing is not clear to me.

1) Have the  WYSIG panel to build the datagrid form.

2) why then do we  have, in the Behavior Script  this handler?

Isn't the layout already pre-determined in the template?

on LayoutControl pControlRect, pWorkingRect

local theFieldRect

-- This message is sent when you should layout your template's controls.

-- This is where you resize the 'Background' graphic, resize fields and

-- position objects.

-- For fixed height data grid forms you can use items 1 through 4 of 
pControlRect as

-- boundaries for laying out your controls.

-- For variable height data grid forms you can use items 1 through 3 of 
pControlRect as

-- boundaries, expanding the height of your control as needed.

-- The working rect is defined area of the control you can safelt use.

-- Use this rect to make sure your controls don't overlap with any edit mode 
controls.

-- Example:

put the rect of field "Label" of me into theFieldRect

put item 1 of pWorkingRect into item 1 of theFieldRect

put item 3 of pWorkingRect - 5 into item 3 of theFieldRect

set the rect of field "Label" of me to theFieldRect

set the rect of graphic "Background" of me to pControlRect

end LayoutControl


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

2018-08-01 Thread Sannyasin Brahmanathaswami via use-livecode
FWIW... acceleratedRendering in causing trouble on Android, 9.0.1. RC 1.

Disables "touch" messages in some contexts... 

Bug report is in, confirmed.

I've struggling for 2 Years with this (!) 

Now on iOS?  Yikes!

I am sure it is a priority with team. Keep fingers crossed. 

BR
 

On 8/1/18, 4:07 AM, "use-livecode on behalf of Randy Hengst via use-livecode" 
 wrote:

Is there some element that goes hand-in-hand with acceleratedRendering that 
I’ve overlooked?

___
use-livecode mailing list
use-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: iOS 12 compatibility

2018-08-02 Thread Sannyasin Brahmanathaswami via use-livecode
Hmmm. I want to see the "beautiful work" ?? that Randy has done...

Brahmanathaswami
 

 Stephen Barncard 

Beautiful work, Randy

___
use-livecode mailing list
use-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: acceleratedRendering

2018-08-02 Thread Sannyasin Brahmanathaswami via use-livecode
Aloha Monte

You are wonderful! "it groups not redrawing..."

Right, it's not "touch". Though from a user perspective, suddenly "my swiping 
doesn't work..."

And thank you for fixing the returnField error also  [Bug 18395] ReturninField 
error on android app)

@team-- would it possible to send a new build out this week?  Even it has only 
this patch

It is the one thing in Android that is blocking. Everything else you have 
accomplished on 9.0.1 is fantastic, and I really *need* get an Android version 
that works one on Google Play asap.   So I need to get this out to beta tester 
asap

BR

PS...

would it would also be nice if get the home screen icon to load in iOS at the 
same time, in an interim patch release. 

https://quality.livecode.com/show_bug.cgi?id=21451
 
On 8/1/18, 5:02 PM, "use-livecode on behalf of Monte Goulding via 
use-livecode"  wrote:

Yes I just patched it https://github.com/livecode/livecode/pull/6620 


>FWIW... acceleratedRendering in causing trouble on Android, 9.0.1. RC 1.
>Disables "touch" messages in some contexts… 

^ is not a very good description of the issue. The touches are fine. It’s 
groups not redrawing when scrolled under some circumstances.

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

Getting Started with DataGrid

2018-08-02 Thread Sannyasin Brahmanathaswami via use-livecode
I have stayed away from the Data Grid because of scrolling issues and the 
complexity issues were  too much for my "baby talk xTalk brain" … but my UX 
designer has implement a module that has index of row that include various 
little icon and controls that will be hard to do in the old "all control 
separate in a single group" that I have been using.  And the indexes are small. 
So, time for DataGrid2 (has that been implemented or still pending? I have not 
kept up with DG dev) .

I am willing to pay for the third party tools, if they are considered really 
helpful,  and it they are maintained and up to date and have "recommendations" 
from the community. Any thoughts on get starting, caveats?  Particularly what 
*not* to do…

Meanwhile, we are off to the on-line academy to check out the lessons….

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: Checking if internet is connected using tsNet?

2018-07-27 Thread Sannyasin Brahmanathaswami via use-livecode
I just went through  this in my app. Like Mark said, you do need to connect to 
"something"

I put a "ping.txt" on the server. It has one word "true".  Apple does the same 
thing. Though they call it something else  "serviceAvailable" or something like 
that and it has one word in it "available"

===
But with TSNet you can just "ping" for the url you are trying  get. By using 
tsNetHeadSync, you don't have to down load the whole file. It will return 
headers.

 It is very fast, so with so much music and online links books  and youTube 
videos, with users going in and out of wi-fi, they forgot their phone on 
airport mode etc.  There is no way of knowing the user context. 

So I just implemented this in one of my main backscripts and call it *every* 
time when try to connect. Turn out the was easy them expected. I only take a 
few millisecond to get status. Charles did say that tsNetHeadSync was probably 
the best way to go.

=
function checkURLAvailable pSelectedURL 
 put  tsNetHeadSync(pSelectedURL, tSentHeaders, tResult, tBytes)  into tHeaders 
 # into tHeaders
  
   ## get url pSelectedURL
   if  (tResult < 400) then
  return true
   else
  internetConnectionDown
  return false
   end if
end checkURLAvailable

command internetConnectionDown
   dialog_CustomMsg "Offline or Low Bandwidth"
   exit top
end internetConnectionDown


If you don't have 

a) a ping 
b) you want test without a URL

Just use  "https://www.google.com;

function checkURLAvailable "https://www.google.com;

 put  tsNetHeadSync(pSelectedURL, tSentHeaders, tResult, tBytes)  into tHeaders 
 
  
   ## get url pSelectedURL header

   if  (tResult < 400) then
  return true
   else
  return false
   end if
end checkURLAvailable

if Google down, so is the whole internet. (smile)

Almond cheese, please.

BR


On 7/26/18, 4:40 AM, "use-livecode on behalf of Klaus major-k via 
use-livecode"  wrote:

can we possibly "mis-"use tsNet somehow to check if the 
current machine has a valid internet connection? 
And to check if a given URL is valid?

___
use-livecode mailing list
use-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: Data Persistence

2018-07-27 Thread Sannyasin Brahmanathaswami via use-livecode
Welcome John!

You will need this, I would endorse Tom's arrayEncode.  

If you have not: Learn to array code RIGHT NOW, before going further with 
Livecode. I resisted array for years, and it bought me a boat load of silly 
coding of text files. And 100 of lines of unnecessary code then I  are 
learned about arrays. I broke my head of the desk.. saying "oh wow is me! I 
have could have saved thousand of hours and lines of codes if use arrays from 
the beginning!" (ha)

  (rough draft code)


Local sTempParamArray # may good to save a local, 

Command saveTempParams

Put fld "fuelNeed" into  pTempParamArray["fuelNeeded'} 
Put fld "timeToArrival" into  pTempParamArray["timeToArrival""
# etc.
Put pTempParamArray into sTempParamArray
storeTempParams pTempParamArray

End saveTempParams

command storeTempParams pTempParamArray 

put   specialFolderPath("documents") & "/tempSavedParams" into  
tSavedPath
put sTempParamArray into url ("binfile:" & tSavedPath)

end storeTempParams

# you will have some trigger get them back, I don't know what that would be:

Function getTempSavedParams

Put   specialFolderPath("documents") & "/tempSavedParams" into  
tSavedPath
put url ("binfile:" & tSavedPath) into pTempParamArray
put pTempParamArray into sTempParamArray
return pTempParamArray

end getTempSavedParams

command reLoadSettings

put getTempSavesParams() into pLastParams
put pLastParams["fuelNeeded"] into # whatever
put pLastParams["timeToArrival"] into # whatever
# etc.

End reLoadSettings

# code is a little verbose but easy to debug later.
# other wizards can improve on my baby xTalk
 
BR 

On 7/23/18, 11:57 AM, "use-livecode on behalf of John McKenzie via 
use-livecode"  wrote:

What I need help with is the issue of persistence. 

___
use-livecode mailing list
use-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: Data Persistence

2018-07-27 Thread Sannyasin Brahmanathaswami via use-livecode
Richard Gaskin 
This is where serialization comes in, collecting all the disparate 
pointer contents and packing them into a bytestream that can be saved or 
transported, using arrayEncode:

Ha! I knew that would bring out something useful... thanks for upgrading the 
handlers.

Richard wrote " If that native form is an array, there may be no need to do 
anything
more than what LC already gives us straight out of the box."

I have been toying with this for some time, but like Alex said..

"I just wish there was a human-readable, human-editable-in-a-text-editor
variant of LSON :-)"

Keeps me in JSON

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: Getting Started with DataGrid and another datagrid form

2018-08-05 Thread Sannyasin Brahmanathaswami via use-livecode
Doug

   WSIWYG:  I was referring to the row temple "build" screen.

... layout handler. I want to understand it...

maybe studying the on-line lessons *before* asking questions

Someone should do a graphic or schema diagram of the DG message hierarchy.

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: Getting Started with DataGrid and another datagrid form

2018-08-05 Thread Sannyasin Brahmanathaswami via use-livecode
Duh!

http://lessons.livecode.com/m/datagrid/l/7305-example-creating-a-list-of-people

on LayoutControl does seem to be required.

So the row template is not WSIWYG?

Sannyasin Brahmanathaswami via use-livecode wrote:
> Doug
>
>WSIWYG:  I was referring to the row temple "build" screen.
>
> ... layout handler. I want to understand it...
>
> maybe studying the on-line lessons *before* asking questions
>
> Someone should do a graphic or schema diagram of the DG message hierarchy.
>
> 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: Getting Started with DataGrid and another datagrid form

2018-08-05 Thread Sannyasin Brahmanathaswami via use-livecode
Aloha zryip

I finally figured out that a row has the behavior script that "requires 
attention"

I have yet to try in dghelper.

FillInData etc. obviously need controls named according to your grid

But I still have the question:

The WSIWYG template has the control "where we want them"

But is the LayOutControl handler doing? Is it needed?

Oh by the way. you need to have a button that

set the relayerGroupedControls to true

In the form builder, otherwise you can't push an object "back"




On 8/5/18 7:26 AM, zryip theSlug via use-livecode wrote:

The code you have in the default behavior is the one installed by the
inspector located in one of the behavior button (stack only script now,
since the dg2)

It contains the minimal example code to help the developer starting;
FillinData, preFillinData, LayoutControl, etc

If you are modifying the template for the datagrid (adding a control,
deleting a control, etc) you have to change the code for your datagrid row
manually.








___
use-livecode mailing list
use-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: Cropping a referenced image

2018-08-15 Thread Sannyasin Brahmanathaswami via use-livecode
Sometimes LiveCode astounds me...

Using Klause's method, plus Datagrid under the hood (and all its code)

1) the setting to Button icon to the size you want your image cropped, 120X74
2) Place an image off screen at +1000 to the right.
3) At 120x90 call it img "ytBtnIconTemplate"

I was able to fill the DataGrid  with the images *in just SEVEN lines of code* !

on FillInData pDataArray

put pDataArray["ytThumb"] into tURL

set the itemdel to "/"; put item -2 of tURL into tImageName

if exists(img tImageName ) = false then

clone img "ytBtnIconTemplate" as tImageName

set the filename of img tImageName to pDataArray["ytThumb"]

end if

set the icon of button "ytThumb"of me to (the id img tImageName)

set the text of field "collectionTitle" of me to 
pDataArray["collectionTitle"]

end FillInData






___
use-livecode mailing list
use-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: Cropping a referenced image

2018-08-14 Thread Sannyasin Brahmanathaswami via use-livecode
Klaus! Brilliant! and "too easy" to boot



on mouseup

put 
"https://i.ytimg.com/vi/KO3l3-4pFyo/default.jpg;
 into tURL

set the itemdel to "/"; put item -2 of tURL into tImageName

clone img "ytBtnIconTemplate" as tImageName

put the long id of img tImageName into pImage

set the filename of pImage to 
"https://i.ytimg.com/vi/KO3l3-4pFyo/default.jpg;

set the icon of button "ytTubeThumb" to (the id of pImage)

end mouseup

# Now, we now we have the reference image (hidden on a card)

# so we don't have go to web to get them if they scroll "around" to the card 
again

on mouseup

put 
"https://i.ytimg.com/vi/KO3l3-4pFyo/default.jpg;
 into tURL

   set the itemdel to "/"; put item -2 of tURL into tImageName

clone img "ytBtnIconTemplate" as tImageName

put the long id of img tImageName into pImage

if exists(pImage) = false then

set the filename of pImage to 
"https://i.ytimg.com/vi/KO3l3-4pFyo/default.jpg;

end if

set the icon of button "ytTubeThumb" to (the id of pImage)

end mouseup

C'est merveilleux!


@ steve, i have used the copy,crop & exportscreen shot method on a puzzle where 
we need to take the words in a field and copy to "tiles" but there is a hit of 
the CPU that we can afford in mobile.

BR



On 8/14/18 5:05 AM, Klaus major-k via use-livecode wrote:

can't you use a button, set its icon to your image(s) and then just "crop" the 
button?
Know what I mean?
...
set the width of btn "el croppo" to the width of img pImage
## Or use formattedwidth...

set the height of btn "el croppo" to round(the width of img pImage/16*9)
...

___
use-livecode mailing list
use-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: Cropping a referenced image

2018-08-16 Thread Sannyasin Brahmanathaswami via use-livecode
Yes I thank "Livecode" but really should thank Trevor for the code (Datagrid) 
behind my little handler. Suddenly going from dBase-query -->  lcArray --> to a 
 form with multiple controls became easy.

I just hope it scrolls smoothly on Mobile (have yet to test it).




On 8/15/18 6:57 AM, Trevor DeVore via use-livecode wrote:

We all asked for a table object that worked much like a spreadsheet, and
we got something much, much cooler, thanks to the work Trevor did. Greatly
appreciated Trevor! Prior to the datagrid, I would be hard pressed to write
any kind of database application.



You’re welcome Bob :-)


___
use-livecode mailing list
use-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: Not many people know this.

2018-08-16 Thread Sannyasin Brahmanathaswami via use-livecode
On 8/16/18 7:49 AM, Richard Gaskin via use-livecode wrote:
> but the Release Notes for v5.5 offer a solid overview of the new 
> field features (starting on p12),

I keep that! it is golden. I think they replaced it with a stack showing
all the features, I can't find it now.

But setting the array of style text, marvelous. Thanks again Trevor and
Mark!

Someday someone should go a menu like inDesign so that you can "do text"
from a WSIWIG menu.
I know Andre has one but he didn't even know about all the features
available since v5.5. That's how buried it is.

Second Clarence "notion" time meld lcStackBrowser with Navigator. LCSB
also failed for me since 8.*

I can't even imagine of Geoff stays neck and neck with an evolving IDE!

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: Getting Started with DataGrid and another datagrid form

2018-08-06 Thread Sannyasin Brahmanathaswami via use-livecode
I am at the lesson.livecode.com/m/datagrid.

They are quite thorough. Much to my chagrin, everything you need to know
is there.

 I would NOT recommend just dragging a Datagrip and "digging in" are
even using DG Helper (to start)

Read the lessons first (or at same time as you follow along in a stack.)

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: Getting Started with DataGrid and another datagrid form

2018-08-06 Thread Sannyasin Brahmanathaswami via use-livecode
I found another way.

Set standard background a opacity=0

add an new container graphic.

then make the background bigger that the controls, But it won't hilite.

So I might use your method.

On 8/6/18 11:33 AM, zryip theSlug via use-livecode wrote:
> I have created this kind of form before: roundrect background and margins
> between 2 rows.
> For the background I used my own graphic. The background graphic if present
> is used by the datagrid library for hiliting the row. I removed it.
> And for magins, I used a row height upper than the height of my custom
> background. The margins between 2 rows are transparent, so I was able to
> see the card's background without doing something specific with the
> datagrid.



___
use-livecode mailing list
use-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: Getting Started with DataGrid and another datagrid form

2018-08-06 Thread Sannyasin Brahmanathaswami via use-livecode
Yay! I made my first form.

Now for questions *not* covered by the lessons.

1) Is the graphic "Background" a special object? In Navigator I opened
stack

"Data Grid Temple 333"
 
directly  editing the group "Row Template". I set background graphic to
roundedRectangle, corners set 20px, and applied a linear gradiant with
nice colors. I saved the stack.

But the graphic did not change?  I *can* adjust its rect, and the
rounded corners show (appears on hilite, the it is tranparent otherwise)
and that sticks, but not linear gradient?

2) How do I make the datagrid transparent (opacity to 0).  So that
between the rows there is a margin which shows the background of the
card coming through.

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


Cropping a Referenced image

2018-08-14 Thread Sannyasin Brahmanathaswami via use-livecode
#test

on mouseup

put the long id of img "thumbTemplate" into pImage

put the loc of pImage into pLocation

set the filename of pImage to 
"https://i.ytimg.com/vi/KO3l3-4pFyo/default.jpg;


--set the filename of pImage to 
"https://i.ytimg.com/vi/KO3l3-4pFyo/hqdefault.jpg;

set the loc of pImage to pLocation

end mouseup

USE CASE:

1) eliminate top and bottom letter boxing on YouTube thumbnails. Easy done on 
web with CSS, not easy in LC
2) They provide a 4x3 by ratio
3) But when you post an HD video, thumbnail is 16x9, letterbox, top and bottom 
(45 pix of the hqdefault.jpg).
4) All youTube video channel thumbnails are letterboxed -- we don't 4X3 videos, 
ever...
6) "crop" command does on work with referenced images.
7) Look for a simple method that in the data grid takes up very little CPU time.
8) options
 a) seems like I could make a mask on top the image to eliminate the 
letterbox.
 b) other options?
9) we could go to the trouble to down load the thumb and crop and store them in 
/documents (mobile app); but there's no point: the user *has* to have a 
internet connection to use this module to view YouTube; and the call to 
https://i.ytimg.com is very fast, so why bother?

 Spotify does a similar thing: it has a generic icon until the album cover is 
loaded.

Any ideas?  Meanwhile I'll explored masking.

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


Cropping a referenced image

2018-08-14 Thread Sannyasin Brahmanathaswami via use-livecode
[sending this again, because it was rolled in another thread/conversation by 
the mail list}

#test

on mouseup

put the long id of img "thumbTemplate" into pImage

put the loc of pImage into pLocation

set the filename of pImage to 
"https://i.ytimg.com/vi/KO3l3-4pFyo/default.jpg;


--set the filename of pImage to 
"https://i.ytimg.com/vi/KO3l3-4pFyo/hqdefault.jpg;

set the loc of pImage to pLocation

end mouseup

USE CASE:

1) eliminate top and bottom letter boxing on YouTube thumbnails. Easy done on 
web with CSS, not easy in LC
2) They provide a 4x3 by ratio
3) But when you post an HD video, thumbnail is 16x9, letterbox, top and bottom 
(45 pix of the hqdefault.jpg).
4) All youTube video channel thumbnails are letterboxed -- we don't 4X3 videos, 
ever...
6) "crop" command does on work with referenced images.
7) Look for a simple method that in the data grid takes up very little CPU time.
8) options
 a) seems like I could make a mask on top the image to eliminate the 
letterbox.
 b) other options?
9) we could go to the trouble to down load the thumb and crop and store them in 
/documents (mobile app); but there's no point: the user *has* to have a 
internet connection to use this module to view YouTube; and the call to 
https://i.ytimg.com is very fast, so why bother?

 Spotify does a similar thing: it has a generic icon until the album cover is 
loaded.

Any ideas?  Meanwhile I'll explored masking.

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: Cropping a referenced image

2018-08-14 Thread Sannyasin Brahmanathaswami via use-livecode
Scott Rossi's Method in masking0ption.livecode.

I can copy the group of

an image (car) with ink:blendSrcOver
and graphic ink:blendDstIn

into another stack

it appears fine.  but as soon and I "touch" in group edited, even if you keep 
them ink params the same, I get not mask! (9.0.1 RC1)

so... LC *can* display the original of  masked image but the IDE "wrecks" it


go stack url 
"http://wiki.hindu.org/uploads/maskingoptions.livecode;<http://wiki.hindu.org/uploads/maskingoptions.livecode>

BR

On 8/14/18 4:55 AM, Sannyasin Brahmanathaswami via use-livecode wrote:

[sending this again, because it was rolled in another thread/conversation by 
the mail list}

#test

on mouseup

put the long id of img "thumbTemplate" into pImage

put the loc of pImage into pLocation

set the filename of pImage to 
"https://i.ytimg.com/vi/KO3l3-4pFyo/default.jpg;<https://i.ytimg.com/vi/KO3l3-4pFyo/default.jpg><https://i.ytimg.com/vi/KO3l3-4pFyo/default.jpg><https://i.ytimg.com/vi/KO3l3-4pFyo/default.jpg><https://i.ytimg.com/vi/KO3l3-4pFyo/default.jpg><https://i.ytimg.com/vi/KO3l3-4pFyo/default.jpg><https://i.ytimg.com/vi/KO3l3-4pFyo/default.jpg><https://i.ytimg.com/vi/KO3l3-4pFyo/default.jpg>


--set the filename of pImage to 
"https://i.ytimg.com/vi/KO3l3-4pFyo/hqdefault.jpg;<https://i.ytimg.com/vi/KO3l3-4pFyo/hqdefault.jpg><https://i.ytimg.com/vi/KO3l3-4pFyo/hqdefault.jpg><https://i.ytimg.com/vi/KO3l3-4pFyo/hqdefault.jpg><https://i.ytimg.com/vi/KO3l3-4pFyo/hqdefault.jpg><https://i.ytimg.com/vi/KO3l3-4pFyo/hqdefault.jpg><https://i.ytimg.com/vi/KO3l3-4pFyo/hqdefault.jpg><https://i.ytimg.com/vi/KO3l3-4pFyo/hqdefault.jpg>

set the loc of pImage to pLocation

end mouseup

USE CASE:

1) eliminate top and bottom letter boxing on YouTube thumbnails. Easy done on 
web with CSS, not easy in LC
2) They provide a 4x3 by ratio
3) But when you post an HD video, thumbnail is 16x9, letterbox, top and bottom 
(45 pix of the hqdefault.jpg).
4) All youTube video channel thumbnails are letterboxed -- we don't 4X3 videos, 
ever...
6) "crop" command does on work with referenced images.
7) Look for a simple method that in the data grid takes up very little CPU time.
8) options
 a) seems like I could make a mask on top the image to eliminate the 
letterbox.
 b) other options?
9) we could go to the trouble to down load the thumb and crop and store them in 
/documents (mobile app); but there's no point: the user *has* to have a 
internet connection to use this module to view YouTube; and the call to 
https://i.ytimg.com is very fast, so why bother?

 Spotify does a similar thing: it has a generic icon until the album cover is 
loaded.

Any ideas?  Meanwhile I'll explored masking.

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: Getting Started with DataGrid and another datagrid form

2018-08-06 Thread Sannyasin Brahmanathaswami via use-livecode
On 8/6/18 7:29 AM, zryip theSlug via use-livecode wrote:
> Bob,
>
> A column template exists for each column of a dg table, so you can use any
> control you want inside a datagrid column, including widgets.
>
> Here is a link to a DGH's screenshot . On the left, we have properties for
> a column (row or header). This is a datagrid table with two visible
> columns. The second column is displaying checkboxes, text, popup menus,
> images, widgets, etc depending of the property type. This is not a trick,
> this is perfectly supported by datagrid tables.
>
> https://livecode.com/wp-content/uploads/2018/06/image14-26.png
>
> On Mon, Aug 6, 2018 at 6:22 PM, Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> The template is like the group editor. In fact it may actually BE the
>> group editor. The behavior script determines what to do when a row is
>> drawn.
>>
>> I think the thing to understand about datagrids, table or forms, is that
>> for each array element in the data (itself an array) the template is
>> "cloned". Each row is a "clone" of the template. But for forms, the
>> behavior does not know what you want to do when the rows are created. For
>> instance, you may want to color negative numbers in red, or surround them
>> with parenthesis. You may have a button that needs to be hilited or not
>> depending on the value for that control. Perhaps you have a field that can
>> contain multiple lines of text, and you need to set the row height for each
>> row based upon the formattedHeight of that field. Or maybe show and hide
>> objects etc.
>>
>> The beauty of a form datagrid is that how each individual row gets drawn
>> is entirely under your own programmatical control. A table datagrid is
>> simply like a spreadsheet with fixed row heights and no support for
>> graphics or other controls.
>>
>> BTW I kinda cheated and made a way to have checkboxes for a table style
>> datagrid. I simply had a group with checkboxes overlaying a "dummy" column
>> in the datagrid. When I queried for data I put something like:
>>
>> SELECT '' AS checkmark, '' AS checkmarkvalue, * FROM customers
>>
>> This put two empty strings in my array data (I use sqlYoga so I get arrays
>> back instead of cursors, but the idea is the same). I only defined a column
>> for "checkmark", but NOT for "checkmarkvalue". This allowed me to have a
>> blank column to overlay the checkboxes on, and a hidden column to hold the
>> checkmarkvalue for each row in the datagrid data.
>>
>> Then when I populated the datagrid, I hid all the checkboxes then showed
>> each checkbox control based upon how much data was being displayed. Of
>> course, you have to account for scrolling, so that can be tricky, but it
>> was a poor man's way of adding checkboxes to a table datagrid. Others could
>> probably come up with a more elegant solution.
>>
>> Bob S
>>
>>
>>> On Aug 5, 2018, at 10:03 , Sannyasin Brahmanathaswami via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> I slowly studying as much as we can on the datagrid,and "digging" in it
>> with an first attempt to build a form.
>>> One thing is not clear to me.
>>>
>>> 1) Have the  WYSIG panel to build the datagrid form.
>>>
>>> 2) why then do we  have, in the Behavior Script  this handler?
>>>
>>> Isn't the layout already pre-determined in the template?
>>
>> ___
>> use-livecode mailing list
>> use-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


Datagrid -- Scrolling on Mobile

2018-08-20 Thread Sannyasin Brahmanathaswami via use-livecode
I am slowly getting up to speed with datagrid, I understand structure, the 
scripts of the row group, can instantiate data etc.

But, am I missing something?

http://lessons.livecode.com/m/datagrid

I can't find single lesson on implementing DG on mobile.

Scrolling on mobile -- do we do it the same way as other groups?

1) turn off scroll bars

2) CreateScroller etc (mobile library)

3) Does does Datagrid have it's own "mobile magic" scroller.

I use what looks like a "hackey" way to determine if a user is clicking  on a 
group, or is scrolling the group. Is it same for the DataGrid?

if abs(the mouseH - item 1 of sStartLoc) <= 10 and abs(the mouseV - item 2 of 
sStartLoc) <= 10 then

portal_setCurrent (the short name of this card)

put the short name of the target into tRow

set the itemDelimiter to "_"

put item 1 of tRow into tLinkNo

if tLinkNo is not a number then

exit mouseup

end if

put fld (tLInkNo &"_" &"portal-link-label") into tRowName

portal_DoRowLink tRowName


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: Set the backgroundcolor of all lines a field to null

2018-08-23 Thread Sannyasin Brahmanathaswami via use-livecode
Aloha Brian and Richard,

@ Brian "put styledText...into tTextA[snip]" looks excellent. It does it all on 
ram!

@ Richard

Again, we all appreciate the time you take to help us "understand the 
architecture"

The list is only 2000 lines, on into a field from a sqlLite list of audio 
file/Title.

That all happens "quickly" on mobile. But we all know that the

repeat with x=1 to (the number lines of fld "audioList")

on a field itself is slow, but on desktop I usual do in RAM first (per Brians 
solution)

But on mobile it produce a 800 second "wait" with the user clicked the list, to 
"unhilite" a previous title/selection

Also with 9.0.1.RC2  I was getting a new message from Android (did not happen 
on earlier versions) Android is attempting fill in the field, and when I click 
I get an unusual message from the OS.

App is not responding
Do you want to

Close the app [OR]
Wait

This is new to 9.0.1 RC 2 for this screen/UX

So I had to admit that my code is admittedly not well optimized. I began look 
around. And saw my old

repeat with x=1 to (the number lines of fld "audioList")

Thinking that was causing the app to "not respond" while it was the setting the 
color of line of everyline.  Aha I thought, "That's is: I am iterate through 
each line in the field itself!"

then I posted my question to the list...

Meanwhile I created a local variable and now store the Current hilitedline. No 
more "going through the whole field"

And *still* I get the msg

App is not responding
Do you want to

Close the app [OR]
Wait

but now I can click "Wait" the dialog disappeared at the change of color works 
as expect and the player started on change of Audio right was. So where it  
mysterious dialog is coming from?

= For the "architecture" discussion:

 Having to generate "setters and getters" of local variable is tedious, and 
sometimes would nice have a global method. I keep thinking my attempt to use 
"chains" of nested behavior in this case (had not done it before) look 
interesting, but sometimes I think one long behavior is better. Like the old 
"one stack script for everything" approach.

As it stands, if you do not want to use global (who does!), for one "module" / 
stack with 3-4 behaviors, that need one value (temporarily) there is no way to 
do it. The code become "tangled" because all 4 behaviors need to know about

local sSelectNum

and you start using "setters and getters"  all over the place


command setJournalFlag pFlag

put pFlag into sJournalFlag

end setJournalFlag

function getJournalFlag

return sJournalFlag

end getJournalFlag

Then if this is "child" behavior, in parent you have to issue a 
"getJournalFlag()" every time you need that value, and debugging gets "crazy" 
-- better to have in all in one behavior.



Now I'm back on "mysterious" Android dialog, I have no clue/way to debug that?



On 8/22/18 8:15 PM, Richard Gaskin via use-livecode wrote:

Sannyasin Brahmanathaswami wrote:

 > I have some big lists in mobile,

How big is "big"? 100 lines?  1,000?  1,000,000?


 > I sent the bkgndColor of certain
 > lines.
 >
 > Then I want clear that,
 >
 > How do we do this "for each line x"
 > which does not return the number of the line, but value
 >
 > command setAudioListColors pLineNum,pColor  # pass "4,"0,0,0"
 > #slow!
 >   repeat with x=1 to (the number lines of fld "audioList")
 >   set the backgroundcolor of line pLineNum of fld "audioList"
to pColor
 > end repeat
 > repeat for each line x in fld "audioList"
 > # need to get a line number and not its value
 >   set the backgroundcolor of line pLineNum of fld "audioList" to pColor
 > end repeat
 > end setAudioListColors


Your command takes a line number and a color, and applies that color to
that one line, yes?  If so, why loop at all?

As written, the code applies the color to the same line over and over
for the number of lines in the field.

Maybe pLineNum could contain a list of line numbers?

If so, iterate through it rather than through the field, since chances
are you're only setting the color of a subset of all lines in the field.
Locking the screen first will speed that up even more.

But faster still will likely be to follow Brian's guidance on
styledText.  With that you probably don't even want to lock the field,
since all the changes are done in a variable outside the field, and the
variable is set back into the field only once at the end.

But once we understand what's needed, the speed difference may not
matter much. Or it might. It depends on how big "big" is.

If you want to clear everything at once:

   set the backgroundColor of line 1 to -1 of fld "audioList" to empty

All this is just guessing, though.  I'm not really sure what this
handler should do.


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



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please 

Set the backgroundcolor of all lines a field to null

2018-08-22 Thread Sannyasin Brahmanathaswami via use-livecode
I have some big lists in mobile, I sent the bkgndColor of certain lines.


Then I want clear that,

How do we do this "for each line x"

which does not return the number of the line, but value

command setAudioListColors pLineNum,pColor  # pass "4,"0,0,0"

#slow!

  repeat with x=1 to (the number lines of fld "audioList")

  set the backgroundcolor of line pLineNum of fld "audioList" to pColor

end repeat

repeat for each line x in fld "audioList"

# need to get a line number and not its value

  set the backgroundcolor of line pLineNum of fld "audioList" to pColor

end repeat

end setAudioListColors


___
use-livecode mailing list
use-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-23 Thread Sannyasin Brahmanathaswami via use-livecode
This thread will never finish (hehe)

I am still have trouble getting  the two object in the stack in place when we 
open stack on mobile.

The resize handlers wrok, and soon as we rotate the phone and back and geometry 
is implemented.

But not on open stack..

So I use your script. I was not orienting the stack size against the screenrect 
first.

Still not go:

on preopenstack

if isMobile() then

mobileSetAllowedOrientations "portrait,portrait upside down,landscape 
left,landscape right"

setupStackRect

end if

end preopenstack

--

# Geometry

on orientationChanged

-- setupStackRect

end orientationChanged

on setupStackRect pWidth,pHeight

if pWidth="" and pHeight="" then

put the effective working screenRect into tRect

set the rect of this stack to tRect

set the topLeft of this stack to item 1 to 2 of tRect

else

put the rect of this stack into tRect

put tWidth into item 3 of tRect

put tHeight into item 4 of tRect

set the rect of this stack to tRect

end if

set bottom of group "footer" to item 4 of tRect

set loc group "footer" to ( (item 2 of tRect)/2,(item 4 of tRect)/25 )

subtract 50 from item 4 of tRect

set the rect of widget "body" to tRect

end setupStackRect

on resizeStack pNewWidth, pNewHeight, pOldWidth, pOldHeight

# check it is landscape, turn off the navigation Bar

if pNewWidth > pNewHeight then -- landscape

put 0, 0, pNewWidth, pNewHeight into tBrowserRect

set loc widget "body" to (pNewWidth/2,pNewHeight/2)

hide group "footer"

else

put 0, 0, pNewWidth, pNewHeight - 50 into tBrowserRect

set loc group "footer" to (pNewWidth/2,pNewHeight-25)

show group "footer"

end if

set the rect of widget "body" of me to tBrowserRect

end resizeStack



On 8/23/18 2:21 AM, FlexibleLearning.com via use-livecode wrote:

Coming in late to the thread, but would this not work on all platforms?

on preOpenStack
  setupStackRect
end preOpenStack

on orientationChanged
  --  setupStackRect
end orientationChanged

on setupStackRect pWidth,pHeight
  if pWidth="" and pHeight="" then
put the effective working screenRect into tRect
set the rect of this stack to tRect
set the topLeft of this stack to item 1 to 2 of tRect
  else
put the rect of this stack into tRect
put tWidth into item 3 of tRect
put tHeight into item 4 of tRect
set the rect of this stack to tRect
  end if
end setupStackRect

You would obviously need to handle individual control geometry as needed,
but I found using a (hidden) master group of template graphics to define
regions a straightforward way to implement consistent geometry settings...

Set [the geometry] of [object] to [the geometry] of [graphic]
e.g. set the topleft of fld "About" to the topLeft of grc "template_Body"

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


<    1   2   3   4   5   6   7   8   9   10   >