Re: fullscreenmode and rect of a substack on mobile device ?

2018-08-18 Thread Brian Milby via use-livecode
@Sannyasin

Something just clicked... if fullscreenmode is not empty, then resizestack
messages are not generated.  Which is part of why the new commands were
created.  For what you want with the browser, your handlers should be very
simple.  Here's what I came up with to put the browser widget and a nav bar
on a card.  I didn't need to mess with orientation changed messages at all
since the relative positions of everything is static.  Here's my very
simplified card script:

on preOpenCard
   if the environment is "mobile" then
  set the fullscreenmode of this stack to empty
   end if
   resizeStack the width of this stack, the height of this stack
end preOpenCard

on resizeStack pNewWidth, pNewHeight, pOldWidth, pOldHeight
   local tBrowserRect, tNavbarRect

   put 0, 0, pNewWidth, pNewHeight - 50 into tBrowserRect
   put 0, pNewHeight - 50, pNewWidth, pNewHeight into tNavbarRect

   lock screen
   set the rect of widget "Browser" of me to tBrowserRect
   set the rect of widget "Navigation Bar" of me to tNavbarRect
   unlock screen
end resizeStack

I tested it out on my iPhone and it seemed to work well.  (The preOpenCard
resizeStack is needed or else the card will be displayed in whatever size
it was originally developed in at the top left of the screen.)

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


Re: fullscreenmode and rect of a substack on mobile device ?

2018-08-18 Thread J. Landman Gay via use-livecode

On 8/18/18 7:52 PM, J. Landman Gay via use-livecode wrote:
Actually, the rect of the stack remains constant in fullscreenmode, you 
don't need to account for the engine resizing. All placement 
calculations can be done normally. That's one of the beauties of it.


I didn't express this exactly right -- it remains constant in that the 
rect of the stack represents the current on-screen rect rather than the 
size it was created at.


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

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


Re: Socket questions

2018-08-18 Thread Mark Wieder via use-livecode

On 08/18/2018 01:38 PM, Douglas Ruisaard via use-livecode wrote:


However, if I substitute "www.googleXXX.com:80" as the socket ID (or distort *my* ESP8266 
ID to a non-existent one), I would have expected some sort of error message... trapped by the 
"socketError" handler ... but I get nothing.


That's a dns lookup failure, which won't get as far as a socketError 
message. What you should get instead is a non-empty result message from 
the openSocket command. I can't comment on tsNet, but libUrl has never 
to my recollection actually done this correctly.


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

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


Re: Split an Array to Numeric with 2 Dimensions

2018-08-18 Thread Monte Goulding via use-livecode
I think what you are after is an enhancement request here 
https://quality.livecode.com/show_bug.cgi?id=9950 


For now you would need to use numeric keys for the columns:

split theList by return and “|”
put theList[2][1] -> orange

> On 19 Aug 2018, at 2:43 am, Sannyasin Brahmanathaswami via use-livecode 
>  wrote:
> 
> I decide to study up to improve my array management skills. Looked up the 
> dictionary: element, columnDel, RowDelimiter etc Tools I never used.  But I 
> can't fine a "one pass" split that takes a dBase dump like this and makes a 
> 2nd  dimension. Other than to do it "manually"
> 
> Also I thought, after reading the dictionary, that the "element" would be "1" 
> in
> 
> uDataArray[1][someValue]
> 
> But instead I was getting "someValue" -- so I am not understanding something 
> there.
> 
> =
> 
> apples|https://www.washington.com/neutral 
> 
> orange|https://www.california.com|citrus 
> 
> peaches|https://www.idaho.com|sweet 
___
use-livecode mailing list
use-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: Navigator 6.0 Alpha 4

2018-08-18 Thread Geoff Canyon via use-livecode
I’ll have a look when I’m back at my laptop. 

gc

