Re: Pasting tabs into Excel

2018-02-02 Thread Matthias Rebbe via use-livecode
Hi,

i cannot reproduce that here on Mac OS X and Excel 2016 (V 15.30).
I executed your sample code in the messagebox and was able to paste 
successfully the clipboard to Excel.
I even tried with alpha numeric values.

But what i noticed is the following:
When i just click on a cell, so that it is selected without showing the 
blinking write cursor in the cell, then pasting is working w/o problems.

When i double click a cell, so that it is selected and the blinking write 
cursor is shown, then i cannot paste it correctly.

Tried with LC 8.19RC2 and LC9DP11.

Will try on Windows later this day.


Regards,
Matthias


> Am 03.02.2018 um 05:19 schrieb J. Landman Gay via use-livecode 
> >:
> 
> Someone asked me this and I don't have an answer:
> 
> Before LC 8, you could put tabbed strings into the clipboard, paste into 
> Excel or Google Sheets, and each tabbed item would go into a separate cell. 
> After LC 8, the tabbed items go into a single cell as one string.
> 
> How can we make Excel recognize the tabs?
> 
> For example:
> 
>put 1 & 2 & 3 into temp
>set the clipboardData["text"] to temp
> 
> -- 
> 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

___
use-livecode mailing list
use-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: Pasting tabs into Excel

2018-02-02 Thread Mike Bonner via use-livecode
It's strange. If you paste into excel, then select the cell and use the
text to columns tool, using Space as delimiter, poof. Columns.  Also, in
libreoffice, paste special can be used to choose "unformatted text" and
that works also.  Surely there is a way to pop a simple tab delimited
string into the clipboard and have it just work..

On Fri, Feb 2, 2018 at 10:22 PM, dunbarx via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Jacque.
>
> As if you needed this, confirmed here.
>
> What on earth can v.8 be doing to the tab character???
>
> Craig
>
>
>
> --
> 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: Pasting tabs into Excel

2018-02-02 Thread dunbarx via use-livecode
Jacque.

As if you needed this, confirmed here.

What on earth can v.8 be doing to the tab character???

Craig



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


Pasting tabs into Excel

2018-02-02 Thread J. Landman Gay via use-livecode

Someone asked me this and I don't have an answer:

Before LC 8, you could put tabbed strings into the clipboard, paste into 
Excel or Google Sheets, and each tabbed item would go into a separate 
cell. After LC 8, the tabbed items go into a single cell as one string.


How can we make Excel recognize the tabs?

For example:

put 1 & 2 & 3 into temp
set the clipboardData["text"] to temp

--
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: any tricks to make SHELL non blocking?

2018-02-02 Thread Dr. Hawkins via use-livecode
On Fri, Feb 2, 2018 at 1:41 PM, Klaus major-k via use-livecode <
use-livecode@lists.runrev.com> wrote:

>
> Any hints on how to make this NON blocking somehow?
> I need a solution for Mac and Win.
>
> I don''t know  about darkside machines, but on  \begin{condescending
snark} mac and other real operating systems \end{snark}, you can launch
commands into the background by suffixing  with  &

You may (or may not; it was years ago) need to enclose the command  in
parenthesis, which makes the whole parenthetical a block.  You might also
need to redirect output.

 so

shell ( "(domycommand > myoutput &)"  )

or something like that, and come back later to check myoutput



-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-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: FormattedHeight of a field and its contents

2018-02-02 Thread David Epstein via use-livecode
Thanks for the responses on this.  I used Bernd’s tool and did some more tests, 
and found some things that may be helpful to others.

While the left and right margins of a field are meant literally (a 5 pixel left 
margin leaves 5 white pixels to the left of the text), the top margin is more 
complicated, no doubt owing to the variety of textHeights that need to be 
accommodated.  For example, a margin of "0" will often clip the top of the 
text--as if "0" meant a "negative margin".

