Re: Help converting python one-liner...

2024-04-25 Thread Andreas Bergendal via use-livecode
The problem may be that base64 encoding inserts line breaks after every 76
chars (a remnant from terminal monitor width restrictions, apparently).
I ran into this a while ago, and cleaning the encoded string with “replace
cr with empty in tString” solved it for me.
I don’t think any textEncode/Decode should be needed after that (Python is
a different animal after all… :)

/Andreas

ons 24 apr. 2024 kl. 20:46 skrev David Bovill via use-livecode <
use-livecode@lists.runrev.com>:

> I need to put encodeImageData into json (which is utf-8) and then post it
> to the api. I'm not sure what aspects of base64 encoding would not be utf8
> compatible... seem to remember there are some quirks there to be aware of.
> The python code does  the decode("utf-8") step at the end - so I guess
> there is some issue with raw base64 encoding in json?
>
> On Wed, 24 Apr 2024 at 19:26, Paul Dupuis via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > On 4/24/2024 1:43 PM, David Bovill via use-livecode wrote:
> > > I'm trying to base64 encode an image and include it into a json file to
> > > post to an api. The python code that accomplishes this is:
> > >
> > > image1_data =
> > > base64.b64encode(httpx.get(image1_url).content).decode("utf-8")
> > >
> > > When I try to follow the logic in Livecode I get:
> > >
> > > put url imageUrl into sImage
> > > put base64Encode (sImage) into base64Image
> > > put textDecode (base64Image, "UTF-8") into encodedImageData
> > >
> > > However the api complains that the image is not encoded properly.
> Adding
> > or
> > > removing the "textDecode" step does not help. Any thoughts?
> > >
> >
> > This is just a guess, but I thing your last line needs to be:
> >
> > put textEncode(base64Image,"UTF-8") into encodedImageData
> >
> > textDecode in Livecode converts from the format (UTF-8) to Livecode's
> > 16bit internal unicode
> >
> > textEncode converts from livecode's internal 16bit unicode to the
> > indicated format (UTF-8).
>
___
use-livecode mailing list
use-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: Xcode 15.01 working with LC?

2024-04-08 Thread Andreas Bergendal via use-livecode
Just to complicate matters, though: In the Forum, two people have confirmed 
successful iOS deployment with Xcode 15.0.1:
https://forums.livecode.com/viewtopic.php?f=49=38849

/Andreas


> 6 apr. 2024 kl. 22:35 skrev Mike Kerner via use-livecode 
> :
> 
> i should further note that in lc settings, if you select 15.0.1, you will
> get the green box like all's well, but during the build you will get an
> error, late.
> 
> On Sat, Apr 6, 2024 at 4:34 PM Mike Kerner 
> wrote:
> 
>> it does not work, at least with 9.6.11
>> here's where you can find all the downloads, including xcode 15
>> https://developer.apple.com/download/all/?q=xcode
>> 
>> On Sat, Apr 6, 2024 at 4:22 PM Klaus major-k via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>>> Hi friends,
>>> 
>>> I am just setting up a new Mac Mini M2 and could not find
>>> Xcode 15.0 as recommended by LCs release notes, only 15.01
>>> on the Apple Dev download pages.
>>> 
>>> Will that work with LC?
>>> Or does someone have a link to version 15.0?
>>> 
>>> Thanks in advance!
>>> 
>>> 
>>> Best
>>> 
>>> Klaus
>>> --
>>> Klaus Major
>>> https://www.major-k.de
>>> https://www.major-k.de/bass
>>> 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
>>> 
>> 
>> 
>> --
>> On the first day, God created the heavens and the Earth
>> On the second day, God created the oceans.
>> On the third day, God put the animals on hold for a few hours,
>>   and did a little diving.
>> And God said, "This is good."
>> 
> 
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-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: Re: WebDeployHelper tool - the LC10 web app toolbox

2024-04-05 Thread Andreas Bergendal via use-livecode
And as a follow-up on this, here is also a demo web app created with the help 
of WebDeployHelper 1.0.1:

https://wheninspace.com/WebDeployHelperTest/

To back my words! :D

/Andreas


> 5 apr. 2024 kl. 03:06 skrev Tom Glod via use-livecode 
> :
> 
> thank you for making this available to the community.
> 
> On Thu, Apr 4, 2024 at 5:02 PM Ralph DiMola via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> +1
>> 
>> Ralph DiMola
>> IT Director
>> Evergreen Information Services
>> rdim...@evergreeninfo.net
>> 
>> -Original Message-
>> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On
>> Behalf Of William Prothero via use-livecode
>> Sent: Thursday, April 04, 2024 4:48 PM
>> To: How to use LiveCode
>> Cc: William Prothero
>> Subject: Re: WebDeployHelper tool - the LC10 web app toolbox
>> 
>> Andreas,
>> This sounds really great! It encourages me to start working with web
>> apps.Thanks for your contribution.
>> Best,
>> Bill
___
use-livecode mailing list
use-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: WebDeployHelper tool - the LC10 web app toolbox

2024-04-05 Thread Andreas Bergendal via use-livecode
Thanks guys!

But don’t just take my word for it - try it at see if it works! 
I did, in a fresh new stack, and… it bugged out on several of the features…

Turns out I had missed to replace some hardcoded pointers to my initial test 
stack with stackname placeholder markers in some of the code blocks.
Insufficient testing before release… When will I ever learn… :)

Anyway, a fix is already available:
https://github.com/wheninspace/WIS_WebDeployHelper/releases/latest

Let me know how that one fares… :)

/Andreas


> 5 apr. 2024 kl. 03:06 skrev Tom Glod via use-livecode 
> :
> 
> thank you for making this available to the community.
> 
> On Thu, Apr 4, 2024 at 5:02 PM Ralph DiMola via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> +1
>> 
>> Ralph DiMola
>> IT Director
>> Evergreen Information Services
>> rdim...@evergreeninfo.net
>> 
>> -Original Message-
>> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On
>> Behalf Of William Prothero via use-livecode
>> Sent: Thursday, April 04, 2024 4:48 PM
>> To: How to use LiveCode
>> Cc: William Prothero
>> Subject: Re: WebDeployHelper tool - the LC10 web app toolbox
>> 
>> Andreas,
>> This sounds really great! It encourages me to start working with web
>> apps.Thanks for your contribution.
>> Best,
>> Bill

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


WebDeployHelper tool - the LC10 web app toolbox

2024-04-04 Thread Andreas Bergendal via use-livecode
So, LiveCode 10 has web deployment, but there are still too many things it 
cannot do out-of-the-box.
Well, some of them are fixable, and as promised I now release the tool I’ve 
built to get so much more out of LC web apps.

Download here: 
https://github.com/wheninspace/WIS_WebDeployHelper/releases/latest

WebDeployHelper tool essentially does two things:

1) It provides you with code (LC, javascript, html) that greatly enhances the 
capabilities of your web app. 
It adds code to your LC stack, and to the html file in the standalone folder. 
You have full control of which features are added. Nothing is altered in your 
existing LC code.

Currently the following features are available:
- Modify the appearance of the web page that the LC stack resides on (your own 
logo, background colour etc)
- Add code that will make the stack resize when the browser window is resized, 
or make the stack stay centered on the web page
- Add code that enables pasting into fields and putting text into the clipboard 
(not in mobile browsers)
- Add code that enables mouse wheel scrolling in all LC fields and relevant 
widgets (not in mobile browsers)
- Add code that gives you access to the localStorage functionality, which 
enables saving data between sessions
- Add code that enables uploading of file data from your local files (like 
image data and text)
- Other minor nifty features :) 


2) It helps automate the web deployment process, which tends to get tedious as 
you often build many, many times and upload to your server to test and test 
again your web app.

So, the workflow automator lets you run one or several steps with one click:
- Trash the previous build folder (so you don’t get build folders like 
"MyApp1”, MyApp2”, "MyApp3” etc)
- Trigger the standalone builder
- Compile the enhanced html file and replace the generic one in the build 
folder with it
- Upload all the standalone files (or just the changed ones, if not first 
upload) to your server with ftp (if you enter credentials for an ftp account)
- Launch the web url to your web app in your browser


The stack requires LC10.0.0 dp7+ and naturally a web deployment license for 
LC10.
It can be used 'as is' or put into the plugins folder.

The tool is free to use (MIT license), but if you like it (or any of the other 
free tools I've made) and feel it adds value to your use of LiveCode, you may 
consider buying me a coffee at https://www.buymeacoffee.com/riu9yazy7p :)

Feedback on everything is welcome!

Andreas Bergendal
WhenInSpace






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

2024-02-12 Thread Andreas Bergendal via use-livecode
I agree that the standalone builder pane for web deployment is strangely 
under-functional (it would be so easy to just add a few options for title, 
background colour of the page, custom logo link etc), and it could also so 
easily include a resize listener per default in the html file.

Nevertheless, already when 10 dp1 came out I was impressed by how much of 
regular LC stuff that just worked out of the box when deploying to web. Now 
with 10 dp7 even more things work, even though there’s still some way to go 
before we’re near a release candidate.

I have made several web deployment examples of various kinds and few of them 
required any significant html/js modifications. 
Even the browser/LC interaction example, which specifically addressed the case 
when a deployed stack is embedded on a site rather than being the site, needed 
just two JavaScript functions of 6-7 lines of code, which ChatGPT effortlessly 
provided me with.

Still, I’ts quite understandable that tinkering with the html file and adding 
JavaScript functions to bend the web deployment to your will can be 
intimidating and/or a time-consuming trial-and-error exercise. So, I’m working 
on a helper stack that will cover some of the gap that the current standalone 
builder functionality leaves. I need it myself to avoid having to repeat code 
copy-pasting with every new project - and thus I may as well go all in and make 
a proper tool that I can share with my fellow LiveCoders. So, stay tuned! ;-)

/Andreas