> On Aug 18, 2018, at 10:30 AM, Douglas Ruisaard via use-livecode 
>  wrote:
> 
> Geoff...
> 
> Excellent tool but I can't seem to get it to display one of the "cards" of a 
> Data Grid template.  In a "standard" DataGrid Form object, Card Id's 1002 and 
> 1005 are created.
> 
> According to the LC Project Browser, which identifies iconically and 
> positionally  the "Data Grid Template xx" as a "card" (although its 
> Property sees it as a stack) ... and which Navigator correctly identifies it 
> as a stack ... there is a Card id 1005 which contains a few objects, 
> including the Behavior Script of the grid.
> 
> Card 1005 does NOT appear in Navigator... or at least I can't find a way to 
> get it to appear.
> 
> Any suggestions?
> 
> Douglas Ruisaard
> Trilogy Software
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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

Re: fullscreenmode and rect of a substack on mobile device ?

2018-08-18 Thread J. Landman Gay via use-livecode
Actually, the rect of the stack remains constant in fullscreenmode, you 
don't need to account for the engine resizing. All placement calculations 
can be done normally. That's one of the beauties of it.


Handling dynamic placement is no different than without fullscreenmode, 
except that you don't need to worry about ratios, resolution, or any of that.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On August 18, 2018 1:48:09 PM Richard Gaskin via use-livecode 
 wrote:


Without fullScreenMode it's as simple as:

get the rect of this stack

FullScreenMode makes handling dynamic layout details complex.





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


Socket questions

2018-08-18 Thread Douglas Ruisaard via use-livecode


Experimenting with sockets in LC .. Windows 7 Pro, LC v8.1.9.  I have tsnet 
working fine in another project but tsnet appears to be primarily for "sending" 
stuff (sorry for the technical jargon).  Of course, tsnet can read after it 
sends a request.  However, sockets let me simply open and READ messages, which 
is what I need in this particular setting.

I am using a very simple stack with one card and one button on that card with 
my code at the end of this message.  The "strange" URL ("Kitchen.local:80") is 
the assigned ID for an ESP8266 WiFi module.

This script works fine if the module is "on-line" and responding .. returns the 
following from the code running on the ESP8266, as expected:

Data read from socket Kitchen.local:80
HTTP/1.0 200 OK
Content-Type: Kitchen.local/getinterrupt ... NO interrupts ... |2018 8 18|10 49 
14|Saturday
Content-Length: 0
Connection: close
going to sleep

ps.. I am "mis-using" some of the HTML fields for different "content" than 
normal.. but this is OK and works according to my needs.. not the issue here.

If I substitute "www.google.com:80" as the socket ID, the "socketTimeout" 
messages gets generated.  That's fine.  I'm certain Google does not generate an 
output with "sleep" in it.

However, if I substitute "www.googleXXX.com:80" as the socket ID (or distort 
*my* ESP8266 ID to a non-existent one), I would have expected some sort of 
error message... trapped by the "socketError" handler ... but I get nothing.

I can't seem to get the "socketError" message (or "socketClosed" message for 
that matter) to trigger at all.  What I'm REALLY looking for is a "timeout" 
message, ideally... but a "no connect" or "no such socket" would be fine too.  
But "crickets"...

I know that the "socketTimeout" only gets generated after a successful socket 
open.

Any help would be greatly appreciated!



local thisSocket, timeoutCount

on mouseUp
 put empty
  put "Kitchen.local:80" into thisSocket
  //put "www.google.com:80" into thisSocket
  put 5 into timeoutCount
 
 set the socketTimeoutInterval to 2000
 open socket to thisSocket
 read from socket thisSocket until "sleep" with message 
"socketFinishedReading"
 
end mouseUp

on socketFinishedReading pSocketID pDataIn
 put "Data read from socket" && pSocketID & return & pDataIn
 close socket thisSocket
end socketFinishedReading

on socketTimeout theID
 put empty
 wait 100 milliseconds with messages
 put  "The connnection: " & theID & " is not responding."
 subtract 1 from timeoutCount
 if timeoutCount < 1 then
  close Socket theID
 end if 