6 seems to be a magic default value for a field's top margin, which avoids 
clipping the content.  With horizontal gridlines visible, a 6 pixel buffer 
makes the top row the same height as the other rows.  And with a 6 pixel buffer 
the formattedHeight of the field will exactly match the formattedHeight of the 
field's content (although a non-zero borderwidth or a horizontal scrollbar 
changes this).

Thus--what I wondered about in my original post--with a margin less than 6 the 
formattedHeight of the field is less than the formattedHeight of the content; 
the content is in effect clipped.  At smaller textHeights this will be visible, 
while at larger textHeights only white space above the characters is clipped.

I was trying to answer two questions, and I think I'm pretty close.

1. How do I make sure that the field's contents are all visible if I set the 
field's height to the formattedHeight?  Answer: Set the top and bottom margins 
to 6. For the left and right margins, even 1 pixel should be enough to keep 
everything visible.

2. What margins will provide a symmetrical look for a text box?
A top margin of 6 doesn’t look like a 6 pixel margin; how it looks depends on 
the textHeight.  I estimate that its apparent height is one fourth of the 
effective textHeight, and I use this to size the other margins in the 
“tightMargins” handler below.
While the top margin of 6 looks good with horizontal gridlines, without them 
(and especially if you show a text baseline) it looks too small compared to the 
space between subsequent lines.  To match that larger space, in effect doubling 
the apparent top margin, add one third of the effective textHeight.  See 
“niceMargins” handler below.

Example of usage:
set the margins of fld 1 to the niceMargins of fld 1
set the height of fld 1 to the formattedHeight of fld 1

getProp niceMargins
   put the effective textHeight of the target into t
   put round(t*7/12) into m1
   put round(t/3) into m2
   return m1,6+m2,m1,m1
end niceMargins

getProp tightMargins
   put round(.25*the effective textHeight of the target) into m
   return m,6,m,max(6,m)
end tightMargins

Improvements to these are welcomed.

David Epstein


___
use-livecode mailing list
use-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: RevQueryDatabase error in standalone

2018-02-02 Thread Bob Sneidar via use-livecode
Belay that. Openstack happens first no matter what. I think at this point I 
will use it only as a utility for resizing windows when things have been 
rearranged, or a new form is created and I need to clean it up a bit. 

Bob S


> On Feb 2, 2018, at 16:11 , Bob Sneidar via use-livecode 
>  wrote:
> 
> A while back I posted there was a difference between Windows and Mac as to 
> when certain messages were sent first, but I think now it may actually be a 
> difference between IDE and Standalone. 
> 
> I will investigate further, now I know where to look. 
> 
> 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: RevQueryDatabase error in standalone

2018-02-02 Thread Bob Sneidar via use-livecode
pCardID contains the long ID of the card that called it. Remember it works 
perfectly in the IDE, so it's doubtful there are any syntactical errors. I am 
vaguely remembering that there are times when openCard is triggered first and 
openstack at other times. If openCard gets triggered first when opening the 
mainstack, none of the libraries (like the utilities backscript containing 
virtually EVERYTHING that makes the stack work) will get loaded. 

A while back I posted there was a difference between Windows and Mac as to when 
certain messages were sent first, but I think now it may actually be a 
difference between IDE and Standalone. 

I will investigate further, now I know where to look. 

Bob S


> On Feb 2, 2018, at 10:26 , Mark Wieder via use-livecode 
>  wrote:
> 
> On 02/02/2018 09:37 AM, Bob Sneidar via use-livecode wrote:
>>put the short name of pCardID into tCardName
> 
> I don't think you can do that.
> Shouldn't that be "card id pCardID"?
> 
> -- 
> Mark Wieder


___
use-livecode mailing list
use-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: any tricks to make SHELL non blocking?

2018-02-02 Thread hh via use-livecode
> Way cool, dude! 
> Voll krass, Alter! :-)

Yes. I once was also a young man with curly hair -- like you. are now ...

