Search found 130 matches

by seaniepie
Mon Jul 22, 2019 6:01 pm
Forum: HTML5
Topic: TIP: How to add ‘paste’ feature.
Replies: 2
Views: 4773

Re: TIP: How to add ‘paste’ feature.

Another pain in the difference between Chrome and Safari is that Safari will still print the 'v' on paste but Chrome does not. So we need to determine if it is Chrome or Safari and either replace the 'v' or not. So we use this to detect the browser type: var isChrome = (navigator.userAgent).includes...
by seaniepie
Mon Jul 22, 2019 2:47 pm
Forum: HTML5
Topic: TIP: How to add ‘paste’ feature.
Replies: 2
Views: 4773

Re: TIP: How to add ‘paste’ feature.

There is an issue apparently with Chrome because it won't allow you to attach the onPaste event handler to an object like Canvas. So you have to point it at the Document. So it needs to be: document.onpaste = function(event){ This does mean you need to handle whether something other than the canvas ...
by seaniepie
Mon Jul 22, 2019 12:15 am
Forum: HTML5
Topic: TIP: How to resize the stack with the window
Replies: 5
Views: 16157

TIP: How to resize the stack with the window

To get the standalone to match or follow the size of the browser window, add the following to the standalone HTML: <script type="text/javascript"> function reportWindowSize() { var myStack = document.liveCode.findStackWithName('myStandalone'); myStack.js2LC_resizeStack(window.innerWidth,window.inner...
by seaniepie
Sun Jul 21, 2019 10:39 pm
Forum: HTML5
Topic: TIP: How to add ‘paste’ feature.
Replies: 2
Views: 4773

TIP: How to add ‘paste’ feature.

You would think something as basic as copy/paste would be easy but native Javascript makes it not so easy. However, most browsers, including chrome, safari and firefox, have both the clipboardData API and onPaste/onCopy/onCut event handlers included. So, for a simple paste function one method is thi...
by seaniepie
Wed Jul 17, 2019 2:54 pm
Forum: LiveCode Builder
Topic: State of the Extensions Store
Replies: 14
Views: 10756

Re: State of the Extensions Store

I actually did ask something foolish only two days ago. Of course my code was only 1 character out (isn’t it always). But I still got a lovely message from both Heather and Eleanor. The rest of the team are just as welcoming. Let us know what you hear. I’d like to know the state and know how to subm...
by seaniepie
Mon Jul 15, 2019 9:08 pm
Forum: HTML5
Topic: html5 wait command (workaround)
Replies: 4
Views: 5552

Re: html5 wait command (workaround)

[-hh] wrote:
Mon Jul 15, 2019 8:28 pm
You could simply use "send in <time>". It's better than wait, not only a workaround.
Sorry, Hermann, only just noticed this post. I (wrongly) assumed that because wait didn't work (heaven knows why - JS can do a wait functions) that 'send in' wouldn't either.

My SQL library is just about done.
by seaniepie
Mon Jul 15, 2019 8:49 pm
Forum: HTML5
Topic: html5 wait command (workaround)
Replies: 4
Views: 5552

Re: html5 wait command (workaround)

So, amazingly, send "{command}" to me in 2 sec works, even though wait can't. Therefore, wait with messages is easy(ish). You just split up your code: on myCommand_1 -- Do some stuff... send "myCommand_2 tMyParametersToPassInAnArray" to me in 1 second -- ^ Is the same as 'wait 1 sec with messages' ^...
by seaniepie
Mon Jul 15, 2019 7:04 pm
Forum: HTML5
Topic: html5 wait command (workaround)
Replies: 4
Views: 5552

html5 wait command (workaround)

A simple bit of code to produce an alternative for 'wait' that works for html5 deployment: on waitFor pMS put the millisec into tMS put the millisec - tMS into tMSDiff repeat until tMSDiff >= pMS put the millisec - tMS into tMSDiff end repeat end waitFor Obviously, this causes the stack to hang and ...
by seaniepie
Wed Jul 10, 2019 1:22 am
Forum: HTML5
Topic: LC to JavaScript to PHP roundtrip
Replies: 14
Views: 12506

Re: LC to JavaScript to PHP roundtrip

I worked out an awesome little cheat where I only need 1 handler in LC that can deal with any message from JS: In Livecode have a handler like this to accept something from JS: on js_ReturnFromJS pCommand,p1,p2,p3,p4,p5,p6,p7,p8,p9 put pCommand && "p1,p2,p3,p4,p5,p6,p7,p8,p9" into tScript do tScript...
by seaniepie
Wed Jul 10, 2019 12:33 am
Forum: HTML5
Topic: Output to console
Replies: 1
Views: 3224

Re: Output to console

Not to worry, I worked it out::

From LC into the JS console window:

Code: Select all

put "MyText"
put tMyVar
From JS into the JS console window:

Code: Select all

Module.print('MyText');
Module.print(myVar);
by seaniepie
Tue Jul 09, 2019 5:51 pm
Forum: HTML5
Topic: Output to console
Replies: 1
Views: 3224

Output to console

Hi all,

How do we output to the textbox console on the standard html5 output? I understand we may need to inject a bit of JS perhaps. Just for JS debugging.

Thanks
by seaniepie
Sun Jul 07, 2019 11:59 pm
Forum: HTML5
Topic: LC to JavaScript to PHP roundtrip
Replies: 14
Views: 12506

Re: LC to JavaScript to PHP roundtrip

That's awesome, Perfect! Thanks, HH. This explains it very well. --: Were any of you able to test and determine if the browser widget usage of the 'javascriptHandlers' property is indeed broken? There is a bug report for Android non-function https://quality.livecode.com/show_bug.cgi?id=21284 but not...
by seaniepie
Sun Jul 07, 2019 10:56 pm
Forum: HTML5
Topic: LC to JavaScript to PHP roundtrip
Replies: 14
Views: 12506

Re: LC to JavaScript to PHP roundtrip

go back to my original post and tell me what part of it was unreasonable or provocative in any way. If you wish to complain about what you get for your HTML5 license then write to LC support. Where did I say even once anything against what I paid for, or any other complaint, for that matter? It is h...
by seaniepie
Sun Jul 07, 2019 10:48 pm
Forum: HTML5
Topic: LC to JavaScript to PHP roundtrip
Replies: 14
Views: 12506

Re: LC to JavaScript to PHP roundtrip

And why should I give statements about the ONLY ways to communicate with HTML5 standalones? Because, as I stated, I am trying to make it absolutely clear for everyone simply because of the lack of documentation and so that I can begin compiling a definitive set of instructions that can be included ...
by seaniepie
Sun Jul 07, 2019 10:41 pm
Forum: HTML5
Topic: LC to JavaScript to PHP roundtrip
Replies: 14
Views: 12506

Re: LC to JavaScript to PHP roundtrip

I apologise if my tone came across as harsh. I was trying my best to show true appreciation, especially by my last sentence. Sorry :( I can't believe I am getting these personal attack on here again! I thought I was asking reasonable, straight forward questions. Instead of answers, I get questioned ...

Go to advanced search