end socketTimeout

on socketError theID, theError
 answer error "There is a problem with connection: " & theID & "Error: " & 
theError
 close socket theID
end socketError

on socketClosed theID
 answer warning "connection: " & theID & " has been closed"
end socketClosed


Douglas Ruisaard
Trilogy Software




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

2018-08-18 Thread Mike Kerner via use-livecode
It's a different audience.  Choose wisely.
___
use-livecode mailing list
use-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-18 Thread Brian Milby via use-livecode
Here is the card script that I just tested on iOS.  It will rotate a two
object card between portrait/landscape on my phone with no issues.  It
handles either orientation as the initial orientation.

local sOrientation, sLongSide, sShortSide

on preOpenCard
   local tScreenRect

   if the environment is "mobile" then
  set the fullscreenmode of this stack to "noScale"
   end if

   -- get the dimensions of the current screen
   put the screenRect into tScreenRect

   -- figure out long/short sides
   if item 3 of tScreenRect > item 4 of tScreenRect then
  put item 3 of tScreenRect into sLongSide
  put item 4 of tScreenRect into sShortSide
   else
  put item 4 of tScreenRect into sLongSide
  put item 3 of tScreenRect into sShortSide
   end if

   put word 1 of mobileDeviceOrientation() into sOrientation
   if sOrientation is not in "portrait,landscape" then
  put "portrait" into sOrientation
   end if
   resizeStack
end preOpenCard


on orientationChanged
   local tNewOrientation

   put word 1 of mobileDeviceOrientation() into tNewOrientation
   if tNewOrientation is in "portrait,landscape" then
  put tNewOrientation into sOrientation
  resizeStack
   end if
end orientationChanged


on resizeStack pNewWidth, pNewHeight, pOldWidth, pOldHeight
   local tStackRect, tBrowserRect, tNavbarRect

   if sOrientation is "landscape" then
  put 0, 0, sLongSide, sShortSide into tStackRect
   else
  put 0, 0, sShortSide, sLongSide into tStackRect
   end if

   put tStackRect into tBrowserRect
   put item 4 of tStackRect - 50 into item 4 of tBrowserRect
   put tStackRect into tNavbarRect
   put item 4 of tBrowserRect into item 2 of tNavbarRect

   lock screen
   set the rect of this stack to tStackRect
   set the rect of widget "Browser" of me to tBrowserRect
   set the rect of widget "Navigation Bar" of me to tNavbarRect
   unlock screen
end resizeStack


On Sat, Aug 18, 2018 at 12:22 PM, Brian Milby  wrote:

> For your browser example, you probably want to use noScale. You just need
> to be sure you capture the rect at the right time. You don’t know the new
> rect until after the orientation changed handler ends. I’ll see if I can
> locate that stack example again that you put up. Unfortunately I can only
> test on iOS right now.
>
> One good thing I discovered is that the content inside the browser widget
> is always native resolution (at least I thought so). So the only part of
> the screen that would have distortion would be the elements outside the
> widget if you used exactFit. It sounds like that was not the case for you
> though.
>
> I agree... the fullScreenModes are most useful when you want the elements
> of the application to scale with the device size.
>
> Thanks,
> Brian
> On Aug 18, 2018, 11:37 AM -0500, Sannyasin Brahmanathaswami via
> use-livecode , wrote:
>
> I have a similar issue with a stack that
>
> a) contains a browser that wants to fill the entire screen (of any device)
> b) a tool bar on the bottom, the background ( 50 px wide) which to set to
> 2000 wide
> c) a 4 widget that appear on bottom on top to background.
>
> It should work on portrait and landscape
>
> That's it, not a complicated screen to layout, responsive... or so we
> thought
>
> Going around and around with this on support, I was using "show all"
> set at 414x736 (iPhone); and with Jacque's help to optimize my code
>
> This left pillar boxes left and right (show the stack/card color) on my
> Android.
>
> Using all the "new methods"
>
> mobileSetFullScreenRectForOrientations "portrait,portrait upside
> down","0,0,414,736"
>
> etc
>
> We were unable to gain programmatic control to use screenrect to fit the
> device.
>
> My Guess/I am wrong, HQ could let us know:
>
> seems the fullscreenmode[what-Ever-It-Is] will, at an engine level will
> override any attempt to do the simple "responsive" handlers of
>
> 
>
> # snip the orientation changed handlers,
>
> # but it all comes down to this:
>
> put the screenrect into tRect
>
> set rect to widget "browser" to \
>
> (item 1 of the tRect, item 2 of the tRect, item 3 of tRect, item 4 of
> tRect-50)
>
> 
>
> Support said
>
> use fullscreenmode "exactFit"
>
> Jacque predicted it would fail, all kinds of distortion. I used tried it,
> worked on the Pixel. (ratio of the widget at bottom barely noticeable) I
> happily deployed to my "nightly" branch
>
> When I finally dug out an iPad to test--oh horror, Jacque was right -- the
> widget and the bottom were all stretched out!
>
> So, I was stuck, went on another project, but I too would like to
>
> Ludovic THEBAULT wrote:
>
> How get the « real » rect of the stack ?
>
> is seems, if you want to do "responsive" design, that it will need to be
> done *without* using fullscreenmode, and do it by handling the screenrect
> yourself. Which defeats the purpose of fullScreenMode "help" for the
> developer.
>
> @Andy I will try the effective Screenrect to see what we get.
>
> BR
>
>
>
> 

Re: fullscreenmode and rect of a substack on mobile device ?

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

Ludovic THEBAULT wrote:

> I’ve a stack for phone and a substack for tablet (with iPad ratio,
> 1024*768). i use the fullscreenmode to « show all »
>
> On android tablet, the ratio height/width is sometimes very different
> from iPad.
> I tried to change the height of the substack before open it but with 
no luck :

>
> // in the openstack handler of the mainstack
> put item 3 of the screenrect into theight
> put item 4 of the screenrect into twidth
> put theight/twidth into tratio
> set the height of stack "substackTablet" to round(1024*tratio)
> mobileSetAllowedOrientations("portrait")
> open stack "substackTablet"
> set the fullscreenmode of stack  "substackTablet" to "showall"
> set the height of  grp "grpbackground"  of stack  "substackTablet" to 
round(1000*tratio)

>
>
> => as result, the top of the stack and the bottom of the stack aren’t
> the top and the bottom of the screen. If i want my background group
> cover all the screen i need to set this top to -200 for example.
>
> How get the « real » rect of the stack ?

Without fullScreenMode it's as simple as:

get the rect of this stack

FullScreenMode makes handling dynamic layout details complex.

It's well suited for certain types of games or multimedia presentations, 
such as Monument Valley.


In those types of layouts everything is stretched to fit, without 
needing dynamic placement of individual controls.


But consider the apps on your phone.  The ones I use the most are 
gMmail, Firefox, YouTube, Twitter, Instagram, LinkedIn, Skype, 
SimpleNote, Play Music, Nextcloud, Hangouts, Telegram, Maps, Calculator, 
Ingres, and a few others.


Every one of them uses dynamic positioning of the sort we've been doing 
in LiveCode for decades by responding to the resizeStack message.


I don't know what you're working on so I can't have an opinion of 
whether fullScreenMode is a good fit.


But in practice I so rarely see other apps use that sort of scaling that 
I don't think about fullScreenMode much at all.


Now that we've had several years since the LC team did a great job of 
delivering resolution independence, handling layouts in mobile is a 
breeze compared to the complex workarounds needed before.


With LC's logical pixels, have total control over our layouts to make 
optimal use of every precious pixel on small screens, all with no more 
work than we've already become accustomed to after years of scripting 
for resizable windows.


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

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

Re: Android compass question