___
use-livecode mailing list
use-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: any tricks to make SHELL non blocking?

2018-02-02 Thread Klaus major-k via use-livecode
Hi Hermann,

> Am 03.02.2018 um 00:35 schrieb hh via use-livecode 
> :
> 
>> Klaus wrote:
>> ... it WORKS, thanks a lot!
> 
> How could you doubt that!?  :-(

sorry, really didn't mean it personally! ;-)

> I never post things that I didn't test thoroughly, learned that from 'bn'.
> In this case I looked into the script of my next Mac/Win/Linux/Raspi-stack 
> "timeLapseCamera" which runs since four days without problems.
> I have it running with up to 4 cheap USB-webcams at different repeat rates.
> There is no blocking with my tests even if they fire all at the same full
> second.

Way cool, dude! 
Voll krass, Alter! :-)


Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


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


Re: any tricks to make SHELL non blocking?

2018-02-02 Thread hh via use-livecode
> Klaus wrote:
> ... it WORKS, thanks a lot!

How could you doubt that!?  :-(
I never post things that I didn't test thoroughly, learned that from 'bn'.
In this case I looked into the script of my next Mac/Win/Linux/Raspi-stack 
"timeLapseCamera" which runs since four days without problems.
I have it running with up to 4 cheap USB-webcams at different repeat rates.
There is no blocking with my tests even if they fire all at the same full
second.




___
use-livecode mailing list
use-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: any tricks to make SHELL non blocking?

2018-02-02 Thread Paul Dupuis via use-livecode
On 2/2/2018 5:42 PM, Richard Gaskin via use-livecode wrote:
> Paul Dupuis wrote:
>
> > I don't think you can use shell as non-blocking. You could use 'open
> > process' to spawn your command line utility off as a subprocess which
> > would be non blocking, but that approach has its own over head thing
> > to work around
>
> What additional overhead is incurred by running a process via "open
> process" vs the shell function?
>
Correction, I wasn't speaking of 'overhead' as CPU overhead, but as
other things you may need to do as a developer. For example, shell()
nicely runs the app specified and returns any return value, where as
with 'open process' you need to also read from the process to get
returned data, close the process. Any helper app you install that you
call via open process (i.e. some app that is not already part of the OS
or installed software), you really need to code sign (a good practice
anyway) otherwise, assorted 3rd party security tools (mostly on Windows
like McAfee or Norton) are likely to interfere with your launching of
the app via open process by treating it as suspicious activity.

There are probably a few other detail I have forgotten as I wrote this.
We just went through this for a couple of HyperRESEARCH (our app) helper
apps (also LC standalones) that 4.0 of HyperRESEARCH communicates with.

FYI we found that interapp communication via sockets is more reliable
cross-platform that via interprocess communication, but at some real
world customer sites, security setting can prohibit socket communication
even to the same computer where as IPC still works, so an app that need
to be really really robust for real world installs may wish to include
code for both and swap from one to the other if one means of
communication fails.

-- Paul


___
use-livecode mailing list
use-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: any tricks to make SHELL non blocking?

2018-02-02 Thread Klaus major-k via use-livecode
Hi Hermann,

> Am 03.02.2018 um 00:02 schrieb Klaus major-k via use-livecode 
> :
> 
> Hi Hermann,
> 
>> Am 02.02.2018 um 23:53 schrieb hh via use-livecode 
>> :
>> 
>> This is non-blocking:
>> 
>> put tCommandLineUtility && q(tGeneratedFile) into p0
>> open process p0 for neither -- no need to close that
>> 
>> Don't use quotes for the utility.
>> You have no feedback with that. That's the advantage of shell.
> 
> just tested on my Mac, no luck.
> And "the result" = EMPTY

sorry, I had a typo in my script, it WORKS, thanks a lot!


Best

Klaus
--
Klaus Major
http://www.major-k.de
kl...@major-k.de


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


Re: any tricks to make SHELL non blocking?

2018-02-02 Thread Klaus major-k via use-livecode
Hi Hermann,

> Am 02.02.2018 um 23:53 schrieb hh via use-livecode 
> :
> 
> This is non-blocking:
> 
> put tCommandLineUtility && q(tGeneratedFile) into p0
> open process p0 for neither -- no need to close that
> 
> Don't use quotes for the utility.
> You have no feedback with that. That's the advantage of shell.

just tested on my Mac, no luck.
And "the result" = EMPTY

>> Klaus M. wrote:
>> Hi friends,
>> I have a command line utility which will process a generated file like:
>> ...
>> get shell(q(tCommandLineUtility) && q(tGeneratedFile))
>> ...
>> FYI:
>> function q tString
>> return QUOTE & tString & QUOTE
>> end q
>> Any hints on how to make this NON blocking somehow?
>> I need a solution for Mac and Win.
>> Thanks for any hint.

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


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


Re: any tricks to make SHELL non blocking?

2018-02-02 Thread Klaus major-k via use-livecode
Hello Hermann,

> Am 02.02.2018 um 23:53 schrieb hh via use-livecode 
> :
> 
> This is non-blocking:
> 
> put tCommandLineUtility && q(tGeneratedFile) into p0
> open process p0 for neither -- no need to close that
> 
> Don't use quotes for the utility.
> You have no feedback with that. That's the advantage of shell.

great, thank you, will try this tomorrow!

>> Klaus M. wrote:
>> Hi friends,
>> I have a command line utility which will process a generated file like:
>> ...
>> get shell(q(tCommandLineUtility) && q(tGeneratedFile))
>> ...
>> FYI:
>> function q tString
>> return QUOTE & tString & QUOTE
>> end q
>> Any hints on how to make this NON blocking somehow?
>> I need a solution for Mac and Win.
>> Thanks for any hint.

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


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


Re: any tricks to make SHELL non blocking?

2018-02-02 Thread Klaus major-k via use-livecode
Hi Phil,

> Am 02.02.2018 um 23:30 schrieb Phil Davis via use-livecode 
> :
> 
> Run it in a different app that you communicate with via sockets? Or maybe run 
> that app as a process?
> You said *any* hints, so... be careful what you ask for! :-)

