Re: Cubist's first bug report

2016-06-05 Thread [-hh]
What's the culprit for that? I dare say:

= It's not the random (as Mark S. proved with his example)
= It's not a random-incompatible "add" (see example below)

It is the basic problem that LC has with counting items,
lines, words or other chunks. The number of  is
defined in a logically inconsistent way.

Example that works correctly:

local f="OUT", c=","
on mouseUp
  lock screen; lock messages
  put the millisecs into m1
  put empty into fld f
  put 0 into s[1]; put 0 into s[2]; put 0 into s[3]
  repeat 1
add 1 to s[random(3)]
put cr & s[1] & s[2] & s[3] after s0
  end repeat 
  put the millisecs - m1 & \
s[1]+s[2]+s[3] & s0 into fld f
  unlock screen; unlock messages
end mouseUp 



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Cubist-s-first-bug-report-tp4705407p4705410.html
Sent from the Revolution - User mailing list archive at Nabble.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: OT: Once more

2016-06-08 Thread [-hh]
A simple TP-Link TL-WN823N v1
DRAM, up to 300 MBit
Connectivity 11,54,300
802.11B, 802.11G, 802.11n
[was at about 9 Euro]

See https://wikidevi.com/wiki/TP-LINK_TL-WN823N_v1

The older TL-WN725N V1 also worked
V2 had an extra driver (had problems).
I use it as a wifi-repeater.

Mike B. wrote
>> I can just declare myself apple incompatible.
Presumably it's exactly vice versa ...




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/OT-Once-more-tp4705524p4705549.html
Sent from the Revolution - User mailing list archive at Nabble.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: OT: Once more

2016-06-07 Thread [-hh]
Mike Bonner wrote
> Has anyone had trouble connecting to a pi that is running hostapd with a
> mac?  And if so, was it fixable?

Yes and yes. I have it now running on a Raspi 2B (and it runs also with the
on-board WIFI of Raspi 3). On Raspi 2 the fix was to try all WIFI dongles I
could find in my workwear  ;-)
Using a 'newer' TP-Link fixed everything.



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/OT-Once-more-tp4705524p4705535.html
Sent from the Revolution - User mailing list archive at Nabble.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: Uninstalling Livecode

2016-06-08 Thread [-hh]
If you install "for this user":
Go to user's directory /home/.runrev/components.
Execute in each directory of a version you want to remove the "setup".
Some older versions don't work or don't work fully with that.
Then delete the directory (the rest and links to it) 'manually'.

If you install "for all users":
You have to find "components" (somewhere in /opt, find it by following
a link from a desktop icon). Then do the above.



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Uninstalling-Livecode-tp4705543p4705547.html
Sent from the Revolution - User mailing list archive at Nabble.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: Raspberry Pi GPIO

2016-06-11 Thread [-hh]
Perhaps the best "library" to Raspi-GPIO, that may also
answer most of your technical questions (in the C-part).

http://elinux.org/RPi_GPIO_Code_Samples

Note the line in the C example that explains how to
make this "Raspi 1"-code working on a Raspi 2.

Especially for you the WebIOPi may be also interesting:
http://webiopi.trouch.com/