> 4 feb. 2024 kl. 01:36 skrev Alex Tweedly via use-livecode 
> :
> 
> I've not been able to get anything worthwhile to work on web.
> 
> All the working examples that I've seen (e.g. Andreas's example last week of 
> interaction between browser and LC) , have involved a significant amount of 
> html + JS being written. The default shipping web wrapper is completely 
> under-functional (no simple customization, can't even handle a window resize, 
> no documentation on what will/won't be possible, no cloud storage interface, 
> ) that I'd have to describe it as pre-beta.
> 
> I'll look at the next DP to see if there's been any progress, but I've 
> completely shelved all the ideas I had about using it any time soon.
> 
> Alex.
> 
> On 03/02/2024 15:40, Mike Kerner via use-livecode wrote:
>> my subscription is up, soon. i have web, but the last time i tried it, no
>> bueno. is anyone using web deploy?
>> 
> 
> ___
> use-livecode mailing list
> use-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 Demo of two way javascript communication?

2024-02-07 Thread Andreas Bergendal via use-livecode
I’ve added a source code download link at the bottom of the page:
https://wheninspace.com/WebpageInteractionStack/

The steps are rather simple:
- Open the stack with LC10 and run the standalone builder with "Build for web" 
checked.
- Replace the html file in the deployment folder (in this case 
”WebpageInteractionStack.html”) with the index.html file included in the source 
code download.
- Upload everything in the deployment folder (should be 7 files) to whatever 
server you use, and then go to that location with your web browser to launch 
the index.html file.

The html file can of course be named whatever you like, but then you must 
include it in the url when accessing the site. By calling it index.html it 
suffices to include the parent level in the url (like I do above). But I guess 
y’all know this, I believe it's worked like that since the dawn of the 
internet… :)


> 5 feb. 2024 kl. 20:40 skrev David Bovill via use-livecode 
> :
> 
> Perfect - just what I was looking for. Can you share the stack, and the
> steps to saving / exporting the standalone?
> 
> On Sat, 27 Jan 2024 at 17:50, Andreas Bergendal via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> OK, so here’s a quick proof of concept, with functions triggered from page
>> to stack and from stack to page.
>> It is not using postMessage, only 'standard’ javascript listeners. Works
>> well on mobile too (at least iPhone).
>> 
>> https://wheninspace.com/WebpageInteractionStack/
>> 
>> If I find the time, it would be very interesting to try deploying two
>> different stacks on the same page (is that even possible?), and then have
>> them communicate with each other. Or have two stacks in two different
>> pages, and have them communicate via postMessage calls…
>> 
>> 
>>> 26 jan. 2024 kl. 17:15 skrev David Bovill via use-livecode <
>> use-livecode@lists.runrev.com>:
>>> 
>>> The scenario would be events like resize, or a button click in the html
>>> page triggering a handler in the Livecode wasm export. The other way
>> round
>>> would ve a Livecode handler in the exported wasm widget calling a
>>> javascriot function in the surrounding Web page.
>>> 
>>> My understanding in other contexts is that you use the postMessage Web
>> api
>>> for this type of thing -
>>> 
>> https://www.google.com/url?q=https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage=U=2ahUKEwiE5eCSufuDAxX7UkEAHbtmBvIQFnoECAoQAg=AOvVaw09QGMScP0-9YwJuHAC-sIE
>>> 
>>> Apart from triggering handlers in both directions passing (json) data in
>>> both directions is needed.
>>> 
>>> On Thu, 25 Jan 2024, 20:35 Andreas Bergendal via use-livecode, <
>>> use-livecode@lists.runrev.com> wrote:
>>> 
>>>> I’ve created some web deployments where the web page interacts with the
>>>> stack e.g. in the sense that a change of the browser window rect
>> triggers a
>>>> resizeStack message in the stack.
>>>> 
>>>> But I’m not sure if by bidirectional you mean that actions in the stack
>>>> should also affect the web page in some way? Could you give an example
>> of
>>>> what you have in mind?
>>>> 
>>>> 
>>>>> 24 jan. 2024 kl. 12:47 skrev David Bovill via use-livecode <
>>>> use-livecode@lists.runrev.com>:
>>>>> 
>>>>> Is there a demo out there for simple bidirectional interaction between
>> a
>>>>> web page and a recent stack exported as wasm? Anyone experimenting with
>>>>> this?

___
use-livecode mailing list
use-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 Demo of two way javascript communication?

2024-01-27 Thread Andreas Bergendal via use-livecode
OK, so here’s a quick proof of concept, with functions triggered from page to 
stack and from stack to page.
It is not using postMessage, only 'standard’ javascript listeners. Works well 
on mobile too (at least iPhone).

https://wheninspace.com/WebpageInteractionStack/

If I find the time, it would be very interesting to try deploying two different 
stacks on the same page (is that even possible?), and then have them 
communicate with each other. Or have two stacks in two different pages, and 
have them communicate via postMessage calls…


> 26 jan. 2024 kl. 17:15 skrev David Bovill via use-livecode 
> :
> 
> The scenario would be events like resize, or a button click in the html
> page triggering a handler in the Livecode wasm export. The other way round
> would ve a Livecode handler in the exported wasm widget calling a
> javascriot function in the surrounding Web page.
> 
> My understanding in other contexts is that you use the postMessage Web api
> for this type of thing -
> https://www.google.com/url?q=https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage=U=2ahUKEwiE5eCSufuDAxX7UkEAHbtmBvIQFnoECAoQAg=AOvVaw09QGMScP0-9YwJuHAC-sIE
> 
> Apart from triggering handlers in both directions passing (json) data in
> both directions is needed.
> 
> On Thu, 25 Jan 2024, 20:35 Andreas Bergendal via use-livecode, <
> use-livecode@lists.runrev.com> wrote:
> 
>> I’ve created some web deployments where the web page interacts with the
>> stack e.g. in the sense that a change of the browser window rect triggers a
>> resizeStack message in the stack.
>> 
>> But I’m not sure if by bidirectional you mean that actions in the stack
>> should also affect the web page in some way? Could you give an example of
>> what you have in mind?
>> 
>> 
>>> 24 jan. 2024 kl. 12:47 skrev David Bovill via use-livecode <
>> use-livecode@lists.runrev.com>:
>>> 
>>> Is there a demo out there for simple bidirectional interaction between a
>>> web page and a recent stack exported as wasm? Anyone experimenting with
>>> this?
>> 
>> ___
>> use-livecode mailing list
>> use-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 Demo of two way javascript communication?

2024-01-25 Thread Andreas Bergendal via use-livecode
I’ve created some web deployments where the web page interacts with the stack 
e.g. in the sense that a change of the browser window rect triggers a 
resizeStack message in the stack. 

But I’m not sure if by bidirectional you mean that actions in the stack should 
also affect the web page in some way? Could you give an example of what you 
have in mind?


> 24 jan. 2024 kl. 12:47 skrev David Bovill via use-livecode 
> :
> 
> Is there a demo out there for simple bidirectional interaction between a
> web page and a recent stack exported as wasm? Anyone experimenting with
> this?

___
use-livecode mailing list
use-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: Should I upgrade to Xcode 15.0 or 15.1?

2023-12-21 Thread Andreas Bergendal via use-livecode
It may not be as bad as it looks, as an app can survive several iOS upgrades 
without needing to be rebuilt. I have an app in AppStore that I think was 
targeted at iOS 14, and didn’t malfunction until iOS 17 came. I then rebuilt it 
targeting iOS 16 (as 17 was not yet supported by the LC deployment chain at the 
time), and it still works like a charm. 

Since that app had been doing fine for two years, all certificates and 
provisioning profiles and whatnot had expired, so I had to jump through all the 
Apple hoops again to get a valid build. It then transferred to TestFlight on 
the first attempt (!!!), and was approved for AppStore by Apple review within 
24 hours. 

All in all I had the new version up and pushed to users in three days, after 
discovering the blocking iOS 17 bug. (I don’t know what the bug was, I was just 
hoping that rebuilding with a newer LC version for an iOS version closer to 17 
would fix it, and thankfully it did.)

Just to share that positive experiences are still possible, even though I 
totally agree that iOS deployment still IS a hassle.

I enjoy web deployment much more, and LC10 is getting better and better at that.

/Andreas


> 21 dec. 2023 kl. 20:28 skrev Bob Sneidar via use-livecode 
> :
> 
> BTW I should add that I do not think this is Livecode’s fault. I imagine 
> every developer for every platform has to deal with this, and now it’s all 
> bled over to desktop apps as well. Seems like forced obsolescence to me. 
> Unmaintained apps get deleted from the store, and therefore from end user’s 
> mobile devices. How convenient for Apple. 
> 
> Bob S
> 
> 
>> On Dec 21, 2023, at 11:05 AM, Bob Sneidar via use-livecode 
>>  wrote:
>> 
>> That’s pretty useful, but also dismaying. I’m kind of glad now, because my 
>> slothfulness had me put off any attempt to make an iOS version of Forms 
>> Generator. That is all a lot to consider. Not only am I bound to rebuild for 
>> every version of my app, I am also bound to rebuild based on every iOS, 
>> MacOS and Xcode versions. No thank you please. 
>> 
>> Of course I am not selling my apps so it doesn’t matter very much to me. For 
>> those of us that produce commercial apps, it matters very much. 
>> 
>> Bob S
>> 
>> 
>>> On Dec 21, 2023, at 5:41 AM, Andreas Bergendal via use-livecode 
>>>  wrote:
>>> 
>>> Just for fun, and because Mermaid is my new toy, I threw together a small 
>>> web stack that shows the various LC-Xcode-macOS-iOS combinations in a 
>>> sankey diagram, where you can also change the order of how they are 
>>> displayed.
>>> 
>>> I added some Xcode versions that are NOT compatible with LiveCode too, just 
>>> as extra info (and to get more data points).
>>> 
>>> I don’t know if it adds any insights beyond what you can simply see in the 
>>> table Heather linked to, but it was a suitable set of data for the sankey 
>>> format, and also a proof of concept that running Mermaid code in a browser 
>>> widget deployed to web works flawlessly. :)
>>> 
>>> See it here: https://wheninspace.com/LCXcode/
>>> 
>>> /Andreas
>>> 
>>> 
>>> 
>>>> 18 dec. 2023 kl. 18:11 skrev Heather Laine via use-livecode 
>>>> :
>>>> 
>>>> Folks, you should upgrade to Xcode 15.0 not 15.1 - see this table (top 
>>>> FAQ):
>>>> 
>>>> 
>>>> https://livecode.com/resources/support/ask-a-question/
>>>> 
>>>> 
>>>> 
>>>> Best Regards,
>>>> 
>>>> Heather