yep, get it! :-D

> Phil Davis
> 
> On 2/2/18 1:41 PM, Klaus major-k via use-livecode wrote:
>> Hi friends,
>> I have a command line utility which will process a generated file like:
>> ...
>> get shell(q(tCommandLineUtility) && q(tGeneratedFile))
>> ...
>> FYI:
>> function q tString
>>  return QUOTE & tString & QUOTE
>> end q
>> 
>> Any hints on how to make this NON blocking somehow?
>> I need a solution for Mac and Win.
>> 
>> Thanks for any hint.

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


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


Re: any tricks to make SHELL non blocking?

2018-02-02 Thread hh via use-livecode
This is non-blocking:

put tCommandLineUtility && q(tGeneratedFile) into p0
open process p0 for neither -- no need to close that

Don't use quotes for the utility.
You have no feedback with that. That's the advantage of shell.

> Klaus M. wrote:
> Hi friends,
> I have a command line utility which will process a generated file like:
> ...
> get shell(q(tCommandLineUtility) && q(tGeneratedFile))
> ...
> FYI:
> function q tString
>  return QUOTE & tString & QUOTE
> end q
> Any hints on how to make this NON blocking somehow?
> I need a solution for Mac and Win.
> Thanks for any hint.

___
use-livecode mailing list
use-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: any tricks to make SHELL non blocking?

2018-02-02 Thread Richard Gaskin via use-livecode

Paul Dupuis wrote:

> I don't think you can use shell as non-blocking. You could use 'open
> process' to spawn your command line utility off as a subprocess which
> would be non blocking, but that approach has its own over head thing
> to work around