2018-08-18 Thread Jonathan Lynch via use-livecode
Just a quick addendum to my last comment - I found an html5 online compass
demo that works well on the device. That means I might be able to use the
browser widget that displays the map to read the compass from the device.
If that works, I could reset the map heading inside the widget without
having to get data from LC.

That is actually a huge amount of work, and I hate to have to resort to
that, but having the heading jump around so much is just unworkable. I am
not sure how the browser can get a steady reading when LC is not getting a
steady reading from the system.

On Sat, Aug 18, 2018 at 2:06 PM Jonathan Lynch 
wrote:

> Hi Jacqueline,
>
> Thank you for this reply. I keep working with this issue, but I still
> cannot resolve it. When I put the Android phone down on a table, to be
> still, the compass heading from LC jumps up and down by as much as 10
> degrees - way too big of a range just to round.
>
> However, the compass app I downloaded on that same device is rock steady.
>
> I really wish it would just work, rather than having to massage the data
> from the device.
>
> On Mon, Aug 13, 2018 at 4:24 PM J. Landman Gay via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> On 8/11/18 3:34 PM, Jonathan Lynch via use-livecode wrote:
>> > I have a new galaxy phone. When I read the mobile compass, both
>> magnetic heading and true heading constantly change - even if the phone is
>> laying down still. It changes up and down randomly by 5 degrees or so. Does
>> anyone know if this is a problem with LC or with galaxy phones? My iPhone
>> does not do this.
>>
>> My Galaxy S5 does the same thing with a LC compass I made. My guess is
>> that's the way Android reads GPS data. When it tries to find my house,
>> it does a whole bunch of hops around the circumference before settling
>> down on the center, and even then it still twitches as it tries for more
>> accuracy.
>>
>> A compass I downloaded from the Play Store does not do that on my Pixel.
>> I'd guess that the app is doing some rounding to the nearest integer,
>> since it doesn't display fractional values.
>>
>> Try downloading a few of the dozens of compasses on the Play Store and
>> see how they behave. It may be that LC is actually more precise than you
>> want it to be. I do know that LC is only reporting what the OS tells it.
>>
>> --
>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>> HyperActive Software   | http://www.hyperactivesw.com
>>
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
> --
> Do all things with love
>


-- 
Do all things with love
___
use-livecode mailing list
use-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: logging

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

Mike Kerner wrote:

> I'm messing with the logger in levure, and looking for feedback,
> sample code, and thoughts others have from your own logging
> experience.
> • Formatting
> • Delimiters
> • Information you include
> • Targets (files, message box, dialogs, fields, etc.)

This conversation is replicated here:
https://forums.livecode.com/viewtopic.php?f=8&t=31415

I don't know where to reply.

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

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

Re: Android compass question

2018-08-18 Thread Jonathan Lynch via use-livecode
Hi Jacqueline,

Thank you for this reply. I keep working with this issue, but I still
cannot resolve it. When I put the Android phone down on a table, to be
still, the compass heading from LC jumps up and down by as much as 10
degrees - way too big of a range just to round.

However, the compass app I downloaded on that same device is rock steady.

I really wish it would just work, rather than having to massage the data
from the device.

On Mon, Aug 13, 2018 at 4:24 PM J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:

> On 8/11/18 3:34 PM, Jonathan Lynch via use-livecode wrote:
> > I have a new galaxy phone. When I read the mobile compass, both magnetic
> heading and true heading constantly change - even if the phone is laying
> down still. It changes up and down randomly by 5 degrees or so. Does anyone
> know if this is a problem with LC or with galaxy phones? My iPhone does not
> do this.
>
> My Galaxy S5 does the same thing with a LC compass I made. My guess is
> that's the way Android reads GPS data. When it tries to find my house,
> it does a whole bunch of hops around the circumference before settling
> down on the center, and even then it still twitches as it tries for more
> accuracy.
>
> A compass I downloaded from the Play Store does not do that on my Pixel.
> I'd guess that the app is doing some rounding to the nearest integer,
> since it doesn't display fractional values.
>
> Try downloading a few of the dozens of compasses on the Play Store and
> see how they behave. It may be that LC is actually more precise than you
> want it to be. I do know that LC is only reporting what the OS tells it.
>
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Do all things with love
___
use-livecode mailing list
use-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: Bluetooth detection and use?