___
use-livecode mailing list
use-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: Should I upgrade to Xcode 15.0 or 15.1?

2023-12-21 Thread Andreas Bergendal via use-livecode
Just for fun, and because Mermaid is my new toy, I threw together a small web 
stack that shows the various LC-Xcode-macOS-iOS combinations in a sankey 
diagram, where you can also change the order of how they are displayed.

I added some Xcode versions that are NOT compatible with LiveCode too, just as 
extra info (and to get more data points).

I don’t know if it adds any insights beyond what you can simply see in the 
table Heather linked to, but it was a suitable set of data for the sankey 
format, and also a proof of concept that running Mermaid code in a browser 
widget deployed to web works flawlessly. :)

See it here: https://wheninspace.com/LCXcode/

/Andreas



> 18 dec. 2023 kl. 18:11 skrev Heather Laine via use-livecode 
> :
> 
> Folks, you should upgrade to Xcode 15.0 not 15.1 - see this table (top FAQ):
> 
> 
> https://livecode.com/resources/support/ask-a-question/
> 
> 
> 
> Best Regards,
> 
> Heather


___
use-livecode mailing list
use-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: Should I upgrade to Xcode 15.0 or 15.1?

2023-12-18 Thread Andreas Bergendal via use-livecode
Thanks, Heather! I was just about to ask if there didn’t use to be a table 
available somewhere, where this stuff was sorted out. And there it was! :D

/Andreas

> 18 dec. 2023 kl. 18:11 skrev Heather Laine via use-livecode 
> :
> 
> Folks, you should upgrade to Xcode 15.0 not 15.1 - see this table (top FAQ):
> 
> 
> https://livecode.com/resources/support/ask-a-question/
> 
> 
> 
> Best Regards,
> 
> Heather
> 
> Heather Laine
> Customer Services Manager
> LiveCode Ltd
> www.livecode.com
> 
> 
> 
>> On 17 Dec 2023, at 15:48, Mike Kerner via use-livecode 
>>  wrote:
>> 
>> can lc 9.6.11 use both 15 and 15.1?
>> i've been holding off on updating to sonoma
>> 
>> On Sat, Dec 16, 2023 at 1:55 PM Paul Dupuis via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>>> For the purposes of notarization of macOS apps, I have seen no
>>> difference between Xcode 15 and 15.1 under Sonoma on a macBook Air (M1
>>> processor)
>>> 
>>> I don't developer iOS apps though, nor do I use Xcode for anything other
>>> than code signing, notarization, and stapling of macOS desktop apps
>>> 
>>> 
>>> On 12/16/2023 1:43 PM, Andreas Bergendal via use-livecode wrote:
>>>> Hi all,
>>>> 
>>>> I’ve just taken the step to MacOS Sonoma (14.2), and now intend to
>>> upgrade Xcode from 14.x to 15.
>>>> But I'm unsure of which version to go for, as the latest LC release
>>> notes say Xcode 15.0 and LC is usually quite picky about it.
>>>> I don’t want to download and install all the gigabytes of Xcode 15.1
>>> (which is the latest) just to discover that I really need 15.0
>>>> 
>>>> Actually, the release notes don’t even mention MacOS 14.2 as a valid
>>> version for iOS deployment, so an additional question is if I’ve already
>>> burnt that bridge by going Sonoma, until LC catches up…?
>>>> 
>>>> Please advise. :)
>>>> 
>>>> /Andreas
>>>> ___
>>>> use-livecode mailing list
>>>> use-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
>>> 
>> 
>> 
>> -- 
>> On the first day, God created the heavens and the Earth
>> On the second day, God created the oceans.
>> On the third day, God put the animals on hold for a few hours,
>>  and did a little diving.
>> And God said, "This is good."
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-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


Should I upgrade to Xcode 15.0 or 15.1?

2023-12-16 Thread Andreas Bergendal via use-livecode
Hi all,

I’ve just taken the step to MacOS Sonoma (14.2), and now intend to upgrade 
Xcode from 14.x to 15. 
But I'm unsure of which version to go for, as the latest LC release notes say 
Xcode 15.0 and LC is usually quite picky about it.
I don’t want to download and install all the gigabytes of Xcode 15.1 (which is 
the latest) just to discover that I really need 15.0

Actually, the release notes don’t even mention MacOS 14.2 as a valid version 
for iOS deployment, so an additional question is if I’ve already burnt that 
bridge by going Sonoma, until LC catches up…?

Please advise. :)

/Andreas
___
use-livecode mailing list
use-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: Your scripts as a flowchart

2023-12-13 Thread Andreas Bergendal via use-livecode
Latest WIS_ScriptDependencies update:

1.1.6 (12 Dec 2023)
- Enhancement: If the Kroki service is down, so no png/svg can be produced, a 
dialog is presented giving the choice to render the flowchart as html instead
- Enhancement: Improved design of the help section and the flowchart settings 
pane
- Enhancement: Mermaid version can now be modified (affects html rendering 
only). This is not something you’d normally need to do, but it has turned out 
that the latest versions of Mermaid implement some kind of hard limit on the 
number of edges, preventing large flowcharts from rendering. So for now, 
Mermaid v10.5.1 is default (no edge limit), but can be changed to a later 
version by advanced users.
- Fixed bug: Some actions in the mainstack triggered flowchart updates even if 
the flowchart substack was closed
- Other minor fixes

Download here:
https://github.com/wheninspace/WIS_ScriptDependencies/releases/latest
___
use-livecode mailing list
use-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: Does the browser widget work?

2023-12-08 Thread Andreas Bergendal via use-livecode
It works for me (LC 9.6.11, Mac).

Impractically, the browser widget only shows its content with browse tool 
selected, not pointer tool.
But I suppose your problem isn’t that simple, right…? :)


> 8 dec. 2023 kl. 22:42 skrev Geoff Canyon via use-livecode 
> :
> 
> set the url of widget 1 to “http://www.google.com” — nothing
> 
> set the url of widget 1 to “file:///Users/gcanyon/Desktop/test.html” — also
> nothing
> 
> Am I doing it wrong?

___
use-livecode mailing list
use-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: Your scripts as a flowchart

2023-12-03 Thread Andreas Bergendal via use-livecode
Thanks for the feedback, Derek!

1. I get an Error 400 when trying for a flowchart of a monster stack with 180+ 
handlers with many interdependencies. This seems to be due to exceeding the 
upper limit of what the Mermaid/Kroki services can handle in therms of ”edges”. 
The graph is simply too complex. Try excluding substacks, or excluding handlers 
by adding them to the handler exclusion filter field, to reduce ”uninteresting” 
complexity.
(I tend to exclude mouse*, and commands/functions that are called many times 
put only do simple things like adding quotes, or utf conversion or something.) 

The "Group per handler host” feature adds complexity to the graph, so using 
that could also tip it over the error threshold. 
Unfortunately, the error message passed back from Mermaid/Kroki is not very 
enlightening. 

2. I realise that I have not put in any error catching for the case where the 
user has not yet chosen a save file destination. Try opening the flowchart 
settings pane (which should already set a default save path if empty) and click 
the folder icon to make an active choice. If it still doesn’t work for you then 
it might be a Linux issue, which unfortunately I’m unable to test.

3. Hmm, I don’t usually use any gray texts. All texts are black, except for a 
few big buttons that have ”midnight blue” text, which is also the colour of 
most of the icons. Is something happening to the UI on Linux? It would be 
interesting to see a screenshot of how it looks for you.

Here’s a screenshot of part of the UI, posted in the LC forum, that shows how 
it looks on Mac and Windows:
https://forums.livecode.com/viewtopic.php?f=9=37644=75

Best,
Andreas


> 3 dec. 2023 kl. 19:00 skrev Derek Bump via use-livecode 
> :
> 
> Thank you, Andreas, this is very cool and quite helpful!
> 
> 
> Some feedback to pass along for consideration:
> 
> 1. I keep getting an Error 400 when creating a flowchart, and it seems to 
> have something to do with the "Group per handler host" checkbox. If you 
> toggle it in the right order, the chart will generate without an error.
> 
> 2. Clicking any of the buttons to save files is not resulting in anything 
> appearing on my Desktop. (Mint 21.2)
> 
> 3. The teal backgrounds and gray text throughout the UI blends together and 
> disappears when I look at it.
> 
> 
> I hope this is helpful,
> 
> Derek Bump
> 
> 
> On 11/30/23 14:45, Andreas Bergendal via use-livecode wrote:
>> Hi all,
>> 
>> Finally I can answer Yes to the question on exporting script flowcharts!
>> New version of WIS_ScriptDependencies available:
>> 
>> v1.1.5 (30 Nov 2023)
>> 
>> /Andreas

___
use-livecode mailing list
use-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: Your scripts as a flowchart

2023-11-30 Thread Andreas Bergendal via use-livecode
Hi all,

Finally I can answer Yes to the question on exporting script flowcharts! 
New version of WIS_ScriptDependencies available:

v1.1.5 (30 Nov 2023)

- Enhancement: Flowcharts can now be produced and exported as PNG or SVG. On 
Windows and Linux the flowchart is now always displayed in-stack, as a PNG. On 
all platforms the flowchart can be exported as PNG, SVG and HTML.

- Enhancement: Node text size can now be set

- Adjustment: Handler type naming convention changed in LC10 (apparently), 
making ”M” mean ”on” and ”C” mean ”command” (and changing ”PM” into ”CM” for 
”private command”). This is now correctly handled when using 
WIS_ScriptDependencies in either LC9 or LC10.

- Fixed bug: Arrow colouring failed for private commands/functions

- Fixed bug: The (rarely used) constructions ”before *command name*” and ”after 
*command name*” now get included in analysis and flowchart (displayed as 
”command *command name*”).

- Other minor fixes

Download link: 
https://github.com/wheninspace/WIS_ScriptDepedencies/releases/latest

/Andreas


> 18 sep. 2023 kl. 03:38 skrev Geoff Canyon via use-livecode 
> :
> 
> Is there a way to export the entire flowchart, instead of just the portion
> currently displayed?

___
use-livecode mailing list
use-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: Your scripts as a flowchart

2023-09-18 Thread Andreas Bergendal via use-livecode
Getting a full export is a tricky business, and I’m looking at various 
solutions.

The easiest workaround is to launch the flowchart in a web browser and print to 
PDF from there. 
On Windows/Linux the flowchart is shown that way anyway, and on Mac you load it 
in a web browser by shift-clicking the Create flowchart button. The obvious 
downside of printing to pdf is that you get page breaks that split up the 
flowchart.

Another workaround is to paste the Mermaid code into an online editor like 
https://mermaid.live and then export to PNG from there.

What looks more promising for actually solving it in-stack though, is using the 
command-line interface (CLI) for Mermaid to generate an svg/png/pdf file:
https://github.com/mermaid-js/mermaid-cli

I’ll experiment with that and see what I can come up with. :)

> As an aside, I don't know whether to be proud or horrified at the map
> Navigator produces…

Yeah, I know the feeling… :D

/Andreas


> 18 sep. 2023 kl. 03:38 skrev Geoff Canyon via use-livecode 
> :
> 
> Is there a way to export the entire flowchart, instead of just the portion
> currently displayed?
> 
> As an aside, I don't know whether to be proud or horrified at the map
> Navigator produces...
> 
> On Sat, Sep 16, 2023 at 8:04 PM Geoff Canyon  wrote:
> 
>> Ah, okay, that explains it. In Navigator, *everything* is a script-only
>> stack behavior. In a few of the substacks there are scripts for a few
>> template objects or where script-only-stack behaviors were inconvenient (I
>> don't remember why, honestly).
>> 
>> That has it working, and the resulting diagram is nice. Navigator does a
>> similar survey (without the visualization, that's a neat trick).
>> 
>> Navigator reports:
>> 
>> 302986 characters in
>> 8092 lines in
>> 112 scripts in
>> 885 objects.
>> 
>> ScriptDependencies reports:
>> 
>> 341 unique handler names - 407 commands, 124 functions, 1 setProps
>> 
>> regards,
>> 
>> Geoff
>> 
>> On Sat, Sep 16, 2023 at 6:24 PM Andreas Bergendal via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>>> As long as you include all the script-only stacks in the analysis, they
>>> will be handled.
>>> The tool will not look for behaviors and auto-include them. Every stack
>>> that has relevant code must be included manually in the project pane. If
>>> you have many SoSs, you can quickly add them all by adding the whole folder
>>> they are in.
>>> 
>>> How many handlers does the analysis find?
>>> 
>>> /Andreas
>>> 
>>> 
>>>> 16 sep. 2023 kl. 22:43 skrev Geoff Canyon via use-livecode <
>>> use-livecode@lists.runrev.com>:
>>>> 
>>>> I didn't change anything before generating, and the flow chart is
>>> literally
>>>> blank -- unless it:
>>>> 
>>>> 1. scrolls invisibly
>>>> 2. keeps returning the project name to the upper left while scrolling
>>>> 3. has *at least* 30 screens' worth of blank space at the top?
>>>> 
>>>> On Sat, Sep 16, 2023 at 1:35 PM J. Landman Gay via use-livecode <
>>>> use-livecode@lists.runrev.com> wrote:
>>>> 
>>>>> That happened to me too with a very long script. To keep everything in
>>>>> view
>>>>> there's a lot of white space. Keep scrolling. This happens only if you
>>>>> have
>>>>> set it to use unlimited sizing.
>>>>> --
>>>>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>>>>> HyperActive Software | http://www.hyperactivesw.com
>>>>> On September 16, 2023 11:15:00 AM Geoff Canyon via use-livecode
>>>>>  wrote:
>>>>> 
>>>>>> Does it not handle script-only stack behaviors? I get a blank display
>>> for
>>>>>> Navigator (which has no code other than SoS behaviors).
>>>>>> 
>>>>>> gc
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-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: Your scripts as a flowchart

2023-09-16 Thread Andreas Bergendal via use-livecode
As long as you include all the script-only stacks in the analysis, they will be 
handled.
The tool will not look for behaviors and auto-include them. Every stack that 
has relevant code must be included manually in the project pane. If you have 
many SoSs, you can quickly add them all by adding the whole folder they are in.

How many handlers does the analysis find?

/Andreas


> 16 sep. 2023 kl. 22:43 skrev Geoff Canyon via use-livecode 
> :
> 
> I didn't change anything before generating, and the flow chart is literally
> blank -- unless it:
> 
> 1. scrolls invisibly
> 2. keeps returning the project name to the upper left while scrolling
> 3. has *at least* 30 screens' worth of blank space at the top?
> 
> On Sat, Sep 16, 2023 at 1:35 PM J. Landman Gay via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> That happened to me too with a very long script. To keep everything in
>> view
>> there's a lot of white space. Keep scrolling. This happens only if you
>> have
>> set it to use unlimited sizing.
>> --
>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>> HyperActive Software | http://www.hyperactivesw.com
>> On September 16, 2023 11:15:00 AM Geoff Canyon via use-livecode
>>  wrote:
>> 
>>> Does it not handle script-only stack behaviors? I get a blank display for
>>> Navigator (which has no code other than SoS behaviors).
>>> 
>>> gc


___
use-livecode mailing list
use-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: Your scripts as a flowchart

2023-09-15 Thread Andreas Bergendal via use-livecode
Thanks, that’s great to hear, Mark! (And terribly sorry for the credit 
misnaming - it’s Mark! I’ll remember that now!)

> 15 sep. 2023 kl. 17:47 skrev Mark Wieder via use-livecode 
> :
> 
> Just want to add that Andreas has been super-responsive to suggestions re 
> adding features and improving things and this tool has gone from being 
> moderately useful to something I can't do without. And is a textbook example 
> in how to incorporate a javascript library into LiveCode.
> 
> -- 
> 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


Your scripts as a flowchart

2023-09-15 Thread Andreas Bergendal via use-livecode
Hi all!

Those frequenting the forums may have seen this already, but I thought I'd 
share it here too now:

If you want to see a graphic map of the inter-relations of all the handlers in 
the scripts of your LiveCode projects, my tool ScriptDependencies now features 
an extremely cool flowchart output (using the Mermaid javascript lib).

Here’s an example of how a script flowchart can look:
https://wheninspace.com/browseranimation/WIS_ScriptDependencies_example.png

A few easy steps to test it on your own scripts:

1) Download ScriptDependencies here:
https://github.com/wheninspace/WIS_ScriptDepedencies/releases/latest

2) Open the stack, click the top left cog wheel and add at least one stack 
(that has at least some handlers calling other handlers) to a project.
3) Close the project pane and click "Start mapping and analysis”.
4) Click ”Create flowchart”. Boom! :)

On Mac, the browser widget can display the flowchart in-stack, enabling some 
interactivity (click a node to highlight the arrows to and from it).
On Windows and Linux, where the browser widget has, er... room for 
improvement…, the flowchart is instead displayed in an external browser window 
(minus interactivity).

My intention with ScriptDependencies is to provide a code analysis and live 
documentation tool (of some kind) for LiveCode projects. I need it myself for 
some big LC projects, and thought it might be useful also for other LC devs.

The tool has been thoroughly tested by LC veterans like bn (Bernd), jacque 
(Jacqueline) and mwieder (Mike), who have all provided invaluable feedback and 
improvement suggestions, bringing the tool up to quite a professional level.

I hope you’ll find use for it - or at least enjoy seeing your scripts presented 
as a bouquet of flowers, a piece of art! :)

Any feedback is very welcome!

/Andreas
___
use-livecode mailing list
use-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: Re: Regex negative lookahead not working in LC?

2023-08-19 Thread Andreas Bergendal via use-livecode
> Nope.
> https://quality.livecode.com/show_bug.cgi?id=21534

Oh no! Well, cumbersome workaround it is then…
Thanks Jacque!

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


Regex negative lookahead not working in LC?

2023-08-19 Thread Andreas Bergendal via use-livecode
Hi all,

I’m trying to run a matchChunk regex on an LC script text, with the aim of 
scoring a hit only if a word is NOT commented out by one of the comment methods.

This regex works beautifully when tested in regex101.com (PCRE flavor):

(?i)^(?:(?!--|#|\/\/).)*\b(myHandler)\b

When applied on the text

command myOtherHandler
   # myHandler
  // myHandler
  -- myhandler
  notMyHandler
end myOtherHandler

it should score zero matches and it does.


When applied on the text

command myOtherHandler
   # myHandler
  // myHandler
  -- myhandler
   myHandler
end myOtherHandler

it should score 1 match and it does.

Applying the same regex in LC does NOT score any match in the latter example 
though.

Why? Doesn't negative lookahead work in LC? (v9.6.9 stable.)

Best,
Andreas
___
use-livecode mailing list
use-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: Re: A spinner that keeps spinning

2023-06-06 Thread Andreas Bergendal via use-livecode
Just an update on the browser animation tool, which has had a major upgrade:

Version 2.0 has a new set of 12 modern spinners. They also include a script 
that enables you to easily change the color of the spinner, and the background 
of the widget, on the fly, even after copying it to your own stack.

Even if you are not able to use the transparency feature, currently only 
available in LC10 dp5 on Mac, you can now in any version of LiveCode (since the 
birth of the browser widget) get rid of the default white background and set it 
to any color you want. 

There is even a feature that will blend in the widget with the (mono-colored) 
background for you. It uses  the mouseColor to pick up the color of the loc 
pixel behind the widget.

Updated web deployment version here (for demonstration of how it looks and 
works), now also including a convenient download button for the LC stack, which 
is the real deal:
https://wheninspace.com/browseranimation/
(Clear your cache or use a private browser window if you don’t see the latest 
version (2.0).)

The amount of fish is the same… :)

/Andreas
___
use-livecode mailing list
use-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: Re: A spinner that keeps spinning

2023-05-13 Thread Andreas Bergendal via use-livecode
Actually, my phrasing it that the web deployment of the browser animation tool 
is ”just for show” was being a bit unfair to it (I’ll blame not being a native 
English speaker :). 
It works very well as a web application, except for the - until now - inability 
to actually let you copy and use the code it produces.

Anyway, in v1.0.5 I’ve:
- Added the possibility to copy the code when running the web application (note 
that a urlDecode() must be done on the pasted text in LiveCode before using it)
- Added the possibility to enter an RGB value into the color field (works in 
the web application too)
- Made the design responsive on web too

I’m working on getting javascript to convey a clipboard content that doesn’t 
need urlDecoding, but at least you can extract your code from browser to LC 
now. 

I still recommend downloading and using the stack, though! :)

Web app: https://wheninspace.com/browseranimation/
Stack: https://github.com/wheninspace/WIS_BrowserAnimation

/Andreas
___
use-livecode mailing list
use-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: A spinner that keeps spinning

2023-05-12 Thread Andreas Bergendal via use-livecode
Peter,

Well no, the web deployment is just for show, really. It’s the LC stack that is 
the actual tool, that you should download from GitHub to use. From the stack 
you can copy the widget or the code as you prefer.

I don’t think it’s currently possible to get the content of a field in web 
deployment into the general clipboard of your browser/computer. But if anyone 
knows a method, please let me know and I’ll implement it (javascript?). I hope 
that when LC 10 is released as stable, it will be a default function.

Also, in the web deployment you can’t import an svg/png/jpg or use the generic 
color swatch, which you can when running the stack in LC. So do get the stack 
in order to let loose your inner animation designer… :)

/Andreas
___
use-livecode mailing list
use-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: A spinner that keeps spinning

2023-05-12 Thread Andreas Bergendal via use-livecode
Just a note that an improved version of WIS_BrowserAnimation has been released:

Version 1.0.4
- More efficient CSS code handling - only CSS code needed for the chosen 
animations is now included
- Added the possibility to animate text, with various fonts and styles
- The html/css code is now automatically put into a custom prop of the browser, 
called cHTML. So if you copy the browser widget, the code is conveniently 
exposed in the Property Inspector, Custom props tab.

Known issues: 
- Going (back) to a card with animated browser widgets on it, while using 
visual effects, seems to negatively impact the loading of the widget content, 
at least in the web deployment (i.e. it capriciously fails to load).

Web deployed example:
https://wheninspace.com/browseranimation/
(If the new version does not appear, make sure to clear browser cache or open 
in a private browser window.)

Source stack:
https://github.com/wheninspace/WIS_BrowserAnimation

/Andreas
___
use-livecode mailing list
use-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: A spinner that keeps spinning

2023-05-03 Thread Andreas Bergendal via use-livecode
Thanks everyone for testing it and for your kind comments. :D

I have now updated the tool with the possibility to set the duration of the 
animations. This is quite good, as many of the animation effects are rather 
frantic, but with this new ability to slow them down they become more useful in 
my opinion.

Also, combining two animation effects becomes more interesting now when you can 
balance their durations independently, making for more varied movements.

And even better, I have also added… *drumroll* … more fish!
Eh, in the examples sections that is. It really is worth another visit to the 
web deployment just to see the fish, I promise! And the crab (proving that the 
animations continue during the move command too… ;-)

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


A spinner that keeps spinning

2023-05-02 Thread Andreas Bergendal via use-livecode
Hi all,

It has long annoyed me that the spinner widget doesn’t actually spin when you 
need it to - during lockScreen or when a database fetch blocks everything. 
Animated gifs are no better.

Inspired by some comment over at the forum, I embarked on building myself a 
tool for crafting spinners animated in browser widgets, as those would continue 
spinning in a heavenly layer of its own, no matter what traffic jams occur down 
on LC ground level… 

Of course the project grew bigger than initially planned, as they do, and is 
not finished yet, as they never are - but at least I have something good enough 
to use, and good enough to share (I think).

The stack is designed for use it in the LC IDE, to craft the spinner (or 
whatever animation you want) and then copy the browser widget (or just the 
htmlText) to wherever you want to use it. The code is completely 
self-sufficient (html and css all crammed in). 
One can obviously make any kind of repeating animation with it (within the 
limits of the current css animation lib), not only spinners. 

Here is a link to the gitHub rep:
https://github.com/wheninspace/WIS_BrowserAnimation

And here is a web deployment of it (LC10 dp5), just to prove that the resulting 
code also works on web.
https://wheninspace.com/browseranimation/
(Make sure to click the "Show examples” button to see some cool examples… :)

Please let me know if you find it useful (or how to improve it, if it isn't).

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


Tool for mapping and analysing handler dependencies

2023-03-16 Thread Andreas Bergendal via use-livecode
Hi guys,

I’ve made a stack/tool that goes through any stacks you throw at it and maps 
their script handlers, then checks which handlers are calling which, displaying 
handler chains and interdependencies etc.

https://github.com/wheninspace/WIS_ScriptDepedencies

The purpose is to find out which are you most ”popular” handlers and how many 
other handlers are, directly or indirectly, dependent on them. Or in other 
words: How many handlers might malfunction if you alter or remove those crucial 
ones…

To get a relevant analysis, include all stacks belonging to one project, i.e. 
the main stack(s) and any library stacks and behaviour stacks connected to them.

The result is presented in various views in the stack, but I’ve also included a 
rudimentary report export (to plain text file), which could be further 
developed if relevant.

I’m not sure how useful such a tool is to most of you, but I sure found it fun 
and interesting to run it on various LiveCode projects and get insights into 
the interdependencies and complexity of all the scripts. So I thought I'd share 
it. :)

I welcome any feedback!

/Andreas
___
use-livecode mailing list
use-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: Training the AI to write better LiveCode

2023-01-22 Thread Andreas Bergendal via use-livecode
In all this, let’s not forget the aspect of simply enjoying coding. Many of us 
would never stop coding just because a pattern-matching language model can 
produce ”better” code - just like people haven’t stopped playing chess or go, 
just because a computer can do it better. 

Coding is an art. It’s creative, it’s a learning experience, it’s beautiful and 
it’s fun! 
And no tool I’ve seen has made it more fun and inspiring than LiveCode. 

For sure, coding is for many of us also a source of income, and it’s natural to 
worry about things that may threaten to make our competence obsolete. But 
coding is also more than typing out the most efficient repeat loops or 
whatever. It’s about seeing what is needed, how it integrates with the whole 
UX/UI design process etc.

ChatGPT may be a useful and perhaps somewhat intimidating tool, but humans are 
still needed to ask it the right questions. Providing good specifications is 
still one of the most crucial parts of any design process, and I think we’re 
still ahead of the AIs in that aspect. For how long, I don’t know. Maybe I’ll 
ask ChatGPT about that… :)


For anyone interested in an accessible intro to AI and machine learning, I can 
really recommend the free course Elements of AI 
(https://www.elementsofai.com/), provided by Helsinki University. It made the 
concept easy to understand, and it was quite fun to go through the various 
sections. It’s available in several languages.

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


Re: LC Date Conversions post 2035

2022-11-06 Thread Andreas Bergendal via use-livecode
Had to test this out of curiosity. Indeed, when using 2-digit year, that is the 
result, as expected and explained in the dictionary entry for centuryCutoff.

But how far does the 4-digit conversion work? Here’s what I’ve found:
- On Windows 10, it works until year 3000, and stops working on year 3001 (it 
just returns the input without converting).
- On MacOS 12.6 it works at least until year 2.100.000.000 (which is a Sunday… 
:). By that time we should be expecting LC v14 or something, or maybe that LC 
rules the galaxy, so I hope that’s sorted by then… :D
___
use-livecode mailing list
use-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: A few issues with web apps

2022-08-19 Thread Andreas Bergendal via use-livecode
Thanks for the hint, Panos - that is useful to mention for those who want to 
try it.
However, that is not my problem - I’ve already done that! 

Kangaroo’s stack works as advertised, as is (with dp-4 mod):
https://wheninspace.com/test/WebScrollField.html 


But when I try to use the code, either like in the original, where it is 
inserted by an LC script in preOpenStack, or by extracting the actual js and 
putting it into the html file beforehand, it just doesn’t trigger. I get no 
error message, js or LC, it just does nothing.

Actually, it was the same with the ”Meeting space” demo, which has a slightly 
different scroll wheel script. At first, I took both the resize js and the 
scroll js from there, but only the resize part works for me. It’s strange since 
my portal solution apparently catches resize events and passes them on to 
topStack, but fails to catch/pass scroll events…

/Andreas
___
use-livecode mailing list
use-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: A few issues with web apps

2022-08-19 Thread Andreas Bergendal via use-livecode
Bah, I can only get Kangaroo’s scroller trigger to work if deployed in a 
separate standalone. No matter how I try to integrate the code in my portal, it 
just doesn’t trigger.

In any case, the code that works in desktop web browsers doesn't work in mobile 
browsers, so there is still a problem to solve there. Hoping for the mothership 
to fix (in-field wheel/touch) scrolling natively in coming dp’s… 

I mean, clicking/touching the actual scrollbar of a field always works, but in 
a desktop browser you want the mouse wheel scroll to work in fields (Kangaroo’s 
script does that, sometimes...), and on mobile touching/dragging over a field 
should scroll it (still unsolved).
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


A few issues with web apps

2022-08-19 Thread Andreas Bergendal via use-livecode
Hi Jacque,

1. I can’t test on Android, but I doubt an Android native field would solve the 
problem here, as the platform is Web, thus not really natively Android. The LC 
web engine doesn’t seem to know where it is running, apart from "in a browser”… 
But do try putting an Android native field in your test stack and see what 
happens. I’ll test an iOS field and see what I get.

2. I confirm the slider widget/object looks and functions horribly on iOS and 
macOS too. See next point.

3. Motif makes most standard LC objects look horrible, but the mothership has 
promised to get rid of that in future releases (please hurry! :).

As to getting scrollers to work, some js seems necessary - see the excellent 
work by Kangaroo in the forum: 
https://forums.livecode.com/viewtopic.php?f=120=36957 

Hopefully that solution can be applied to sliders too. Again, I doubt the 
native mobile scroller would work, because platform = web.

Actually, my next step is anyway to test scroller stuff in my portal - I’ll 
make sure to try not just fields but also the slider. I’ll be back! :)

