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

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

On 01/01/2018 07:48 PM, Sannyasin Brahmanathaswami via use-livecode wrote:

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.


Well, the dictionary leaves a bit to the imagination.
It also says

Name: window
Description:
The name or windowID property of any open stack. If a window is
specified, the stack opens in that window, replacing the stack that was
previously displayed in that window.

So I believe what you want (untested) is something more like
go to tDestination in 
or
go to tDestination in 

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


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: lineHeight different Mac vs. Windows

2018-01-01 Thread Peter Bogdanoff via use-livecode
Yes, I am actually adjusting the field width individually for each “page.” But 
it doesn’t solve the problem of occasional “widows” at the bottom. Thus the 
thought about other formatting work arounds.

Thanks, Jacque.


> On Jan 1, 2018, at 3:39 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> I wonder if you could figure out a general ratio for the size difference and 
> adjust the width of the field to correct the text wrap on Windows. That's 
> about all I can think of.
> 
> On 1/1/18 5:04 PM, Peter Bogdanoff via use-livecode wrote:
>> I think that the size difference is related to the specific font used. 
>> Georgia is displaying slightly wider in Windows than Mac. Helvetica seems 
>> pretty consistent. A Chinese font I use is much smaller in Windows.
>> Changing Georgia from 16 to 15 is too drastic a change for me, so I need to 
>> keep the font size the same.
>> I can’t set the textHeight since I have to set fixedLineHeight to false so I 
>> can display thumbnail images within the text.
>> I suspect that the space between lines when fixedLineHeight is false is 
>> determined by the specific font metrics, something LiveCode can’t or doesn’t 
>> want to override. I haven’t done a test of various fonts comparing the 
>> Windows vs. Mac “free” line spacing. Maybe there is a constant among them 
>> all…
> 
> 
> -- 
> 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: lineHeight different Mac vs. Windows

2018-01-01 Thread J. Landman Gay via use-livecode
I wonder if you could figure out a general ratio for the size difference 
and adjust the width of the field to correct the text wrap on Windows. 
That's about all I can think of.


On 1/1/18 5:04 PM, Peter Bogdanoff via use-livecode wrote:

I think that the size difference is related to the specific font used. Georgia 
is displaying slightly wider in Windows than Mac. Helvetica seems pretty 
consistent. A Chinese font I use is much smaller in Windows.

Changing Georgia from 16 to 15 is too drastic a change for me, so I need to 
keep the font size the same.

I can’t set the textHeight since I have to set fixedLineHeight to false so I 
can display thumbnail images within the text.

I suspect that the space between lines when fixedLineHeight is false is 
determined by the specific font metrics, something LiveCode can’t or doesn’t 
want to override. I haven’t done a test of various fonts comparing the Windows 
vs. Mac “free” line spacing. Maybe there is a constant among them all…



--
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: screenloc not actually centered after changing scalefactor (was Screen Resolution for Desktop Apps)

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

On 12/31/17 7:31 PM, Nicolas Cueto via use-livecode wrote:

To do "some calculations", I thought of comparing the loc to the
scalefactor. So ran the standalone on three devices, but saw no consistent
corelation between the differing locs and the scalefactor.

So, still no clue what to use for these calculations...


My math skills are terrible so we need someone more clever to fix my 
calculation. But this seems to work for most scalefactors until you get 
down to about 0.6 or lower:


on setloc pScale
  -- pScale = the desired scaleFactor
  put the screenloc into tSLoc
  if pScale <= 1 then
put 1 + (1-pScale) into tRatio
  else
put 1/pScale into tRatio
  end if
  put item 1 of tSLoc * tRatio into item 1 of tNewLoc
  put item 2 of tSLoc * tRatio into item 2 of tNewLoc
  set the scalefactor of this stack to pScale
  set the loc of this stack to tNewLoc
end setloc

I'm pretty sure there's a way to calculate the ratio without the "if" 
clause so that it works for both large and small scales and I'm not sure 
why it breaks at about 0.6. Hopefully one of our math gurus can advise.


--
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: lineHeight different Mac vs. Windows