What additional overhead is incurred by running a process via "open 
process" vs the shell function?


--
 Richard Gaskin
 Fourth World Systems


___
use-livecode mailing list
use-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: any tricks to make SHELL non blocking?

2018-02-02 Thread Paul Dupuis via use-livecode
I don't think you can use shell as non-blocking. You could use 'open
process' to spawn your command line utility off as a subprocess which
would be non blocking, but that approach has its own over head thing to
work around


On 2/2/2018 4:41 PM, Klaus major-k via use-livecode wrote:
> Hi friends,
>
> I have a command line utility which will process a generated file like:
> ...
> get shell(q(tCommandLineUtility) && q(tGeneratedFile))
> ...
>
> FYI:
> function q tString
>  return QUOTE & tString & QUOTE
> end q
>
>
> Any hints on how to make this NON blocking somehow?
> I need a solution for Mac and Win.
>
> Thanks for any hint.
>
>
> Best
>
> Klaus
>
> --
> Klaus Major
> http://www.major-k.de
> kl...@major-k.de
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


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


Re: any tricks to make SHELL non blocking?

2018-02-02 Thread Phil Davis via use-livecode
Run it in a different app that you communicate with via sockets? Or 
maybe run that app as a process?


You said *any* hints, so... be careful what you ask for! :-)

Phil Davis



On 2/2/18 1:41 PM, Klaus major-k via use-livecode wrote:

Hi friends,

I have a command line utility which will process a generated file like:
...
get shell(q(tCommandLineUtility) && q(tGeneratedFile))
...

FYI:
function q tString
  return QUOTE & tString & QUOTE
end q


Any hints on how to make this NON blocking somehow?
I need a solution for Mac and Win.

Thanks for any hint.


Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


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



--
Phil Davis


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


any tricks to make SHELL non blocking?

2018-02-02 Thread Klaus major-k via use-livecode
Hi friends,

I have a command line utility which will process a generated file like:
...
get shell(q(tCommandLineUtility) && q(tGeneratedFile))
...

FYI:
function q tString
 return QUOTE & tString & QUOTE
end q


Any hints on how to make this NON blocking somehow?
I need a solution for Mac and Win.

Thanks for any hint.


Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


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


Re: RevQueryDatabase error in standalone

2018-02-02 Thread Mark Wieder via use-livecode

On 02/02/2018 09:37 AM, Bob Sneidar via use-livecode wrote:

put the short name of pCardID into tCardName


I don't think you can do that.
Shouldn't that be "card id pCardID"?

--
 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: RevQueryDatabase error in standalone

2018-02-02 Thread Bob Sneidar via use-livecode
Okay I found the issue with the standalone not building properly. I wrote a new 
handler to size a window based on the min/max left, top,right,bottoms of every 
visible object, so that the "air" or empty space is consistent for every stack 
opened. It *sorta* works, as long as the topmost and leftmost of the most 
extreme top left objects are where you want them to be. But that is neither 
here nor there. 

To do this more easily, I gather the rects of every object, along with a few 
other properties into an array, then convert the array to a memory database, 
where I can query it for the rect,visible and owner properties, excluding 
simple groups (not datagrids) and the menu group. The result is a text variable 
containing these properties of every object on a card that I queried for, and I 
can sort the lines by item 2,3,4 or 5 of each to get the min left and top, and 
the max right and bottom of all the objects. Good so far? 

All that works a peach in development mode. But in a standalone, something 
fails when the app launches AS A STANDALONE. If I open the mainstack in the 
standalone folder in the IDE, it ALSO runs fine, so it isn't that something is 
going wrong in the build process!!! Just not as a STANDALONE! 

Here is the code. After commenting out all the calls to this handler, the 
standalone works fine again. I am completely befuddled by this. If anyone can 
find fault in this code, which would ONLY cause a problem with a standalone, 
I'd love to hear it: 

on setWindowRect pCardID
   lock screen
   put the short name of pCardID into tCardName
   if not there is a card tCardName then return "ERROR: No Card ID supplied."
   put getParentStack(pCardID) into pStackID
   put the left of pStackID into tOldLeft
   put the top of pStackID into tOldTop
   put tOldLeft into item 1 of tOldTopLeft
   put tOldTop into item 2 of tOldTopLeft
   put the loc of pStackID into tOldLoc
   put "rect,visible,owner" into tPropList
   put getCardObjects(pCardID, tPropList) into aCardObjects
   put aCardObjects ["props"] into aObjectProperties
   put arrayToMemoryDB(aObjectProperties) into tDBID
   put "select * from arraydata where" into tQuery
   put " visible = 'true'" after tQuery
   put " AND (NOT controlname LIKE 'group " & quote & "grp%" & quote & "')" 
after tQuery
   put " AND (NOT controlname LIKE '%MainMenu%')" after tQuery
   put " AND (NOT owner LIKE  '%MainMenu%')" after tQuery
   if the environment is not "Development" then answer "about to query memory 
database."
   
   try
  put revDataFromQuery(comma,cr,tDBID,tQuery) into tQueryResults
   catch theError
  answer theError
   end try
   
   revCloseDatabase tDBID
   if the environment is not "Development" then answer "just queried memory 
database."
   sort tQueryResults numeric by item 2 of each
   put item 2 of line 1 of tQueryResults into minLeft
   sort tQueryResults numeric by item 3 of each
   put item 3 of line 1 of tQueryResults into minTop
   sort tQueryResults numeric descending by item 4 of each
   put item 4 of line 1 of tQueryResults into maxRight
   sort tQueryResults numeric descending by item 5 of each
   put item 5 of line 1 of tQueryResults into maxBottom
   subtract 26 from maxBottom -- Title Bar Height
   -- if the platform contains "MAC" then subtract 21 from maxBottom -- for 
menubar
   -- if the platform contains "WIN" then add 21 to maxBottom
   put minLeft + tOldLeft -30 into item 1 of tNewRect
   put minTop + tOldTop -45 into item 2 of tNewRect
   put maxRight + tOldLeft + minLeft into item 3 of tNewRect
   put maxBottom + tOldTop into item 4 of tNewRect
   set the rect of pStackID to tNewRect
   if the platform contains "WIN" then set the height of pStackID to the height 
of pStackID +21
   set the topLeft of pStackID to tOldTopLeft
   
   put the effective working screenrect into tScreenRect
   put rectWithin(tNewRect, tScreenRect) into tIsWithin
   
   if not tIsWithin then
  set the loc of pStackID to the screenLoc -- center window
   end if
   unlock screen
end setWindowRect


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


Standalone Building

2018-02-02 Thread Bob Sneidar via use-livecode
Hi all. 

On the issue of Standalone Building with a call to open stacks modally in a 
script, I noted that I can suppress messages and then build the standalone 
without issue. I am wondering if this doesn't cause problems for the standalone 
builder, why not have the standalone builder save the current setting and 
suppress messages before it begins the build brocess, then restore the prior 
setting when it's done?

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: discrepancy between official device metric and LC stack size

2018-02-02 Thread J. Landman Gay via use-livecode

On 1/31/18 5:23 PM, Nicolas Cueto via use-livecode wrote:

I test my mobile stacks on a Nexus 5, and, in portrait orientation, many
bottom pixels are offscreen, even though for width and height I follow
exactly the numbers given in dp at the website Device Metrics
 .

Why is it cut off? And how can I avoid this? Is there an LC keyword, like
"effective" or "working", that I should be including if so, how?


Probably the area occupied by the status bar is pushing the stack down. 
Get "the working screenrect" to find out the actual screen dimensions 
your stack can use.


Since every Android device is different, it's usually easier to set the 
fullscreenMode to "showAll" and let the LC engine adjust the size.



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