2018-08-18 Thread Douglas Ruisaard via use-livecode
I'm always happy to see the Bluetooth topic "revived" for another exposure on 
this forum... since I also am quite interested in it.

I have been VERY successful in using the mergBLE library in LC for IOS (but it 
takes some getting used to) ... 

Unfortunately, it is exclusive to IOS which leaves desktop OS's and Android out 
in the cold.


Douglas Ruisaard
Trilogy Software
(250) 573-3935

> Date: Thu, 16 Aug 2018 16:46:54 +0200
> From: Graham Samuel 
> To: How to use LiveCode 
> Subject: Bluetooth detection and use?
> Message-ID: <979fee68-297b-4b66-b8c4-21c2e4c44...@mac.com>
> Content-Type: text/plain; charset=utf-8
> 
> After a long long interval of not really coding anything, I?m thinking of a 
> cross-platform app that
> uses Bluetooth devices. I see that mergNIC can tell me if my iOS has 
> something connected via
> Bluetooth, but that raises a lot more questions than it answers, such as 
> ?what kind of device have we
> here?? and ?oops, I?m on Android/ Mac/ PC, now what??, and ?glad we?re 
> connected, how do we actually
> read some data?"
> 
> Is anyone out there using Bluetooth, or is it not a suitable thing to mix 
> with LC?
> 
> TIA
> 
> Graham
> 


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


Navigator 6.0 Alpha 4

2018-08-18 Thread Douglas Ruisaard via use-livecode
Geoff...

Excellent tool but I can't seem to get it to display one of the "cards" of a 
Data Grid template.  In a "standard" DataGrid Form object, Card Id's 1002 and 
1005 are created.

According to the LC Project Browser, which identifies iconically and 
positionally  the "Data Grid Template xx" as a "card" (although its 
Property sees it as a stack) ... and which Navigator correctly identifies it as 
a stack ... there is a Card id 1005 which contains a few objects, including the 
Behavior Script of the grid.

Card 1005 does NOT appear in Navigator... or at least I can't find a way to get 
it to appear.

Any suggestions?

Douglas Ruisaard
Trilogy Software




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

2018-08-18 Thread Mike Kerner via use-livecode
Really?  I thought you just added more bar oil, or ground the gages down a
bit more.

On Sat, Aug 18, 2018 at 12:33 PM Alex Tweedly via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Ah, let's see 
>
> Hardwoods burn better than soft, but you gotta keep the chainsaw really
> sharp.
>
> -- Alex.
>
>
> On 18/08/2018 17:06, Mike Kerner via use-livecode wrote:
> > I'm messing with the logger in levure, and looking for feedback, sample
> > code, and thoughts others have from your own logging experience.
> > • Formatting
> > • Delimiters
> > • Information you include
> > • Targets (files, message box, dialogs, fields, etc.)
> >
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: fullscreenmode and rect of a substack on mobile device ?

2018-08-18 Thread Brian Milby via use-livecode
For your browser example, you probably want to use noScale. You just need to be 
sure you capture the rect at the right time. You don’t know the new rect until 
after the orientation changed handler ends. I’ll see if I can locate that stack 
example again that you put up. Unfortunately I can only test on iOS right now.

One good thing I discovered is that the content inside the browser widget is 
always native resolution (at least I thought so). So the only part of the 
screen that would have distortion would be the elements outside the widget if 
you used exactFit. It sounds like that was not the case for you though.

I agree... the fullScreenModes are most useful when you want the elements of 
the application to scale with the device size.