Relating to PIR sensors there are well-tested-tutorials
in English in the folks (I dont link to the one I used,
because it's in German only).

===
This is my 'unsharp' opinion
(may hopefully need an update with LC's FFI):

If you use python via shell from LC this doesn't really
matter: LC 7 is *much* slower than LC 6, and LC 6 is
slower than Python, and Python is *much* slower than C
anyway. Sums up to a factor of close to 100 in time
needed. LCB will not bring that down below 10, I presume.

Nevertheless, using LC on Raspi for hardware is *really*
good for rapid TESTING (use LC 6), NOT for rapid WORKING.




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Raspberry-Pi-GPIO-tp4705616p4705665.html
Sent from the Revolution - User mailing list archive at Nabble.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: Raspberry Pi GPIO

2016-06-09 Thread [-hh]
Using the GPIO is nothing else than writing zeros or ones to a file.
Nobody needs a library for that?
[Also there was a talk about that at the last LC US-conference.]

The problem is to use the *correct* files or pins numbering
respectively. This is hardware dependent, not a problem of using
LC or Python. And hardware has changes, also on Raspi GPIO ...

So be very careful to follow old "second hand" links which are
for Raspberry A (2012/13). Better use the infos/forum, starting for
example from here (or ask LC-Fraser):

http://www.raspberrypi-spy.co.uk/
http://www.raspberryconnect.com/




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Raspberry-Pi-GPIO-tp4705616p4705626.html
Sent from the Revolution - User mailing list archive at Nabble.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


Widgets and the Dictionary

2016-05-25 Thread [-hh]
I wonder who will manage (and how) the description of
1000 widgets/externals in the dictionary? A menu with
1000 entries? And all the updates?

Perhaps it would be better if each widget/external
had his own help file/demo stack?

Or if the dictionary will be split into LiveCodeScript
and LiveCodeBuilder and Guides in one part and all
the rest in a second part?




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Widgets-and-the-Dictionary-tp4705172.html
Sent from the Revolution - User mailing list archive at Nabble.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: Infinite Livecode Pledge

2016-05-25 Thread [-hh]
Peter TB Brett wrote
> Without counting bug reporting [1], approximately 98% of the changes to 
> the LiveCode engine and IDE are made by the core dev team, and most of 
> this work is funded by subscriptions.  Almost all of those changes go 
> directly into the open source edition.
> 
> Peter
> 
> [1] Some of our open source edition users are very diligent about 
> carefully testing LiveCode and filing extremely high-quality bug reports.

The disadvantage of overestimating a quote: The 98% quote sets also
the quote of bugs or even regressions in the engine and IDE that are
produced by the core dev team and are to be in part reported by
community members (also such members that have Indy and HTML5
licenses) ... 98%.



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Infinite-Livecode-Pledge-tp4705088p4705182.html
Sent from the Revolution - User mailing list archive at Nabble.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: Raspberry Pi GPIO

2016-06-11 Thread [-hh]
Forgot to mention, in case you are interested in WebIOPi,
there is a patch:

WebIOPi-0.7.1 Patch for Raspberry B+, Pi2, and Pi3
https://github.com/doublebind/raspi/

I had it running on Raspi2, but not yet on Raspi3.



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Raspberry-Pi-GPIO-tp4705616p4705669.html
Sent from the Revolution - User mailing list archive at Nabble.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: Raspberry Pi GPIO

2016-06-11 Thread [-hh]
Currently I ran
= Lubuntu 15.10 on Raspi2, runs LC 6.5.1 and 7.0.4 without any problem
= Xubuntu 16.04 on Raspi3, runs LC 6.5.1 and 7.0.4 without any problem

installed from here:
https://ubuntu-pi-flavour-maker.org/download/

There is also Ubuntu Server Minimal 16.04 for Raspi3 ... 




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Raspberry-Pi-GPIO-tp4705616p4705677.html
Sent from the Revolution - User mailing list archive at Nabble.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: [OT-ish] WWDC things of interest

2016-06-14 Thread [-hh]
Sadly LC is not OK with 10.12 here:

Menu file > Open stack ... *crashes* LC immediately.
Tested with LC 6/7/8 latest releases.

[I'm running MacOS 10.12 beta (16A201w) from an external disk].
Is that system dialog working in LC with you?



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/OT-ish-WWDC-things-of-interest-tp4705724p4705736.html
Sent from the Revolution - User mailing list archive at Nabble.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: Card SnapShot from Negative Rect?

2016-06-06 Thread [-hh]
Yet another option could be:

[1] Shift each control down and right, so that the negative coords become
non-negative
and enlarge also the stack size so that the rectangle fits into the stack
window (and hide img X)
[2] Take your snapshot from the 'shifted' rect to img X.
I use 'export snapshot from rect  of window windowID here and resize
the image if necesary.
[3] Invert the action from step 1 (and show img X)

This works pretty fast.
Sadly we cannot lock screen for that, so there is some 'flickering' and it
is, contrary to export snapshot from a group, restricted to current
screensize.




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Card-SnapShot-from-Negative-Rect-tp4705458p4705469.html
Sent from the Revolution - User mailing list archive at Nabble.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


Forcing redraw of a LC window

2016-06-06 Thread [-hh]
I remember some discussions here about screen refresh and how
to force the redraw of a (possibly resized) LC window.

I recently found a method that works all the time for me, even
for cards that are 'overloaded' in some sense. I couldn't find
it mentioned until now, so I should share it.

I use it mostly just before an "unlock  screen":
** set backcolor of this card to the backcolor of this card **



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Forcing-redraw-of-a-LC-window-tp4705470.html
Sent from the Revolution - User mailing list archive at Nabble.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: OT: Once more

2016-06-08 Thread [-hh]
Forgot to mention in case of using DHCP:

Newer OS on Mac Desktop enforces me after each
WIFI change (on a Raspi) in the local net to
= delete the corresponding entries in ~/.ssh/known_hosts
= sometimes even empty the file ~/.ssh/known_hosts
or any connection that uses internally a line of 'ssh-talk' will die.




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/OT-Once-more-tp4705524p4705584.html
Sent from the Revolution - User mailing list archive at Nabble.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: [ANN] This Week in LiveCode 38

2016-06-20 Thread [-hh]
Jerry D. wrote:
> 'Focusing' has only one 's'. Not two.

This is true, of course. And just the same:

'Focussing' has two 's'. Not only one.



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/ANN-This-Week-in-LiveCode-38-tp4705958p4705975.html
Sent from the Revolution - User mailing list archive at Nabble.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: Get url "file:///..."

2016-06-21 Thread [-hh]
Hi all,

the task of Jim is, as I understand, that he wants a correct
actual browser interpretation of the file, that is, what Safari
displays, some say HTMLtoTEXT to such a conversion.
LC's status for 'the htmltext' is HTML of before 2005 ...

The applescript is probably instable because of delayed result
sending/ getting but it's the most actual interpretation you can have.

Now I just looked into my treasure chest for MacOS and found the
following. I tested once for 50 files. Worked stable and very fast.
(This is the conversion method that TextEdit uses).

Hermann

-- DOES NOT CONVERT text that is javascript generated by a browser.
-- Convert files on MacOS, tested on 10.11/ 10.12
-- Outputs to an input-file with the ending changed to format
-- "textutil -convert format 
-- format is one of the following
-- txt, html or htm, rtf, rtfd, doc, docx, wordml, odt, webarchive

on mouseUp
  set defaultfolder to \
"/Users/jimhurley/Library/Mail Downloads/elec_web/precincts/"
  put the files into fs
  -- filter fs with/without some criterium
  repeat for each line f in fs
put shell("textutil -convert txt " & f) into nirwana
  end repeat
end mouseUp

If you have all files and only these in one folder you could simply use:
(all files converted by one line, you could do that also in Terminal).

on mouseUp
  put "/Users/jimhurley/Library/Mail Downloads/elec_web/precincts/" into f0
-- assuming all files to convert end in "htm"   
  put shell("textutil -convert txt " & f0&"*.htm") into nirwana 
end mouseUp




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Get-url-file-tp4705988p4706032.html
Sent from the Revolution - User mailing list archive at Nabble.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: Get url "file:///..."

2016-06-21 Thread [-hh]
> -- Outputs to an input-file with the ending changed to format
> -- "textutil -convert format 

Should better read
-- Outputs an input-file of format1 to a file of format2
-- with the ending changed to format2:
-- "textutil -convert format2 "

Example HTMLtoTEXT on Mac:

textutil -convert txt /path/to/folder/inputfile.html



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Get-url-file-tp4705988p4706034.html
Sent from the Revolution - User mailing list archive at Nabble.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


hhImageJIT

2016-06-21 Thread [-hh]
If you are interested in FFI and/ or image processing
then you may have a look to here

http://forums.livecode.com/viewtopic.php?f=16=27518

I wrote a GUI for using the LuaJIT-FFI (here for
processing images) that goes into the direction that
LC will give us with its new FFI interface.

There are free standalones for Mac/Win/Linux (not yet
open sorce). The apps are still in early beta status,
if you have problems or questions, ask in the forum,
please.

MODULES/FEATURES.
[+] Color. Change RGB-channels and apply a 3x3-color
matrix to each pixel.
[+] Convolve. Apply 3x3-5x5-7x7 matrices for 1 to 3
of the channels.
[+] Median. Apply median (another quantile) filtering
from a 3x3 up to a 33x33 surrounding area for each
pixel and selected RGB-channels.
[+] Transform (advanced: needs basic Lua).
Apply math-transforms like whirl or wave.
[+] Advanced (expert level: Touch the CORE).

Hermann



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/hhImageJIT-tp4706047.html
Sent from the Revolution - User mailing list archive at Nabble.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: Get url "file:///..."

2016-06-20 Thread [-hh]
Assuming you are on a Mac: 
The following should work from 10.4 to 10.12 with LC 5/6/7/8.

on mouseUp
  put "/Users/jimhurley/Library/Mail%20Downloads/elec_web/precincts/241.htm"
into f
  put "source" into sOrT --> one of "source", "text", "URL"
  do iScript(f, sOrT) as applescript
  put the result into fld 1
end mouseUp

Using above "text" instead of "source" may save you some work.
(The LC interpretation as htmltext does the same but somehow 'uncomplete').

function iScript f,x
  put numToChar(34) into q
  return "tell application " &  q&"Safari"  & \
"   open POSIX file " &  q(f)  & \
"   set rslt to " & x & " of document 1" & \
"end tell"
end iScript




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Get-url-file-tp4705988p4706007.html
Sent from the Revolution - User mailing list archive at Nabble.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: Windows 10 script editor problem

2016-06-17 Thread [-hh]
Disappearing property inspector and script editor
windows happen often here in latest desktop versions
of LC 6/7 on all three, Mac/Win/Linux.
I had then always a lot of windows open or too many
(closed) stacks in memory.
That's why I cannot fix a situation for a bug report.

== The hidden property inspector requires regularly a
restart of LC (purging RAM requires more time).

== The hidden script editor window is here *ALWAYS*
available in LC-menu "Window" and comes back to front
if selected. I prefer such a 'passive' behaviour to 
an 'aggressive' top-layering of the editor (which I
saw in some other development environments).



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Windows-10-script-editor-problem-tp4705855p4705876.html
Sent from the Revolution - User mailing list archive at Nabble.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: Windows 10 script editor problem

2016-06-17 Thread [-hh]
> Disappearing property inspector and script editor
> windows happen often here in latest desktop versions
> of LC 6/7 on all three, Mac/Win/Linux.

Should read "LC 6/7/8".



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Windows-10-script-editor-problem-tp4705855p4705877.html
Sent from the Revolution - User mailing list archive at Nabble.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: Getting textShift To Shift Down?

2016-01-15 Thread [-hh]
Tested now and it works here:

LC 's textshift does exactly what it *can* do (with the primitive typesetting 
system of HTML which it uses): 

[1] It takes the baseline, moves the chunk relative to that up or down, leaving 
the surrounding text on that baseline.
[2] After that it gives the whole line a new height (if variable textheight) or 
fits it midway into the fixed line height, that is it moves the baseline.

One can watch this with with "showlines" and "hGrid".

What you 'optically' want, can you achieve exactly with a professional 
typesetting system ("TeX") only or, approximately, if you shift (also) the 
*complement* of the object in the line.

H.
___
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 textShift To Shift Down?

2016-01-14 Thread [-hh]
Right out from my head, can not test at the moment.

The hard way: The direct input of the htmltext should always work (as long as 
your on one line with the chunk).

wordOne put me down wordThree"  -- down
wordOne put me down wordThree"  -- up

If I remember right "sup" instead of "sub" (what works in HTML) doesn't work 
with LC,
it's not really needed, bt good to know.
Anyway, look at the htmltext to see what's wrong with you current LC version.

H.
___
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: Move to the points.

2016-06-26 Thread [-hh]
You could also have a look to the forum:

moving multiple objects (SOLVED)
http://forums.livecode.com/viewtopic.php?p=137583#p137583



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Move-to-the-points-tp4706104p4706110.html
Sent from the Revolution - User mailing list archive at Nabble.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: LC 6.7.8 won't load

2016-02-06 Thread [-hh]
This is a bug, reported for LC 6-8 (not by me).

I have it frequently, about 50% of all startups are crashes on Mac 10.11
Especially when I have several versions running.

If LC is asking too often for license data it helps mostly here to simply 
cancel.

The error message is for "Ignoring" the crash comes with the next startup of LC 
from Mac. This is sometimes also after (correctly) quitting LC.
___
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 6.7.8 won't load

2016-02-06 Thread [-hh]
This is a great advantage of the forum (at least for me):
One can edit a post and correct typos and wrong wording.

You have please simply to overlook such things here ;-)

___
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: html5 & liveCode

2016-02-10 Thread [-hh]
John D. wrote:
> Is there a list somewhere about what is working and what is not
> with html 5 ?

Hello John,

perhaps it's too early to maintain such a listing.
I already asked for insights into a "To-Do-List"
in order to add "enhancement requests" (#16252).

We could/should do that by ourselves (spares time for the team).

The first big problem is "the" listing.
List 2000 handlers, functions, operators, properties, constants?
If you start with a listing that has checks (YES/NO/PARTLY) then
I'll come in and make also checks.

** And there is one possibility to check a lot of that directly in
the browser: **

Terminal zero (current state dp-9), you can download the stack
there and use it for your own version-testing.
http://hh.on-rev.com/html5/
TerminalZero-8.0.0-dp-9X.html 

(Because of fileSize link to TOC only. Note: standalones don't
work with Firefox 44.0, but earlier versions)

===
Hermann


___
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: lock and unlock files from script? - Mac options

2016-02-10 Thread [-hh]
Stephen B. wrote:
> > I'd be happy with an Applescript solution or something using the
> > Shell. faster would be better. thanks for any help. stephen.
>
> thanks guys. sqb

TMHO, such threads should end -- if available -- with a full
working solution. Perhaps somebody can use this, for example
me, in half a year :-)

=== HowTo
Switch the "locked" flag (= the check in Finder's "Get info"-dialog
box) of a Mac OSX file.
Yo have to be superuser or the owner of this file for that.

[1] using applescript (see note at end of this post)

on mouseUp
   answer file "File to unlock" -- obtain the path/to/file
   if it is not empty then
  replace slash with colon in it
  delete char 1 of it --> delete leading colon <-- BN
  do switchLocked(it) as applescript
   end if
end mouseUp

function switchLocked ff
 return "" & \
"tell application " & "Finder"  & \
"  set p to alias " & ff  & \
"  set locked of p to not (locked of p)" & \
"end tell"
end switchLocked

[2] using shell

on mouseUp
   answer file "File to unlock" -- obtain the path/to/file
   if it is not empty then
 put quote into f1
 put word 5 of shell ("ls -lO " & f1) into myFlag
 --> myFlag is "-" if not locked and "uchg" if locked
 if myFlag is "uchg" then
put "nouchg" into myFlag --> lock
 else put "uchg" into myFlag --> unlock
 put shell ("chflags" && myFlag && f1) into nirwana
 -- put shell ("ls -lO " & f1) --> check if it's done
  end if
end mouseUp

=== Note
Bernd N. and I had a dialog about the "execution error" of the
original script [1] above and he found the culprit:
If you give an alias that starts with a colon (or a POSIX path
that starts with a slash) then the Applescript Script Editor puts
"startup disk" in front of this and it's OK). We have to delete
the leading colon or put the diskName in front of the path).

[-hh]

___
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: When is a GIF Finished Playing?

2016-02-10 Thread [-hh]
Scott R. wrote:
> If you want the GIF to stop playing when it reaches the last frame, why
> wouldn't you set the repeatCount to 1?
> 
> If your GIF can play multiple times through (repeatCount = -1), then I
> believe the only way you can track its frames is to poll it, with a
> frequency that slightly exceeds its frame delay.  Try running a loop while
> the GIF is playing, maybe something like:
> 
> # GIF WITH 10 MS FRAME DELAY
> 
> on mouseUp
>set the repeatCount of img "myGif" to -1
>trackPlayback
> end mouseUp
> 
> on trackPlayback
>if the currentFrame of img "myGif" > (the frameCount of img "myGif" - 1)
> then
>   set the repeatCount of img "myGif" to 0
>   set the currentFrame of img "myGif" to the frameCount of img "myGif"
> -- just to be sure
>   exit trackPlayback
>end if
>send "trackPlayback" to me in 8 millisecs
> end trackPlayback

I'm currently working on a LC stack, that runs animated pictures (from 
screenShots) on Raspi, because GIF animation is sometimes unreliable there. LC 
is pretty good with that even if one does this by setting filenames of the 
frames. So I could compare for myself:

If you do such a polling as above then it is LESS effort for the CPU and you 
have moreover FULL control on the animation if you do it by yourself:

SPLIT the gif into it's frames as GIF, PNG or whatever (there are online-tools 
for that) and animate them by send "handler" .

You can then even play parts of the original GIF (adjust by that to differnet 
CPUs), zoom single frames and and ...
___
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: When is a GIF Finished Playing?

2016-02-10 Thread [-hh]
Scott R. wrote:
> -HH makes a good point that I forgot about: if you control the playback
> yourself, setting the GIF's currentFrame every so many millisecs, you'll
> always know which frame you're on in the GIF.  This will work for most
> GIFs, but can mess up playback of GIFs that use varying frame delays since
> timing will differ from how the GIF was originally authored.

Let me add these considerations regarding 'frame delay' by DIY:

== Advantage: We can use the given times or adjust to current
'environment'on the fly if we control the animation by ourselves.
For example change the frame every *full next* 50 millisecs by

send "handler" to me in 50 millisecs - (the millisecs mod 50) millisecs

This holds the animation "in rhythm" and doesn't buffer and spit out
at once the 'waiting frames' -- as some browsers and GIF players do.

== I use to look at (and edit) frames delay with GraphicConverter.
As you say, most gifs (here 99%) use the same delay for all frames,
much too short for usage in HTML5 standalones.

== Regarding frame delays in general, especially usage of gifs in HTML5,
this will be a real ('cross-browser') problem:

"The problem seems to be that many browsers will ignore very short
per-frame delays and ***replace them with a default delay*** (often
0.1 secs). And the cutoff for what counts as a "very short" delay
varies between browsers: Firefox apparently accepts anything down
to 0.02 seconds per frame, while IE ignores delays below 0.06 seconds
per frame."
[Source: seen at webmasters.stackexchange.com, stars set by me.]


___
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: snapshot and animation capture

2016-02-06 Thread [-hh]
Sorry, forgot the link to the shaped-screenShot stack, here it is

http://forums.livecode.com/viewtopic.php?p=137640#p137640


___
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: IDE stack names

2016-02-06 Thread [-hh]
@Peter B.
The "Live Code UI elements..." check button is in Preferences/General line 3.

@Matt M.
Here an info community-stack (works on Mac/Win/Linux/Raspi)

"summary6.livecode"
http://forums.livecode.com/viewtopic.php?p=105550#p105550

that shows:

RevLoadedStacks, mainStacks, openstacks

and has options to filter them by "rev".

you get a full file info on a selected stack from the above lists:
URL, URLshortName, dataForkSize, accessPermissions, several dates

===
Hermann

[Def. A community-stack is one that is targeted to the community]

___
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: snapshot and animation capture

2016-02-06 Thread [-hh]
[Fits best into that thread, better than creating a new one]

Here another community stack, mainly prepared for Raspi,
but works (much faster, of course) also on Mac/Win/Linux.

The stack is a resizable transparent window-masked stack.

= Choose shapes to be created on-the-fly from menu:
... Rectangle, Oval and N-polygons (regular, 3<=N).
= Resizing is possible also non-proportional.
= Screenshots are done from the shape, i.e. if you use an
... oval you get the inner transparent part from screen and
... the frame of the image is your oval.

Simple rectangle shots are fast (impressing LC-features).
Shaped shots need much more time, incl. creating and saving
image, on a medium fast machine (Mac mini, 2.5 GHz) 800 ms
and 1800 ms on a Raspi2.
(Of course this is dependent of image size, the times are
averaged over sizes, the average size is 600x400 px.)

For the "shaped-shot" part I'm probably too complicated and
don't see the easy way.

If you know a tip or even have a better/faster method (that
works preferably on Mac/Win/Linux/Raspi) please come in to
Forum:Subforum Rich Media:Fast method for shaped screenshot?
http://forums.livecode.com/viewtopic.php?p=137641#p137641

===
Hermann

___
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: Question About Resolution Independence

2016-02-07 Thread [-hh]
Out of curiosity, if that's not a typo:
> my stack has a size of 1025*768

Is it the same if you use 1024*768 (exactly 4:3)?

___
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: HTML5 "Features" Library Substacks and "send ### in time"

2016-02-07 Thread [-hh]
Ciao,

[1] Firefox does NOT work any more since version 44.0 with
LC's HTML5-standalones. Sadly, because Firefox was up to
5 times faster with the standalones (with loading AND playing)
than other browsers.
ALL standalones are affected, no matter the dp version.
This is reported at Bugzilla@Mozilla, they really try to help us.
If I read that correct, it is even planned for Firefox 47.0 to
implement some backward-compatibilty.
Peter B. will 'repair' that from LC's side soon (8.0.0-dp15), you
then simply have to recompile your projects with the new version.

[2] LC 8.0.0-dp14 has with my tests a speed loss by factor of up
to 10 compared to dp9. [Will report in detail to QC tomorrow].
Hope your results are better. Please tell us.

[3] In general to HTML5:

PeterB. and the dev team is really working hard on all the nasty
detailed problems (you can see that immediately when reading at
github.com/livecode/livecode) with the HTML5-standalone builder.

==> There is an own HTML5-Subforum <===
http://forums.livecode.com/viewforum.php?f=120
Peter B. comes in regularly there and gave already a lot of
valuable information, nothing is unanswered until now.

For example the BIG problem of **implementing 'wait' or not**
is discussed at large there (and was already shortly discussed
here).

===
Hermann



___
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: Accessing handler in LC resource stack

2016-02-07 Thread [-hh]
James H. wrote:
> Hi, I am using the GLX framework with LC7 and have hit a snag.
> Its application builder calls a handler in an LC resource stack 
> "revStandaloneSettings.rev" which no longer exists. Looking at
> the LC package I think it has been replaced by 
> revsaveasstandalone.livecodescript".
> How do I address the handler from this script only stack file?
> What is its path/syntax required? James

[1] The Standalone Application Builder uses a custom property
of each stack, named cRevStandaloneSettings.
For example
the cRevStandaloneSettings["defaultBuildFolder"] of this stack

*Platform specific* properties are multi-dimensional written as
, for example
the cRevStandaloneSettings["Windows,companyname"] of this stack

Platform is one of (as of LC 8.0.0)
"Windows,MacOSX x86-32,Linux,Linux x64,Linux armv6-hf,Emscripten"
[Item 5 is for Raspi, currently only available in 7.0.4,
item 6 is for HTML5, available since 8.0.0-dp4.]

May be you'll find in that property what you need.

[2] If you have the path of the stack and the handlers name
(may have changed), the syntax should be still the same as before.

(You will know, but for some other readers the hint:
If you need a handler's name or wish to copy out a short one you
need to your script, you could use a text editor to open the
stack, or use Raspi stacks collection #44 = nuzzler7b.livecode
http://forums.livecode.com/viewtopic.php?p=112416#p112416
runs on Win/Mac/Linux/Raspi.)


___
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 6.7.8 won't load

2016-02-07 Thread [-hh]
> Peter H. wrote:
> ...  Surprised it hasn't been fixed yet since 6.7.8 is dead in the water for 
> me.

Sadly it's all the same on MacOS**, from LC 6.7 to LC 8.0, also with newest
rc- or dp-releases.
I don't report repeatedly, because probably MacOS/SIPS is (more) the culprit.

__
** Mac OS 10.11.3 (also tested with newest MacOS 10 developer previews).
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: How to launch a stack from a file.

2016-02-07 Thread [-hh]
Mike D. wrote:
> I am trying to build a simple launcher app and I am stumped as to how to 
> load a stack from a file.  I have no problem loading it from my dropbox, 
> but not from a local file.
> 
> put 
> /Users/mike/Library/Preferences/CueSheets/ridewithgps_cuesheets.livecode 
> into localpath
> 
> none of the following work:
> 
> go stack localpath
> go stack url ("binfile:" & localpath)
> go stack url ("file:" & localpath)
> 
> I have also tryed the "in a new window" clause
> 
> What am I missing?

Obviously you are on Mac.
The first method should work. The other two not.
Hope you didn't forget the quotes around the path?


___
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 6.7.8 won't load

2016-02-07 Thread [-hh]
Peter H. wrote:
> It looks like this is a plugin issue.  I removed all my plugins
> and 6.7.8 now loads fine.  Will experiment to find which plugin
> is causing the problem.

Tried your no-plugin-method. Had until now no startup-crash with
6.7.8, but two with 7.1.1 and one with 8.0.0-dp14.

Rick H. wrote:
> I have told my Mac to never sleep because of weirdness
> like that over many years.  I use the screen saver instead,
> or shut it down if I’m not going to use it for a few hours. Rick
> > On Feb 7, 2016, at 2:28 PM, [-hh]  wrote:
> > Related to that
> > (seems to be a well-known "random"-occurrence problem)
> > #16112 8.0.0-dp6 Crash at startup
> > #14264 7.0.1-GM1 Crash on startup
> > Also, for me:
> > The probability increases if it is the first startup
> > of LC after a machine sleep.

I had sometimes better results when ejecting a certain USB-2.0 drive
before a sleep (no change: thunderbolt drive). Yes, Mac will be
more involved with that than LC. But: Other apps don't crash here ...
___
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 6.7.8 won't load

2016-02-07 Thread [-hh]
> Sounds like you may be experiencing something different. 6.7.8 is the only
> version that won't run for me. I've tried a half dozen time with the same
> result. Is there some sort of system logfile I can look at and include
> with a QCC report?
> On Sun, Feb 7, 2016 at 3:54 AM [-hh]  wrote:
> > > Peter H. wrote: 
> > > ... Surprised it hasn't been fixed yet since 6.7.8 is dead in the water 
> > for me. 
> >
> > Sadly it's all the same on MacOS**, from LC 6.7 to LC 8.0, also with newest 
> > rc- or dp-releases. 
> > I don't report repeatedly, because probably MacOS/SIPS is (more) the 
> > culprit. 
> >
> > __ 
> > ** Mac OS 10.11.3 (also tested with newest MacOS 10 developer previews). 
> > ___ 

Couldn't find a report in QC. Can remember now: I 'reported' it in
"forums/Bug  Triage" with 0 answers for 14 days or so, so I deleted it.
There was another problem with frequent relicensing in QC (for me connected
to that) but its better to open a new report in QC. Please do that.

I have a system log from just now for 6.7.8 Indy (the one that is offered
to send to Apple). I'll add it zipped to your report -- please use "startup"
in the header so I can find it fast.

