Re: [ANN] Release 9.6.2 RC-3

2021-03-17 Thread Håkan Liljegren via use-livecode
Ok, after a day or so it creeps back. Unplug extra monitor, restart LiveCode, 
plug in extra monitor. Annoying, but maybe not a showstopper...

I only see this with LiveCode and not any of my other apps.

:-Håkan
On 16 Mar 2021, 08:08 +0100, Håkan Liljegren via use-livecode 
, wrote:
> Thanks to everyone testing this! Trashing the prefs didn’t help, trashing all 
> files in the ”Application support”-folder didn’t help! But, I tried to unplug 
> my second monitor… Started LC and then, everything worked! Plugged the 
> monitor back again, end now, it works! Now I can even click the buttons in 
> the ”Save before closing”-dialog that is tucked to the menu bar. I have not 
> been able to do that before!
>
> The only hiccup now is that the revMenubar starts right aligned on my second 
> monitor, but I always move it to my second (bigger) screen anyway so that is 
> a minor bump in the road.
>
> :-Håkan
> On 16 Mar 2021, 04:23 +0100, Sean Cole (Pi) via use-livecode 
> , wrote:
> > I just downloaded and tested on my MBP16(2019), single screen, MacOS
> > 11.2.2, and also in parallels Win10(v1909) and had no issues.
> >
> > BTW, visual effects work a dream and even macOS CoreImage effects work
> > great. Super. Hope to see more (HTML5, hint, hint) soon.
> >
> > Sean
> >
> > On Mon, 15 Mar 2021 at 18:28, Richmond via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> > > I have just downloaded Indy 9.6.2 RC-3, done the licensing "dance" and
> > > fired it up
> > > without any problems at all:
> > >
> > > macOS 11.3 Beta 3, 2018 Mac Mini, 3 monitors.
> > >
> > > I suspect you have some background process (i.e. something set to run at
> > > startup) that is
> > > clogging up the works.
> > >
> > > Best, Richmond.
> > >
> > > On 15.03.21 18:40, Håkan Liljegren via use-livecode wrote:
> > > > After downloading and activating with my indie license, LiveCode starts
> > > but is totally unresponsive! I can move the windows, but that’s it! I 
> > > can’t
> > > click anything not even in the menu. No shortcuts works, and, If I select
> > > ”Quit” from the icon in the dock LiveCode doesn’t quit. Only thing I can 
> > > do
> > > is to ”Force Quit” the application.
> > > >
> > > > Running macOS 11.2.2 on a MacBook Pro (15-inch, 2018) with a dual
> > > monitor setup.
> > > >
> > > > Any one else having this???
> > > >
> > > > :-Håkan
> > > > On 12 Mar 2021, 12:57 +0100, panagiotis merakos via use-livecode <
> > > use-livecode@lists.runrev.com>, wrote:
> > > > > Dear list members,
> > > > >
> > > > > We are pleased to announce the release of LiveCode 9.6.2 RC-3.
> > > > >
> > > > >
> > > > > Getting the Release
> > > > > ===
> > > > > You can get the release at https://downloads.livecode.com/livecode/ or
> > > via
> > > > > the automatic updater.
> > > > >
> > > > >
> > > > > Release Contents
> > > > > 
> > > > > LiveCode 9.6.2 RC-3 comes with 6 regression fixes, including:
> > > > >
> > > > > - Visual effects doesn't work on macOS Big Sur
> > > > > - Cannot close "Ask Password" dialog as Sheet in modal stack
> > > > > - mergLA not included in 9.6.2 RC 2
> > > > > - PDF Widget broken on iOS device
> > > > >
> > > > > For the full list of all fixes, updates and enhancements please see 
> > > > > the
> > > > > release notes:
> > > > >
> > > http://downloads.livecode.com/livecode/9_6_2/LiveCodeNotes-9_6_2_rc_3.pdf
> > > > >
> > > > >
> > > > > Known issues
> > > > > 
> > > > > - The Browser widget's native layer is not shown in some Linux distros
> > > with
> > > > > Cinnamon window manager.
> > > > > - The use of the Browser widget is not supported on Ubuntu 18.04 64 
> > > > > bit
> > > LTS
> > > > > yet.
> > > > >
> > > > >
> > > > > Required Software
> > > > > =
> > > > > To build iOS apps with LiveCode you must have the appropriate versions
> > > of
> > > > > Xcode as follows:
> > > > >
> > > &

Re: Emtying browser widget cache?

2021-03-16 Thread Håkan Liljegren via use-livecode
Thanks! Works like a charm! Should have thought about that, myself. Teaching 
web design for nearly two decades, and still missed the obvious…

:-Håkan
On 15 Mar 2021, 21:21 +0100, How to use LiveCode 
, wrote:
>
> do "location.reload()" in widget "myBrowser"
>
> Kind regards,
> Panos
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: [ANN] Release 9.6.2 RC-3

2021-03-16 Thread Håkan Liljegren via use-livecode
Thanks to everyone testing this! Trashing the prefs didn’t help, trashing all 
files in the ”Application support”-folder didn’t help! But, I tried to unplug 
my second monitor… Started LC and then, everything worked! Plugged the monitor 
back again, end now, it works! Now I can even click the buttons in the ”Save 
before closing”-dialog that is tucked to the menu bar. I have not been able to 
do that before!

The only hiccup now is that the revMenubar starts right aligned on my second 
monitor, but I always move it to my second (bigger) screen anyway so that is a 
minor bump in the road.

:-Håkan
On 16 Mar 2021, 04:23 +0100, Sean Cole (Pi) via use-livecode 
, wrote:
> I just downloaded and tested on my MBP16(2019), single screen, MacOS
> 11.2.2, and also in parallels Win10(v1909) and had no issues.
>
> BTW, visual effects work a dream and even macOS CoreImage effects work
> great. Super. Hope to see more (HTML5, hint, hint) soon.
>
> Sean
>
> On Mon, 15 Mar 2021 at 18:28, Richmond via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > I have just downloaded Indy 9.6.2 RC-3, done the licensing "dance" and
> > fired it up
> > without any problems at all:
> >
> > macOS 11.3 Beta 3, 2018 Mac Mini, 3 monitors.
> >
> > I suspect you have some background process (i.e. something set to run at
> > startup) that is
> > clogging up the works.
> >
> > Best, Richmond.
> >
> > On 15.03.21 18:40, Håkan Liljegren via use-livecode wrote:
> > > After downloading and activating with my indie license, LiveCode starts
> > but is totally unresponsive! I can move the windows, but that’s it! I can’t
> > click anything not even in the menu. No shortcuts works, and, If I select
> > ”Quit” from the icon in the dock LiveCode doesn’t quit. Only thing I can do
> > is to ”Force Quit” the application.
> > >
> > > Running macOS 11.2.2 on a MacBook Pro (15-inch, 2018) with a dual
> > monitor setup.
> > >
> > > Any one else having this???
> > >
> > > :-Håkan
> > > On 12 Mar 2021, 12:57 +0100, panagiotis merakos via use-livecode <
> > use-livecode@lists.runrev.com>, wrote:
> > > > Dear list members,
> > > >
> > > > We are pleased to announce the release of LiveCode 9.6.2 RC-3.
> > > >
> > > >
> > > > Getting the Release
> > > > ===
> > > > You can get the release at https://downloads.livecode.com/livecode/ or
> > via
> > > > the automatic updater.
> > > >
> > > >
> > > > Release Contents
> > > > 
> > > > LiveCode 9.6.2 RC-3 comes with 6 regression fixes, including:
> > > >
> > > > - Visual effects doesn't work on macOS Big Sur
> > > > - Cannot close "Ask Password" dialog as Sheet in modal stack
> > > > - mergLA not included in 9.6.2 RC 2
> > > > - PDF Widget broken on iOS device
> > > >
> > > > For the full list of all fixes, updates and enhancements please see the
> > > > release notes:
> > > >
> > http://downloads.livecode.com/livecode/9_6_2/LiveCodeNotes-9_6_2_rc_3.pdf
> > > >
> > > >
> > > > Known issues
> > > > 
> > > > - The Browser widget's native layer is not shown in some Linux distros
> > with
> > > > Cinnamon window manager.
> > > > - The use of the Browser widget is not supported on Ubuntu 18.04 64 bit
> > LTS
> > > > yet.
> > > >
> > > >
> > > > Required Software
> > > > =
> > > > To build iOS apps with LiveCode you must have the appropriate versions
> > of
> > > > Xcode as follows:
> > > >
> > > > - macOS 10.13.4: Xcode 10.1 - LiveCode builds iOS apps using the iOS
> > 12.1
> > > > SDK
> > > > - macOS 10.14.4: Xcode 11.3.x - LiveCode builds iOS apps using the iOS
> > > > 13.2 SDK
> > > > - macOS 10.15.4+: Xcode 12.1.x - LiveCode builds iOS apps using the iOS
> > > > 14.1 SDK
> > > >
> > > > There is a full list of working LiveCode/macOS/Xcode combinations here:
> > > > https://livecode.com/docs/9-5-0/faq/faq/
> > > >
> > > > Note: Whilst we endeavour to release updated versions of LiveCode
> > > > supporting the latest Xcode/iOS SDKs as quickly as possible; we strongly
> > > > recommend disabling automatic update of Xcode or downloading the
> > specific
> > &

Emtying browser widget cache?

2021-03-15 Thread Håkan Liljegren via use-livecode
Does anyone know if the browser widget has its own cache? If I load a local web 
page (by setting the URL property) the browser widget seams to cache the linked 
CSS-file. If I restart LiveCode the edits usually go through, but, is there any 
way to empty the browser widget cache without needing to restart LiveCode? Or 
is it just me doing stupid stuff? (It might occasionally have happened before 
;) )

:-Håkan
___
use-livecode mailing list
use-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 9.6.2 RC-3

2021-03-15 Thread Håkan Liljegren via use-livecode
Thanks for that!

I haven’t had time to trash all settings and restart, but it is good to see 
that it is probably something on my part. Will do further testing tomorrow.