2018-01-01 Thread Peter Bogdanoff via use-livecode
I think that the size difference is related to the specific font used. Georgia 
is displaying slightly wider in Windows than Mac. Helvetica seems pretty 
consistent. A Chinese font I use is much smaller in Windows.

Changing Georgia from 16 to 15 is too drastic a change for me, so I need to 
keep the font size the same.

I can’t set the textHeight since I have to set fixedLineHeight to false so I 
can display thumbnail images within the text.

I suspect that the space between lines when fixedLineHeight is false is 
determined by the specific font metrics, something LiveCode can’t or doesn’t 
want to override. I haven’t done a test of various fonts comparing the Windows 
vs. Mac “free” line spacing. Maybe there is a constant among them all…

Peter


> On Jan 1, 2018, at 2:23 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> On 1/1/18 2:39 AM, Peter Bogdanoff via use-livecode wrote:
>> My page layout is fixed — no user settings of font face or size. Also the 
>> card height doesn’t have room for text fields to get taller. And there was 
>> the design decision not to show scroll bars.
>> Text also often has “widows” at the bottom of the field when the text was 
>> formatted for Mac but is displayed in Windows. Thus my desire to adjust the 
>> Windows text to get it to flow similarly to the Mac (where it was authored).
> 
> The old-school method was to find a font size and textheight that matches 
> what you see on Mac, and on preOpenStack, set the text properties based on 
> platform.
> 
> It used to be that Windows fonts displayed larger and/or wider than the 
> same-named Mac fonts. That may have changed recently; my client says Windows 
> fonts are smaller now. At any rate, do some experimentation on Windows to see 
> if you can adjust the flow using textsize and textheight, or by experimenting 
> with different fonts.
> 
> -- 
> 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: lineHeight different Mac vs. Windows

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

On 1/1/18 2:39 AM, Peter Bogdanoff via use-livecode wrote:

My page layout is fixed — no user settings of font face or size. Also the card 
height doesn’t have room for text fields to get taller. And there was the 
design decision not to show scroll bars.

Text also often has “widows” at the bottom of the field when the text was 
formatted for Mac but is displayed in Windows. Thus my desire to adjust the 
Windows text to get it to flow similarly to the Mac (where it was authored).


The old-school method was to find a font size and textheight that 
matches what you see on Mac, and on preOpenStack, set the text 
properties based on platform.


It used to be that Windows fonts displayed larger and/or wider than the 
same-named Mac fonts. That may have changed recently; my client says 
Windows fonts are smaller now. At any rate, do some experimentation on 
Windows to see if you can adjust the flow using textsize and textheight, 
or by experimenting with different fonts.


--
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: delete the customproperty (of a card)

2018-01-01 Thread Dr. Hawkins via use-livecode
For removing a single property while leaving the rest intact, I have a
library routine rmProp.

on rmProp prop, tgt

--remove a property from the basic property set

local props

if tgt is empty then

put the long id of me nto tgt

end if

put the customProperties of tgt into props

repeat for each word prp in prop

delete variable props[prp]

end repeat

set the customProperties of tgt to props

end rmProp



-- 
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: screenloc not actually centered after changing scalefactor (was Screen Resolution for Desktop Apps)

2018-01-01 Thread Dr. Hawkins via use-livecode
On Sun, Dec 31, 2017 at 5:31 PM, Nicolas Cueto via use-livecode <
use-livecode@lists.runrev.com> wrote:

>
> To do "some calculations", I thought of comparing the loc to the
> scalefactor. So ran the standalone on three devices, but saw no consistent
> corelation between the differing locs and the scalefactor.
>
> I took a stab at it a few years ago, and failed.

I found no coherent relationship between the location on my iMac screen and
what livecode reported once I changed  the scaleFactor of the stack.  With
each 10% increase, the stack seems to move (usually) right, and also up or
down, possibly causing the menubar to be above the screen.

I also see an intermittent issue that livecode things the mouse pointer is
about an inch higher on the screen than it is, but the horizontal seems
correct.  This also seems be be limited to browse rather than select mode.


-- 
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: Error deleting a stack

2018-01-01 Thread Dr. Hawkins via use-livecode
On Mon, Jan 1, 2018 at 8:03 AM, Graham Samuel via use-livecode <
use-livecode@lists.runrev.com> wrote:
>The thing is, this used to work, probably in the LC 7 series.

I think that is the error here--it shouldn't be possible to delete the
stack containing a target while that target's script is running.

For my transient stacks, it's

send ("delete stack " & the short name of this stack) to stack "mcp" in 0



(where "mcp" is the main stack with routines, etc.)
-- 
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: Error deleting a stack

2018-01-01 Thread Mike Bonner via use-livecode
Try using a send in time to do the deletion?  Also, with the settings you
currently have, closing the stack SHOULD remove it from memory once any
running scripts are complete.

On Mon, Jan 1, 2018 at 9:03 AM, Graham Samuel via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Happy New Year to all!
>
> I have a bit of script that says
>
>  delete stack “myStack”
>
> This runs in a mainstack (not the one I’m trying to delete, “myStack”,
> which I’ll call the target), but the path by which this script was invoked
> was started in a menu item in the target. I get error 377 “stack locked or
> object’s script is executing”. The target stack’s ‘cantDelete' property is
> false, its ‘destroyStack' and ‘destroyWindow' properties are true.
>
> The thing is, this used to work, probably in the LC 7 series. It never
> went wrong, so presumably something’s changed in the engine. I accept that
> it doesn’t work now, but I need to get the target stack definitively out of
> memory, and I don’t think just closing it does that.
>
> Can anyone help with this?
>
> 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
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Error deleting a stack

2018-01-01 Thread Graham Samuel via use-livecode
Happy New Year to all!

I have a bit of script that says

 delete stack “myStack”

This runs in a mainstack (not the one I’m trying to delete, “myStack”, which 
I’ll call the target), but the path by which this script was invoked was 
started in a menu item in the target. I get error 377 “stack locked or object’s 
script is executing”. The target stack’s ‘cantDelete' property is false, its 
‘destroyStack' and ‘destroyWindow' properties are true.

The thing is, this used to work, probably in the LC 7 series. It never went 
wrong, so presumably something’s changed in the engine. I accept that it 
doesn’t work now, but I need to get the target stack definitively out of 
memory, and I don’t think just closing it does that.

Can anyone help with this?

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

Re: lineHeight different Mac vs. Windows

2018-01-01 Thread Peter Bogdanoff via use-livecode
My page layout is fixed — no user settings of font face or size. Also the card 
height doesn’t have room for text fields to get taller. And there was the 
design decision not to show scroll bars.

Text also often has “widows” at the bottom of the field when the text was 
formatted for Mac but is displayed in Windows. Thus my desire to adjust the 
Windows text to get it to flow similarly to the Mac (where it was authored).

This is an old-school desktop application with serious content! My heritage is 
the 1990s Voyager Company’s CD-ROM programs where titles were designed to be 
book-like.

Peter

> On Dec 31, 2017, at 2:36 PM, Warren Samples via use-livecode 
>  wrote:
> 
> On 12/31/2017 03:11 PM, Peter Bogdanoff via use-livecode wrote:
>>  text sometimes flows off the bottom of the field. Changing the font size is 
>> too extreme a change and doesn’t fix widows.
>> I’m trying to conceive of a method of somehow creating page metadata that 
>> reformats the Windows text—possibly adjusting field width, arbitrary 
>> carriage returns to move text, changing the text size of space characters, 
>> etc., all in an attempt to make the Windows version text display more of 
>> less the same as Mac. But the problem of line height difference is otherwise 
>> unfixable by me.
> 
> 
> Linux users also often face the problem where LC developers share stacks 
> where multi-line text wraps below the bottom of fields with fixed height.
> 
> Can you set the field height to the formattedHeight and auto-show scrollbars 
> as necessary when you load the field's contents? That ordinarily solves the 
> problem. I would protest efforts to mess with user font selection, be it 
> fontface or size and suggest you try to make it adaptive. Fontface and size 
> can be elements the user has good reasons to set for himself.
> 
> 
> Warren
> 
> ___
> use-livecode mailing list
> use-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