/Andreas
___
use-livecode mailing list
use-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: A web app launcher with responsive design

2022-08-18 Thread Andreas Bergendal via use-livecode
I have now redesigned the portal page and made it much more responsive and also 
with clearer sections for the example stacks:
https://wheninspace.com/portal/  
(You may need to clear the browser cache, or open the link in a private browser 
window if it looks the same as before.)

I've also updated the download package and put a link to it from the portal 
stack.
___
use-livecode mailing list
use-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: A web app launcher with responsive design

2022-08-14 Thread Andreas Bergendal via use-livecode
Hi all,

Thanks for your feedback on this first test version. It is made with LC 10 dp 4 
which indeed uses the wasm tech and not the old html5 tech.

And don’t worry - I wouldn’t have half the knowledge I have in LC coding if it 
weren’t for the generous sharing on this list and in the forum. Being able to 
make a small contribution to this knowledge bank is my pleasure.

Here’s a link to a zip file with all the stacks used in the example, plus the 
index.html file (with I use to replace the standalone.html file produced by the 
standalone maker):
https://wheninspace.com/portal/LC_wasm_example_package.zip

Note that the links used in the scripts to open stacks all point to my 
server/domain (obviously) , so if you want to experiment with your copy you’ll 
need to have a server to put them on and change the links accordingly. It will 
not work by using the Test deployment (at least not out-of-the-box). I do all 
testing live on the server.

Note the order in which the stacks fire up: LCweblauncher.livecode (which 
becomes standalone.zip when built) -> uses WISwebLauncherLib.livecodescript -> 
opens WISwebPortal.livecode -> opens the other stacks.

I’m sure there's room for vast improvement to all this, and I believe there 
will also be more support for natively handling some things in coming LC10 
versions.
But the future looks promising! :)

/Andreas


> 13 aug. 2022 kl. 23:39 skrev Mark Smith :
> 
> Congratulations Andreas and thanks for sharing. I haven’t done any work with 
> the new LC HTML5 engine but I was really impressed with the speed of loading 
> it on my new M1 Pro — about 3-4 seconds on first download and then a second 
> or so thereafter. On my iPhone 12 not so fast… more like 30 on the first 
> download but again very quick (a second or two) on subsequent loads. It looks 
> like you’ve got a lot of the tech working with objects and screens and the 
> adaptive resizing. When I do get around to getting into this (and it looks 
> very enticing) I’ll know where to go for help :)
> 
> Mark
> 
> 
>> On 13 Aug 2022, at 8:24 pm, Andreas Bergendal via use-livecode 
>>  wrote:
>> 
>> Friends, I have done wonderful things with LC10 web deployment!
>> 
>> I’m excited to share with you the fruits of this week's extensive research 
>> and testing!
>> 
>> TL;DR:
>> Try this: https://wheninspace.com/portal/
>> 
>> Long version:
>> 
>> I wanted to do two things:
>> 
>> 1) Like we often do with desktop standalones: Create a minimal 
>> launcher/splash stack as standalone, which only does one thing - open an 
>> external stack that does everything else. This way I can then update 
>> individual stacks, without having to build a new standalone each time.
>> 
>> 2) Get the resizing of the browser window to trigger the resize of the 
>> stacks and all the responsive design therein, and make it look good on both 
>> desktop and mobile. (Refining the example from the mothership, ”Meeting 
>> space”.)
>> 
>> I have accomplished both!
>> You can see and test the result here:
>> https://wheninspace.com/portal/
>> 
>> Please try it both in desktop browsers (resizing the browser to various 
>> sizes) and mobile browsers (both portrait and landscape orientation).
>> 
>> The standalone consists of a minimal launch stack that just acts as event 
>> listening agent (even after closing itself) and opens the Portal stack which 
>> is an external LC stack. The Portal stack then has buttons for opening 
>> additional external LC stacks. 
>> 
>> When the launcher stack receives a resize signal from the browser (from the 
>> JavaScript in the html file), it dispatches ”resizeEvent” with the 
>> width/height values to the topStack, which can subsequently rearrange its 
>> stack rect and content accordingly.
>> 
>> As a bonus, I also demonstrate the possibility to show several stacks in the 
>> same browser window!
>> 
>> I find the LC web deployment option a true game-changer! A new world is 
>> opening! Let’s build it! :)
>> 
>> /Andreas
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


A web app launcher with responsive design

2022-08-13 Thread Andreas Bergendal via use-livecode
Friends, I have done wonderful things with LC10 web deployment!

I’m excited to share with you the fruits of this week's extensive research and 
testing!

TL;DR:
Try this: https://wheninspace.com/portal/ 

Long version:

I wanted to do two things:

1) Like we often do with desktop standalones: Create a minimal launcher/splash 
stack as standalone, which only does one thing - open an external stack that 
does everything else. This way I can then update individual stacks, without 
having to build a new standalone each time.

2) Get the resizing of the browser window to trigger the resize of the stacks 
and all the responsive design therein, and make it look good on both desktop 
and mobile. (Refining the example from the mothership, ”Meeting space”.)

I have accomplished both!
You can see and test the result here:
https://wheninspace.com/portal/ 

Please try it both in desktop browsers (resizing the browser to various sizes) 
and mobile browsers (both portrait and landscape orientation).

The standalone consists of a minimal launch stack that just acts as event 
listening agent (even after closing itself) and opens the Portal stack which is 
an external LC stack. The Portal stack then has buttons for opening additional 
external LC stacks. 

When the launcher stack receives a resize signal from the browser (from the 
JavaScript in the html file), it dispatches ”resizeEvent” with the width/height 
values to the topStack, which can subsequently rearrange its stack rect and 
content accordingly.

As a bonus, I also demonstrate the possibility to show several stacks in the 
same browser window!

I find the LC web deployment option a true game-changer! A new world is 
opening! Let’s build it! :)

/Andreas
___
use-livecode mailing list
use-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 use addEventListener for browser window resizing in web deployment?

2022-08-06 Thread Andreas Bergendal via use-livecode
Wow, thanks Alex! That’s brilliant and exactly what I need!
I must have missed (or forgotten) that session at the conference - I’ll try to 
find it among the recordings to see if it helps explaining the various bits a 
little. In any case I’ll experiment with the code and see what I can get to 
work.

Cheers,
Andreas
___
use-livecode mailing list
use-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 use addEventListener for browser window resizing in web deployment?

2022-08-06 Thread Andreas Bergendal via use-livecode
Thanks guys, those are indeed great resources for many cases. 

What I’m after here however, are specific solutions to the javascript/livecode 
’pairing’ of code to manage browser window/stack resizing.
To avoid reinventing the wheel, if possible. I imagine this would be of great 
interest to a lot of people here, since having your stack react to browser 
window resizing should be quite crucial in many cases of LC web deployment.

That’s why I’m also confident that the mothership will build this into future 
releases of LC10. But as an early adopter, I can’t wait… ;-)
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


How to use addEventListener for browser window resizing in web deployment?

2022-08-06 Thread Andreas Bergendal via use-livecode
Hi all,

So I’ve been experimenting with web deployment with LC 10 dp 4. Now I would 
like my stack to be able to react to resizeStack events when the browser window 
is resized by the user. Or to adapt to e.g. a mobile browser screen size.

For this, if I understand correctly, some javascript needs to be used. I’ve 
tried to piece together how to do that from these sources:
https://livecode.com/using-the-new-web-features-in-livecode-10-dp-1/

and Ali Lloyd’s cool WordLC app:
https://alilloyd.livecodehosting.com/wordlc/wordlc.html

where he uses window.addEventListener(”resize” […] etc in the html file to 
catch browser window resizing for the stack to react on. However, as I can’t 
see his LC script side of it, I fail to figure out the proper adaptation to my 
needs:

I want my stack to get, from javascript, the impulse that the browser window 
has changed its width/height and what the new width/height is, in order to 
trigger a normal resizeStack handler to deal with that.

Ideally, the javascript part of this should be included by LC in the standalone 
build, and I hope that’s what they plan at least when LC10 stable ships (seems 
logical), but in the meantime - can someone please help get the code right?

/Andreas
___
use-livecode mailing list
use-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: Print to pdf fails on Windows with multiple pages

2022-03-24 Thread Andreas Bergendal via use-livecode
Hi Panos,

Interesting, I had not seen that bug report. Yes, it’s the same issue, and 
unfortunately it seems not fully solved in 9.6.x.

I tried using 9.6.7 rc 2 Win 32bit and built both a 32bit and 64bit standalone, 
but neither did any better really. They can sometimes succeed on first run to 
create the full pdf, but after that it seems Windows calls it a day and refuses 
to repeat the effort.

Since the stack/data is indeed confidential, I’ll make it available to you 
through other channels.

Best,
Andreas


Panos wrote:
> This sounds like this bug https://quality.livecode.com/show_bug.cgi?id=23088, 
> which should be fixed in LC 9.6.6 RC-1 and newer.

> If this is not the case for you, could you attach a sample stack and the
> pdf to this report and reopen it? Or send it to me directly if they are
> confidential. Also, it might be worth checking with the 32bit version of LC
> for Windows
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Print to pdf fails on Windows with multiple pages

2022-03-24 Thread Andreas Bergendal via use-livecode
Hi all,

TL;DR:
App/IDE crashes/fails when printing 30+ pages to single pdf, using Windows 10. 
Works fine on Mac. Windows memory issues?


Long version:
I have a stack/app where a crucial feature is printing to pdf.

Om Mac (LC 9.6.6 or 9.6.7 rc1) this works flawlessly with 156 posts, resulting 
in a 312 page pdf file (around 4Mb):

---
set the printScale to 0.714286 ## This matches the A4 proportion of the printed 
area
set the printMargins to 0,0,0,0

open printing to pdf tFilename ## tFilename has been defined earlier in the 
process

repeat for each line tLine in pKeyList ## pKeyList is a list of numerical keys
   fillFieldsWithData tLine ## This updates several fields on the card with new 
data from an array
   print card 1 from the topLeft of grc "page1" to the bottomRight of grc 
”page1” ## An A4-shaped rect
   print break
   print card 1 from the topLeft of grc "page2" to the bottomRight of grc 
”page2” ## An A4-shaped rect
   print break
end repeat

close printing ## (I also un/lock screen at appropriate places around this 
script, for speed)
---

On Windows 10, which is what my client is using, this happens:
- If run in the IDE, it sometimes manages to created the pdf, but usually fails 
(”printing failed” error), sometimes crashes LC silently
- If run as standalone, it can create a pdf with max 15-20 posts (2x pages), 
but if I try more then it stalls and fails, or crashes.

Another feature in the app is creating the 156 pdfs individually, and this 
works flawlessly also on Windows. 
So it’s creating the combined pdf that seems too taxing for poor old Windows, 
most of the time. The client needs both features to work.

Is this ”memory exhaustion” (saw that term mentioned by LCMark in the Forum on 
a different pdf problem)?

What can be done about it? Can I force Windows to dedicate more memory to my 
app?

I’ve tried having the pdf created on C:, on a USB stick and in SharePoint (the 
client’s preferred destination), but all fail equally.

Please advise! :)

Best,
Andreas
___
use-livecode mailing list
use-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: Excel_Lib on Mac

2022-03-16 Thread Andreas Bergendal via use-livecode
Matthias wrote:
> where did you get 1.5.3 from?  I have still 1.5.0 and in the download section 
> for the commercial version of the library there is still 1.5.0 and not 1.5.3. 

Heh, yes, I reported some problems to Zryip in January and he promptly fixed 
them each time and sent updated versions to me.
But the original 1.5.0 version already worked as expected regarding 
AppleScript. The problems he fixed pertained to Excel value formatting issues 
on Mac.

But if you actively use Excel Lib in projects (especially for Mac), you should 
probably ask him for the update. 
I don’t know why it hasn’t been officially released - perhaps he wants to test 
it more first or something. 
___
use-livecode mailing list
use-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: Excel_Lib on Mac

2022-03-16 Thread Andreas Bergendal via use-livecode
I’m confused - we’re talking Excel Lib by Zryip TheSlug, right?

I’m using v.1.5.3, and it works very well for opening/editing Excel files on my 
Mac (12.2 Monterery, Excel 16.59, LC9.6.7 rc1).
I can’t remember if at first use I had to grant some permissions of some kind, 
but now it works without a hitch. Using AppleScript if understand correctly. 
(On Mac I only tried it from the IDE, though, not a standalone.)

On Windows it works fine in a standalone too, where it uses vsbscript.

Bob wrote:
> The Macintosh can no longer send apple events to Excel, or indeed any other 
> Microsoft product [...]

We’re does this info come from? My Mac seems to disagree… :)

Best,
Andreas
___
use-livecode mailing list
use-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: Rounding in LiveCode vs Excel

2022-01-18 Thread Andreas Bergendal via use-livecode
Just to follow up on the rounding issue: 
Panos has now confirmed that round(5,-1) = 0 is indeed a bug, since at least LC 
6(!!!):
https://quality.livecode.com/show_bug.cgi?id=23522 


/Andreas
___
use-livecode mailing list
use-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: Rounding in LiveCode vs Excel

2022-01-09 Thread Andreas Bergendal via use-livecode
> Will using "statround()" instead of "round()" give you an Excel-comparable 
> outcome? 

Unfortunately not, I tried that too.

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


Rounding in LiveCode vs Excel

2022-01-09 Thread Andreas Bergendal via use-livecode
Hi all,

TLDR;

In LC:
round(0.5,0) = 1 (Excel agrees)
round(5,-1) = 0  (Excel disagrees and makes that 10!)

I agree with Excel, I want the latter rounded to 10, not 0. Is LC doing it 
’wrong’ and if so, why? 


Long version:
I’m building software for a client that will do some calculations that are 
currently done in Excel. They want most amounts rounded off by hundred, so e.g. 
1049 is rounded to 1000 and 1050 is rounded to 1100 etc. 

In Excel they would use this formula structure: ROUND(1050/100;0)*100 for which 
Excel returns 1100. I pointed out that ROUND(1050;-2) would give the same 
result, which they were unaware of. In Excel it does.

So, I thought I’d be smart and use the shorter form in LiveCode: round(1050,-2)
Astonishingly though, for that LiveCode returns 1000.
While round(1050/100,0)*100 returns 1100 also in LiveCode, which is what we 
want.

So I ended up having to use the cumbersome, long version in LiveCode to get 
what Excel gives in both versions.

Is LiveCode (or Excel) doing it ’wrong’, or what is going on? 
Why does LiveCode round decimals with one logic and integers with another?

/Andreas
___
use-livecode mailing list
use-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: Invalid mac/ios standalone engine file

2021-12-31 Thread Andreas Bergendal via use-livecode
Hi Panos,

I had set the minimum deployment target to 15.0 or later. Changing it to 9.0 or 
later solved the problem!

The new standalone was successfully deployed to device, as well as submitted 
for review on AppStore.

I got this warning feedback (on top of the traditional "ITMS-90078: Missing 
Push Notification Entitlement”):
"ITMS-90683: Missing Purpose String in Info.plist”

As the app does not "access sensitive user data” I hope that warning too can 
safely be ignored.
Or should I always fill in the App Tracking Transparency field in the 
standalone settings, even if not relevant?

Anyway, many thanks for you swift and helpful reply Panos - I wish an 
especially Happy New Year to you!

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


Invalid mac/ios standalone engine file

2021-12-31 Thread Andreas Bergendal via use-livecode
Hi all,

So, following the release of LC 9.6.6 rc1, I took the plunge and upgraded my 
Mac to Monterey (12.1) and Xcode to 13.2.1.

I now want to build an iOS15 version of my app and upload to AppStore, to 
prevent the crashing that has occurred for users with the iOS14 version.

Everything works fine in the Simulator (iOS15.2), but when I try to build the 
standalone for upload, I get the error message:
”There was an error while saving the standalone application
invalid mac/ios standalone engine file”

It still actually builds the app, but I’m afraid of uploading it to AppStore 
after such an error message.

I have so far done the following:
- Using macOS Monterey 12.1
- Using Xcode 13.2.1
  - Selected Xcode 13.2.1 in the Command Line Tools section in Xcode
  - Reinstalled the Command Line Tools just in case (following hint in the 
Forum)
- Using LiveCode 9.6.6 rc1 (Pro)
  - Selected the correct path in LC to Xcode 13.2.1, green-lighted
- Turned the Mac off, and on again...

With a development provisioning profile everything works fine when deploying to 
the Simulator.
With a development provisioning profile the error message appears and it 
doesn’t deploy to my physical device (iPhone X, iOS 15.2).
With a distribution provisioning profile the error message appears when 
building a standalone.

All certificates and provisioning profiles are valid.

Why, oh why, does it not work?

Hoping for a solution before the New Year! :)
Wishing you all a Happy New Coding Year 2022!
/Andreas
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


iphoneDeviceModel lookup library

2021-10-04 Thread Andreas Bergendal via use-livecode
Status update:
I've updated the library with a minor correction (two iPhone 11 versions with 
notch that weren't included in the script constants).
I've also improved the demo stack a lot, so that it now works in the Simulator, 
if you indicate which device you will simulate, before deploying.

Please also note:
Whenever Apple releases new iPhones/iPads, the lookup tables will need to be 
manually updated accordingly. I will keep mine in gitHub updated as quick as I 
can, but if you copy the data into your own projects, so as not depend on 
external sources, you'll naturally need to to the same updating yourself.

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


iphoneDeviceModel lookup library

2021-10-03 Thread Andreas Bergendal via use-livecode
Hi guys,

This is for those of you who develop for iOS. We all know the challenge of 
getting the layout right for various iOS screens. ”The notch” (camera area at 
the top) is especially annoying, since there’s no easy way of knowing if the 
user’s device has one or not, and how many pixels it is (there are 4 variants!).

In LC 9.6.3 iphoneDeviceModel was introduced. Where machine() just returns 
”iphone”, iphoneDeviceModel() returns e.g. ”iPhone10,6” (=iPhone X) or 
”iPad13,7” (=iPad Pro 11 inch).

But the Dictionary entry on iphoneDeviceModel just links to a Wikipedia page 
listing mammoth tables of Apple device data. There is no way of knowing what 
”iPhone10,6” means without a decent lookup table.

So, I’ve made one! And a library to use it with! And a demo stack to test it 
with!

It will check the device code of the current device, and return an array with 
values for:
- notch margin
- portrait bottom margin
- landscape bottom margin
- (device model name - in the rare case that you'd need it)

You use these for determining the safe area your UI elements can use, when 
rearranging them in response to the resizeStack message.
Or e.g. how much taller the Header bar widget needs to be on a ”notch” device 
in order to look good.

It’s all here and free to get, use and modify as you need:
https://github.com/wheninspace/WISmobDeviceLib 


The demo stack has the library in its stack script, and the full lookup array 
in a cProp, so that stack is all you need really.
Testing must be done by deploying to physical devices though, as 
iphoneDeviceModel() does not work in the iOS Simulator (or, it works, but just 
returns a code for the Simulator itself…).

Let me know if anything can be improved on (of course it can)! :)

The source for my data is this excellent website:
https://www.screensizes.app/  which has 
comprehensive screen info on every existing iOS device since the first iPhone.
And this list which has the device codes interpreted:
https://gist.github.com/adamawolf/3048717#file-apple_mobile_device_types-txt 


Cheers,
Andreas
___
use-livecode mailing list
use-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: Testers wanted for score tracking app

2021-09-30 Thread Andreas Bergendal via use-livecode
Thanks Mark! 

Here is a decent video on how to play (less than 2 minutes)
https://www.youtube.com/watch?v=3fwtBomGp7Q 


And here are the basics in text:

---
12 wooden pins, numbered 1-12, are set up close together.

Players stand 3-4 meters away and take turns trying to knock over pins with a 
special throwing pin.

If a player knocks down one pin, the number on the pin is the score.
If a player knocks down more than one pin, the number of fallen pins is the 
score.

After each throw and score count, all fallen pins are raised up at the exact 
point where they fell (resulting in an ever more scattered field).

After the first round, each new round starts with the player with the lowest 
score etc.

The first player to reach exactly 50 points is the winner, and the game then 
ends.

If a player ends up scoring over 50 points, their total score is reduced to 25 
points (but they remain in the game).
If a player scores 0 (misses all pins) three times in a row, they are 
eliminated from the game.

If only one player remains in the game, they are the winner regardless of score.
---

Now, to test the app, pretend to be a few people playing, and just make up a 
score from 0-12 for each throw.

Suggested things to test:
Let someone get 0 three times in a row. 
Let someone overshoot 50. 
Let someone win, etc. 
Shut down the app mid-game and check that it resumes the active game correctly.
Click the Undo button to correct (imagined) mistakes in the scoring
Modify the rules in the Settings section
Change voices for the announcements (and language if you want :)
Delete a previous games
Delete a player
Find a bug (if you can! :D)
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Testers wanted for score tracking app

2021-09-30 Thread Andreas Bergendal via use-livecode
Hi all,

I’ll soon release an app made with LiveCode to the App Store, but I’d like to 
have a few more external testers first to catch whatever I’ve missed.

The app is called MölkkyMaster and is used for tracking the score when playing 
the outdoor throwing game Mölkky. The game is popular in some Nordic countries, 
France and a few other countries. It originates from Finland.

Anyway, you don’t need to play Mölkky, or even have a clue how to, to help me 
test the app. Just create a few players and start a game. Then assign random 
score to the players until someone reaches 50 points.

The app is multilingual, currently English, French and Swedish. German and 
Finnish is in the works. The app talks, and you can select different voices 
relevant to the language chosen.

To test, you need an iPhone or iPad and the TestFlight app installed. Then use 
this link to download the app:
https://testflight.apple.com/join/c8gKjIRJ

Soon I’ll also have an Android version released for testing. I’ve optimized the 
app for iOS, but almost everything worked ’out of the box’ when I used the same 
stack for an Android build. Love LiveCode!

If you’ve never played Mölkky, the aspect of how well the app suits its 
intended target group would naturally be hard to judge. 
So, instead, I hope you’ll just try breaking the app and report back any 
technical errors, or shortcomings in the interaction design etc.

In any case, any feedback is highly appreciated.

Cheers,
Andreas

— 
Andreas Bergendal
WhenInSpace
___
use-livecode mailing list
use-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: numberformat question

2021-03-23 Thread Andreas Bergendal via use-livecode
A few years back I needed calculation to a precision of 300 decimals. I found a 
js solution by -hh in the forum, which solved my need:
https://forums.livecode.com/viewtopic.php?f=93=29018=30 


It runs in a browser widget, with easy input from and output to LC script. I 
don’t know the precision limit, but it’s way more than 300 IIRC.

Maybe useful here?

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


Re: LC iOS Command 'mergPopActivity'

2020-10-19 Thread Andreas Bergendal via use-livecode
Graham wrote:
”[…] iOS Deployment, for me a nightmare compared with simply coding and 
debugging.”

Indeed - I know the feeling, as do many of us, I believe.

I wise man (Richard Gaskin actually) once said:
”Mobile development is like building a ship in a bottle.”

I find that a very apt and accurate parable (and I dare to say that even 
though, admittedly, I have no actual experience in bottled ship building). :)
___
use-livecode mailing list
use-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: Modal stacks cpu usage

2020-10-05 Thread Andreas Bergendal via use-livecode
Indeed, when I open the Message box and click the Pending messages tab, two 
messages always keep running there:
_EnsureAccept (seems to have to do with the remote debugger library?)
_revInternal_SavePreferences

Just LC 9.6.1 running, no stacks. I’m also on Mojave.


J. Landman Gay via use-livecode 

 Mon, 05 Oct 2020 10:02:14 -0700 

> I'm fairly sure the IDE is sending some pending messages 
> in the background which would account for the CPU usage. 
___
use-livecode mailing list
use-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: iOS app erratically freezing up when loading audio files

2020-09-30 Thread Andreas Bergendal via use-livecode
Unfortunately, it didn’t work. It actually crashes the app in Simulator after 
doing it twice(!).

On the first go, it's loading the audio file, by first setting the path to 
empty, then to the actual path. All is fine.
Going back to gallery card, the player is stopped and deleted (as intended, 
mobileControlDelete).
Repeating the procedure a second time (go to profile card (same or other), 
create new player, load the audio file) now crashes the app every time, at the 
stage of loading the real path.

This is another flavour of strange, but a step backwards.

I think we’ll try with other audio formats than mp3, to see if it makes any 
difference...

If anyone has time, an iPad and interest in taking part in testing, I can 
invite you via TestFlight (my client approves). 

J. Landman Gay via use-livecode 
Some video problems can be solved by setting the filename of the player to 
empty, waiting a few milliseconds, and then setting the new filename.


___
use-livecode mailing list
use-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: iOS app erratically freezing up when loading audio files

2020-09-30 Thread Andreas Bergendal via use-livecode
Thanks Jacqueline, I’ll try that!

I use LC business 9.6.1 stable, Xcode 11.3.1


J. Landman Gay via use-livecode 

 Tue, 29 Sep 2020 22:17:57 -0700 

Some video problems can be solved by setting the filename of the player to 
empty, waiting a few milliseconds, and then setting the new filename. I'm not 
sure it will work in this case but it's worth a try.
Also, if you aren't using the latest version of LC, try that.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


iOS app erratically freezing up when loading audio files

2020-09-29 Thread Andreas Bergendal via use-livecode
Hi folks,

I really need your help now. I’m developing a simple app for a client, to be 
run on iPads in an exhibition starting 8th Oct. It consists of two cards: 
a gallery card, with 16 photos
a profile card which you go to by clicking a photo on the gallery card

On the profile card this is loaded:
the photo again, larger
a short text in a field
an audio file (mp3), which starts playing

All resources are included in file folders with the app, no internet needed. 
The audio files are central to the app. They are recordings of people on 
Guernsey speaking Guernesiais, and sizes range from 1.6Mb to 2.6Mb.

In iOS a player is created with mobileControlCreate, and the audio controller 
is visible, so the user can pause, fast fwd etc. 

The app design and coding is done and it works perfectly in the IDE, as Mac 
standalone (with standard player) and in the iOS simulator (iOS 13.3). 

It works on the client’s iPads too (iOS 13.6), but irregularly freezes (rarely 
crashes), preventing further interaction until the app is killed and restarted. 
The freeze occurs at (or during)  
”mobileControlSet "voicePlayer", "filename", sAudioPath”

In the simulator I get a crash (app quits) if I don’t put ”wait 20 ticks with 
messages” after setting the file path, but never a freeze. I’ve tried to give 
the audio loading a full second wait, in case iPads are slower than simulator, 
and it prevents crash but not the random freezing.

The iPad user can sometimes load the same profile (or different ones, we see no 
pattern) 30-40 times before freeze occurs, sometimes just 3. So it doesn’t seem 
to have anything to do with cache build-up or so. 

So, has anyone experienced similar problems with playing mp3 files on iOS?
Any obvious pitfalls? 

The frustrating thing is that I cannot reproduce the problem in simulator (it 
works perfectly there), and have no iPad myself to hook up for Remote 
debugging. So I have to try various solutions, then upload a new build to 
TestFlight and wait for the client’s ”Sorry, it’s still freezing randomly”…

Help!

Hopeful greetings,
Andreas 
WhenInSpace

___
use-livecode mailing list
use-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: Which git service suits a LiveCoder best?

2020-04-27 Thread Andreas Bergendal via use-livecode
As to the ’how’, I planned to move into script-only stacks more anyway, and 
will also test the Levure framework, and/or Script Tracker.
I’m not sure if those two are compatible though? I mean, if I use Levure 
framework I can’t (needn’t?) use Script Tracker as well, right?

Anyway, with the help of a good free tutorial I’ve set up a GitHub account and 
done the necessary local stuff, including doing basic command line actions 
(yeah, wasn’t that scary after all…), so I’m progressing one step at a time… :)

Andreas
___
use-livecode mailing list
use-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: Which git service suits a LiveCoder best?

2020-04-23 Thread Andreas Bergendal via use-livecode
Thanks everyone for your feedback and insights. Nothing speaks against GitHub, 
it seems, so I’ll give that a try then.

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


Which git service suits a LiveCoder best?

2020-04-22 Thread Andreas Bergendal via use-livecode
Hi everybody, first time posting to this list, so I hope I get it right… :)

I need your wisdom on a slightly off-topic issue, though seen in the LiveCode 
perspective:
I’ve never used git, but I want to start now. 

I’m working on several LC projects, some with co-developers, several with 
commercial potential, so I need to get more professional with version control 
and other benefits that come with git.

I’ll educate myself on how to use it, but: Step one seems to be to select a git 
host/system.
GitHub is the obvious giant, but is it the best for my needs?

- I use LiveCode, obviously, so is any git service in any way more suited for 
that?
- I’m not very familiar with using the command line, so I’d prefer a git 
service that has software that handles that, as far as possible. (Yeah, I’m a 
developer, I can learn, but hey, we promote the xTalk way here, no? Command 
line seems very much in the opposite side of the spectrum of readable code…)
- I develop on Mac, in case that is a factor when choosing git solution?

So, in short: How do I best get started with git when working with LiveCode on 
Mac, in small teams or alone, wishing minimal use of command line?

Do I just let gravity pull me into the GitHub gas giant, or join a rebel moon? 
:)

Best
Andreas
(xTalker since HyperCard days, in other forums aka SWEdeAndy or WhenInSpace)
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode