Re: JavaScript + LC HTML5 = LiveCode.js

2016-11-24 Thread Todd Fabacher
Hello Roger, you need to remember almost 50% of web users are on a
non-desktop OS, and almost none of them support plugins like you are
describing. LC HTML5 is what it is...It is an App running in an HTML5
canvas. We will be limited that those restrictions. But I understand where
you are coming from.

What I would like to focus on is what are the current possibilities that we
can capitalize on with the JavaScript integration - NOW. I need a
functioning HTML5 data entry clint for several Apps we are developing.

Mark, One question I had that was NOT answered is..Can a JavaScript
function call a LiveCode function? I know this was added in the LC8 browser.

How do we get started and have the community involved? We can do it and
give it to everyone like we have been doing, but I would like to see if we
can get several people involved who are passionate about making LC HTML5
easier and  more successful. We code just want to do it our way, but the
middle ground so more people will use it, and improve it. Richard, Any
ideas?

--Todd


>I disagree that you might as well be running a desktop app.  The download
>of the helper would only be necessary once (like the old RevWeb plugin).
>Back when we had the RevWeb plugin, my browser based apps just worked.
>Being in a position where localized automation is primarily what I create
>for in-house users, this would allow me to update/maintain to a single
>code-source, but without having my hands tied capability-wise by the
>browser.

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


Re: JavaScript + LC HTML5 = LiveCode.js

2016-11-24 Thread Sannyasin Brahmanathaswami
I too never quite understood why the RevWeb Plugin was abandoned. The old issue 
that users resist such downloads, never, IMHO, really materialized… just look 
at the kJillion extensions for FireFox or Chrome, there is no end in sight.

So the plugin was abandoned, but in the end, hasn't  the team has built the 
same thing?

 Enscripten with a wrapper for LC?

But instead of being able to deliver that as a "player"  … now the user is 
forced to download that entire source code with each and every Html5 app built 
with LC. 

I get of course that the framework of the RevWeb Plugin was a completely 
different architecture… and moving to JS means the browser as an "OS" will be 
more "at peace with the code,"  so to speak, but yet, why could it not be 
externalized as a plug-in/helper/player?

I must be very naïve and missing something….perhaps security issues require us 
to bundle the code with each app, so that 3rd parties can't hack the player for 
nefarious ends… as Mark says: legions are trying to find ways to break through 
to your HD… 

BR
 

On 11/24/16, 10:42 AM, "use-livecode on behalf of Roger Eller" 
 wrote:

I disagree that you might as well be running a desktop app.  The download
of the helper would only be necessary once (like the old RevWeb plugin).
Back when we had the RevWeb plugin, my browser based apps just worked.
Being in a position where localized automation is primarily what I create
for in-house users, this would allow me to update/maintain to a single
code-source, but without having my hands tied capability-wise by the
browser.

~Roger

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

Re: Draw an adjustable Trapezoid in Livecode - How to change x, y of the 4 corner points of a rect

2016-11-24 Thread Sannyasin Brahmanathaswami
Thanks every one for all the great answers/ideas.

That said, 

@Mark… docs may need clarification

1) create 'regular polygon graphic" with 4 sides
2) name it "trapezoid"
3) make button "set the editMode of grc "trapezoid" to polygon

result: nothing happens at all, no change, no option to add  or "touch" any 
points. So perhaps "edit mode of graphics" needs to be "editMode of graphics 
with style set to "Polygon"

and not "regular" 

@Alejandro:  Awesome simple little script!

BR

 

On 11/24/16, 10:01 AM, "use-livecode on behalf of Mark Waddingham" 
 wrote:

Check out the editMode property of graphic objects.

Warmest regards,

Mark.



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

Draw an adjustable Trapezoid in Livecode - How to change x, y of the 4 corner points of a rect

2016-11-24 Thread Alejandro Tejada
Maybe this could be useful:

on mouseUp
   lock screen
   create grc
   set the style of it to polygon
   set the points of it to "3,0,0,10,10,10,7,0,3,0"
   -- a very small figure
   set the rect of it to "0,0,200,100"
   -- enlarge the figure
   set the loc of it to the screenloc
   -- position it in a place easy to find
   unlock screen
end mouseUp

Alejandro

___
use-livecode mailing list
use-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: Draw an adjustable Trapezoid in Livecode - How to change x, y of the 4 corner points of a rect

2016-11-24 Thread Paul Hibbert

> On Nov 24, 2016, at 11:57 AM, Sannyasin Brahmanathaswami  
> wrote:
> 
> Question: is there a way to close the polygon path? It does appear to be 
> closed by default, but I can't actually get the last point of the last line 
> to snap-connect to the first point of starting line… maybe that is not 
> doable?  But, mute point since when you switch out the polygon is closed even 
> if you have a small "x over" at the return point… 

You can do this by script, just use something like the following script in the 
card or stack;
on newGraphic

 — use the altKey to ensure this is a chosen behaviour

 — leave the altKey condition out if this is to be the default behaviour
   if the altKey is down and the style of the last graphic = "polygon" then

  get the points of the last graphic

  put line 1 of it into line -1 of it

  set the points of the last graphic to it

  set the editMode of the last graphic to "polygon" -- Thank you Mark!

   end if

end newGraphic

This will make sure the first point and last point are equal and the graphic 
points are editable.
  set the editMode of the last graphic to “none” -- turn off the Reshape 
Polygon mode and remove the edit handles

Regards,

Paul
___
use-livecode mailing list
use-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: Draw an adjustable Trapezoid in Livecode - How to change x, y of the 4 corner points of a rect

2016-11-24 Thread Roger Guay
I don’t know about you, but I got tired trying to figure out how to use the 
editMode of a polygon in Version 8, so I built what I think you need here:

https://www.dropbox.com/s/bbsfkorg9vm32um/PolywHandles.livecode?dl=0 



Cheers,

Roger



> On Nov 24, 2016, at 11:57 AM, Sannyasin Brahmanathaswami  
> wrote:
> 
> 
>The good news:
>Right click on the Polygon then choose 'Reshape Polygon' and the points 
> that you require should appear. :-)
> 
> BR: confirmed.. that works.
> 
>Now the bad news:
>Sadly this also revealed the ghost trails seen before when you start to 
> drag the points around. :-(
> 
> BR: oops, right, old bug is back…
> 
> Question: is there a way to close the polygon path? It does appear to be 
> closed by default, but I can't actually get the last point of the last line 
> to snap-connect to the first point of starting line… maybe that is not 
> doable?  But, mute point since when you switch out the polygon is closed even 
> if you have a small "x over" at the return point… 
> 
> ___
> use-livecode mailing list
> use-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: JavaScript + LC HTML5 = LiveCode.js

2016-11-24 Thread Roger Eller
I disagree that you might as well be running a desktop app.  The download
of the helper would only be necessary once (like the old RevWeb plugin).
Back when we had the RevWeb plugin, my browser based apps just worked.
Being in a position where localized automation is primarily what I create
for in-house users, this would allow me to update/maintain to a single
code-source, but without having my hands tied capability-wise by the
browser.

~Roger


On Thu, Nov 24, 2016 at 3:08 PM, Mark Waddingham  wrote:

> The connection could possibly be made by using web sockets I guess
> (someone correct me if I'm wrong).
>
> However, the user would have to download, install and run the helper
> process... At which point you might as well be running a desktop
> app I'd think.
>
> Browsers do not and will almost certainly never allow execution of
> (native) subprocesses via JavaScript. (Nor any kind of native code which is
> not part of the browser executable - well, outside the browsers very tight
> sandbox).
>
> Mark.
>
>
>
> Sent from my iPhone
>
> > On 24 Nov 2016, at 20:00, Roger Eller 
> wrote:
> >
> > Mark,
> >
> > Would it be possible to have a LC executable (something resembling LC
> > Server) on a Desktop, allowing the browser to access the local machine by
> > way of that backgrounded process?  Could it be an out of the box
> capability
> > only turned on by the machine's primary user, via the html5 application
> > before it fully launches?  Similar to how Android tells the user what
> > permissions are needed is how I imagine it would present itself.
> >
> > ~Roger
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: JavaScript + LC HTML5 = LiveCode.js

2016-11-24 Thread Mark Waddingham
I should perhaps say that whilst what I'm saying above sounds somewhat doom and 
gloom, it isn't.

Browsers have a huge responsibility to keep your computer safe from malicious 
attack (there are people who spend all their time trying to find holes to 
wriggle through and then exploit).

Browser JS APIs are rich and diverse, and become more so each year.

For most things it will be a case of 'when', and not 'if'.

Sent from my iPhone

> On 24 Nov 2016, at 20:08, Mark Waddingham  wrote:
> 
> The connection could possibly be made by using web sockets I guess (someone 
> correct me if I'm wrong).
> 
> However, the user would have to download, install and run the helper 
> process... At which point you might as well be running a desktop
> app I'd think.
> 
> Browsers do not and will almost certainly never allow execution of (native) 
> subprocesses via JavaScript. (Nor any kind of native code which is not part 
> of the browser executable - well, outside the browsers very tight sandbox).
> 
> Mark.
> 
> 
> 
> Sent from my iPhone
> 
>> On 24 Nov 2016, at 20:00, Roger Eller  wrote:
>> 
>> Mark,
>> 
>> Would it be possible to have a LC executable (something resembling LC
>> Server) on a Desktop, allowing the browser to access the local machine by
>> way of that backgrounded process?  Could it be an out of the box capability
>> only turned on by the machine's primary user, via the html5 application
>> before it fully launches?  Similar to how Android tells the user what
>> permissions are needed is how I imagine it would present itself.
>> 
>> ~Roger
>> 
>> 
>> 
>> Roger Eller
>> Graphics Systems Analyst
>> 
>> 803 North Maple Street P: 864.967.1625
>> Simpsonville, SC 29681 C: 864.908.0337
>> SealedAir.com  roger.e.el...@sealedair.com
>> 
>> 
>> 
>> 
>>> On Thu, Nov 24, 2016 at 2:40 PM, Mark Waddingham  wrote:
>>> 
>>> Indeed.
>>> 
>>> Once we have JS which 'does a similar thing' to answer file (or any other
>>> OS related piece of syntax) - hooking it up to that command is relatively
>>> straightforward.
>>> 
>>> The hard part is writing the JavaScript implementations of the various OS
>>> services we are so used to using directly in LC.
>>> 
>>> It is important to remember that browsers give no direct access to OS
>>> APIs, they are sandboxed and attempt to mitigate security issues as much as
>>> they can.
>>> 
>>> The only system type functionality you get is that exposed by supported JS
>>> APIs a given browser has.
>>> 
>>> Mark.
>>> 
>>> Sent from my iPhone
>>> 
> On 24 Nov 2016, at 18:41, Roger Eller 
 wrote:
 
 File picker should not have to be built in another language, in my
 opinion.  Ask or Answer file SHOULD just work.  Again, my opinion.  This
>>> is
 LiveCode after all.
 
 ~Roger
 
> On Nov 24, 2016 10:49 AM, "Todd Fabacher"  wrote:
> 
> Hello LiveCode community,
> 
> At Digital Pomegranate we are very excited about the update to LiveCode
> HTML5. We already have several projects that we plan on using the
>>> platform
> for. Since our LiveCode team has only a little experience in
>>> JavaScript, we
> are thinking of creating a LiveCode.js. This will be both a LC substack
> that wraps a Javascript function library which would be in a file named
> LiveCode.js.
> 
> Our thinking is it would have 5+ core functionalities that woul dbe
>>> shared
> by most HTML5 apps.  I think this would be a great community project and
> help people who may not be so familiar with Javascript and can stay
>>> focused
> on LiceCode.
> 
> Communications
> tsNet has given LiveCode async server communications, the good news is
> Javascript has had this functionality for quite some time. We would
>>> need a
> simple wrapper of the XMLHttpRequest functionality in LiveCode.js, so it
> seems seamless in Livecode.
> 
> I know LC can call the browser's javascript, but can the JS do a
>>> callback
> to LiveCode? It would be great if we could do sockets in JS and create a
> two way communications system.
> 
> RestAPI services
> I have seen recent notes about using revIgniter as a REST server, and
>>> there
> are many other options available. We use mostly WP and the WP RestAPI.
> 
> Remote Storage
> Mark's LiveCloud is a great option and there are several different
>>> options.
> As I said, we mostly use WP, but we also use Node.js w/ mongodb. The
> LiveCode.js  will just need a simple way of taking XML. JSON or an
>>> encoded
> array and sending it to the remote storage of choice and returning the
> values.
> 
> Local Storage
> The ability to create and use a local DB within the local browser. My
> understanding is that LC HTML5 will not because to utilize the database

Re: JavaScript + LC HTML5 = LiveCode.js

2016-11-24 Thread Mark Waddingham
The connection could possibly be made by using web sockets I guess (someone 
correct me if I'm wrong).

However, the user would have to download, install and run the helper process... 
At which point you might as well be running a desktop
app I'd think.

Browsers do not and will almost certainly never allow execution of (native) 
subprocesses via JavaScript. (Nor any kind of native code which is not part of 
the browser executable - well, outside the browsers very tight sandbox).

Mark.



Sent from my iPhone

> On 24 Nov 2016, at 20:00, Roger Eller  wrote:
> 
> Mark,
> 
> Would it be possible to have a LC executable (something resembling LC
> Server) on a Desktop, allowing the browser to access the local machine by
> way of that backgrounded process?  Could it be an out of the box capability
> only turned on by the machine's primary user, via the html5 application
> before it fully launches?  Similar to how Android tells the user what
> permissions are needed is how I imagine it would present itself.
> 
> ~Roger
> 
> 
> 
> Roger Eller
> Graphics Systems Analyst
> 
> 803 North Maple Street P: 864.967.1625
> Simpsonville, SC 29681 C: 864.908.0337
> SealedAir.com  roger.e.el...@sealedair.com
> 
> 
> 
> 
>> On Thu, Nov 24, 2016 at 2:40 PM, Mark Waddingham  wrote:
>> 
>> Indeed.
>> 
>> Once we have JS which 'does a similar thing' to answer file (or any other
>> OS related piece of syntax) - hooking it up to that command is relatively
>> straightforward.
>> 
>> The hard part is writing the JavaScript implementations of the various OS
>> services we are so used to using directly in LC.
>> 
>> It is important to remember that browsers give no direct access to OS
>> APIs, they are sandboxed and attempt to mitigate security issues as much as
>> they can.
>> 
>> The only system type functionality you get is that exposed by supported JS
>> APIs a given browser has.
>> 
>> Mark.
>> 
>> Sent from my iPhone
>> 
 On 24 Nov 2016, at 18:41, Roger Eller 
>>> wrote:
>>> 
>>> File picker should not have to be built in another language, in my
>>> opinion.  Ask or Answer file SHOULD just work.  Again, my opinion.  This
>> is
>>> LiveCode after all.
>>> 
>>> ~Roger
>>> 
 On Nov 24, 2016 10:49 AM, "Todd Fabacher"  wrote:
 
 Hello LiveCode community,
 
 At Digital Pomegranate we are very excited about the update to LiveCode
 HTML5. We already have several projects that we plan on using the
>> platform
 for. Since our LiveCode team has only a little experience in
>> JavaScript, we
 are thinking of creating a LiveCode.js. This will be both a LC substack
 that wraps a Javascript function library which would be in a file named
 LiveCode.js.
 
 Our thinking is it would have 5+ core functionalities that woul dbe
>> shared
 by most HTML5 apps.  I think this would be a great community project and
 help people who may not be so familiar with Javascript and can stay
>> focused
 on LiceCode.
 
 Communications
 tsNet has given LiveCode async server communications, the good news is
 Javascript has had this functionality for quite some time. We would
>> need a
 simple wrapper of the XMLHttpRequest functionality in LiveCode.js, so it
 seems seamless in Livecode.
 
 I know LC can call the browser's javascript, but can the JS do a
>> callback
 to LiveCode? It would be great if we could do sockets in JS and create a
 two way communications system.
 
 RestAPI services
 I have seen recent notes about using revIgniter as a REST server, and
>> there
 are many other options available. We use mostly WP and the WP RestAPI.
 
 Remote Storage
 Mark's LiveCloud is a great option and there are several different
>> options.
 As I said, we mostly use WP, but we also use Node.js w/ mongodb. The
 LiveCode.js  will just need a simple way of taking XML. JSON or an
>> encoded
 array and sending it to the remote storage of choice and returning the
 values.
 
 Local Storage
 The ability to create and use a local DB within the local browser. My
 understanding is that LC HTML5 will not because to utilize the database
 library, so we will have to use Javascript localStorage. We just need to
 create a controller that will connect LC to create, read and write to
>> the
 local DB. Javascript even has a way to store the DB and can be accessed
>> for
 the next session.
 
 http://www.w3schools.com/html/html5_webstorage.asp
 
 File Picker & Uploaded
 Not use how to do this in HTML5, but we will need a way to select a file
 and upload it to a server. We could use an HTML+JS dialog box to do it.
 
 Best,
 
 Todd
 ___
 use-livecode mailing list
 

Re: Draw an adjustable Trapezoid in Livecode - How to change x, y of the 4 corner points of a rect

2016-11-24 Thread Mark Waddingham
Check out the editMode property of graphic objects.

Warmest regards,

Mark.

Sent from my iPhone

> On 24 Nov 2016, at 04:44, Sannyasin Brahmanathaswami  wrote:
> 
> I want to be able to draw an adjustable trapezoid in Livecode.
> 
> The regular polygon tool set to 4 sides doesn't allow you  to grab any given
> 
> Similarly, the polygon graphic also doesn't provide grab points for corners 
> of a rect that you can drag and adjust
> 
> Is this just impossible? or am I missing something?
> 
> I could live with the option to set the four points of the graphic such that 
> 4 straight lines are connected but the corners placed where I want them… a 
> bit above my brain pay grade at the moment. of course you could set *all* of 
> the points of the graphic but I'd like just to be able to set the points of 
> the 4 corners of the rect/trapezoid
> 
> is this even doable?
> 
> BR
> 
> ___
> use-livecode mailing list
> use-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: JavaScript + LC HTML5 = LiveCode.js

2016-11-24 Thread Roger Eller
Mark,

Would it be possible to have a LC executable (something resembling LC
Server) on a Desktop, allowing the browser to access the local machine by
way of that backgrounded process?  Could it be an out of the box capability
only turned on by the machine's primary user, via the html5 application
before it fully launches?  Similar to how Android tells the user what
permissions are needed is how I imagine it would present itself.

~Roger



Roger Eller
Graphics Systems Analyst

803 North Maple Street P: 864.967.1625
Simpsonville, SC 29681 C: 864.908.0337
SealedAir.com  roger.e.el...@sealedair.com




On Thu, Nov 24, 2016 at 2:40 PM, Mark Waddingham  wrote:

> Indeed.
>
> Once we have JS which 'does a similar thing' to answer file (or any other
> OS related piece of syntax) - hooking it up to that command is relatively
> straightforward.
>
> The hard part is writing the JavaScript implementations of the various OS
> services we are so used to using directly in LC.
>
> It is important to remember that browsers give no direct access to OS
> APIs, they are sandboxed and attempt to mitigate security issues as much as
> they can.
>
> The only system type functionality you get is that exposed by supported JS
> APIs a given browser has.
>
> Mark.
>
> Sent from my iPhone
>
> > On 24 Nov 2016, at 18:41, Roger Eller 
> wrote:
> >
> > File picker should not have to be built in another language, in my
> > opinion.  Ask or Answer file SHOULD just work.  Again, my opinion.  This
> is
> > LiveCode after all.
> >
> > ~Roger
> >
> >> On Nov 24, 2016 10:49 AM, "Todd Fabacher"  wrote:
> >>
> >> Hello LiveCode community,
> >>
> >> At Digital Pomegranate we are very excited about the update to LiveCode
> >> HTML5. We already have several projects that we plan on using the
> platform
> >> for. Since our LiveCode team has only a little experience in
> JavaScript, we
> >> are thinking of creating a LiveCode.js. This will be both a LC substack
> >> that wraps a Javascript function library which would be in a file named
> >> LiveCode.js.
> >>
> >> Our thinking is it would have 5+ core functionalities that woul dbe
> shared
> >> by most HTML5 apps.  I think this would be a great community project and
> >> help people who may not be so familiar with Javascript and can stay
> focused
> >> on LiceCode.
> >>
> >> Communications
> >> tsNet has given LiveCode async server communications, the good news is
> >> Javascript has had this functionality for quite some time. We would
> need a
> >> simple wrapper of the XMLHttpRequest functionality in LiveCode.js, so it
> >> seems seamless in Livecode.
> >>
> >> I know LC can call the browser's javascript, but can the JS do a
> callback
> >> to LiveCode? It would be great if we could do sockets in JS and create a
> >> two way communications system.
> >>
> >> RestAPI services
> >> I have seen recent notes about using revIgniter as a REST server, and
> there
> >> are many other options available. We use mostly WP and the WP RestAPI.
> >>
> >> Remote Storage
> >> Mark's LiveCloud is a great option and there are several different
> options.
> >> As I said, we mostly use WP, but we also use Node.js w/ mongodb. The
> >> LiveCode.js  will just need a simple way of taking XML. JSON or an
> encoded
> >> array and sending it to the remote storage of choice and returning the
> >> values.
> >>
> >> Local Storage
> >> The ability to create and use a local DB within the local browser. My
> >> understanding is that LC HTML5 will not because to utilize the database
> >> library, so we will have to use Javascript localStorage. We just need to
> >> create a controller that will connect LC to create, read and write to
> the
> >> local DB. Javascript even has a way to store the DB and can be accessed
> for
> >> the next session.
> >>
> >> http://www.w3schools.com/html/html5_webstorage.asp
> >>
> >> File Picker & Uploaded
> >> Not use how to do this in HTML5, but we will need a way to select a file
> >> and upload it to a server. We could use an HTML+JS dialog box to do it.
> >>
> >> Best,
> >>
> >> Todd
> >> ___
> >> use-livecode mailing list
> >> use-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:
> 

Re: Draw an adjustable Trapezoid in Livecode - How to change x, y of the 4 corner points of a rect

2016-11-24 Thread Sannyasin Brahmanathaswami

The good news:
Right click on the Polygon then choose 'Reshape Polygon' and the points 
that you require should appear. :-)

BR: confirmed.. that works.

Now the bad news:
Sadly this also revealed the ghost trails seen before when you start to 
drag the points around. :-(
 
BR: oops, right, old bug is back…

Question: is there a way to close the polygon path? It does appear to be closed 
by default, but I can't actually get the last point of the last line to 
snap-connect to the first point of starting line… maybe that is not doable?  
But, mute point since when you switch out the polygon is closed even if you 
have a small "x over" at the return point… 

___
use-livecode mailing list
use-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: JavaScript + LC HTML5 = LiveCode.js

2016-11-24 Thread Mark Waddingham
Indeed.

Once we have JS which 'does a similar thing' to answer file (or any other OS 
related piece of syntax) - hooking it up to that command is relatively 
straightforward.

The hard part is writing the JavaScript implementations of the various OS 
services we are so used to using directly in LC.

It is important to remember that browsers give no direct access to OS APIs, 
they are sandboxed and attempt to mitigate security issues as much as they can.

The only system type functionality you get is that exposed by supported JS APIs 
a given browser has.

Mark.

Sent from my iPhone

> On 24 Nov 2016, at 18:41, Roger Eller  wrote:
> 
> File picker should not have to be built in another language, in my
> opinion.  Ask or Answer file SHOULD just work.  Again, my opinion.  This is
> LiveCode after all.
> 
> ~Roger
> 
>> On Nov 24, 2016 10:49 AM, "Todd Fabacher"  wrote:
>> 
>> Hello LiveCode community,
>> 
>> At Digital Pomegranate we are very excited about the update to LiveCode
>> HTML5. We already have several projects that we plan on using the platform
>> for. Since our LiveCode team has only a little experience in JavaScript, we
>> are thinking of creating a LiveCode.js. This will be both a LC substack
>> that wraps a Javascript function library which would be in a file named
>> LiveCode.js.
>> 
>> Our thinking is it would have 5+ core functionalities that woul dbe shared
>> by most HTML5 apps.  I think this would be a great community project and
>> help people who may not be so familiar with Javascript and can stay focused
>> on LiceCode.
>> 
>> Communications
>> tsNet has given LiveCode async server communications, the good news is
>> Javascript has had this functionality for quite some time. We would need a
>> simple wrapper of the XMLHttpRequest functionality in LiveCode.js, so it
>> seems seamless in Livecode.
>> 
>> I know LC can call the browser's javascript, but can the JS do a callback
>> to LiveCode? It would be great if we could do sockets in JS and create a
>> two way communications system.
>> 
>> RestAPI services
>> I have seen recent notes about using revIgniter as a REST server, and there
>> are many other options available. We use mostly WP and the WP RestAPI.
>> 
>> Remote Storage
>> Mark's LiveCloud is a great option and there are several different options.
>> As I said, we mostly use WP, but we also use Node.js w/ mongodb. The
>> LiveCode.js  will just need a simple way of taking XML. JSON or an encoded
>> array and sending it to the remote storage of choice and returning the
>> values.
>> 
>> Local Storage
>> The ability to create and use a local DB within the local browser. My
>> understanding is that LC HTML5 will not because to utilize the database
>> library, so we will have to use Javascript localStorage. We just need to
>> create a controller that will connect LC to create, read and write to the
>> local DB. Javascript even has a way to store the DB and can be accessed for
>> the next session.
>> 
>> http://www.w3schools.com/html/html5_webstorage.asp
>> 
>> File Picker & Uploaded
>> Not use how to do this in HTML5, but we will need a way to select a file
>> and upload it to a server. We could use an HTML+JS dialog box to do it.
>> 
>> Best,
>> 
>> Todd
>> ___
>> use-livecode mailing list
>> use-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: JavaScript + LC HTML5 = LiveCode.js

2016-11-24 Thread Roger Eller
File picker should not have to be built in another language, in my
opinion.  Ask or Answer file SHOULD just work.  Again, my opinion.  This is
LiveCode after all.

~Roger

On Nov 24, 2016 10:49 AM, "Todd Fabacher"  wrote:

> Hello LiveCode community,
>
> At Digital Pomegranate we are very excited about the update to LiveCode
> HTML5. We already have several projects that we plan on using the platform
> for. Since our LiveCode team has only a little experience in JavaScript, we
> are thinking of creating a LiveCode.js. This will be both a LC substack
> that wraps a Javascript function library which would be in a file named
> LiveCode.js.
>
> Our thinking is it would have 5+ core functionalities that woul dbe shared
> by most HTML5 apps.  I think this would be a great community project and
> help people who may not be so familiar with Javascript and can stay focused
> on LiceCode.
>
> Communications
> tsNet has given LiveCode async server communications, the good news is
> Javascript has had this functionality for quite some time. We would need a
> simple wrapper of the XMLHttpRequest functionality in LiveCode.js, so it
> seems seamless in Livecode.
>
> I know LC can call the browser's javascript, but can the JS do a callback
> to LiveCode? It would be great if we could do sockets in JS and create a
> two way communications system.
>
> RestAPI services
> I have seen recent notes about using revIgniter as a REST server, and there
> are many other options available. We use mostly WP and the WP RestAPI.
>
> Remote Storage
> Mark's LiveCloud is a great option and there are several different options.
> As I said, we mostly use WP, but we also use Node.js w/ mongodb. The
> LiveCode.js  will just need a simple way of taking XML. JSON or an encoded
> array and sending it to the remote storage of choice and returning the
> values.
>
> Local Storage
> The ability to create and use a local DB within the local browser. My
> understanding is that LC HTML5 will not because to utilize the database
> library, so we will have to use Javascript localStorage. We just need to
> create a controller that will connect LC to create, read and write to the
> local DB. Javascript even has a way to store the DB and can be accessed for
> the next session.
>
> http://www.w3schools.com/html/html5_webstorage.asp
>
> File Picker & Uploaded
> Not use how to do this in HTML5, but we will need a way to select a file
> and upload it to a server. We could use an HTML+JS dialog box to do it.
>
> Best,
>
> Todd
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Is there a mapping table for all rawKeyUp Codes?

2016-11-24 Thread Mark Waddingham
Hi Tiemo,

If you search for 'PlatformKeyCode' in this file:

https://github.com/livecode/livecode/blob/develop/engine/src/platform.h

It should give you what you need.

Warmest Regards,

Mark.

Sent from my iPhone

> On 24 Nov 2016, at 16:31, Tiemo Hollmann TB  wrote:
> 
> Hello,
> 
> since keyUp doesn't works anymore  as it should on windows in LC 7/8 (see my
> previous post) I have to workaround with rawKeyUp.
> 
> Does anybody has a togo mapping table of the rawkeyup codes to the real
> chars? If not I have to build it myself by testing each char.
> 
> Thanks
> 
> Tiemo
> 
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-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


Is there a mapping table for all rawKeyUp Codes?

2016-11-24 Thread Tiemo Hollmann TB
Hello,

since keyUp doesn't works anymore  as it should on windows in LC 7/8 (see my
previous post) I have to workaround with rawKeyUp.

Does anybody has a togo mapping table of the rawkeyup codes to the real
chars? If not I have to build it myself by testing each char.

Thanks

Tiemo

 

 

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


JavaScript + LC HTML5 = LiveCode.js

2016-11-24 Thread Todd Fabacher
Hello LiveCode community,

At Digital Pomegranate we are very excited about the update to LiveCode
HTML5. We already have several projects that we plan on using the platform
for. Since our LiveCode team has only a little experience in JavaScript, we
are thinking of creating a LiveCode.js. This will be both a LC substack
that wraps a Javascript function library which would be in a file named
LiveCode.js.

Our thinking is it would have 5+ core functionalities that woul dbe shared
by most HTML5 apps.  I think this would be a great community project and
help people who may not be so familiar with Javascript and can stay focused
on LiceCode.

Communications
tsNet has given LiveCode async server communications, the good news is
Javascript has had this functionality for quite some time. We would need a
simple wrapper of the XMLHttpRequest functionality in LiveCode.js, so it
seems seamless in Livecode.

I know LC can call the browser's javascript, but can the JS do a callback
to LiveCode? It would be great if we could do sockets in JS and create a
two way communications system.

RestAPI services
I have seen recent notes about using revIgniter as a REST server, and there
are many other options available. We use mostly WP and the WP RestAPI.

Remote Storage
Mark's LiveCloud is a great option and there are several different options.
As I said, we mostly use WP, but we also use Node.js w/ mongodb. The
LiveCode.js  will just need a simple way of taking XML. JSON or an encoded
array and sending it to the remote storage of choice and returning the
values.

Local Storage
The ability to create and use a local DB within the local browser. My
understanding is that LC HTML5 will not because to utilize the database
library, so we will have to use Javascript localStorage. We just need to
create a controller that will connect LC to create, read and write to the
local DB. Javascript even has a way to store the DB and can be accessed for
the next session.

http://www.w3schools.com/html/html5_webstorage.asp

File Picker & Uploaded
Not use how to do this in HTML5, but we will need a way to select a file
and upload it to a server. We could use an HTML+JS dialog box to do it.

Best,

Todd
___
use-livecode mailing list
use-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: Shell Command and cURL

2016-11-24 Thread Gregory Lypny
Hi Richard and Mark,

Thanks for responding.

Richard, I had tinkered with Put and libURLDownloadToFile or whatever version 
of libURL was available in version 7.1 (I have only today updated to 8.1.2) but 
the problem with those commands is that they need to make a connection or call 
(not sure of the proper terminology) to the remote server for every file (say, 
by using a Repeat For Each loop), and the server cuts me off after a random 
number of files. cURL makes just one connection or keeps one connection open, 
and it has worked like a charm.

Thanks for the heads up about rsync. I hadn’t heard of it, so I’ll do my 
homework.

Thanks for the script, Mark. Shell scripts will definitely be a new venture for 
me.

Regards,

Gregory

Richard Gaskin wrote:


___
use-livecode mailing list
use-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: Installing LiveCode Server on a Microsoft Azure Bitnami LAMP stack

2016-11-24 Thread Dave Kilroy

Thanks Peter! I’ve passed it on…

Kind regards

Dave


> Dave 
> 
> > On 24 Nov 2016, at 19:46, Dave Kilroy <[hidden email] 
> > >
> >  wrote: 
> > 
> > Hi all 
> > 
> > I’ve contracted a smashing guy with great server experience but who is new 
> > to LiveCode install LiveCode Server on a Microsoft Azure Bitnami LAMP stack 
> > for me - and it’s great working with someone who knows what they’re doing 
> > 
> > However we’re stuck - could you clever people have a look at this thread 
> > http://forums.livecode.com/viewtopic.php?f=20=28354=148772#p148772 
> >  
> >  > > 
> > and pass on your suggestions as to how to get it working? 
> > 
> > Thanks in advance! 
> > 
> > Dave 
> > 
> 
> It might be the Apache is being fussy about the lack of a trailing “/“ in the 
> Script Alias or giving the name of an executable when a directory is 
> required. 
> 
> These are the relevant parts of the config I use happily with Apache 2.4: 
>   
> ScriptAlias /livecode-cgi/ "/Users/peter/Sites/LiveCodeServer/“ 
> 
>  
> AllowOverride None 
> Options +ExecCGI 
> Require all granted 
>  
> 
> AddHandler lcscript .lc 
> Action lcscript /livecode-cgi/livecode-server 
> 
> Hope this helps. 
> 
> Peter 
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Installing LiveCode Server on a Microsoft Azure Bitnami LAMP stack

2016-11-24 Thread Peter W A Wood
Dave

> On 24 Nov 2016, at 19:46, Dave Kilroy  wrote:
> 
> Hi all
> 
> I’ve contracted a smashing guy with great server experience but who is new to 
> LiveCode install LiveCode Server on a Microsoft Azure Bitnami LAMP stack for 
> me - and it’s great working with someone who knows what they’re doing
> 
> However we’re stuck - could you clever people have a look at this thread 
> http://forums.livecode.com/viewtopic.php?f=20=28354=148772#p148772 
>  and 
> pass on your suggestions as to how to get it working?
> 
> Thanks in advance!
> 
> Dave
> 

It might be the Apache is being fussy about the lack of a trailing “/“ in the 
Script Alias or giving the name of an executable when a directory is required.

These are the relevant parts of the config I use happily with Apache 2.4:
 
ScriptAlias /livecode-cgi/ "/Users/peter/Sites/LiveCodeServer/“


AllowOverride None
Options +ExecCGI
Require all granted


AddHandler lcscript .lc
Action lcscript /livecode-cgi/livecode-server

Hope this helps.

Peter


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

AW: LC 8: slowdown of a repeat loop

2016-11-24 Thread Tiemo Hollmann TB
Picking the thumbposition of the slider at mouseup and doing the
calculations only at mouseup feels better now, as doing it simultaneously
dragging the slider, though it is not a real "live experience" for the user.
Tiemo

-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag
von Tiemo Hollmann TB
Gesendet: Donnerstag, 24. November 2016 12:06
An: LiveCode User Liste senden 
Betreff: LC 8: slowdown of a repeat loop

Hello,

I am converting a 384x288 color image into greyscale, looping thru each
pixel of the image and doing some calculations. That works fine.

The user can do some fine adjustments using a slider with a live visual
control of the effect on the image. For each movement of the slider the
looping thru all pixels starts again. Up to LC 6.7 this was pretty
responsive but now with LC 8 moving the slider feels like tearing a rubber
band. It still works, but is much slower and not so the slider isn't really
responsive. Actually it is only a repeat loop with simple LC calculations,
some numToByte and byteToNum. Nothing where I can see what could cause the
slowdown of LC 8, compared with 6.

Before going into each statement of the code, I wanted to ask, if perhaps my
approach is a no go and there could be a better approach or if you say,
that's just like it is. Perhaps I should run the loop only once after
releasing the slider instead of continuously at *scrollbardrag*, but
releasing the slider doesn't fire a *rawkeyup*, so I actually don't know,
how I should trigger that event.

Thanks for any ideas

Tiemo

 

 

 

 

 

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


Installing LiveCode Server on a Microsoft Azure Bitnami LAMP stack

2016-11-24 Thread Dave Kilroy
Hi all

I’ve contracted a smashing guy with great server experience but who is new to 
LiveCode install LiveCode Server on a Microsoft Azure Bitnami LAMP stack for me 
- and it’s great working with someone who knows what they’re doing

However we’re stuck - could you clever people have a look at this thread 
http://forums.livecode.com/viewtopic.php?f=20=28354=148772#p148772 
 and 
pass on your suggestions as to how to get it working?

Thanks in advance!

Dave




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

LC 8: slowdown of a repeat loop

2016-11-24 Thread Tiemo Hollmann TB
Hello,

I am converting a 384x288 color image into greyscale, looping thru each
pixel of the image and doing some calculations. That works fine.

The user can do some fine adjustments using a slider with a live visual
control of the effect on the image. For each movement of the slider the
looping thru all pixels starts again. Up to LC 6.7 this was pretty
responsive but now with LC 8 moving the slider feels like tearing a rubber
band. It still works, but is much slower and not so the slider isn't really
responsive. Actually it is only a repeat loop with simple LC calculations,
some numToByte and byteToNum. Nothing where I can see what could cause the
slowdown of LC 8, compared with 6.

Before going into each statement of the code, I wanted to ask, if perhaps my
approach is a no go and there could be a better approach or if you say,
that's just like it is. Perhaps I should run the loop only once after
releasing the slider instead of continuously at *scrollbardrag*, but
releasing the slider doesn't fire a *rawkeyup*, so I actually don't know,
how I should trigger that event.

Thanks for any ideas

Tiemo

 

 

 

 

 

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


LC 8: no keyUp at fast enter

2016-11-24 Thread Tiemo Hollmann TB
Hello,

when entering chars in a fast sequence into a field I don't get a keyUp
event in LC 8.1.1 on Windows.

When entering single chars I get the keyUp, but when writing 10 finger
system keyup stops working. On OS X 10.11 no problem and with LC 6.7 on
windows also no problem, so it is not an issue of my keyboard.

If I don't get the keyup working for me, I could use rawkeyup as a
workaround. I would build manually an array to transform the rawkey code to
the real character. Has anybody a better idea or a script snippet for this
transformation?

Can anybody confirm, before I file a bug?

Thanks

Tiemo

 

 

 

 

___
use-livecode mailing list
use-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: roundUp function?

2016-11-24 Thread Quentin Long
sez Roger Eller :
> We have round, which will either round up or down depending on the decimal
> value being > or < .5, but what if I want ANY decimal value, even .01 to
> round UP to the next whole number?
The best solution is the Ceiling function. Since that's not an option for the 
version of LiveCode you're working with, you gotta roll your own.

The proposed "return int (DerNumber +.5)" solution won't do, because any number 
whose decimal part is *less than* .5 will round down to the integer part. 
Instead, what you want is something like this:

if DerNumber = int (DerNumber) then -- DerNumber doesn't *have* a decimal part
  return DerNumber
else -- DerNumber *does* have a decimal part, hence rounds up
  return int (DerNumber) + 1
end if

That works fine for positive numbers and zero. Negative numbers, not so much. 
So, a tweak to handle negative numbers:

if DerNumber = int (DerNumber) then -- DerNumber doesn't *have* a decimal part
  return DerNumber
else -- DerNumber *does* have a decimal part, hence rounds up
  return int (DerNumber) + (DerNumber / abs (DerNumber))
end if

The expression "DerNumber / abs (DerNumber)" yields a value of +1 when 
DerNumber is a positive number, and -1 when DerNumber is negative. Alas, it 
runs into problems when DerNumber is zero. So, tweaking again:

function CeilingOf DerNumber
  if DerNumber = 0 then
return 0
  else
if DerNumber = int (DerNumber) then -- DerNumber doesn't *have* a decimal 
part
  return DerNumber
else -- DerNumber *does* have a decimal part, hence rounds up
  return 1 + int (DerNumber)
end if
  end if
end CeilingOf

Please don't feed a non-number to this function. It won't like that.
 
"Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length"

Read the webcomic at [ http://www.atarmslength.net ]!

If you like "At Arm's Length", support it at [ 
http://www.patreon.com/DarkwingDude ].

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