:-Håkan
On 15 Mar 2021, 19:30 +0100, Richmond via use-livecode 
, wrote:
> I have just downloaded Indy 9.6.2 RC-3, done the licensing "dance" and
> fired it up
> without any problems at all:
>
> macOS 11.3 Beta 3, 2018 Mac Mini, 3 monitors.
>
> I suspect you have some background process (i.e. something set to run at
> startup) that is
> clogging up the works.
>
> Best, Richmond.
>
> On 15.03.21 18:40, Håkan Liljegren via use-livecode wrote:
> > After downloading and activating with my indie license, LiveCode starts but 
> > is totally unresponsive! I can move the windows, but that’s it! I can’t 
> > click anything not even in the menu. No shortcuts works, and, If I select 
> > ”Quit” from the icon in the dock LiveCode doesn’t quit. Only thing I can do 
> > is to ”Force Quit” the application.
> >
> > Running macOS 11.2.2 on a MacBook Pro (15-inch, 2018) with a dual monitor 
> > setup.
> >
> > Any one else having this???
> >
> > :-Håkan
> > On 12 Mar 2021, 12:57 +0100, panagiotis merakos via use-livecode 
> > , wrote:
> > > Dear list members,
> > >
> > > We are pleased to announce the release of LiveCode 9.6.2 RC-3.
> > >
> > >
> > > Getting the Release
> > > ===
> > > You can get the release at https://downloads.livecode.com/livecode/ or via
> > > the automatic updater.
> > >
> > >
> > > Release Contents
> > > 
> > > LiveCode 9.6.2 RC-3 comes with 6 regression fixes, including:
> > >
> > > - Visual effects doesn't work on macOS Big Sur
> > > - Cannot close "Ask Password" dialog as Sheet in modal stack
> > > - mergLA not included in 9.6.2 RC 2
> > > - PDF Widget broken on iOS device
> > >
> > > For the full list of all fixes, updates and enhancements please see the
> > > release notes:
> > > http://downloads.livecode.com/livecode/9_6_2/LiveCodeNotes-9_6_2_rc_3.pdf
> > >
> > >
> > > Known issues
> > > 
> > > - The Browser widget's native layer is not shown in some Linux distros 
> > > with
> > > Cinnamon window manager.
> > > - The use of the Browser widget is not supported on Ubuntu 18.04 64 bit 
> > > LTS
> > > yet.
> > >
> > >
> > > Required Software
> > > =
> > > To build iOS apps with LiveCode you must have the appropriate versions of
> > > Xcode as follows:
> > >
> > > - macOS 10.13.4: Xcode 10.1 - LiveCode builds iOS apps using the iOS 12.1
> > > SDK
> > > - macOS 10.14.4: Xcode 11.3.x - LiveCode builds iOS apps using the iOS
> > > 13.2 SDK
> > > - macOS 10.15.4+: Xcode 12.1.x - LiveCode builds iOS apps using the iOS
> > > 14.1 SDK
> > >
> > > There is a full list of working LiveCode/macOS/Xcode combinations here:
> > > https://livecode.com/docs/9-5-0/faq/faq/
> > >
> > > Note: Whilst we endeavour to release updated versions of LiveCode
> > > supporting the latest Xcode/iOS SDKs as quickly as possible; we strongly
> > > recommend disabling automatic update of Xcode or downloading the specific
> > > version of Xcode required directly from the Apple developer portal and
> > > installing it separately.
> > >
> > > Important: From the end of June 2020, Apple is only accepting apps built
> > > using iOS13 SDKs. This means that, if you wish to submit apps to the
> > > AppStore you will have to be running at least macOS 10.14 in order to be
> > > able to install the necessary version of Xcode.
> > >
> > >
> > > Feedback
> > > 
> > > Please report any bugs encountered on our quality center at
> > > http://quality.livecode.com/
> > >
> > > We have a forum available for discussing LiveCode Builder at
> > > http://forums.livecode.com/viewforum.php?f=93
> > >
> > >
> > > Have fun!
> > > The LiveCode Team
> > >
> > >
> > > --
> > > ___
> > > use-livecode mailing list
> > > use-livecode@lists.runrev.com
> > > Please visit this url to subscribe, unsubscribe and manage your 
> > > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your 
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: [ANN] Release 9.6.2 RC-3

2021-03-15 Thread Håkan Liljegren via use-livecode
After downloading and activating with my indie license, LiveCode starts but is 
totally unresponsive! I can move the windows, but that’s it! I can’t click 
anything not even in the menu. No shortcuts works, and, If I select ”Quit” from 
the icon in the dock LiveCode doesn’t quit. Only thing I can do is to ”Force 
Quit” the application.

Running macOS 11.2.2 on a MacBook Pro (15-inch, 2018) with a dual monitor setup.

Any one else having this???

:-Håkan
On 12 Mar 2021, 12:57 +0100, panagiotis merakos via use-livecode 
, wrote:
> Dear list members,
>
> We are pleased to announce the release of LiveCode 9.6.2 RC-3.
>
>
> Getting the Release
> ===
> You can get the release at https://downloads.livecode.com/livecode/ or via
> the automatic updater.
>
>
> Release Contents
> 
> LiveCode 9.6.2 RC-3 comes with 6 regression fixes, including:
>
> - Visual effects doesn't work on macOS Big Sur
> - Cannot close "Ask Password" dialog as Sheet in modal stack
> - mergLA not included in 9.6.2 RC 2
> - PDF Widget broken on iOS device
>
> For the full list of all fixes, updates and enhancements please see the
> release notes:
> http://downloads.livecode.com/livecode/9_6_2/LiveCodeNotes-9_6_2_rc_3.pdf
>
>
> Known issues
> 
> - The Browser widget's native layer is not shown in some Linux distros with
> Cinnamon window manager.
> - The use of the Browser widget is not supported on Ubuntu 18.04 64 bit LTS
> yet.
>
>
> Required Software
> =
> To build iOS apps with LiveCode you must have the appropriate versions of
> Xcode as follows:
>
> - macOS 10.13.4: Xcode 10.1 - LiveCode builds iOS apps using the iOS 12.1
> SDK
> - macOS 10.14.4: Xcode 11.3.x - LiveCode builds iOS apps using the iOS
> 13.2 SDK
> - macOS 10.15.4+: Xcode 12.1.x - LiveCode builds iOS apps using the iOS
> 14.1 SDK
>
> There is a full list of working LiveCode/macOS/Xcode combinations here:
> https://livecode.com/docs/9-5-0/faq/faq/
>
> Note: Whilst we endeavour to release updated versions of LiveCode
> supporting the latest Xcode/iOS SDKs as quickly as possible; we strongly
> recommend disabling automatic update of Xcode or downloading the specific
> version of Xcode required directly from the Apple developer portal and
> installing it separately.
>
> Important: From the end of June 2020, Apple is only accepting apps built
> using iOS13 SDKs. This means that, if you wish to submit apps to the
> AppStore you will have to be running at least macOS 10.14 in order to be
> able to install the necessary version of Xcode.
>
>
> Feedback
> 
> Please report any bugs encountered on our quality center at
> http://quality.livecode.com/
>
> We have a forum available for discussing LiveCode Builder at
> http://forums.livecode.com/viewforum.php?f=93
>
>
> Have fun!
> The LiveCode Team
>
>
> --
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: How to escape wildcard chars - and find the offset of a '?' in a URL?

2021-03-14 Thread Håkan Liljegren via use-livecode
Hmm, strange! For me it works without problems:

put "https://www.mysite.com/?some=parameters=folllow; into tURL
put offset("?", tURL)

Returns 24

:-Håkan
On 14 Mar 2021, 17:29 +0100, BT via use-livecode 
, wrote:
> Hi folks,
> What’s the correct the syntax needed to escape a question mark so that its 
> offset can be found in a URL string?
>
> I get zero returned by put offset(“?”, tURL) and put offset( "?\",tURL) and 
> put offset( numToCodepoint(Ux003F),tURL) throws errors.
>
> The docs & forums cover escaping quotes but not wildcard characters.
>
> Thanks in advance for any steer.
> Best,
> Keith
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: mergFTPd example?

2021-03-10 Thread Håkan Liljegren via use-livecode
I would go for a REST API on the desktop and then use the https protocol. On 
the mobile app you can then just use the powerful url command. Take a look at 
”post data to URL” in the dictionary. And maybe also the ”put url … into” for 
getting data in the opposite direction.

:-Håkan
On 10 Mar 2021, 08:29 +0100, Phil Davis via use-livecode 
, wrote:
> I'm anticipating the need to connect an iOS app with a companion desktop
> app so the desktop app can get data from the mobile app and do some
> reporting and recordkeeping. It should also be able to transfer data
> back to the mobile app. Does anyone have an example of how to make that
> happen? I can't find one anywhere.
>
> The data connection & transfer don't have to be made with mergFTPd but I
> see it's an LC option.
>
> Thanks -
> Phil
>
> --
> Phil Davis
> 503-307-4363
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Printing BackgroundColor of text

2021-03-07 Thread Håkan Liljegren via use-livecode
Looks like a bug to me, and on top of that the HTML should be updated IMHO as 
the -tag is officially deprecated in HTML 5. But, that’s another story. 
When I try I get the same error! So, I guess it is a bug that should be 
reported-

:-Håkan
On 4 Mar 2021, 21:06 +0100, How to use LiveCode 
, wrote:
>
> Color:   0233 Deep  color="#ACA08C">Marsh
___
use-livecode mailing list
use-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: Parsing properties in Link- and Internet Shortcut files

2021-02-26 Thread Håkan Liljegren via use-livecode
On macOS URL link files are stored as a plist-file like:

http://www.apple.com/DTDs/PropertyList-1.0.dtd;>


URL
https://lessons.livecode.com/



So you can open the file as text and then parse the content.

:-Håkan
On 12 Feb 2021, 18:55 +0100, R.H. via use-livecode 
, wrote:
> I am on Windows 10 (but answer will apply to MacOS as well).
>
> I am trying to read the URL property of a file that I create simply
> dragging-dropping the Internet address from my browser to the Desktop and
> then storing this file. There are thousands now!!!
>
> Some of such files are readable text files with the readable content
> "[internetshortcut], URL: xxx etc." -- but most Internet shortcut files on
> Windows with the invisible .url or .ink extension are empty when trying to
> read with using a text editor or opening them in LiveCode.
>
> In such Windows file's there is a property url: that contains the web
> address. It is visible when opening using the right mouse button (context
> menu) and then selecting the "properties" item. When double-clicking such
> file, the default browser will open and open the web page directed to.
>
> But I want to read this URL property as text directly and use it from
> within LiveCode.
>
> I assume that these Internet shortcuts store the URL information not in the
> file itself, or I just cannot get to this information.
>
> I found one batch file script that promises such a solution. Such batch
> text file can be called through the SHELL() command and will then execute.
> It has the file extension ".bat".
>
> #-- START BATCH SCRIPT
> echo off
> setlocal enableextensions enabledelayedexpansion
> pushd %1
> for %%F in (%1\*.url) do (
> echo %%~dpnxF
> call :findurl "%%~dpnxF"
> )
> popd
> goto end
> :findurl inputfile
> set url=
> for /f "tokens=2 delims==" %%i in ('findstr URL %1') do set url=%%i
> echo %url%
> echo -
> :end
> #-- END BATCH SCRIPT
>
> Unfortunately, my knowledge of such batch scripts is very limited.
>
> I get error messages when calling the batch file through the shell
> function. Maybe there is someone here who can interpret this script? To me
> it would be sufficient to simply call shell("location of the file and file
> name of the url-file .. shell commands") and receive back the URL property
> as text. Or is there any other way to get to this information?
>
> Since LC is cross-platform, such solution also would be nice to have for
> OSX and Linux?
>
> Regards, Roland
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: HTML internal to stack - best practices

2021-02-26 Thread Håkan Liljegren via use-livecode
Found this old mail, but no answer?! Maybe just me, but here goes.

LiveCode has a strong connection between the browser and the LiveCode engine as 
you can call LiveCode handlers from within your JavaScript and call JavaScript 
from within your LiveCode handlers. You can also detect clicks on links, when 
pages load in the browser etc. But there are some quirks we need to know.

a .The Browser widget runs kind of on its own. If you save something from an 
HTML form in a JavaScript variable this is not automagically transfered to 
LiveCode and vice versa.
b. The browser widget ”takes over” the rect where it displays the web page and 
you can thus not overlay LiveCode controls on top of the browser. We can kind 
of fake this but might be good to know!

So to your questions:

1) How you store the HTML doesn’t matter! IF you stor it in a property, field, 
variable or file is not important. Doing: ‘set the htmlText of widget ”browser" 
to …' will be the same as long the stuff you add evaluates to some (HTML) text. 
If it is a file it might be better to just set the url of the widget though.

2) The short answer is: no. You can include an HTML-file that loads CSS and 
JavaScript as a normal web page would do. But remember that you can’t link to 
some CSS that only resides within LiveCode. You can only link to a file. But 
there is nothing stopping you from within LiveCode create the HTML, CSS and 
JavaScript on the fly. Output the CSS and JavaScript to temporary files (that 
you link to in your HTML!) and then set the htmlText of the widget. Or save out 
all three files and then set the url.
If you want to build the page progressively from LiveCode you can do that also. 
BUT you need to either keep a copy of the HTML code in LiveCode that you edit 
and then reset the htmlText of the widget OR you can prepare some JavaScript 
functions that you can call from within LiveCode that in turn manipulates the 
DOM.

3) If you still are talking about the browser widget there are some lessons at 
https://lessons.livecode.com but I can agree that the material might need some 
updates as has been discussed here on the list before. Also take a look at the 
Dictionary. In the left column there you can find ”browser”. Click on that and 
you will focus on browser related stuff. There are some good things in the 
Dictionary!

Happy Coding!