Thanks,
Brian
On Aug 18, 2018, 11:37 AM -0500, Sannyasin Brahmanathaswami via use-livecode 
, wrote:
> I have a similar issue with a stack that
>
> a) contains a browser that wants to fill the entire screen (of any device)
> b) a tool bar on the bottom, the background ( 50 px wide) which to set to 
> 2000 wide
> c) a 4 widget that appear on bottom on top to background.
>
> It should work on portrait and landscape
>
> That's it, not a complicated screen to layout, responsive... or so we 
> thought
>
> Going around and around with this on support, I was using "show all"
> set at 414x736 (iPhone); and with Jacque's help to optimize my code
>
> This left pillar boxes left and right (show the stack/card color) on my 
> Android.
>
> Using all the "new methods"
>
> mobileSetFullScreenRectForOrientations "portrait,portrait upside 
> down","0,0,414,736"
>
> etc
>
> We were unable to gain programmatic control to use screenrect to fit the 
> device.
>
> My Guess/I am wrong, HQ could let us know:
>
> seems the fullscreenmode[what-Ever-It-Is] will, at an engine level will 
> override any attempt to do the simple "responsive" handlers of
>
> 
>
> # snip the orientation changed handlers,
>
> # but it all comes down to this:
>
> put the screenrect into tRect
>
> set rect to widget "browser" to \
>
> (item 1 of the tRect, item 2 of the tRect, item 3 of tRect, item 4 of 
> tRect-50)
>
> 
>
> Support said
>
> use fullscreenmode "exactFit"
>
> Jacque predicted it would fail, all kinds of distortion. I used tried it, 
> worked on the Pixel. (ratio of the widget at bottom barely noticeable) I 
> happily deployed to my "nightly" branch
>
> When I finally dug out an iPad to test--oh horror, Jacque was right -- the 
> widget and the bottom were all stretched out!
>
> So, I was stuck, went on another project, but I too would like to
>
> Ludovic THEBAULT wrote:
>
> How get the « real » rect of the stack ?
>
> is seems, if you want to do "responsive" design, that it will need to be done 
> *without* using fullscreenmode, and do it by handling the screenrect 
> yourself. Which defeats the purpose of fullScreenMode "help" for the 
> developer.
>
> @Andy I will try the effective Screenrect to see what we get.
>
> BR
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Split an Array to Numeric with 2 Dimensions

2018-08-18 Thread Sannyasin Brahmanathaswami via use-livecode
I decide to study up to improve my array management skills. Looked up the 
dictionary: element, columnDel, RowDelimiter etc Tools I never used.  But I 
can't fine a "one pass" split that takes a dBase dump like this and makes a 2nd 
 dimension. Other than to do it "manually"

Also I thought, after reading the dictionary, that the "element" would be "1" in

uDataArray[1][someValue]

But instead I was getting "someValue" -- so I am not understanding something 
there.

=

apples|https://www.washington.com/neutral

orange|https://www.california.com|citrus

peaches|https://www.idaho.com|sweet

===

## this works, but I wonder if it is optimal.

local aSetUp,aDataArray

put [thelist] into aSetUp

put "fruit" into t1Element

put "url" into t2Element

put "category" into t3Element

split aSetup by cr

set itemdel to "|"

Repeat for each line x in (the keys of aSetup)

put item 1 of aSetUp[x] into aDataArray[x][t1Element]

put item 2 of aSetUp[x] into aDataArray[x][t2Element]

put item 3 of aSetUp[x] into aDataArray[x][t3Element]

end repeat


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

2018-08-18 Thread Sannyasin Brahmanathaswami via use-livecode
I have a similar issue with a stack that

a) contains a browser that wants to fill the entire screen (of any device)
b) a tool bar on the bottom, the background ( 50 px wide) which to set to 2000 
wide
c) a 4 widget that appear on bottom on top to background.

It should work on portrait and landscape

That's it, not a complicated screen to layout, responsive... or so we 
thought

Going around and around with this on support, I was using "show all"
set at 414x736 (iPhone); and with Jacque's help to optimize my code

This left pillar boxes left and right (show the stack/card color) on my Android.

Using all the "new methods"

mobileSetFullScreenRectForOrientations "portrait,portrait upside 
down","0,0,414,736"

etc

We were unable to gain programmatic control to use screenrect to fit the device.

My Guess/I am wrong, HQ could let us know:

seems the  fullscreenmode[what-Ever-It-Is] will, at an engine level will 
override any attempt to do the simple "responsive" handlers of



# snip the orientation changed handlers,

# but it all comes down to this:

put the screenrect into tRect

set rect to widget "browser" to \

(item 1 of the tRect, item 2 of the tRect, item 3 of tRect, 
item 4 of tRect-50)



Support said

use fullscreenmode "exactFit"

Jacque predicted it would fail, all kinds of distortion. I used tried it, 
worked on the Pixel. (ratio of the widget at bottom barely noticeable) I 
happily deployed to my "nightly" branch

When I finally dug out an iPad to test--oh horror, Jacque was right -- the 
widget and the bottom were all stretched out!

So, I was stuck, went on another project, but I too would like to

 Ludovic THEBAULT  wrote:

How get the « real » rect of the stack ?

is seems, if you want to do "responsive" design, that it will need to be done 
*without* using fullscreenmode, and do it by handling the screenrect yourself.  
Which defeats the purpose of fullScreenMode  "help" for the developer.

 @Andy  I will try the effective Screenrect to see what we get.

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

2018-08-18 Thread Alex Tweedly via use-livecode

Ah, let's see 

Hardwoods burn better than soft, but you gotta keep the chainsaw really 
sharp.


-- Alex.


On 18/08/2018 17:06, Mike Kerner via use-livecode wrote:

I'm messing with the logger in levure, and looking for feedback, sample
code, and thoughts others have from your own logging experience.
• Formatting
• Delimiters
• Information you include
• Targets (files, message box, dialogs, fields, etc.)




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

logging

2018-08-18 Thread Mike Kerner via use-livecode
I'm messing with the logger in levure, and looking for feedback, sample
code, and thoughts others have from your own logging experience.
• Formatting
• Delimiters
• Information you include
• Targets (files, message box, dialogs, fields, etc.)

-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: fullscreenmode and rect of a substack on mobile device ?

2018-08-18 Thread AndyP via use-livecode
you could try using either the working or effective adjectives before the
screenRect

working ScreenRect

effective screenRect

to see if you get better results?

from the dictionary

/Adding the working adjective to either form returns the virtual
co-ordinates of each screen's working-area. The working-area of a screen is
defined to be the area not covered by OS furniture (such as the task bar on
Windows, and the Dock and Menubar on Mac OS X).

Adding the effective adjective to either form returns the area of the screen
the application has to itself. In particular, if the keyboard is activated,
it take into account if the keyboard is taking up space on the screen.
(Android and iOS only)

Note: The co-ordinates returned by the screenRect family of functions can be
anywhere in the virtual desktop /





-
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


fullscreenmode and rect of a substack on mobile device ?

2018-08-18 Thread Ludovic THEBAULT via use-livecode
Hello,

I’ve a stack for phone and a substack for tablet (with iPad ratio, 1024*768).
i use the fullscreenmode to « show all »

On android tablet, the ratio height/width is sometimes very different from iPad.
I tried to change the height of the substack before open it but with no luck :

// in the openstack handler of the mainstack
put item 3 of the screenrect into theight

put item 4 of the screenrect into twidth

put theight/twidth into tratio

set the height of stack "substackTablet" to round(1024*tratio) 

mobileSetAllowedOrientations("portrait")

open stack "substackTablet"

set the fullscreenmode of stack  "substackTablet" to "showall"

set the height of  grp "grpbackground"  of stack  "substackTablet" to 
round(1000*tratio) 


=> as result, the top of the stack and the bottom of the stack aren’t the top 
and the bottom of the screen. If i want my background group cover all the 
screen i need to set this top to -200 for example.

How get the « real » rect of the stack ?

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