hh
___
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 6.7.8 won't load

2016-02-07 Thread [-hh]
Related to that
(seems to be a well-known "random"-occurrence problem)
#16112 8.0.0-dp6 Crash at startup
#14264 7.0.1-GM1 Crash on startup

Also, for me:
The probability increases if it is the first startup
of LC after a machine sleep.


___
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: Black icons in LC 8 DP 14

2016-02-08 Thread [-hh]
black, lightgray, darkgray, white, red , yellow, blue and "102,255,204" :-)


___
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: lock and unlock files from script? - Mac options

2016-02-09 Thread [-hh]
>From terminal/LC's shell() use:

lock with . $ chflags uchg 
unlock with ... $ chflags nouchg 

What is interesting in this connection: I got also a
"compile error" from LC's "do as applescript" using
a script that works from Applescript's Script Editor.

MacOS 10.11.3
___
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: lock and unlock files from script? - Mac options

2016-02-09 Thread [-hh]
Hi all,

these flowers are not for me. Here's my secret:

Simon Sheppard’s website ss64.com
Extremly fast and *very* competent.

===
Hermann
___
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: lock and unlock files from script? - Mac options

2016-02-09 Thread [-hh]
Phil D. wrote:
> I looked at the web site below and it makes sense now. Guess I'm not 
> used to such flowery language. Phil
> 
> On 2/9/16 4:59 PM, Phil Davis wrote:
> > I can smell them from here... smells fishy. Or maybe rotten, if 
> > Hermann is in Denmark.
> > ;-)
> > On 2/9/16 4:53 PM, [-hh] wrote:
> >> Hi all,
> >> these flowers are not for me. Here's my secret:
> >> Simon Sheppard’s website ss64.com
> >> Extremly fast and *very* competent. Hermann

Phil,

for example the entry for chflags contains the line
"The immutable flag is equivalent to locking the file in the Finder's Show Info 
box."

This info is missing on Apple's own (BSD-) man page for chflag. That's an 
example for
why I used such 'flowery' superlatives. And I don't even know Simon.

By the way: I'm from Germany and I like fish, also fish from Denmark.
And I like flowers --- and Phil's 'Shell Command Help' in LC's Sample Stacks ;-)

===

I found also the hint that
setfile (Xcode CommandLine Tools) enables to lock/unlock.

It's now somehow clear why Stephen and I got "execution errors" from applescript
via LC:
Locking/unlocking of a file requires to be owner or superuser of that file. 
This is
perhaps better reflected by the Applescript Script Editor but may not be given
if we "do ... as applescript".

===
Hermann
___
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 textfont color in IDE? LC8DP14

2016-02-11 Thread [-hh]
I'm used to set the 'global' text color of a field by the Property Inspector by 
setting the textColor (synonym foreColor) and set the color of chunks of text 
by script or menu.

I've never been able to set the color of text (or parts of text) in Project 
Browser or Application Browser. Please tell me, how did you achieve that?

> > Will P. wrote: Folks:

> > I notice there is no way to set the textfont color of text in a field,
> > in the project browser in LC8Dp14. Is this intentional? I can set it
> > in the toolbar menu, but it seems an omission in the IDE.
> 
> Peter B. wrote:
> Hi Bill,
> If you could set the font color of field text using the LiveCode 7 
> project browser, and you can no longer do that in LiveCode 8, then yes, 
> it's a bug - and please file a bug report!

___
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 textfont color in IDE? LC8DP14

2016-02-11 Thread [-hh]
Hi Klaus,

wrong number? Report 16843 is not about "textColor/ForeColor" but abut setting 
the textfont.

Hermann
___
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 textfont color in IDE? LC8DP14

2016-02-11 Thread [-hh]
William P. wrote:
> But, why not call it what it is? Since this is an app for "everybody" why not 
> just call it textcolor? That’s what it actually is. If we can use syntax 
> like: “put 3 into x” instead of “x=3”, why not try to carry through the 
> entire system with the same philosophy and keep the “jargony” things as 
> minimized as possible.

As I am one of the "everybodys" who tried to build you a golden bridge you 
didn't use, here another one.

There is in the LC Preferences/ Tab General at top an option
"Property labels are:"
o Description of option
X Name of LiveCode property

If you choose to prefer "Description of option" then you'll get in the Property 
Inspector "Text Fill" instead of "foreGroundColor".

Hermann

By the way "put 3 into x" is logically correct, x=3 not, because it is an 
equation, which is equivalent to 3=x ...


___
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: snapshot and animation capture

2016-01-29 Thread [-hh]
Hi,

I've made a stack for the Raspi collection, that does the following:

Creates a *resizable* rectangle frame (window shape of a non-opaque rectangle), 
currently set as systemWindow. You can drag that around the screen and trigger 
a small button on the frame. Then a screenshot of the visible interior of the 
frame is made and saved as PNG. You can open and view these 'shots' in the 
stack, if it is switched to non-window-shaped.

It's all "intermediate" Livecode, runs on Mac/Win/Linux and is fast enough on a 
Raspi. On Win/Linux resizing "flickers", you may play there with the 
'update-beat' (currently 4 ticks), but it works.

I didn't publish it until now, because "window-shaping" is currently/not yet 
possible in the available Raspi IDE's or standalones.

If this is (partly) what you want, then I'll post it (or a link to it) in a few 
hours in the sub-forum "Rich Media". Just tell me.


Hermann
___
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: Explicit Variables

2016-01-29 Thread [-hh]
What about the following?

on mouseUp
  do "local tvar=1.2"
  put 2*tvar
end mouseUp

Should NOT work. But this should work (as do recompiles?):

on mouseUp
  do "local tvar=1.2"
  do "put 2*tvar"
end mouseUp


___
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: launch document problem

2016-01-28 Thread [-hh]
This may be related to the fact we know from HTML5-standalones.

(Newest) Goggle Chrome and Opera want a (local) web server
for more than 'simple' html documents,
Safari and Firefox launch everything from local files.

Anyway, comparing to the behaviour when launching from alocal web server could 
give a hint?

> Peter H. wrote:
> In an application I wrote several years ago, I create reports by writing
> html into a file and then using the launch document command to open the
> file in the user's preferred browser.  All has been working fine with that
> approach until OSX Yosemite came along.
> 
> The launch command references a file named:
> 
> /Users/Pete/Documents/BandTrak/Report Data/Remittance.html
> 
> The user has their default browser set to Chrome and when Chrome launches
> with the above file reference, the URL is:
> 
> 
> file:///.file/id=6571367.405704
> 
> 
> ... which results in a "web page not found" message.  If I copy/paste the
> URL into Safari, the file is successfully displayed.
> 
> Does anyone know why this transformation of the file reference is
> occurring? Also why it is recognized in Safari and not Chrome?


___
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: Can Handler Know What Params It Should Have

2016-02-02 Thread [-hh]
Bernard wrote:
> I know the params can be called to find out what parameters were
> passed to the handler when it is called. However, I'm wondering
> if a handler has a way of knowing what parameters it had at the
> time it was defined. I don't think so. Regards Bernard

Yes, that's my opinion too, for user handlers, but not for LC/reserved
handlers. This is the simple explanation I use for myself:

[1] For any *user handler*, the answer is NO, because there are
not "the parameters" in a definition. For example

on handler x1,x2
 put ( x1,x2 )
end handler

is equivalent to

on handler
 put ( param(1),param(2) )
end handler

[2] For a *LC handler* we can see the defined params by calling the 
params in the handler without params. For example

on mouseUp
 put the params
end mouseUp

yields: MouseUp "1" (if left-clicked)
Means: We can use, where b is the 'reserved' LC param, for example

on mouseUp b,x1,x2
 put (x1,x2)
end mouseUp

or equivalently

on mouseUp 
 put (param(2),param(3))
end mouseUp

===
Hermann

___
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: snapshot and animation capture

2016-01-29 Thread [-hh]
Richmond,

"import" of the error message relates to the rect (see the wording in the 
dictionary), so char 1 means the superfluous quote (as Dame jacque says).

Whatever you test here, you could use 'from rect  of this card' or 'from 
rect of img "border.png"' if you wish to have a local coords shot of 
'border.png', else you'll get a *global* coords shot (from the tools window or 
whatever).

Thanks again for your "throwing a spanner in the works" (I like your unusual 
phrasing and wording), indeed you did exactly the opposite.

hh
___
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: Richmond gets into drag

2016-02-01 Thread [-hh]
Richmond,

1. Can you "click through" the transparency to desktop on Linux? I couldn't 
manage that (what works on Mac/Win).
2. Be aware of a nasty resize problem with Linux + LC6.

When you are done you could compare with a solution that's fast enough for 
Raspi (runs also, faster, on newer MacOS X, Win7-10, newer Ubuntu):

Shaped RaspiStack #2
http://forums.livecode.com/viewtopic.php?f=76=26397

and please tell us your improvements.

Hermann
___
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: AW: How to create a hyperlink within a text field?

2016-02-03 Thread [-hh]
Hi,

Bernd and I had once a long thread in the forum about selecting
text where we found *the selectedLoc* to be very useful.

Means here:
[1] When writing the chapters mark their offset in your text in a
separate list, one line per mark [or as metadata of each link].

[2] Then walk once through the text, select the offsets and denote
the wanted scroll based on the selectedLoc and the field's top
(you may even adjust to "centering" or "scroll-to-2nd-line" here).
Then add these scrolls to your list and lookup this list when
clicking the link [or add these scrolls to the metadata of each
link].

If you resize the field or change the textsize/the textfont of
the field then simply update the list [or the metadata of each
link].

===
Hermann

___
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: snapshot and animation capture

2016-01-29 Thread [-hh]
Richmond wrote:
> At the risk of throwing a spanner in the works I want to refer you to this:
> http://lists.runrev.com/pipermail/use-livecode/2014-January/196782.html
> "Hi all, Some weeks ago,
> I reported that windowShape was not working in my Lubuntu Linux setup.
> After looking around and testing many recipes,
> finally I found the program that works in my setup.
> The windowshape property was not working in Lubuntu Linux because it 
> does not include, by default a composite manager."
> posted by someone wiser than me.
> Richmond.

What a valuable hint from Alejandro! And what a valuable hint to that hint.
May nearly all your sins be forgiven for that, Richmond:

Based on that I found the way of how to have windowshape on RaspberryPi,
running Raspbian. See here my first screenshot of a LC "frame"-stack
(the skyBlue line is the stack) that makes screenshots.

http://forums.livecode.com/viewtopic.php?f=76=26397

Thank you both very much for that.

Hermann


___
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] Release 8.0.0 DP 15

2016-02-22 Thread [-hh]
> Peter B. wrote:
> Dear list members, We are pleased to announce the release of
> LiveCode 8.0.0 DP 15 ... and 45 bug fixes!

What a british understatement for a preview, that's more
a release candidate (we are still in dot-dot state).

Especially the HTML5 part. I'm testing since three hours:
= The dp9-speed is back!!!
= Firefox 44 runs again (and pretty fast).
= Multiple fonts are available.
= The textsystem (measurements) seems close to the IDE now.
= Moves are smooth and look even more exact.
This is an essential progress.

Peter, iOS externals here, iOS externals there, I support that too.

But you and all you others of the team that worked with you in
that HTML5 part, you are *my* heros.

THANK YOU SO MUCH.
The more I read the source code the more I was impressed.
This progress and your ability of solving really difficult problems
is demonstrating again that the HTML5 part is worth the separate
license.

Good bye use-list (will still read the list), good bye sleep tonight,
back to forum, HTML5 (and Raspi)! Was fun here, I learned a lot from
you, thanks!

===
Hermann


___
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: Players in HTML5 - ETA for Full Functionality?

2016-02-26 Thread [-hh]
> Dirk wrote:
> I still hope that a niche can be created for the less demanding hobby
> group. Not all of us want to feel like freeloaders.

> jacque wrote:
> It isn't that there is no path forward, but rather that he thinks the 
> current licensing model is costing the company some sales. I don't
> know if that's true or not, I'm just playing interpreter.

> Peter H. wrote:
> I agree, I think that's what he means.  Wasn't there a personal use
> license at one point?  I seem to recall that standalones built with it
> displayed a splash screen for 10 seconds at startup.

That's it (whether the possible solution reminder or not).

** I think moreover, that Dirk is right with that consideration. **
The company loses additional available money.
In economics, more exactly in microeconomics, this is a pricing strategy,
called "price discrimination".

___
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: Math question

2016-02-26 Thread [-hh]
> Kay C. wrote:
> But then again I failed English so maybe I completely misunderstood what
> Peter was trying to achieve with his slider. :-(

@Kay C.
I didn't want to critisize you with my answer, sorry.

Of course you are correct with the "rounding", he said he can "vary the
events by 1 second", sorry. So he should use
round(c*f(..))
with my solution too, because that *gets* the thumbpos.

After your remark reading Peter's first post again it's still not
clear for me what he really wants:

@Peter
Could you please go more in detail.

You have a scrollbar of width 200,
startValue -300 (or -5*60),
endValue 300 (or 5*60).
What is your target output for example at -300, -60, 60 and 300
and some other values in between? What numbers do you wish to see
there?

Possibly you are thinking of a scrollbar that varies it's thumbs
units. Say for example, if the width of your scrollbar is 200:

from left to left+40 divides into -5*60 to -2*60
  = 180 units scaled to width 40
from left+40 to left+160 divides into -2*60 to 2*60
  = 240 units scaled to width 120
from left+160 to left+200=right divides into 2*60 to 5*60
  = 180 units scaled to width 40

This would scale the **INPUT** (=the x-axis), what is possible
to achieve, but you then have to script your own "showValue" field.

The current approaches of Kay and me scale the **OUTPUT** (= y-axis),
usually quite different.

@Kay C.
Do you agree with that second possible interpretation?

hh

___
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: Open Process, Interactive Shell on OS X

2016-02-28 Thread [-hh]
Each 'shell' opens it's own "terminal" session.
You have to do your own housekeeping (stdin, stdout).

Why don't you use (secure) sockets?

___
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: Min function

2016-02-28 Thread [-hh]
Nice comparison.

In 8.0.0-dp15 I have here with the large example 2.13 - 4.45 -  2.90.

**So case 1 wins. Clearly.**
Interesting. And good to know.

p.s.
min and max work also on arrays containing only numbers.
Has at about the speed of case 3.

hh

___
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: Possible enhancement

2016-02-28 Thread [-hh]
>> Peter H. wrote:
>> The php break statement has a numeric argument that defines how many
>> control structures to break out off  I sometimes find myself in 3 or 4
>> nested repeat statements and need to get out of the whole structure if a
>> particular condition is met in one of the inner structures.
>> The default would be 1 so no existing code would be affected.
>> Worth an enhancement request?
> 
> Mark Wi. wrote:
> What I'd rather see, and I think Robert Calliau has suggested this 
> before, is the ability to have named loops. Then you could exit from a 
> loop by specifying its name.
> 
> Dr. Ha. wrote:
> Yes; this is how modern Fortran does it.

Worth an enhancement request? Of course, both variants would be valuable.

I wonder which "workaround" you use until now for that in LC?

hh


___
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: Players in HTML5 - ETA for Full Functionality?

2016-02-28 Thread [-hh]
> BR wrote:
> This could work for me also. I think that we are talking about
> Javascript interactions ... 

It's all said, but not yet by all ... ;-)

"Es ist schon alles gesagt, nur noch nicht von allen."
(Karl Valentin)

___
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


Look positive at HTML5 now

2016-02-25 Thread -hh
Here a constructive post to HTML5.

CLUSTER-6:
** Six HTML5 standalones running smoothly together in one window. **
hh.on-rev.com/html5/ (the cyan button "CLUSTER" is at bottom).

I don't hesitate at all to criticize if appropriate, but much the same
I don't hesitate to praise:
Have fun and try yourself, LC 8.0.0-dp15 did a big step forward with
the HTML5 builder! Look at your great work, Peter (and some co-workers)!

After you started the six modules you can have with that cluster 9
clocks running "in sync". Work with one module and watch the others.

Load one single other module before loading cluster-6, then it's
faster. This is a real stress test for browsers, compare their 
performance with cluster-6. 

Currently Firefox is running fastest (with animations), Safari has the
best caching for repeated usage. Zoom the window *content* in/out to
fit your window or screen (I mean the cmd-minus/plus/0 mechanism).

I have (with  a 50 Mbit connection) Cluster-6 complete here in
... 12 seconds with Firefox
... 16 seconds with Safari
... 32 seconds with Chrome
... 40 seconds with Opera

This is my opinion to the current state of HTML5:
It's still in the lower half of a first final state. **And it's not very
coincident with my wish list.** But where it is, it is far beyond my
expectations. And it has already now become hard to touch it's limits
(I tried). I like it, go on!

===
Hermann

p.s. these modules demo a little bit what already works fine.

At topLeft: Fields with effects, a cool font and a color chooser.
At bottomLeft: Numbers drawn by polygons and a small color chooser.
At topRight: Symbols displayed by changing backPatterns.
At midRight: Polygon Clocks, one "wireframe" style, one "plain" style.
At bottomRight: Manipulating imagedata for display (6 images only).





--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Look-positive-at-HTML5-now-tp4701410.html
Sent from the Revolution - User mailing list archive at Nabble.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: Open source, closed source, and the value of code

2016-02-29 Thread [-hh]
>>> Monte G. wrote: 
>>> One of the issues of course is that there really might only be a handful
>>> of users that can't afford Indy and can't or won't use Community.

>> Sent from my iPhone
>> Roger G. wrote:
>> Do you include those who might want to publish to the Mac App Store and
>> IOS in your estimate? Roger

> Monte G. wrote:
> Roger if you are suggesting you would be happy with Community if you
> could publish GPL apps to Apple's stores then that's probably something
> to take up with Apple.
> Sent from my iPhone

Monte, Roger's question is clear. Why don't you answer it?
And show us the the data that's the base of your estimate?

Hermann

___
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: Open source, closed source, and the value of code

2016-02-29 Thread [-hh]
My email wasn't displayed, perhaps because a suspected iPhone?
No, No - I didn't sent this from anybody's iPhone ;-)

___
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: Math question

2016-02-26 Thread [-hh]
>> Peter Bo. wrote
>> How would one modify this to return tOffset as a smaller change when tData 
>> is near zero, and the opposite when tData is near the maximum?
> Kay C. Lan wrote:
> I think what you need is use x to the power of. ie x*x, x*x*x, or x*x*x*x 

Yes K.C., that's my proposal too.
Allow me to write this a little more math-like.

One may use

[*] return defaultSetting + c*f(n, 5*tData/maxvalue)

if the slider range is from -maxvalue to maxvalue.
the constant factor c will depend on tData (you use 60 in your example)

-- n is any real > 1 (try n=3/2 or n=2 or n=5/2 or n=3 or n=4)
-- (n doesn't need to be an integer, essential is to set n>1).
-- x is any real, here between -5 and 5
-- I would try to use -3 to 3 (--> the 3 replacing 5 in [*])

function f n,x
  return x*abs(x^(n-1))
end f

Kay, I write this in order to remark that
instead of the two cases
  -x*x, if x<0
   x*x, if x>0
one could write
   x*abs(x)
which has the correct sign
[because abs(x) = -x if x<=0 and abs(x) = x if x>0]

p.s. the thumbpos is since LC 7 a real, rounding is for setting
the thumpos not necessary any more.
One should know that if one needs an integer when getting the thumbpos.
===
Hermann


___
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: Players in HTML5 - ETA for Full Functionality?

2016-02-26 Thread [-hh]
> Scott R. wrote:
> ... That said, does an HTML5 standalone have the ability to
> interact with the HTML of the surrounding page?
> If yes, it would seem to be relatively straightforward to do
> what most HTML apps do, which is displaying video content in
> an iFrame, or embedded video on the same page...

Mark Wadd. said recently, freely out of my brain:
'LC uses emscripten only to render into the canvas'.
I suggested the use of other HTML5 objects already in November
and got a strict "NO": The HTML5 standalone will not have
features that are not in the engine.
The other way is already somehow possible: One can have a
webpage with actions that work on the LC canvas like on every
other canvas, for example get mouseActions or keyboardActions
if over the canvas.
But for that the LC canvas is a "dead" drawn object, like a
still image, you can't go 'deeper'. Except LC would allow to
attach js handlers alike the browser objects do.

Hope that was not too theoretical, the HTML5 people in general
have their own special wording what builds (intentionally?)
a barrier to simple HTML3 users like me and, as you wrote,
also you ...

hh


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


Re: LiveCode for the Hobbyists

2016-02-26 Thread [-hh]
Really good points, Roland.

Let me add explicitly this one.

Build on the next generation, who will become decision maker in a few
years. And, if they *know* the software, may also become possible
buyers of LC-related products:
Give teachers and their students in class FREE copies.
Give university students and hobbyists very cheap copies.

If the company continues to have such crazy pricing strategies as now
then it will loose in sum: The negative income by people "jumping off" will be 
greater than the additional positive income by raised prices.

For example I went with backing nearly everything in the last three
years already over my limits: An Indy license, a community membership
(who of the writers here has also one?), an additional HTML5 license,
a lot of time wasted for beta-testing. I'm hobbyist, sell nothing ...

The next "pricing game" will force me to jump off. And jumping off will
mean to jump off by 100%, in anger, not only partially.

And certainly I'm not the only one who works for no money, pays only
to support LC. The current pricing strategy becomes aggressive against
this group of users.



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


Re: LiveCode for the Hobbyists

2016-02-26 Thread [-hh]
> Matt M. wrote:
> But, if you're a hobbyist, and not charging for what you distribute,
> why would you need to close the source?

Because, not always but sometimes, you would like to share the code
with some people only, not with all.
And at the same time you are willing to share your product with all,
for free.

Code has also an immaterial value.

___
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: Math question

2016-02-26 Thread [-hh]
Peter,

now I got it ...
You could use finer steps for the whole scrollbar.
The use, say between -2 and 2 these finer steps, may be steps of size 0.1,
and if the value is greater smaller than -2 or greater than 2 use a 
value rounded to the next integer or fraction of an integer.

Example:
Scrollbar setting in LC8, startvalue=-5, endvalue=5,  numberformat=0.0

The following yields

between -2 and +2 steps of 6 added to defaultSetting
between -5 and -2 steps of 30 added to defaultSetting (use n=2)

That is,
-- x is the thumbpos
-- n is the denominator in the steps 60/n ( n is one of 1,2,3,4,5,6)

function factorFromSlider n,x
   if abs(x) < 2 then
  return defaultSetting + round(60*x)
   else
 return defaultSetting + 60*round(n*x)/n  --  60 dividable by n
 --> = defaultSetting + 30*round(2*x) for n=2
   end if
end factorFromSlider


You can find an explanation for "round(n*x)/n" here
http://forums.livecode.com/viewtopic.php?p=112072#p112072

If I understood correctly, you have with the above function essentialy
what you wanted, at least I hope so.


Hermann

p.s. If using LC 5-6-7-8 "in one" you could use a scrollbar -50 to 50
with steps of 1 and

function factorFromSlider5678 n,x
   if abs(x) < 2 then
  return defaultSetting + round(6*x)
   else
 return defaultSetting + 6*round(n*x)/n
 --> = defaultSetting + 3*round(2*x) for n=2
   end if
end factorFromSlider5678

> Hermann,
> 
> Reading your last message again….
> 
> The slider is marked in absolute increments of -5, -4, -3, -2, -1, 
> 0, 1, 2, 3, 4, 5.
> 
> The user moves the thumb to a position with a corresponding output 
> of one of those numbers. That position is saved in the preferences.
> 
> I take the output from the slider and translate it to a timing 
> change. The user sees an animation synced with music notation happen 
> sooner or later on the screen. In the current linear form, that 
> change is precisely the same for each increment. But I have found 
> that most of the adjustment is needed around the zero mark, mainly 
> having to do with the speed of the user’s computer, so I need finer 
> adjustment there. 
> 
> If a user really wants to change the timing a lot, he can do so by 
> moving it to 4 or 5—it’s all subjective for each user—but the point 
> of the adjustment is to allow everyone to get it just right.
> 
> The number output from the algorithm is an offset to trigger the 
> animation earlier so after processing is done the animation looks 
> like it is in sync.
> 
> > What is your target output for example at -300, -60, 60 and 300
> > and some other values in between? What numbers do you wish to see
> > there?
> 
> 
> It seems for Windows users, zero (-300 output) makes things happen 
> too soon, and moving it to -1 (-360 output) makes it late. I could 
> change the slider to show a range of -10 to +10 to keep the visual 
> indication of exact linear change with more precision, but I’m 
> choosing to try to do it in a non-linear fashion and keep the user 
> interface simple.
> 
> Peter

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

Re: LiveCode for the Hobbyists

2016-02-26 Thread [-hh]
> Monte wrote:
> > On 27 Feb 2016, at 9:28 AM, [-hh]  wrote:
> > Build on the next generation, who will become decision maker in a few
> > years. And, if they *know* the software, may also become possible
> > buyers of LC-related products:
> > Give teachers and their students in class FREE copies.
> > Give university students and hobbyists very cheap copies.
> 
> Which out of these groups isn't covered by LiveCode Community? Clearly 
> Indy has a target market of developers earning or planning to earn at 
> least enough to justify the cost. I'm not really sure I understand the 
> issue here. Is it people want to give the company money but don't want 
> to do it via donations as thanks for the availability of Community?
> Cheers Monte


There is an education category (and LiveCode Teacher Pack) of products.
You can read that on the Livecode webpages, here the link :-)
http://livecode.com

hh

p.s. Why are you hiding your externals code? Could it be that a simple
student who has a good idea, wants to hide his code, may be only for a
while, for similar reasons?


___
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: Math question

2016-02-26 Thread [-hh]
Peter,

now I got it ...
You could use finer steps for the whole scrollbar.
The use, say between -2 and 2 these finer steps, may be steps of size 0.1,
and if the value is greater smaller than -2 or greater than 2 use a 
value rounded to the next integer or fraction of an integer.

Example:
Scrollbar setting in LC8, startvalue=-5, endvalue=5,  numberformat=0.0

The following yields

between -2 and +2 steps of 6 added to defaultSetting
between -5 and -2 steps of 30 added to defaultSetting (use n=2)

That is,
-- x is the thumbpos
-- n is the denominator in the steps 60/n ( n is one of 1,2,3,4,5,6)

function factorFromSlider n,x
  if abs(x) < 2 then
 return defaultSetting + round(60*x)
  else
return defaultSetting + 60*round(n*x)/n  --  60 dividable by n
--> = defaultSetting + 30*round(2*x) for n=2
  end if
end factorFromSlider


You can find an explanation for "round(n*x)/n" here
http://forums.livecode.com/viewtopic.php?p=112072#p112072

If I understood correctly, you have with the above function essentialy
what you wanted, at least I hope so.


Hermann

p.s. If using LC 5-6-7-8 "in one" you could use a scrollbar -50 to 50
with steps of 1 and

function factorFromSlider5678 n,x
  if abs(x) < 2 then
 return defaultSetting + round(6*x)
  else
return defaultSetting + 6*round(n*x)/n
--> = defaultSetting + 3*round(2*x) for n=2
  end if
end factorFromSlider5678

> Hermann,
> 
> Reading your last message again….
> 
> The slider is marked in absolute increments of -5, -4, -3, -2, -1, 
> 0, 1, 2, 3, 4, 5.
> 
> The user moves the thumb to a position with a corresponding output 
> of one of those numbers. That position is saved in the preferences.
> 
> I take the output from the slider and translate it to a timing 
> change. The user sees an animation synced with music notation happen 
> sooner or later on the screen. In the current linear form, that 
> change is precisely the same for each increment. But I have found 
> that most of the adjustment is needed around the zero mark, mainly 
> having to do with the speed of the user’s computer, so I need finer 
> adjustment there. 
> 
> If a user really wants to change the timing a lot, he can do so by 
> moving it to 4 or 5—it’s all subjective for each user—but the point 
> of the adjustment is to allow everyone to get it just right.
> 
> The number output from the algorithm is an offset to trigger the 
> animation earlier so after processing is done the animation looks 
> like it is in sync.
> 
>> What is your target output for example at -300, -60, 60 and 300
>> and some other values in between? What numbers do you wish to see
>> there?
> 
> 
> It seems for Windows users, zero (-300 output) makes things happen 
> too soon, and moving it to -1 (-360 output) makes it late. I could 
> change the slider to show a range of -10 to +10 to keep the visual 
> indication of exact linear change with more precision, but I’m 
> choosing to try to do it in a non-linear fashion and keep the user 
> interface simple.
> 
> Peter

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

Re: LiveCode for the Hobbyists

2016-02-26 Thread [-hh]
> Monte wrote:
> Apples/oranges you are comparing proprietary extensions with something created
> just for the fun of it with no intent to commercialise. Cheers Monte
> Sent from my iPhone
> > hh wrote:
> > Why are you hiding your externals code? Could it be that a simple 
> > student who has a good idea, wants to hide his code, may be only for a 
> > while, for similar reasons? 

You may be right at your current level of thinking.
Now try to think one more level abstract: Apples and oranges are both fruits.

A good idea and good code doesn't depend on the proprietary state while
working for that. So, why can a student/hobbyist who has a good idea not
have the same reasoning as you for hiding such code? He may buy the cheap/
affordable proprietary state to hide it (for a while, until he can afford
the more expensive offers)?

hh
NOT sent from anybodys iPhone
___
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: Math question

2016-02-26 Thread [-hh]
> hh wrote:
> function f n,x
>   return x*abs(x^(n-1))
> end f

Sorry that's wrong. Should read

function f n,x
  return x*abs(x)^(n-1)
end f


___
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: Image Scaling Problem

2016-01-19 Thread [-hh]
Let me add my 1.414214 cents to this.

Connected to "scaled and original size of images" (whether imported
as control or by setting the filename):

The *old* property inspector shows in the size & location tab the
"fit content" buttons which allow to restore the original width and/or
height even while 'the lockLoc of img x' (or 'the locked of img x') is true.

Until now, these "fit content" buttons are missing in the *new*
property inspector (LC 8), although we can restore the original size
values by script (LC 1-8):
set width of img iName to the formattedWidth of img iName
set width of img iName to the formattedWidth of img iName


___
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: changing the size of the image that's combined with text

2016-02-16 Thread [-hh]
> I've been doing some php coding recently and it allows the us
> of single or double quotes as string delimiters so you can use
> single quotes around a string that includes double quotes. Would 
> be nice to have that in LC.

Yes, this is so comfortable! I miss it in LC since years. Please
make a feature request so that we can second it.

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


Re: Free BasicClock desktop clock for OSX

2016-02-16 Thread [-hh]
Howard, two hints to your clock:
= If user hasn't installed (or disabled) the few fonts you
make available then it always has the same 'system font'.
= The colour chooser may be fully hidden by the clock window
and then 'blocks' the app.


___
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: Free BasicClock desktop clock for OSX

2016-02-16 Thread [-hh]
Howard B. wrote:
> Did you not have any of these fonts installed at the time?
> Had you explicitly removed them? What version of OSX are
> you running?

I have > 800 fonts on my Mac (and use newest OSX developer
preview). Of course I enable only a small subset, what I
currently need. Your's are usually not in that subset.

> Again, I'm wondering if this happened naturally for you
> or if you created this condition for stress testing.

No stress test, a simple short test for functionality.
I was curious whether you have implemented very special
features because you hide your code. Then I saw this,
tried to be helpful and reported.

Good luck with your app.
===
Hermann

___
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: Mac window fullscreen widget

2016-02-16 Thread [-hh]
Monte G. wrote:
> We need ways to programmatically enter and leave fullscreen
> mode along with ways to enable and disable the availability
> of the mode.
> Anyone have any hints where I look for those things.

This is what I use on MacOSX.
The windowLevel should *always* be set lower than the popUpMenu
level, so that one could use a rightClick menu to change to/from
fullScreen mode. Use also, like most other apps, the escapeKey
for leaving fullScreenMode.

Perhaps is it possible to implement "set windowLevel to x" in LC 8.1?
===
Hermann

___
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 and do - what NOT to do

2016-02-18 Thread [-hh]
Kay C. L. wrote:
> Moving right along, for those Slack Moders, if you run the same statements:
> 
> repeat with x=1 to 20
>   do "local tVar_" & x
>   do "put x*x into tVar_" & x
> end repeat
> put tVar_5 into msg  --not hidden in 
> 
> For reasons I do NOT understand, you get a runtime error:
> 
> line: do "local tVar_" & x
> hint: local tVar_5
> 
> If you remove/comment the line: do "local tVar_" & x
> 
> everything will then run fine - reinforcing your decision to choose Slack
> Mode because declaring vars is so 3GL ;-)
> 
> So long story short; contrary to the example, it would seem to be
> counter-productive to use  within a  statement.


Hi,

I read about "do" again last night, because Craig N. (in a comment to
Peter H.'s QCC #16941) suggested to use single quotes also for triggering a
re-compilation, as "do" does.
He used a 'declaration'-example similar to yours.

Now you end in a rather nifty example.

on mouseUp
  repeat with x=1 to 20
do "local tVar_" & x
do "put x*x into tVar_" & x
  end repeat
  put tVar_5 into fld 2
end mouseUp

[1] In strict compilation mode it throws "unquoted literal" on "tVar_5", all OK.
[2] In slack compilation mode it throws "local tVar_5", also OK?

I think so. The point is:  *** "do" recompiles ***.
Thus line 3 with x=5, what is "local tVar_5", is offending in that 
re-compilation,
because tVar_5 is already implicitly declared in line 6 of first compilation.

> .. It may be be counter-productive to use  within a  statement
I would like to add to your advice the following line.

'This may help sometimes:  Read "do" as if it were on the end of current 
handler.'

===
Hermann
___
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 and do - what NOT to do

2016-02-18 Thread [-hh]
> Peter B. wrote:
> > The Dictionary entry for 'local' has this Example: 
> >
> > -- To make a numbered list of variables: 
> > repeat with x=1 to 20 
> > do "local tVar_" & x & "; put empty into tVar_" & x 
> > end repeat 
> >
> > Which 'apparently' runs fine if you copy and paste it into the msg box. For 
> > the purposes of this discussion and so we can see what's going on I'm going 
> > to remix that to: 
> 
> Are there any problems that can be solved by generating variable names, that
> couldn't be solved equally well (and without using "do") using an array? 
> Peter 

Just now I can't think of an example for *generating* variable names only.
But there are very simple and important ones for *using* variable names:

local a1=1, a2=false
-- local a[1]=1, a[2]=false #<-- currently not allowed

For such default-constructs variable names and using "do" are really helpful.


___
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 and do - what NOT to do

2016-02-18 Thread [-hh]
Mark Wadd. wrote:
> > [-hh] wrote:
> > local a1=1, a2=false
> > -- local a[1]=1, a[2]=false #<-- currently not allowed
> > 
> > For such default-constructs variable names and using "do"
> > are really helpful.
> 
> Although you can do the above as:
>local a -- only needed if in strict compilation mode
>put 1 into a[1]
>put false into a[2]

I meant local *script* variables, outside of handlers,
I seldom use local declarations within handlers.
The possibility of setting default values is an important
tool for me.

For example in a button script that uses a certain variable
in mouseEnter, mouseDown, menuPick and ...
Where to set the default for an array entry if one wishes
to use also "send " to the button? In each and
every handler?

(These local variable declarations in the top lines of my
scripts act for me also like the header of a HTML-page.
Nearly always one knows roughly alone from that what's
following.)

===
Hermann

___
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


leap to future

2016-02-18 Thread -hh
Kevin M. wrote:
> see in detail https://livecode.com/leap-to-future/

Yes, LC is great, worth its pricing, even if one is not using
any of Monte's iOS externals: The other core-developers will
have more time for their valuable work by that personal expanding.

But sadly your explanations to the Indy license are quite unclear
relating to HTML5.

1. You argue with HTML5 development for the raise of Indy pricing.
2. Recently we had to buy *separate* licenses for HTML5 deploying.

Please explain the issue "HTML5" in detail for the example of a
locked $499 Indy license.

===
Hermann 



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/leap-to-future-tp4701170.html
Sent from the Revolution - User mailing list archive at Nabble.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: Programmatically determine the average greyscale

2016-02-18 Thread [-hh]
Hi BR (thanks for the abbreviation),

First you have to decide in detail what you want.

1. What is an average for you?
Usual arithmetic mean is one option, other simple ones are a weighted mean of 
rgb (used by Photoshop etc.) or median values.
2. How to use the alphavalues?
Max, min, median, weighted means are again options.

This is not at all trivial. The designers here will have extremely diverging 
examples for different 'averaging'.

Perhaps it is much easier (and much faster) to simply set the ink of the button 
to give a high contrast?

hh
___
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: Programmatically determine the average greyscale

2016-02-18 Thread [-hh]
BR,

I now saw, late -- sorry, that you are using button's showName, that is, the 
text colour has to be adjusted, not the pattern.

Then using a text field instead of 'showName' and setting the field's ink to 
"notSrcAndReverse" should do what you want (incl. nice effects).


OR:

Here's a formula for a weighted mean close to that some professional apps use 
when converting an image to grayLevel.

This is derived from "perception" values (note: .6 is close to goldenRatio) of 
the human eye:

## g = (1*r + 6*g + 3*b) div 10 for each r,g,b-pixel
used for fully opaque pixels.

hh
___
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: Programmatically determine the average greyscale

2016-02-19 Thread [-hh]
BR and jacques,

it's kind of a 'LC-mania' of me to put a fully working
solution, if available, near the end of a thread.

Here's one I made for converting to grayLevel colours and
adapted to your case. Tell us your solution also, please.
The following is pretty fast, I wrote it after learning some
secrets of imageData from Bernd's "little stacks" and forum
posts. So praise him and LC's pointer arithmetic for the speed.

It takes here on a medium fast machine in average 16 ms for
your 20x20 px image segment
(incl. setting of the button's or field's adjusted textcolor)

===

local ii="preview", bb= "bigBen" -- image's and button's name

## Function computes an average RGB-colour value for an image
## (or a rectangular segment of it).
## Divide below in each loop if image is *very* large
-- x = imageData 32bit ARGB of the full img ii
-- w = width of the full image ii
-- pixel rows = r1 to r1, pixel cols = c1 to c2
-- wr, wg, wb = weights for r, g, b
function weightedColorMean x,w,r1,r2,c1,c2,wr,wg,wb
  repeat with j=r1 to r2
put (j-1)*w into j0
repeat with i=c1 to c2
  add sum( \
wr*byteToNum(byte 4*(j0+i)-2 of x), \
wg*byteToNum(byte 4*(j0+i)-1 of x), \
wb*byteToNum(byte 4*(j0+i)   of x) ) to s
end repeat
  end repeat
  return s div (sum(wr,wg,wb)*(r2-r1+1)*(c2-c1+1))
end weightedColorMean

on mouseUp
  put the millisecs into m1
  put the width of img ii into w
  put the imageData of img ii into iData
  -- perception values:
  put weightedColorMean(iData,w,20,40,20,40,1,6,3) into M 
  -- usual luminance formula (wikipedia, cited by Jaques)
  -- put weightedColorMean(iData,w,20,40,20,40,3,10,1) into M 
  if M > 191 then set textcolor of btn bb to "51,51,51"
  else set textcolor of btn bb to "255,255,225"
  put M && the millisecs-m1 && "ms" into fld 1
end mouseUp

===
Hermann

p.s. Jacques: There is no semicolon above in that post ;-)


___
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: Programmatically determine the average greyscale

2016-02-19 Thread [-hh]
BR,

you do estimate the luminance of a 120x175 = 21000 px region
on base of the evaluation of ONE single deterministic pixel?

Accepted, of course, but then it may be better, from a
probabilistic point of view, not to take "the" pixel (40,40)
but *any* randomly chosen pixel of that region.

You could do for that:

  set randomseed to (char -8 to -1 of the millisecs)
  put 19+random(120) into pX ; put 19+random(175) into pY

==
hh

p.s. Sorry for giving this advice, but "randomness" was my
job's field and is still my passion.

___
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: Programmatically determine the average greyscale

2016-02-20 Thread [-hh]
> BR wrote:
> HH You are right of course. one pixel was an expediency and certainly
> does not cover all cases. In fact it is a rather weak algorithm ...
> ... Musings:
> A random algorithm also does not help us out either.  

BR,

[1] I didn't say a single random pixel is the way to go.
I simply accepted your single-pixel-way and tried to improve it.

[2] You CAN solve this in a very short time with LiveCode.

You could give the following a try (less than 5 minutes).
This is ONE 'static' setting, that works for ALL images.

Make a new textField, that will use contrast to *every* single pixel
that is below the text.
It requires later on only to script that the name of the buttons will
be hidden and instead displayed by the correspondingly placed and sized
field (you can use with that even formattedHeight and formattedWidth to
optimize sizing and location).

Settings:
opaque=false
locktext=true
autohilite=false
forecolor=255,255,255
script="on mouseDown;grab me;end mouseDown"

ink=notSrcOrReverse
showBorder=true -- needed with that ink or if you wish a border
borderWidth=0   -- needed with that ink, not if you wish a border

blending=12
Increase the blendlevel to have less contrast
between "black" (darkGrey) and "white" (lightGray)
blendLevel=0 gives 'full' black and white

Now bring this field to front and drag it over any part
of pictures or black/gray/white rectangles of your stack.
You should have readable contrast while dragging and
whereever you drag it (if the field is not empty).

I tried with your link that resolves to "skitch.png",
works as expected.

-hh

Below are the properties of my test field for looking up,
in case you use different default values.
=
altId=0
autoHilite=false
autoTab=false
backColor=0,0,0
backPattern=
behavior=
blendLevel=12
borderColor=
borderPattern=
borderWidth=0
bottomColor=
bottomPattern=
cantSelect=false
colorOverlay=
cursorMovement=default
disabled=false
dontSearch=false
dontWrap=false
dropShadow=
firstIndent=0
fixedLineHeight=true
focusColor=
focusPattern=
foreColor=255,255,255
forePattern=
hGrid=false
hScroll=0
hScrollbar=false
hiliteColor=
hilitePattern=
hilitedLines=
htmlText=Knowledge
id=1005
ink=notSrcOrReverse
innerGlow=
innerShadow=
layer=6
layerMode=static
listBehavior=false
lockLoc=false
lockText=true
margins=8
multipleHilites=false
name=Field
noncontiguousHilites=false
opaque=false
outerGlow=
rect=146,284,460,360
scrollbarWidth=20
shadow=false
shadowColor=
shadowOffset=4
shadowPattern=
sharedText=false
showBorder=true
showFocusBorder=true
showLines=false
style=transparent
tabStops=
textAlign=center
textDirection=auto
textFont=Arial Black
textHeight=
textSize=48
textStyle=plain
threeD=false
threeDHilite=false
toggleHilites=false
toolTip=
topColor=
topPattern=
traversalOn=true
vGrid=false
vScroll=0
vScrollbar=false
visible=true

___
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: Finding UTC

2016-02-20 Thread [-hh]
You could think about showing the internet date (=full information).

___
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: Programmatically determine the average greyscale

2016-02-20 Thread [-hh]
BR uses or wants to use button labels.
Where then do you apply this effect? To a button label?


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


Re: How do I enable scrolling of a group ?

2016-02-20 Thread [-hh]
This is essentially the same technique that Scott R. suggested.
New is the MOVE-TO-SCROLL-FACTOR, in case you prefer that.

** The scroll respects here the group's relative to card's size. **
** Thus scrolling becomes "parallel" to the mouseMove distances. **
For example if you move your fingers/the mouse from (20,70) to (50,30)
then the hscroll of the the group changes by +30
and the vscroll of the the group changes by -40.
Of course you may moreover scale these factors (fw0, fh0 below) to
your needs, for example to an increase for a large display.

-- In group's script.
-- Here given for hscroll and vscroll, mostly I use only one of both.
-- Also I give it for mouseMove, you change this to your need
-- (touchMove ...) better than I do.

local d0=false, x0=0, y0=0, h0=0, w0=0, fh0=1, fw0=1

on mouseEnter; put false into d0; end mouseEnter
on mouseUp; put false into d0; end mouseUp
on mouseRelease; put false into d0; end mouseRelease

on mouseMove x,y
  if not d0 then exit mouseMove
  set hscroll of me to w0+fw0*(x-x0)
  set vscroll of me to h0+fh0*(y-y0)
end mouseMove

on mouseDown
  put (the height of this card) div (the height of me) into fh0
  put (the width of this card) div (the width of me) into fw0
  put true into d0; put the clickV into y0; put the clickH into x0
  put the vscroll of me into h0 ; put the hscroll of me into w0
end mouseDown

I also have sometimes, in order to have a 'static' scrollbar size,
a transparent (for example by using ink 'noop") object, may also be
disabled, of card's (half) size in the group.

___
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: Programmatically determine the average greyscale

2016-02-20 Thread [-hh]
> > hh wrote:
> > BR uses or wants to use button labels.
> > Where then do you apply this effect? To a button label?
> 
> jacque wrote:
> Shadows work on button names/labels the same as they do for fields
> if the button is transparent. The shadow affects only the text.

He uses images as backpattern. For text the label.
How to manage that with a transparent button and dropshadow?

If he uses a textfield instead of labels, yes, then the described
dropshadow setting is a *very* nifty solution. I already added this
to my main personal "library" (who shall be cited as 'author'?)

hh

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


Re: How do I enable scrolling of a group ?

2016-02-21 Thread [-hh]
Alex,

sorry, I know from your posts which I read long before writing to
this list that you don't need help for the scrolling per se.
I just wanted
to add my MOVE-TO-SCROLL-FACTOR as a whole. inside of a working script.
I don't like to scroll with 5 long moves until the targeted loc is
reached and may be I'll use your app. :-)

The point with the scrolling is probably given in the dictionary entry
to "scrollbarDrag":
"Sent to a field, scrollbar, or group when the user drags the scrollbar
thumb **or when a text selection causes a field to scroll**"

The "or-part" may be the explanation why scrolling works with the text
field and not with the group. Without 'autohilite' a textfield may also
not scroll.

 "Doing Touch scroll by rawkeyDown" 
will be interesting for a lot of readers. Would be great if you share
your solution with a script snippet at the end of this thread ...

Hermann


___
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: Finding UTC

2016-02-21 Thread [-hh]
> Graham S. wrote
> Thanks to all those who replied - ‘the internet date’ was the
> answer I needed, since I then didn’t have to get out of my
> LiveCode comfort zone to do the calculation. I’m thinking of
> time-stamping some interactions that are going to go through
> a program I’m running on LiveCode Server. Right now I have it
> running on DreamHost, whose servers presumably stay in one
> place, but I wanted an invariant time stamp not depending on
> the location of the server or of any particular user, so I
> saw UTC as the way to go. My issue was that I didn’t know of
> a command that I could run on the server, or a url to a public
> time server, that would just give me UTC in its simplest form
> without leaving LiveCode - probably very lazy of me, but I want
> to keep things as simple as I can. I have now written a little
> homegrown routine that uses ‘the internet date’ which seems to
> work fine. Thanks again Graham

One remark to the internet date (which is the date format I
always use and then convert to dateItems if needed for
calculations).

If using recent or future dates one should have in mind that
"the internet date" respects **daylight saving offsets** of
the dates.

You can see that with a HTML5 standalone
http://hh-onrev.com/html5/countUpOrDown-8.0.0-dp-9X.html
that counts up to the LC meeting. Click at the bottom field
to change the date from August to March and you(?) will see
the UTC offset changing by -1 hour.
[Use Safari, Chrome or Opera.
Currently NOT Firefox (v45, again with v46)]

hh
___
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: Finding UTC

2016-02-21 Thread [-hh]
Sorry, typo in link, should read
http://hh.on-rev.com/html5/countUpOrDown-8.0.0-dp-9X.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


Re: Not able to use the clipboard with HTML5 deployment

2016-02-21 Thread [-hh]
> So, I want to copy the formatted text from my LC HTML5 app to a
> text field in another webpage that is independent of my HTML5
> app and over which I have no control. I don¹t think that¹s
> possible without using the clipboard as an intermediary - is it? 
> Regards, Terry...

Hi Terry (and BR)
this is currently the one and only way available for communication
with a HTML5 standalone: The Ask dialog.

I made a demo, available at hh.on-rev-com/html5/ (= overview)
called 'Copy/Paste Text'-Test

It's made with dp9 in November, nothing related to that changed
in dp10-14, stack is downloadable.
[Use Chrome, Opera or Safari.
Firefox: yes < v44, NO v44, yes > v44 (coming soon)]

hh
___
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: Finding UTC

2016-02-21 Thread [-hh]
> Peter H. wrote:
> I don;t have the link to hand but there's a Youtube video that's been
> posted on this list before about what a nightmare it is to handle all
> the scenarios involving what date and time it is in different parts of
> the world and keeping up to date with changes. Pete 

> Kay C.L. wrote:
> I don;t have the link to hand but there's a Youtube video
> https://www.youtube.com/watch?v=-5wpm-gesOY

Here are several other approaches also discussed. Especially good
pro and contra for TAI, CUT and 'internet time'(Swatch).

http://www.timeanddate.com/topics/timekeeping

___
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 able to use the clipboard with HTML5 deployment

2016-02-21 Thread [-hh]
> Terry J. wrote:
> OK, thanks hh. It’s probably a little too clunky for my purpose
> (I don’t think I can expect users to manually replace placeholder
> characters with returns) but nice to know that there is a
> workaround of sorts.

If the webpage that receives the text (page) accepts 'styled' text
you could -- before delivering the text -- juggle with
   case RTFtext: \par, \line or \softline
   case HTMLtext: ,  or space
so that the copied text (if it's not too long) becomes one line
for using the Ask dialog??

hh
___
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: Problems creating a field in LC8 DP16

2016-03-18 Thread -hh
William,

meanwhile I tested this in depth and must say that you are
right with that: The formattedWidth and formattedHeight don't
show the exact boundaries, as you wish.

But from my knowledge of TeX I know, that this isn't obtainable
for fonts that don't have an extremely optimized metric. This
isn't even solvable by "pure" typesetting engines (nor by LC).

The formattedWidth is meanwhile pretty good measured.
[It has some problems with extreme slanted fonts.
That's the problem of non-perfect text-metric of the fonts.]

The formattedHeight is *better than ever*, but has still some
problems with interline-spacing at top or at end of strings.

So, with the final version of script you probably have to wait
for stable 8.0.0 (or 8.0.1) -- there is too much "in motion"
with the new "text engine". Peter certainly could say more here.

Perhaps you should report this as bug, so that they know
there are, despite their improvements, still problems?

We should use for demos of these problems, to be fair with respect
to font-metrics, a high-quality otf/ttf-font (for example "Skia").

Hermann

p.s. I was some time ago preparing a stack for the Raspi-stacks
collection that shows the exact boundary box of the
"outer opaque region" of a transparent object. I'll expand it now to
test also the formattedHeight and formattedWidth of a text-display.



Wprothero wrote
> Is this a bug? Shouldn’t the formattedHeight and formattedWidth show the
> text? I’m content to use my margins adjustment, but hope it doesn’t need
> to be revisited in the future. If so, it’s a small thing, but...





--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Problems-creating-a-field-in-LC8-DP16-tp4702326p4702354.html
Sent from the Revolution - User mailing list archive at Nabble.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

<    1   2   3   4   5   6   7   8   9   10   >