:-Håkan
On 13 Feb 2021, 19:20 +0100, Brian K. Duck via use-livecode 
, wrote:
> I’m looking to understand, find references, and hopefully *examples* of a 
> stack with html, css, JavaScript, JSON and JavaScript libraries that are 
> stored internal to the stack.
> Some files must be modified by the user, others are untouched by user data, 
> but included via 

Re: No visual effects on Big Sur?

2021-02-07 Thread Håkan Liljegren via use-livecode
That is strange. As it worked for you Sean, what machine are you on? But, as we 
have several of us where it doesn’t work I filed a bug anyway:

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

:-Håkan
On 7 Feb 2021, 05:12 +0100, Sean Cole (Pi) via use-livecode 
, wrote:
> Hi all,
> I just tested here in BigSur 11.2 and they work fine in both the IDE and
> standalone. The only ones that do not work are the core image transitions
> (with the exception of dissolve which, although having the same name, does
> not appear to use the CI version of the effect).
>
> I made a simple default stack with one button with this code:
>
> on mouseUp pButtonNumber
> lock screen for visual effect
> set the backcolor of this card to (line random(552) of colornames())
> unlock screen with visual effect "dissolve"
> end mouseUp
>
> The standalone was set with all the default parameters and auto inclusions.
>
> Sean
>
> On Sat, 6 Feb 2021 at 18:16, prothero--- via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Hakan:
> > I get the same thing. Big Sur, livecode version LC 9.6.2 (rc2). It was
> > working on previous versions.
> >
> > Yes, please file a bug report.
> >
> > Bill
> >
> > > On Feb 5, 2021, at 10:55 PM, Håkan Liljegren via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> > >
> > > Running LC 9.6.2 (rc2) on macOS Big Sur I have no visual effects that
> > work. None! Is there anyone else having the same experience, or is it just
> > my setup? I have tried to wipe every RunRev/LiveCode file in the Library
> > and in the applications folder and then reinstall but still no luck. Also
> > tried older (stable versions) with no luck, but that was before wiping
> > every file out of existence.
> > >
> > > Can anyone else running Big Sur confirm before I file a bug-report?
> > >
> > > :-Håkan
> > > ___
> > > use-livecode mailing list
> > > use-livecode@lists.runrev.com
> > > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> > William A. Prothero, Ph.D.
> > University of California, Santa Barbara Dept. of Earth Sciences (Emeritus)
> > Santa Barbara, CA. 93105
> > http://earthlearningsolutions.org/
> >
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


No visual effects on Big Sur?

2021-02-05 Thread Håkan Liljegren via use-livecode
Running LC 9.6.2 (rc2) on macOS Big Sur I have no visual effects that work. 
None! Is there anyone else having the same experience, or is it just my setup? 
I have tried to wipe every RunRev/LiveCode file in the Library and in the 
applications folder and then reinstall but still no luck. Also tried older 
(stable versions) with no luck, but that was before wiping every file out of 
existence.

Can anyone else running Big Sur confirm before I file a bug-report?

:-Håkan
___
use-livecode mailing list
use-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: reading QR-code on Mac from an imported image

2020-11-27 Thread Håkan Liljegren via use-livecode
There is a free command line tool called zbar that you maybe could bundle or 
even create a library from.
https://github.com/mchehab/zbar

:-Håkan
On 20 Nov 2020, 19:17 +0100, Klaus major-k via use-livecode 
, wrote:
> Hi all,
>
> ist is possible to read the QR-code from an imported image
> on the Mac? If yes, how?
> The dictionary did not really enlighten me...
>
> Thanks in advance!
>
>
> Best
>
> Klaus
> --
> Klaus Major
> https://www.major-k.de
> kl...@major-k.de
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Suspend in iOS, or when is a mobile app running?

2020-11-17 Thread Håkan Liljegren via use-livecode
I’m not sure what you mean with ”suspend” on mobile. You only run one 
application at a time. If your app goes out due to a phone call or any other 
event it will normally quit your app and send a closeStack message and some 
more. If you want to create an application that doesn’t allow the screen lock 
to kick in you can do that via mobileLockIdleTimer, but don’t forget to unlock 
when you don’t need it anymore!

The first time you ask for location data the phone will pop up a message asking 
the user to allow location tracking (as that is a privacy feature). You need to 
check if you are allowed to track before trying to get location data. If the 
user disallows location tracking your app will never get any location data how 
much you even try!

An app can also ask for location tracking as a background execution task. This 
is where the user selects ”Always” instead of ”When app is in use”. Then your 
app might get location data even if it is not the front-most application. Then 
your app will still get locations change updates. This is available as an 
experimental feature under the ”Standalone Application Settings” for iOS. I say 
might, because you can never be 100% sure. If the user starts an app that 
requires all memory your app might still be thrown out and terminated, but iOS 
is really good at shuffling memory so it usually works. I haven’t tried this 
experimental feature though so I can’t say if it works OK in LiveCode, but if 
you have a device for testing you can give it a try!

Applications that will get permissions for always track location can also set 
up "location notifications”. Then your app will startup when you arrive or 
leave a specified location. E.g. this is how Remainders work when you set a 
Remainder to trigger based on location. E.g. When I leave home.

:-Håkan
On 17 Nov 2020, 16:26 +0100, Graham Samuel via use-livecode 
, wrote:
> Sorry if this is documented somewhere but I can’t find it.
>
> On desktop platforms, LC gives us “suspend” which is fired when the app goes 
> into the background. I seem to be having some problems with iOS, in that when 
> the screen locks (triggered by user action or a time limit), my app seems to 
> stop getting messages from the OS, so is in some sense suspended. This seems 
> to call for something like “suspend” for mobiles. Does such a message exist?
>
> Another thing that happens with iOS apps that use Location Services is that 
> the user is sometimes asked via a popu-up on the screen of the device whether 
> the app should be allowed to use these services when it’s not running. I 
> don’t know what triggers these user messages, nor am exactly certain what 
> ‘not running’ means - presumably if the app has been properly quit, that’s 
> something other than ‘not running’. In the Standalone Settings for mobile, 
> one can set Location Services as being a requirement, but there doesn’t seem 
> to be a setting corresponding to this user choice.
>
> Has anyone a clear understanding of all this? I would love to see an 
> explanation.
>
> TIA
>
> Graham
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Standardizing codepoints

2020-11-15 Thread Håkan Liljegren via use-livecode
What do you mean with standard? Do you mean that some combined codepoints show 
up as one glyph and your question is if there is one codepoint for every such 
combination? Or do you mean that several seemingly identical glyphs might have 
different codepoints? Unicode actually has a good introduction on their site: 
https://www.unicode.org/versions/Unicode10.0.0/ch01.pdf
that might answer some of your questions.

:-Håkan
On 15 Nov 2020, 11:16 +0100, scott--- via use-livecode 
, wrote:
> I’m a little over my head in this area so I may not be describing this quite 
> right…
> Some unicode glyphs seem to be describable with different (arrangements of) 
> codepoints. Is it possible to coerce the glyph to be described in a 
> “standard” way?
>
> --
> Scott Morrow
>
> Elementary Software
> (Now with 20% less chalk dust!)
> web https://elementarysoftware.com/
> email sc...@elementarysoftware.com
> booth 1-360-734-4701
> --
>
>
>
>
>
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: How do I shorten this script? Use 'repeat with'?

2020-11-13 Thread Håkan Liljegren via use-livecode
Great!

For me it works without adding 'the name of grc ”k1”‘. This works perfectly:

   set the loc of grc "k1" to the width of this card/2, the height of this 
card/2
   put "k1" into tPrevious
   repeat with i = 2 to 5
      put "k" & i into tName
      set the topleft of grc tName to item 1 of the topright of grc tPrevious - 
1, item 2 of the topright of grc tPrevious
      put tName into tPrevious
   end repeat

Did you maybe forget ”grc” somewhere?

:-Håkan
On 12 Nov 2020, 16:00 +0100, williamdes...@gmail.com, wrote:
>
> I added 'the name of grc "k1" to the script and now it works.
___
use-livecode mailing list
use-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 shorten this script? Use 'repeat with'?

2020-11-12 Thread Håkan Liljegren via use-livecode
You could use two variables like tName and tPrevious

set the loc of grc "k1" to cardWidth/2,cardHeight/2
put ”k1” into tPrevious
repeat with i = 2 to 5
   put ”k” & i into tName
   set the topleft of grc tName to the topright of grc tPrevious
   put tName into tPrevious
end repeat

Coding out of my head so reserve for mistakes!

:-Håkan
On 12 Nov 2020, 14:50 +0100, William de Smet via use-livecode 
, wrote:
> Hi there,
>
> Another question today.
> How do I shorten this script?
> 
> set the loc of grc "k1" to cardWidth/2,cardHeight/2
> set the topleft of grc "k2" to (item 1 of topright of grc "k1" -1, item 2
> of topright of grc "k1")
> set the topleft of grc "k3" to (item 1 of topright of grc "k2" -1, item 2
> of topright of grc "k2")
> set the topleft of grc "k4" to (item 1 of topright of grc "k3" -1, item 2
> of topright of grc "k3")
> set the topleft of grc "k5" to (item 1 of topright of grc "k4" -1, item 2
> of topright of grc "k4")
> 
>
> I know I should use 'repeat with' but I am stuck.
> repeat with x = 2 to 4
> put "k" & x into tName
> set the topleft of grc tName to (item 1 of topright of. grc? , item
> 2 of topright of grc ...?)
> end repeat
>
>
> Any help is appreciated!
>
>
>
> greetings,
>
> William
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LiveCode Server Under MAMP

2020-05-27 Thread Håkan Liljegren via use-livecode
I have done that some time ago, nowadays I usually use MAMP Pro if I need more 
sophistication. But I’ll make a try to find it..

:-Håkan
On 27 May 2020, 17:50 +0200, Rick Harrison via use-livecode 
, wrote:
> Did you get MAMP to work with SSL?
>
> If you do, let me know as then you might catch my interest.
>
> Thanks,
>
> Rick
>
> > On May 27, 2020, at 11:44 AM, Håkan Liljegren via use-livecode 
> >  wrote:
> >
> > Ouch,
> >
> > Hit send to early, new try:
> >
> > Hi,
> >
> > I was trying to get LiveCode server up and running under MAMP in macOS 
> > Catalina and if anyone is interested. This is what I did to get it running.
> >
> > 1. Download and unpack LiveCode Server
> > 2. Move livecode-server, drivers folder and externals folder into the 
> > cgi-bin folder in MAMP. ( /Applications/MAMP/cgi-bin if you have a standard 
> > installation )
> > 3. Open up /Applications/MAMP/conf/apache/httpd.conf
> > 4. Find the  section and just before 
> > the  you add:
> > AddHandler livecode-script .lc
> > Action livecode-script /livecode-cgi/livecode-server
> > NOTE: IF your have the community server you should replace livecode-server 
> > with livecode-community-server
> > 5. Just after  add a new line with:
> > ScriptAlias /livecode-cgi/livecode-server 
> > /Applications/MAMP/cgi-bin/livecode-server
> > Again replace livecode-server with livecode-community-server if you use the 
> > community version.
> > 6. Now if you restart MAMP and add a .lc file into your web folder and 
> > tries to access it, you will se a prompt that says that livecode-server 
> > can’t be trusted with no options to allow.
> > 7. To allow unnotarized applications under MacOS you need to right-click 
> > the application and select open. You will then get a prompt where you have 
> > an “Open” button. If you click that you will get another prompt asking for 
> > an admin user and password. Fill in and continue.
> > 8. Now you finally have to repeat the procedure for every lib (i.e. every 
> > file in the drivers and the externals folder. But if you do them in 
> > succession you will probably not get the admin prompt more than once.
> > 9. Now you should have a local web development under MAMP with livecode 
> > server up and running!
> >
> > There is also a command line option for point 7 (and 8) above and that is 
> > to use:
> > spctl --add /Applications/MAMP/cgi-bin/livecode-server
> > You will get the same prompt for admin user unless you do
> > sudo spctl …
> >
> > So, no there is no excuse for not starting to use LiveCode for your next 
> > web project ;)
> >
> > Happy Coding!
> >
> > :-Håkan
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your 
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-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 Server Under MAMP

2020-05-27 Thread Håkan Liljegren via use-livecode
Not at all! Go ahead.

:-Håkan
On 27 May 2020, 18:14 +0200, matthias rebbe via use-livecode 
, wrote:
> Håkan,
>
> would you mind if i take your steps and create a detailed Livecode Lesson 
> with it?
>
>
> -
> Matthias Rebbe
> Life Is Too Short For Boring Code
>
> > Am 27.05.2020 um 17:44 schrieb Håkan Liljegren via use-livecode 
> > :
> >
> > Ouch,
> >
> > Hit send to early, new try:
> >
> > Hi,
> >
> > I was trying to get LiveCode server up and running under MAMP in macOS 
> > Catalina and if anyone is interested. This is what I did to get it running.
> >
> > 1. Download and unpack LiveCode Server
> > 2. Move livecode-server, drivers folder and externals folder into the 
> > cgi-bin folder in MAMP. ( /Applications/MAMP/cgi-bin if you have a standard 
> > installation )
> > 3. Open up /Applications/MAMP/conf/apache/httpd.conf
> > 4. Find the  section and just before 
> > the  you add:
> > AddHandler livecode-script .lc
> > Action livecode-script /livecode-cgi/livecode-server
> > NOTE: IF your have the community server you should replace livecode-server 
> > with livecode-community-server
> > 5. Just after  add a new line with:
> > ScriptAlias /livecode-cgi/livecode-server 
> > /Applications/MAMP/cgi-bin/livecode-server
> > Again replace livecode-server with livecode-community-server if you use the 
> > community version.
> > 6. Now if you restart MAMP and add a .lc file into your web folder and 
> > tries to access it, you will se a prompt that says that livecode-server 
> > can’t be trusted with no options to allow.
> > 7. To allow unnotarized applications under MacOS you need to right-click 
> > the application and select open. You will then get a prompt where you have 
> > an “Open” button. If you click that you will get another prompt asking for 
> > an admin user and password. Fill in and continue.
> > 8. Now you finally have to repeat the procedure for every lib (i.e. every 
> > file in the drivers and the externals folder. But if you do them in 
> > succession you will probably not get the admin prompt more than once.
> > 9. Now you should have a local web development under MAMP with livecode 
> > server up and running!
> >
> > There is also a command line option for point 7 (and 8) above and that is 
> > to use:
> > spctl --add /Applications/MAMP/cgi-bin/livecode-server
> > You will get the same prompt for admin user unless you do
> > sudo spctl …
> >
> > So, no there is no excuse for not starting to use LiveCode for your next 
> > web project ;)
> >
> > Happy Coding!
> >
> > :-Håkan
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your 
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


LiveCode Server Under MAMP

2020-05-27 Thread Håkan Liljegren via use-livecode
Ouch,

Hit send to early, new try:

Hi,

I was trying to get LiveCode server up and running under MAMP in macOS Catalina 
and if anyone is interested. This is what I did to get it running.

1. Download and unpack LiveCode Server
2. Move livecode-server, drivers folder and externals folder into the cgi-bin 
folder in MAMP. ( /Applications/MAMP/cgi-bin if you have a standard 
installation )
3. Open up /Applications/MAMP/conf/apache/httpd.conf
4. Find the  section and just before the 
 you add:
AddHandler livecode-script .lc
Action livecode-script /livecode-cgi/livecode-server
NOTE: IF your have the community server you should replace livecode-server with 
livecode-community-server
5. Just after  add a new line with:
ScriptAlias /livecode-cgi/livecode-server 
/Applications/MAMP/cgi-bin/livecode-server
Again replace livecode-server with livecode-community-server if you use the 
community version.
6. Now if you restart MAMP and add a .lc file into your web folder and tries to 
access it, you will se a prompt that says that livecode-server can’t be trusted 
with no options to allow.
7. To allow unnotarized applications under MacOS you need to right-click the 
application and select open. You will then get a prompt where you have an 
“Open” button. If you click that you will get another prompt asking for an 
admin user and password. Fill in and continue.
8. Now you finally have to repeat the procedure for every lib (i.e. every file 
in the drivers and the externals folder. But if you do them in succession you 
will probably not get the admin prompt more than once.
9. Now you should have a local web development under MAMP with livecode server 
up and running!

There is also a command line option for point 7 (and 8) above and that is to 
use:
spctl --add /Applications/MAMP/cgi-bin/livecode-server
You will get the same prompt for admin user unless you do
sudo spctl …

So, no there is no excuse for not starting to use LiveCode for your next web 
project ;)

Happy Coding!

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


LiveCode Server not notarized?

2020-05-27 Thread Håkan Liljegren via use-livecode
Hi,

I was trying to get LiveCode server up and running under MAMP in macOS Catalina 
and if anyone is interested. This is what I did to get it running.

1. Download and unpack LiveCode Server
2. Move livecode-server, drivers folder and externals folder into the cgi-bin 
folder in MAMP. ( /Applications/MAMP/cgi-bin if you have a standard 
installation )
3. Open up /Applications/MAMP/conf/apache/httpd.conf
4. Find the  section and just before the 
 you add:
AddHandler livecode-script .lc
Action livecode-script /livecode-cgi/livecode-server

Added
___
use-livecode mailing list
use-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: Integrating Desktop or mobile application with LMS using LTI 1.3

2020-05-27 Thread Håkan Liljegren via use-livecode
I don't think LTI is dead at all, most mayor LMSs support LTI today in one way 
on another. I'm also looking into this as we are using the Canvas LMS at our 
university (where I have my day-work) so I'm definitely interested in some 
participation in a LiveCode LTI library. I've just started my work so no code 
yet though...

Best wishes,

Håkan
On 27 May 2020, 01:34 +0200, William Prothero via use-livecode 
, wrote:
> Martin and Peter:
> I am retired, but still creating one (big) educational application. I thought 
> the LMS integration idea had died a death by silence, so I am so glad you are 
> looking into this. I’m very interested, but have not put forth any effort in 
> this direction.
>
> Please keep me informed about what you find.
> Best,
> Bill
>
> William A. Prothero
> https://earthlearningsolutions.org
>
> > On May 25, 2020, at 3:28 PM, Peter Bogdanoff via use-livecode 
> >  wrote:
> >
> > Hi Martin,
> >
> > I’ve just begun looking into this myself, so I’m also interested in what 
> > anybody knows about this.
> >
> > Peter Bogdanoff
> > ArtsInteractive
> >
> >
> > > On May 25, 2020, at 3:05 PM, Martin Koob via use-livecode 
> > >  wrote:
> > >
> > > Hi list
> > >
> > > I have been researching how to integrate a desktop application created 
> > > with LiveCode with a learning Management system (LMS) like Brightspace by 
> > > D2L, Moodle, Canvas etc. Last time I looked at this SCORM was the 
> > > standard with TinCan( aka xAPI) as a potential successor. This time 
> > > around I found those seem to have been superseded by LTI 1.1 going to LTI 
> > > 1.3.
> > >
> > > In the documents I have found I see that one of the advantages of LTI 1.3 
> > > is that it can be used with desktop and mobile apps. LTI 1.1 only worked 
> > > with web based applications.
> > >
> > > " Mobile Ready—The model is independent of web browsers, a better 
> > > solution for server-to-server, native desktop and mobile applications.”
> > > https://www.imsglobal.org/why-platforms-and-tools-should-adopt-lti-13 
> > > 
> > >
> > > I am looking for examples of people doing this but have not found any 
> > > online.(I don’t want to spend time on idly ddl I looks like it would be 
> > > possible to use it in an LiveCode application. It uses oAuth 2 for 
> > > authentication and JSON for messages both of which are available on the 
> > > the latest version of LiveCode.
> > >
> > > First I just want to confirm it has been done for a desktop application 
> > > in general so I know that is a viable approach for integrating an App 
> > > into an LMS.
> > >
> > > Second I wonder if people have done it using LiveCode.
> > >
> > > Thanks
> > >
> > >
> > >
> > > Martin Koob
> > >
> > > ___
> > > use-livecode mailing list
> > > use-livecode@lists.runrev.com
> > > Please visit this url to subscribe, unsubscribe and manage your 
> > > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your 
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Group resizing.

2020-05-03 Thread Håkan Liljegren via use-livecode
You probably need to lock messages in the beginning of your resizeControl. 
Otherwise the group will adapt to your resizing of your controls. I usually 
begin with both lock messages and lock screen, but the last is more for 
optimization.

Håkan
On 3 May 2020, 16:22 +0200, Alex Tweedly via use-livecode 
, wrote:
> I realized after the discussion last week about resizing that I was
> missing the benefits of "resizeControl" being sent to each group, so I
> changed one of my resize handlers to make use of groups (adding a few
> groups along the way).
>
> And it all went wrong :-(
>
> Eventually I traced it down to the following ... and don't know if I'm
> missing something or if I've bumped into a bug.
>
> The resize handler is
>
> > on resizeControl
> >    set the width of field "list titles" of me to the width of me - 20
> >    put "B" && the rect of me && the bottom of me  after msg
> >    set the left of field "list titles" of me to 10
> >    put "C" && the rect of me && the bottom of me  after msg
> >    local tR
> >    put 10, the top of me, the right of me -10, the bottom of me-10 into tR
> >    set the rect of fld "List" of me to tR
> > end resizeControl
>
> Note the two "put ... msg" statements. - for no reason I can figure out,
> the "bottom of me" changes between these two statements. Here's the
> output from the message box:
>
> > B 5,32,331,468 468
> > C 6,32,325,2618 2618
> > B 5,32,331,471 471
> > C 5,32,320,2622 2622
> > B 5,32,331,473 473
> > C 5,32,320,2626 2626
> >
> If I comment out that "set the left of ..." statement, all apparently
> works as expected.
>
> Why should setting the 'left' of a control change the bottom of its
> enclosing group ?
>
> And why change it to an apparently silly value ?
>
> -- Alex.
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Mobile text input mystery

2020-04-24 Thread Håkan Liljegren via use-livecode
Have you tried to add a background color to the control so you can actually see 
it? Then the dictionary actually tells you that the result holds the ID. I know 
that you can then use them both. I usually use the ID as that is guaranteed to 
be unique.

Håkan
On 22 Apr 2020, 19:39 +0200, Graham Samuel via use-livecode 
, wrote:
> Reading your response, Mark, I didn't feel so bad, since the LC Dictionary 
> says for example about mobileControlSet
>
> syntax: mobileControlSet idOrName, PropertyName, value
>
> and later explains
>
> idOrName - the id or name of the control
>
> So I therefore saw the two ways of referring to the control as apparently 
> interchangeable.
>
> However, I changed my openCard handler according to your suggestion and 
> nothing at all changed. I think there must be some other factor, but as usual 
> I just can’t see it.
>
> Just to labour the point, here is my actual handler with the original names 
> in place. The answer call works as expected:
>
> on opencard -- we dynamically create a field for the user to key in the radius
>
> global sinputID -- this is all from the LC lesson
>
> if environment() = "mobile" then
>
> mobileControlCreate "input", "FRadiusText" -- so the user can type in
>
> put the result into sinputID
>
> answer "opening text field for radius input. ID created is:" && sinputID && 
> "Name is:" && "FRadiusText"
>
> mobileControlSet "FRadiusText", "rect", "114,135,163,158" -- this is where 
> the original rect was
>
> mobileControlSet "FRadiusText", "visible", "true"
>
> mobileControlSet "FRadiusText", "opaque", "true"
>
> end if
>
> end opencard
>
>
> Still puzzled
>
> Graham
>
> > On 22 Apr 2020, at 18:34, Mark Waddingham via use-livecode 
> >  wrote:
> >
> > On 2020-04-22 17:00, Graham Samuel via use-livecode wrote:
> > > As usual, the problem will be my fault, but I can’t get a mobile input
> > > field to appear on a card. I’m debugging it at present, which explains
> > > the answer statement:
> > > on opencard -- we dynamically create a field for the user to key in
> > > global sinputID -- this is all from the LC lesson. It’s a global
> > > because I need to refer to it in a button later
> > > if environment() = "mobile" then
> > > mobileControlCreate "input", "FMyText" -- so the user can type in
> > > put the result into sinputID — the Dictionary doesn’t mention
> > > ‘the result’ but it does seem to be right
> > > answer "opening text field for input. ID created is:" && sinputID
> > > mobileControlSet sinputID, "rect", “114,135,163,158” — this is
> > > a real location on the card
> > > mobileControlSet sinputID, "visible", "true"
> > > mobileControlSet sinputID, "opaque", "true"
> > > end if
> > > end opencard
> >
> > I'm pretty sure if you give your mobileControl a name (FMyText) in this 
> > case, then that is the only way you can refer to it. You can only use 'the 
> > result' of the Create function *if* you didn't give it a name.
> >
> > So you need to do either:
> >
> > mobileControlCreate "input", "FMyText"
> > mobileControlSet "FMyText", ...
> >
> > OR
> >
> > mobileControlCreate "input"
> > put the result into sinputID
> > mobileControlSet sinputID, ...
> >
> > Warmest Regards,
> >
> > Mark.
> >
> > --
> > Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> > LiveCode: Everyone can create apps
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your 
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-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: Simple 3D animation question

2020-04-18 Thread Håkan Liljegren via use-livecode
When teaching my students about hybrid apps I usually do a session called "Vad 
är klockan vart då?" (What is the time where?) Where we have a globe in a 
browser widget, that you can spin and tap. When you tap a location we have a 
clock-widget set to the current time at that location. The globe is driven by 
d3js, which is a really powerful visualization library written in JavaScript. 
Without resorting to builder or embedding some other graphic library I don't 
think that would be possible at the current state of LiveCode graphics. But on 
the other hand it is really nice to see how easily you can combine the browser 
widget with LiveCode.

So to conclude I also would suggest to resort to a browser widget and then add 
something like:

https://codepen.io/Mombasa/pen/fvgqb

(Built with threes)

Håkan
On 18 Apr 2020, 18:47 +0200, Mark Wieder via use-livecode 
, wrote:
> On 4/18/20 6:32 AM, David Bovill via use-livecode wrote:
> > For Earth Day this Wendesday a few of us are working on an art piece that I 
> > want to use Livecode for.
> >
> > As part of this event I need to create an interactive presentation and wish 
> > to create an icosahedrons - so a 3 dimensional hexagon - that I need to 
> > rotate in different dimensions.
>
> At the risk of getting into a religious war here...
> I wouldn't do this in LiveCode.
>
> Have you seen threejs?
>
> https://threejs.org
>
> example:
> https://threejs.org/examples/#webgl_geometry_convex
>
> source:
> 
>
> --
> Mark Wieder
> ahsoftw...@gmail.com
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-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: Even Distribution

2020-04-16 Thread Håkan Liljegren via use-livecode
Maybe I’m misunderstanding but if you just want to divide the jobs you could 
have a counter for the current driver and after assigning a job you increase 
the counter and wrap it when you exceed the number of drivers.

If you’re looking for a more fancy job division algorithm you should take a 
look at the classical traveling salesman problem but with multiple drivers. And 
even with one driver this is a tricky solution. If you are building an app that 
really needs a good solution for the vehicle routing problem you can maybe wrap 
the optaplanner Java library. (optaplanner.org)

Good luck!

Håkan
On 17 Apr 2020, 04:42 +0200, Skip Kimpel via use-livecode 
, wrote:
> I have working on creating a loop that would divide the number of jobs by
> the number of users and then checking to see to see if it is evenly
> divisible but that is kind of where I am stuck. Everything I have tried
> thus far has proven to be unsuccessful.
>
> SKIP
>
> On Thu, Apr 16, 2020 at 10:36 PM Skip Kimpel  wrote:
>
> > Dev, I have already sorted the jobs out by proximity so I don't need to
> > worry about that. Just need the distribution piece down. I agree, you
> > have a good point an might prove valuable in the future.
> >
> > SKIP
> >
> > On Thu, Apr 16, 2020 at 10:33 PM Skip Kimpel  wrote:
> >
> > > Haha... Let me specify, I am looking to do this programmatically :)
> > >
> > > SKIP
> > >
> > > On Thu, Apr 16, 2020 at 10:31 PM Dev via use-livecode <
> > > use-livecode@lists.runrev.com> wrote:
> > >
> > > > Since you would probably have long trips and short trips, I would try
> > > > and allocate on an estimated time to complete basis so that all were 
> > > > busy
> > > > for about the same time.
> > > >
> > > > > On 16-Apr-2020, at 8:23 PM, Skip Kimpel via use-livecode <
> > > > use-livecode@lists.runrev.com> wrote:
> > > > >
> > > > > I have 15 "jobs" that need to be assigned to 7 "drivers". How would 
> > > > > you
> > > > > evenly distribute the jobs to the drivers? In this case one of the
> > > > drivers
> > > > > would have 3 jobs while the others have two.
> > > > >
> > > > > Obviously, the number of drivers and number of jobs would fluctuate.
> > > > >
> > > > > This has been my mind twister for the night thus far :)
> > > > >
> > > > > SKIP
> > > > > ___
> > > > > use-livecode mailing list
> > > > > use-livecode@lists.runrev.com
> > > > > Please visit this url to subscribe, unsubscribe and manage your
> > > > subscription preferences:
> > > > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > > > >
> > > >
> > > >
> > > > ___
> > > > use-livecode mailing list
> > > > use-livecode@lists.runrev.com
> > > > Please visit this url to subscribe, unsubscribe and manage your
> > > > subscription preferences:
> > > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > > >
> > >
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Hijack the property inspector?

2020-04-15 Thread Håkan Liljegren via use-livecode
I didn't remember that the datagrid is actually a group, well kind of. I'll 
take a look at that. Thanks for the info.

Håkan
On 15 Apr 2020, 18:31 +0200, Ali Lloyd via use-livecode 
, wrote:
> This is possible - you would need to look at how the datagrid does it:
> https://github.com/livecode/livecode-ide/blob/develop/Toolset/resources/supporting_files/property_definitions/com.livecode.interface.classic.DataGrid.tsv
>
> Each datagrid property uses a custom getter / setter defined in the IDE
> library which does the right thing. You would have to tweak either the
> 'properties info' stuff in the ide library or perhaps add a frontscript
> that intercepts revIDEExtensionPropertiesInfo and returns the array from
> the revIDEExtensionLibrary implementation augmented with your custom data.
> Alternatively you could use the inspectorData setProp handler of
> revInspectorTemplate more directly.
>
> It will be a little tricky I suspect, but definitely doable. We really
> would like to add a way to make 'script widgets' - i.e. aggregate livecode
> controls with script behaviors - but there are some technical hurdles to
> overcome before that is possible (at least in a way that insulates them in
> the same way as a widget is)
>
> On Wed, 15 Apr 2020 at 15:42, Håkan Liljegren via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > When building widgets we can quite easily “inject" the properties into the
> > ordinary property inspector. I often build new controls out of LiveCode
> > controls and mainly a group of controls. Currently I have my own system
> > with my own tools palette for dragging them to the current card and my own
> > “property” stack to handle some of the properties, but does anyone know if
> > it is possible to use the standard property inspector instead?
> >
> > As they are usually ordinary LiveCode groups (with some behavior script)
> > it would be nice to be able to use the ordinary property inspector and just
> > add some extra properties. Again in the same manner as a widget property
> > works.
> >
> > I found this blog post:
> >
> >
> > https://livecode.com/how-to-create-plugins-and-tools-with-the-livecode-8-0-ide/
> >
> > That gives some hint but I can’t find how my controls should respond to
> > the property inspector.
> >
> > :-Håkan
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Hijack the property inspector?

2020-04-15 Thread Håkan Liljegren via use-livecode
When building widgets we can quite easily “inject" the properties into the 
ordinary property inspector. I often build new controls out of LiveCode 
controls and mainly a group of controls. Currently I have my own system with my 
own tools palette for dragging them to the current card and my own “property” 
stack to handle some of the properties, but does anyone know if it is possible 
to use the standard property inspector instead?

As they are usually ordinary LiveCode groups (with some behavior script) it 
would be nice to be able to use the ordinary property inspector and just add 
some extra properties. Again in the same manner as a widget property works.

I found this blog post:

https://livecode.com/how-to-create-plugins-and-tools-with-the-livecode-8-0-ide/

That gives some hint but I can’t find how my controls should respond to the 
property inspector.

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


Re: Socket Help

2020-04-05 Thread Håkan Liljegren via use-livecode
There is no problem running the server and client on the same machine. I've 
used it for doing elevated services. There is a demo stack for a chat server 
and client that you can download. I know that helped me a lot when doing my 
first client server.

:-Håkan
On 5 Apr 2020, 20:23 +0200, Bob Sneidar via use-livecode 
, wrote:
> Hi all.
>
> I am creating a client/server socket based app and I am trying to develop 
> both the client and server on the same workstation, and I am having 
> difficulty. I *think* the issue is that the client and server cannot both be 
> on the same system, but I’m not entirely sure. I’m asking the system to 
> listen and also talk on the same port.
>
> Anyone have any insight into this?
>
> Bob S
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting started with geographical coordinates

2020-04-03 Thread Håkan Liljegren via use-livecode
Most of the mobileSomething are wrappers around the system functions so you can 
learn a lot by reading the ios developer documentation as most of the functions 
started there.
And reading the docs I can see that you probably get a CLLocationCoordinate2D 
from the system and that is in turn two doubles in the WGS 84 system. I.e. you 
get a float for longitude and latitude.

I have code for distance calculation somewhere, that I built for a Quiz walk 
app, that I made for my sons birthday party several years ago. If you are 
interested I can dig it up.

I remember that the biggest problem was not calculating the distance it was 
translating lat long to some meaningful x,y coordinate.

Håkan
On 3 Apr 2020, 21:50 +0200, Graham Samuel via use-livecode 
, wrote:
> This is cheeky but I can’t run up my mobile simulation today - can someone 
> tell me the format of the geographical coordinates produced by 
> mobileSensorReading et al. I mean, is say latitude just one integer showing 
> seconds, or is it deg, min, sec - and are fractional seconds returned (so, 
> floating point)? I shall find out for myself eventually but it would help a 
> little to know now. AFAIKS there’s nothing in the LC documentation about it.
>
> Graham
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: How to find the column and row of a basic tableField

2020-04-03 Thread Håkan Liljegren via use-livecode
With risk of going slightly off-topic, but also showing yet another code 
example. I had exactly this problem some time ago and came up with the 
following solution:

getProp clickedRowCol
   # calc Row => TODO: Handle row with variable row heights
   put the clickV - the top of me - the borderWidth of me - the effective 
topMargin of me + 5 into tY
   put tY div the effective textHeight of me + 1 into tLine

   #Calc column : TODO : Handle other text aligns
   put the tabstops of me into tTabs
   put the number of items in tTabs into tNumCols
   put item -1 of tTabs into tLastTab
   put tLastTab - item -2 of tTabs into tTabWidth
   put the left of me + the borderWidth of me +the effective leftMargin of me - 
2 into tLeft
   if (the ClickH - tleft) > tLastTab then
      # Click right of last column
      return tLine, (the ClickH - tLastTab - tLeft) div tTabWidth + tNumCols + 1
   else
      put the ClickH - tLeft into tClickPos
      put "," & tClickPos after tTabs
      sort items of tTabs numeric ascending
      return tLine, itemOffset(tClickPos, tTabs)
   end if
end clickedRowCol

You can try it by adding the following mouseUp code:

on mouseUp
   answer "You clicked at " & the clickH, the clickV && "= (Row,Col)" && the 
clickedRowCol of me
end mouseUp

It works for tables with or without date but doesn’t handle tables with 
variable row heights as that was not the case at the moment. To get it 
pixel-perfect I needed to compensate the row calculation with 5 pixels and the 
column with -2 as you can see in my code. Does anyone know why? Is it the same 
reason that if you set the margins of a field to 0 you often get the first line 
clipped?

Keep Safe!

:-Håkan
___
use-livecode mailing list
use-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: Guessing the encoding of a test file...

2020-03-20 Thread Håkan Liljegren via use-livecode
I know that Mozilla had a library for finding text decoding. I don’t think they 
use it anymore though. But I know it was translated into several other 
languages. It was called something like “universal character detection” or 
something equally sexy. Just typing out of my head, so it might be something 
completely different.

Håkan
On 20 Mar 2020, 00:47 +0100, Paul Dupuis via use-livecode 
, wrote:
> Users of our application may use text files any whatever encoding their
> local system creates them in. We can not tell them to only create such
> files with a specific encoding. So, we need to detect the encoding of
> the text file the user selects.
>
> As I mentioned, I have an LC script that implements a encoding guessing
> algorithm. I am looking for an alternative or better one if someone out
> there happened to have created one they might like to share or license.
>
> Any such routine needs to work on macOS and Windows and return the types
> used by the LC textDecode function.
>
> I already knew about file on OSX, but I needs a x-platform solution.
>
>
> On 3/19/2020 6:15 PM, Pi Digital via use-livecode wrote:
> > On a mac it’s easy. Use
> > file -I “MyFile.txt”
> > as a shell script.
> >
> > On Windows it’s near impossible without running a whole bunch or arbitrary 
> > tests that may or may not be correct - certainly not accurate.
> >
> > What kind of text were you hoping to see? Was you looking for a particular 
> > encoding? If it is grammatical text there’s are a bunch or runs you can do 
> > to see what character sets are used but even then it’s only a 
> > ‘probably’/‘possibly’ response.
> >
> > Sean Cole
> > Pi Digital
> >
> >
> > > On 19 Mar 2020, at 20:31, Paul Dupuis via use-livecode 
> > >  wrote:
> > >
> > > This has come up many times before, but I'll ask once again in case 
> > > something has changed or someone new sees this.
> > >
> > >
> > > Does anyone have a routine that will take a filespec to a text file and 
> > > return the guessed encoding of the text file?
> > >
> > >
> > > First, please don't respond with your should know the encoding or the 
> > > users should know the encoding of their files. Not possible in the widely 
> > > uncontrolled real world.
> > >
> > > I do already have a routine to guess file encodings. It was written by 
> > > someone else. There are instances where it should work and does not. I 
> > > fear there may be errors in the algorithm and I do not have the original 
> > > algorithm to check it against. Hence, I am looking for an alternative 
> > > that is either free to use or to be licensed for a modest fee.
> > >
> > > My current routine attempts to return the encoding as a string that can 
> > > be directly passed to textDecode(binaryData,encoding)
> > >
> > > "ASCII"
> > > "UTF-16"
> > > "UTF-16BE"
> > > "UTF-16LE"
> > > "UTF-32"
> > > "UTF-32BE"
> > > "UTF-32LE"
> > > "UTF-8"
> > > "CP1252" *
> > > "MacRoman" *
> > >
> > > * for these last 2, if the file is MacRoman on a Windows system, you 
> > > actually have to textDecode(macToISO(data),"CP1252") and if you have 
> > > CP1252 on the Mac, you need to do textDecode(isoToMac(data),"MacRoman"). 
> > > There is an enhancement request to support MacRoman decoding under 
> > > WIndows and vice versa at 
> > > https://quality.livecode.com/show_bug.cgi?id=22391 if you want to CC 
> > > yourself to show interest.
> > >
> > >
> > > ___
> > > use-livecode mailing list
> > > use-livecode@lists.runrev.com
> > > Please visit this url to subscribe, unsubscribe and manage your 
> > > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your 
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: No support for 24bit/96kHz audio file?

2020-01-23 Thread Håkan Liljegren via use-livecode
I kind of never use the built-in sound player other than small short sound 
effects and often not even at then, as the build in player is so limited. I 
instead use the player control. It can play kind of every file. (96kHz/ 24bit 
Flac among them). On top of that you can play several sounds at once, you can 
control the volume individually, you can keep the files external, etc.

Would it be nice to have an overhaul of the built-in player? Yes, of course! Is 
it a big problem? For me it isn’t!

:-Håkan
On 23 Jan 2020, 03:00 +0100, Stephen Barncard via use-livecode 
, wrote:
> No and my biggest gripe about live code right now.
>
> On Wed, Jan 22, 2020 at 16:43 Sannyasin Brahmanathaswami via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > aiff or wav?
> >
> > Hi,
> >
> > i imprted some short audiofiles 24bit/96kHz but it seems LC does some
> > kind of downsampling or changes the frequency.
> >
> > As it plays now very looow.
> >
> > Is the max 16bit/44.1kHz ?
> >
> > Any idea?
> >
> >
> > Thanks,
> >
> > Jerry
> >
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> --
> --
> Stephen Barncard - Sebastopol Ca. USA -
> mixstream.org
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Apple Mac menubar?

2020-01-21 Thread Håkan Liljegren via use-livecode
I this is already created by our hero Trevor Devore. Take a look at his github 
page:

github.com/trevordevore/lc-macos-toolset

what you are looking for is the nssystem-status-bar.lcb


On 21 Jan 2020, 18:45 +0100, Bob Sneidar via use-livecode 
, wrote:
> I thought they were called Diddly Buggers?
>
> Bob S
>
>
> > On Jan 21, 2020, at 09:26 , Mark Waddingham via use-livecode 
> >  wrote:
> >
> > On 2020-01-21 17:22, dunbarx--- via use-livecode wrote:
> > > @Sean
> > > What are the "system menu extensions" on the right side of the menubar?
> > > @Mark W.
> > > What is a "Mac Status Menu"?
> >
> > They are the little icons which appear on the right hand-side of the mac
> > menubar - things like the keyboard selector, bluetooth status,
> > battery life indicator, wifi status etc.
> >
> > Warmest Regards,
> >
> > Mark.
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-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: Catalina

2019-10-09 Thread Håkan Liljegren via use-livecode
So, maybe I’m an Apple fanatic but here goes…

By dropping 32-bit support Apple doesn’t need to update 2 pairs of system 
libraries, as most 32-bit applications requires 32-bit libraries to work. Thus 
it would also be possible to save some disk space (as I only need 64-bit). This 
also means that the system doesn’t need to keep two versions of a library in 
memory. I.e. I will save RAM in my machine. And of course the developers needed 
to maintain the 32-bit libs can now concentrate on other things. Yes, I know 
Apple has more  than several countries, but they still lack good engineers 
in many areas.

But, yes, old 32-bit only versions of apps like old versions of LiveCode will 
stop working. But, if you have a newer version of LiveCode there is not that 
much work that needs to be done to turn your app into a 64-bit version. If you 
are lucky you just do a new “Save as stand-alone”. If you are not that lucky 
you might need to rewrite some code, but I must say that LiveCode have done a 
great job being backwards compatible. I can still open several HyperCard stacks 
in LiveCode!

On top of that you I can run older versions of MacOS in a virtual machine (like 
Parallels Desktop) if I really need to. Or I can keep an old installation on a 
separate hard drive and boot from that when needed.

Just installed Catalina, so tomorrow I might think totally different ;)

:-Håkan
On 9 Oct 2019, 16:18 +0200, Paul Dupuis via use-livecode 
, wrote:
> Agree!
>
> With all the billions of $$$ Apple has, they certainly could have
> afforded to maintain 32-bit compatibility for smaller developers who
> can't afford to make every change Apple demands, but they make more
> profits if they don't.
>
> Sorry to any Apple fanatics. I just needed to vent my frustration at
> Apple's dictatorial development model.
>
> On 10/8/2019 9:52 PM, hh via use-livecode wrote:
> > "Catalina is a girl's name of Spanish origin meaning 'pure'".
> > What a beautiful sounding name!
> >
> > But MacOS Catalina is a pure killer. Killed my beloved LC 6/7
> > (I need for development of Raspi stacks) and sometimes need
> > for speed.
> >
> > I learned LiveCode using LC 6 in 2013.
> > TMHO, LC 6.7.11 was the most complete LC version ever made.
> >
> > May be I'll use one older machine only for using LC 6/7.
> > But it's kind of a burial. :-((
> >
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your 
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-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: Is there a way to use custom icons in the navbar widget?

2019-06-15 Thread Håkan Liljegren via use-livecode
The is a command setCurrentIconFamliy that you can use. You first need to 
create an icon family by adding all your wanted icons into an array, there 
array needs to have a structure of

Array
   Iconname
       Codepoint
       SVG
 iconname
       …

I’ve always used 0 for code point and the svg should be the SVG path

I do believe I have seen a stack sometime where someone had put together 
severalt of the common families. I can’t remember who did that though…

Håkan
On 15 Jun 2019, 09:39 +0200, Matthias Rebbe via use-livecode 
, wrote:
> Hi,
>
> i am currently working on a mobile app which makes use of the navbar widget. 
> I like the ease of that widget. The only thing i am missing is that i would 
> like to use my own icons with it, because i need other symbols than the ones 
> provided by the widget.
>
> So is there a way to use custom icons with that widget?
>
> Regards
> Matthias
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Browser HTML Source & URLs

2019-04-17 Thread Håkan Liljegren via use-livecode
You can execute a small javascript to grab the HTML. I’ve done something 
similar in an Instagram Scraper I just built….

First you need to set up a callback function in the widget under javascript 
handlers e.g. jscallback then you can call a javascript that calls you back 
with whatever you want. Create field for the script, save script into a 
constant or just submit if it is short:

do ”liveCode.jscallback( ’source', document.documentElement.outerHTML );" in 
widget ”browser"

You also need to setup the jscallback in LiveCode:

on jscallback pMethod pValue
 if pMethod is ”source” then
      # pValue holds the source except the 
   end if
end jsCallback

Here I used a ”key value” principle with a method and a value, but you can of 
course set up several callbacks in the browser widget if you prefer.

Håkan
PS. Writing code directly in mail so it is untested and qoutes and formatting 
might be wrong...
On 16 Apr 2019, 16:53 +0200, Rick Harrison via use-livecode 
, wrote:
> I am able to load the browser widget with a URL
> and go to the URL successfully.
>
> I can get the HTMLtext of the page I have
> browsed to just fine.
>
> What I have yet to do is to get the page
> source code of the page I have browsed
> to in LiveCode into a field.
>
> I also would like the browser widget to
> show me any new URL address that I
> have gone to.
>
> Suggestions?
>
> Thanks,
>
> Rick
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Saving a tab formatted field to a file and retaining its formatting

2019-04-11 Thread Håkan Liljegren via use-livecode
If you want the tab stops to be included in the file I guess you need to add 
them manually to the rtf file. There is a \tx command in rtf that sets the tab 
size. I used it long time ago so I don’t remember of it was relative or absolut 
positions but I do think it should be doable…

:-Håkan
On 8 Apr 2019, 18:25 +0200, Robert J. Earp via use-livecode 
, wrote:
> Thanks for the reply Paul. Yes, tried that but there are problems. It saves a 
> .rtf file but when you open that in MSWord (OS X or Windows) the tabs are 
> changed to underscores. If you open the file in OS X TextEdit it does have 
> tabs but the position/spacing is not retained. I’ve created a sample/test 
> stack if anybody wants to play ;-)
>
> Our project is supposed to create a formatted file that external to the LC 
> project, gets assembled with other documents/files to make a presentable 
> report. The other docs/files are .rtf (created in MSWord or Pages or 
> TextEdit) and an .eps file. The final report will be a .pdf and Acrobat is 
> likely what will get used to manually assemble the final report.
>
> To quote my valued colleague (RogerG) on this problem, and who has spent 
> inordinate hours trying to find a solution, tabs have turned out to be tricky 
> little devils in LC !!
>
> best, Bob...
>
> > From: Paul Dupuis mailto:p...@researchware.com>>
> > To: use-livecode@lists.runrev.com 
> > Subject: Re: Saving a tab formatted field to a file and retaining its
> > formatting
> > Message-ID:  > >
> > Content-Type: text/plain; charset=utf-8; format=flowed
> >
> > I take it your have tried:
> >
> > put the rtfText of field "X" into URL
> > ("file:"("desktop")&"savedfield.rtf")
> >
> > And then reading it back to a new field with:
> >
> > set the rtfText of field "Y" to URL
> > ("file:"("desktop")&"savedfield.rtf")
> >
> > and the tab spacing is not preserved?
> >
> >
> >
> > On 4/7/2019 7:57 PM, Robert J. Earp via use-livecode wrote:
> > > Dear all, we have a field that is formatted nicely with tabs and want to 
> > > save that as a file, retaining the tab formatting. The saved file format 
> > > ideally should be .rtf but we may be able to use other formats such as 
> > > .pdf
> > >
> > > Anybody got any ideas how to do this ?
> > >
> > > Thanks in advance for your suggestions.
> > >
> > > best, Bob?
> > >
> > > Bob Earp - White Rock, BC, Canada
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Panel/Form Widget

2019-04-11 Thread Håkan Liljegren via use-livecode
Maybe I don’t understand your idea but I do think you have kind of  the same 
using a group. If you design your group or your ”panel” you still need to place 
your controls. If you move a group you also move the controls within that 
group. You can also grab individual controls in a group if you click on the 
”Select Grouped” button.
If you do want to place them programmatically you do have a relation as all 
groups can know their children via ”of me”:

repeat with i = 1 to the number of controls of me
   set the loc of control i of me to 
end repeat

Every control also know their parent via ”the owner”:
dispatch ”controlSelected” to the owner of me with the long id of me

Groups also get a message ”resizeControl” that I have used a lot when creating 
my own ”controls” consisting of several controls in a group.

I can see the advantage if you are to build a fairly complex multi window 
layout but still what to keep a one-window layout (ala Photoshop). But even 
that should be doable with groups alone as if you drag a palette to be 
free-floating you could create a new palette window and clone the group to that 
window.

I usually drag out the controls and place them where I want them and then 
select them and ”Group” them afterwards. If I want that exact group in another 
project I can clone the group in one way or another.

So I can’t see the big difference...

But maybe [probably] I’m missing something…

:-Håkan
On 11 Apr 2019, 15:27 +0200, Dalton Calford via use-livecode 
, wrote:
> Hi Richard,
> Thanks for your response!
>
> So for the foreseeable future, we have groups, sharable within a stack,
> > and clonable anywhere, even into other stacks. Using that as a
> > foundation, we may be able to write a handler or two to give you a very
> > Viewer-like experience, if you can share more about the particulars of
> > how you'll be using them.
> >
>
> Although I can see the use of groups as an option, it is far less
> intuitive and causes more issues than it should.
> For example.
> Calculating where to place/move an object within a group requires
> calculating where you want a new widget or where to move a widget in
> regards to the rest of the group, getting the top left corner of the group,
> combining the result etc., all in code.
> A parent/child with relative positioning is far simpler and closer to all
> modern systems.
> Another example,
> During development, in other apps, you drop a panel, drop your new widgets
> upon it as needed, and that is it.
> With Livecode, you either do not create the group until you are absolutely
> sure you know what you want in it, or, baring that, play with code or the
> project browser to move items into an existing group.
> Plus, using the pointer tool to move items within the group is also not
> possible as the items in the group are the items you use to click upon to
> move the whole group.
>
> This is a frustrating issue for what should be a simple thing. A
> 'container' would be the solution - effectively a smarter group, with
> widgets having a 'parent' and a possible array list of 'children'. This
> would allow a 'child' to know it's parent, and a 'parent' to know its
> children. Event notifications such as changes in geometry, style, etc
> could then be triggered/passed. It would also allow for simpler
> cropping/scroll bar mechanisms.
> It would also act as a scoping mechanism for variables and events.
>
> You could even have a stack as a child of another stack with this setup
> (MDI interface).
>
> If I had a better understanding of the codebase, I would implement it
> myself.
> But, If I had a better understanding of the code base, I would rather spend
> my time on the database layer which is woefully limited.
>
> best regards
> Dalton
>
> On Wed, 10 Apr 2019 at 18:11, Richard Gaskin via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Dalton Calford wrote:
> >
> > > In other programming languages/environments that I have used, there is
> > > a normally a panel object.
> > > In livecode terms, it would act like a stack that is embedded inside
> > > another stack as a widget.
> > > With Delphi, it is a panel (tabbed; normal or repeating) while in
> > > MSAccess it is a form (repeating or not).
> > > My question is, does such a thing exist in livecode?
> >
> > LC has groups, which can contain any number of objects, and when nested
> > can even work like having multiple cards within them. They can be
> > shared across any card within a stack, but not across stacks*.
> >
> > Nice for some things, but if you want a true stack object within another
> > stack you may have to wait a while: this enhancement request is now 14
> > years old, for what Gain Momentum introduced to the xTalk world as
> > "Viewers"; while the LC team has shown interest in it, other priorities
> > have displaced its implementation:
> >
> > https://quality.livecode.com/show_bug.cgi?id=2786
> >
> > So for the foreseeable future, we have groups, sharable within a stack,
> > and 

Re: TabStops and Tab Spacings

2019-03-13 Thread Håkan Liljegren via use-livecode
Tab-size is a CSS-thing and not a Livecode thing...
On 7 Mar 2019, 01:15 +0100, Roger Guay via use-livecode , wrote:
> Thank you, Håkan. I am working with rtfText and 4 or 5 tab-sizes, but this is 
> very interesting and I will see what I can use. Is the Tab-size attribute an 
> LC thing? If so, I don’t find anything about tab size in the dictionary.
>
> Roger
>
> > On Mar 6, 2019, at 1:16 PM, Håkan Liljegren via use-livecode 
> >  wrote:
> >
> > There is a tab-size attribute that you can use but it can’t contain more 
> > than one number and it only handles ”number of spaces” for a tab like
> > tab-size: 6
> > Will give you 6-spaced tab.
> > To get the layout in HTML I instead suggest another approach. Replace each 
> > tab with an HTML-element to convert the text into something more HTML-like. 
> > I.e.
> > 123 can be converted to something like
> > 123
> > Then you can style your HTML in the way you want…
> > Or if you really want table data in HTML you can use a (drumroll please ;) 
> > !
> > Converting a text field with tabs to an HTML table is a fairly 
> > straightforward process:
> >
> > function tabTextToHTMLTable pText
> > set the itemDelimiter to tab
> > put "” into tHTML
> > repeat for each line tLine in pText
> > put "” after tHTML
> > repeat for each item tItem in tLine
> > put ”” & tItem & ”” after tHTML
> > end repeat
> > put ”” after tHTML
> > end repeat
> > put "” after tHTML
> > return tHTML
> > end tabTextToHTMLTable
> >
> > There is an OLD proposal (like from 1998 or 97 if I remember correct) about 
> > tab-stops in HTML but to my knowledge it has never been implemented.
> >
> > :-Håkan
> > On 5 Mar 2019, 14:59 +0100, hh via use-livecode 
> > , wrote:
> > > > Roger G. wrote:
> > > > Is there any way to export myFld to URL and retain the Tab spacings 
> > > > 15,250,320 ?
> > > > ...
> > > > I’m working with rtfText instead of HTMLText. (Again, not sure if that 
> > > > makes a
> > > > difference or even what the trades are of each).
> > >
> > > RtfText is, without a large JavaScript library, unusable as input for a 
> > > browser
> > > widget (or a browser). The htmltext retains, alike rtfText, styled 
> > > formatting.
> > >
> > > > Roger G. wrote:
> > > > I am not converting a "simple table field" but rather a simple field 
> > > > with
> > > > tabStops.
> > >
> > > A simple field with tabstops as input is OK.
> > > ___
> > > use-livecode mailing list
> > > use-livecode@lists.runrev.com
> > > Please visit this url to subscribe, unsubscribe and manage your 
> > > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your 
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: TabStops and Tab Spacings

2019-03-06 Thread Håkan Liljegren via use-livecode
There is a tab-size attribute that you can use but it can’t contain more than 
one number and it only handles ”number of spaces” for a tab like
tab-size: 6
Will give you 6-spaced tab.
To get the layout in HTML I instead suggest another approach. Replace each tab 
with an HTML-element to convert the text into something more HTML-like. I.e.
123 can be converted to something like
123
Then you can style your HTML in the way you want…
Or if you really want table data in HTML you can use a (drumroll please ;) 
!
Converting a text field with tabs to an HTML table is a fairly straightforward 
process:

function tabTextToHTMLTable pText
   set the itemDelimiter to tab
   put "” into tHTML
   repeat for each line tLine  in pText
      put "” after tHTML
          repeat for each item tItem in tLine
              put ”” & tItem & ”” after tHTML
          end repeat
      put ”” after tHTML
   end repeat
   put "” after tHTML
  return tHTML
end tabTextToHTMLTable

There is an OLD proposal (like from 1998 or 97 if I remember correct) about 
tab-stops in HTML but to my knowledge it has never been implemented.

:-Håkan
On 5 Mar 2019, 14:59 +0100, hh via use-livecode 
, wrote:
> > Roger G. wrote:
> > Is there any way to export myFld to URL and retain the Tab spacings 
> > 15,250,320 ?
> > ...
> > I’m working with rtfText instead of HTMLText. (Again, not sure if that 
> > makes a
> > difference or even what the trades are of each).
>
> RtfText is, without a large JavaScript library, unusable as input for a 
> browser
> widget (or a browser). The htmltext retains, alike rtfText, styled formatting.
>
> > Roger G. wrote:
> > I am not converting a "simple table field" but rather a simple field with
> > tabStops.
>
> A simple field with tabstops as input is OK.
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: SVG icons in buttons

2019-02-26 Thread Håkan Liljegren via use-livecode
For me it usually works with “import as control” or “import as referenced...”, 
but for some “mysterious” reason it never works by setting the filename of the 
control. I haven’t looked into the IDE code, but I guess it takes care of the 
calling to drawingSVGcompile() or something

Håkan
On 27 Feb 2019, 06:26 +0100, J. Landman Gay via use-livecode 
, wrote:
> On 2/26/19 6:21 PM, Monte Goulding via use-livecode wrote:
> >
> >
> > > On 27 Feb 2019, at 11:14 am, J. Landman Gay via use-livecode 
> > >  wrote:
> > >
> > > I thought I read that we could use SVG icons in buttons now. How does 
> > > that work? I thought I'd tried it once before successfully but I can't 
> > > get it to work right now (LC 9.0.3rc1).
> >
> > Import the SVG using the drawing library `drawingSVGCompile()` and set the 
> > text of an image to the returned value. Then use the image ID as an icon in 
> > the normal way.
>
> Thanks Monte, that's just too cool. I've gone wild with it. :)
>
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-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: SVG widget and grab me command

2019-02-22 Thread Håkan Liljegren via use-livecode
Or you can use an image instead as they happily handle SVG files nowadays…

:-Håkan
On 21 Feb 2019, 18:18 +0100, Tore Nilsen via use-livecode 
, wrote:
>
> The simple solution was to «group» each individual SVG widget and add the 
> grab me command to 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: How to IMPORT CONTACTS and GPS location

2019-02-22 Thread Håkan Liljegren via use-livecode
Take a look at mobileFindContact, mobileGetContact etc (search for contact) in 
the dictionary… Remember though that you will get a dialog asking the user for 
permission and if they reject you will not be able to grab anything!

GPS is a system with satellites that your device can use to pin-point where it 
is on the globe (Global Positioning System), but I guess that you are asking 
for some geolocation based on an address. And yes you can do that via Google or 
any other provider of a map API. Do read the licensing careful as Google has 
limitations on how you can use the service and how much you need to pay (if you 
do a lot of lookups). To use The Google api you first need to get an API key. 
You then need to send that key together with every request:

https://maps.googleapis.com/maps/api/geocode/json?address=empire+state+building+new+york=YOUR_API_KEY

Another alternative is to use Open Street map. Take a look at:
https://wiki.openstreetmap.org/wiki/Nominatim

But if you are in a hurry the syntax is something like:
https://nominatim.openstreetmap.org/?format=json=1=empire+state+building+new+york=json=1

So to use that in your LiveCode application you can do

function nomatimLookup pQuery
   put 
"https://nominatim.openstreetmap.org/?format=json=1=json=1=;
 into tURL
   put textEncode(pQuery,"utf8") into pQuery
   replace space with "+" in pQuery
   put pQuery after tURL
   put url tURL into tResult
   return JSONToArray(tResult) // or jsonImport(tResult)
end nomatimLookup

This will return an array with data about the address and among those fields 
you find "lat" and "lon" for latitude and longitude if that was your GPS 
question...

But before you start using it, also take a look at the usage policy for the 
api: https://operations.osmfoundation.org/policies/nominatim/ and especially 
the requirements section!

There are a lot of other api providers that you can use also, depending on your 
need. But this will hopefully get you started...

Good Luck!

Håkan Liljegren
On 22 Feb 2019, 08:32 +0100, paolo mazza via use-livecode 
, wrote:
> Dear LiveCoders,
> I have not been using livecode for a while and do not know anymore
> what are the features of Livecode today.
> I would like to know
> - if LiveCode can IMPORT THE CONTACTS from the Iphone and Android systems
> - if it is possible to send an address to Google and get the GPS
> location from a LiveCode app.
> Best regards,
> Paolo Mazza
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Get RGB color of a specific screen location

2019-01-07 Thread Håkan Liljegren via use-livecode
Well, he could, if he didn’t wanted an average value of some more pixels, and, 
calculating an average via screenMouseLoc is really slow. Exporting a rect to 
an image is fairly quick though

Found the following in a stack:

# Calculates the average color value for an image
# pID should be the long id of the image we want to get the average from
function imageAverageValue pID
   put the imageData of pID into tData
   put the number of bytes of tData / 4 into tNumPixels
   # Sum all pixel values
   repeat with i = 0 to tNumPixels - 1
      add byteToNum(byte i*4 + 2 of tData) to tResult["red"]
      add byteToNum(byte i*4 + 3 of tData) to tResult["green"]
      add byteToNum(byte i*4 + 4 of tData) to tResult["blue"]
   end repeat
   # Calculate mean value
   repeat for each item anItem in "red,green,blue"
      put round(tResult[anItem] / tNumPixels) into tResult[anItem]
   end repeat
   return tResult["red"], tResult["green"], tResult["blue"]
end imageAverageValue

So to get the mouse average color in a square ± 2px from the mouseLoc we could 
do:

function getMouseAverageColor pSize
   if pSize is empty then put 2 into pSize
   put globalLoc(the mouseLoc) into tLoc
   if there is no image "averageColor" then create invisible image 
"averageColor"
   put the long id of image "averageColor" into tID
   export snapshot from rectangle item 1 of tLoc - pSize, item 2 of tLoc - 
pSize,  \
         item 1 of tLoc + pSize, item 2 of tLoc + pSize to image "averageColor"
   return imageAverageValue(tID)
end getMouseAvaregeColor

Happy coding!

:-Håkan
On 7 Jan 2019, 15:35 +0100, dunbarxx via use-livecode 
, wrote:
> A kluge, but couldn't you:
>
> on mouseUp
> set the screenMouseLoc to "200,200"
> answer the mouseColor
> end mouseUp
>
> I just threw this together, so you might want to restore the original
> mouseLoc, and locking the screen might be useful.
>
> Craig Newman
>
>
>
> --
> Sent from: 
> http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Probably a No-Brainer

2018-12-27 Thread Håkan Liljegren via use-livecode
replace "x^n" with "x^" & n in field "formula"

might do the trick…

:-Håkan
On 27 Dec 2018, 04:34 +0100, Roger Guay via use-livecode 
, wrote:
> As an example, I want to replace the contents of a field that contains x^n 
> with x^1 or x^2 or x^3 as n= 1 or 2 or 3 etc.
> But I can’t seem to find find a script that works. Help please??
>
> Roger
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-12-03 Thread Håkan Liljegren via use-livecode
The code will not work if you have htmltext containing the text "color=" like:
To set the color you can use color="#fa3b42"

and you can also shave off some milliseconds in the styledText version by using 
foreach:

…
repeat for each key aKey in tTextA
      # Check if first run has textcolor set
      put (tTextA[aKey]["runs"][1]["style"]["textcolor"] is empty) \
            into tTextA[aKey]["style"]["hidden"]
 end repeat
…

For me that is always faster than your clever 'offset("color="…' version.

It is a bit strange though that the foreach always seams to be faster. If we 
try to sum an array with 100 000 element like:

   put 10 into tNum
   # Create array with random numbers
   repeat with i = 1 to tNum
      put random(100) into tData[i]
   end repeat

   # Sum array by looping with index
   put the long seconds into tStart
   repeat with i = 1 to tNum
      add tData[i] to tSum
   end repeat
   put the long seconds - tStart into tTime1

   #Sum array by using foreach
   put the long seconds into tStart
   repeat for each key aKey in tData
      add tData[aKey] to tSum2
   end repeat
   put the long seconds - tStart into tTime2
   put tTime1 , tTime2, " ratio : " & tTime1 / tTime2

You will see that the second code is almost three times faster than the first 
one.

If it isn’t important that you process an indexed array in order 
foreach is always faster!

Happy coding!

:-Håkan
On 1 Dec 2018, 15:40 +0100, How to use LiveCode , wrote:
>
> if offset("color=",L)>0 then put " else put "http://lists.runrev.com/mailman/listinfo/use-livecode

Re: How to unset the backdrop in the preferences?

2018-10-12 Thread Håkan Liljegren via use-livecode
Does

View => Backdrop

work?

On my Mac it is "sticky" between launches of LiveCode

Håkan
On 12 Oct 2018, 12:48 +0200, Andre Alves Garzia via use-livecode 
, wrote:
> Hey Friends,
>
> This will sound silly. I am on Windows 10 using LC 9.x, I've set a
> backdrop on preferences and now I want to unset it but I can't find a
> way to do it. There are only options to select a new color but no way to
> clear it. Can anyone help? Executing `set the backdrop to none` every
> time I boot LC is getting tiresome.
>
> cheers
>
> andre
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: scaleFactor

2018-08-16 Thread Håkan Liljegren via use-livecode
As the screenrect is the same but virtually larger / smaller based on the 
scaleFactor you need calculate the scale factor based on the current 
scaleFactor and the new scaleFactor

Try this:
on changeScaleFactor pNewScale
   put the scaleFactor of this stack into tScale
   put tScale / pNewScale into tFactor
   put the topLeft of this stack into tTL
   multiply item 1 of tTL by tFactor
   multiply item 2 of tTl by tFactor
   set the scaleFactor of this stack to pNewScale
   set the topLeft of this stack to tTL
end changeScaleFactor

Of course you can substitute topLeft with something else if you want another 
corner or the center to be the fix point.

:-Håkan
On 16 Aug 2018, 01:11 +0200, Peter Bogdanoff via use-livecode 
, wrote:
> I too am using scaleFactor and ran into this issue of the difficulty of 
> windows moving around and even off screen. It seems that when scaleFactor is 
> invoked the entire screen is now virtual and calculations have to be made to 
> position the window where you want it to be visually. Unfortunately, those 
> exact calculations were beyond me at the time I implemented scaleFactor, so 
> my windows do still move somewhat. But if someone else has a method/formula 
> for window placement I too would be interested.
>
> Peter Bogdanoff
> ArtsInteractive
>
>
> > On Aug 15, 2018, at 3:02 PM, Knapp Martin via use-livecode 
> >  wrote:
> >
> > I know that scaleFactor is not intended to be a "zoom view" feature for 
> > desktop, but in lieu of actually having zoom views, I really need to use it 
> > to allow the user to enlarge or reduce the window size for a Mac and 
> > Windows app I’m working on. What I would like is for it to shrink or grow 
> > from the topLeft point on the screen but I can't seem to figure out a way 
> > to keep it from jumping around. I would like to have scaleFactors from .5 
> > to 1.5. Anybody tackled this one?
> >
> > Thanks,
> > Marty
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your 
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-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: Determine if device is a tablet

2018-08-15 Thread Håkan Liljegren via use-livecode
I think the idea is that if you have enough space for a viable landscape 
representation I think you should support it. The line between phone and tablet 
is very blurry and according to the rumours even Apple will start to support 
landscape multi-column apps on the new phones. Eg. :

https://gadgets.ndtv.com/mobiles/news/apple-iphone-x-plus-6-5-inch-2018-landscape-mode-ios-12-beta-1893260

:-Håkan
On 15 Aug 2018, 08:32 +0200, J. Landman Gay via use-livecode 
, wrote:
> On 8/14/18 11:13 PM, Richard Gaskin via use-livecode wrote:
> > J. Landman Gay wrote:
> >
> > > I need to determine whether the current mobile device is a tablet or a
> > > phone. On iOS I can use "the machine" but on Android it only provides
> > > the manufacturer's name.
> > >
> > > Does anyone know a way to do that?
> >
> > For screen metrics or device capabilities?
> >
>
> Metrics. I want to allow landcape orientation on tablets but only
> portrait for phones.
>
> Phil suggested getting device info, but mobileBuildInfo doesn't return
> anything better than "the machine." The server idea doesn't return
> specific enough info either if it isn't an i-thing.
>
> Monte mentioned the screenrect, which is what I started with, but it's a
> wild guess. Right now I'm using an arbitrary screen pixel width but I
> don't think it will work everywhere.
>
> I thought about using a ratio but I'm not sure what would be most
> accurate. And I'm not clear on how different resolutions affect it.
>
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-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: CRASH after entering "put the hostnametoaddress" into MSG

2018-05-31 Thread Håkan Liljegren via use-livecode
Crash here!

LC 9.0.0 / Mac OS 10.13.4
On 31 May 2018, 10:42 +0200, How to use LiveCode 
, wrote:
>
> put the hostnametoaddress
___
use-livecode mailing list
use-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: execution doesn't stop when multiple function calls in a line

2018-05-23 Thread Håkan Liljegren via use-livecode
It is out to get you ;)

 I can’t replicate this. The first stop stops the full execution for me (as 
expected). Do you have anything in your getVal that can cause it (e.g. 
recursion)?

:-Håkan

On 23 May 2018, 00:47 +0200, Dr. Hawkins via use-livecode 
, wrote:
>
> It seems to me I filed a bug about this a couple of years ago, and it was
> fixed.
>
> If I have a line like
>
> setVal "someVal", getVal("abc", dbtr) + getVal("def",
> dbtr)+getVal("ghi", dbtr) + getVal("jul", dbtr)
>
> and I stop the IDE in the first getVal() with the blue box when it hits a
> breakpoint, the other three getVal() still get called--and slowly, after a
> delay of seconds for each.
>
> I'm in (supposedly) the latest 9.0.
>
> Are others seeing this, or is it out to get me again? :)
> hawk
> --
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Web fonts

2018-05-17 Thread Håkan Liljegren via use-livecode
Web fonts are usually .woff and LiveCode can’t use that internally, AFAIK. But 
if you use the browser widget they do work! You can of course download the font 
in .ttf format and use it that way but then make sure that the licence allow 
you to do that.

Håkan Liljegren

On 17 May 2018, 00:34 +0200, Tom Glod via use-livecode 
, wrote:
> I've never tried it ...but the easy way to test is to
>
> "set the htmltext of field "Text" to html_text" .. if your html has inline
> font definition  chances are it should work. let us know.
>
> On Wed, May 16, 2018 at 6:22 PM, Peter Bogdanoff via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Crazy question, but is it possible to use a web font within a
> > internet-connected LiveCode application?
> >
> > Peter Bogdanoff
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode