decompressing gzip data server side

2021-08-02 Thread jbv via use-livecode

Hi list,

I need to post data from an LC standalone to a remote server.

For years, using LC as cgi engine, I have compressed and encoded
the data in base 64 like this :
  put base64encode(compress(myData)) into myVar

and then I run the opposite command server side :
  put decompress(base64decode(myData)) into myVar

Now I need to post from an LC app to a php script.
According to the LC dict, "compress" uses gzip, so I tried the 2
following php commands :
  $data = $_POST['a'];
  $a = gzdecode(base64_decode($data));
  $a = gzuncompress(base64_decode($data));

But in both cases it returns an empty string. The problem is with
the decompressing step, for the base64 encoded data is received by
the server and decoded without error.

Could someone be kind enough to tell me what I am missing ?

Thanks in advance.
jbv

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


Resizing images

2021-06-16 Thread jbv via use-livecode

Hi list,
I need to resize hundreds of jpg and png images.
Most images have different initial width and height,
and the resizing needs to be done according to data
in an xml file, therefore most resizing are quite
unique.
I was wondering : what is the best way to do it ?
1- with a LC script using export snapshot
2- or in php using a library such as Image magik ?

The main point is not how to do it, for I can code
both options, but rather : which option will ensure
the best image quality after resizing ?

Thanks in advance.
jbv

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


launch url and then close

2021-04-17 Thread jbv via use-livecode

Hi list,
On desktop, when a browser window is opened outside
of LC using the "launch url" command, is there a way
to close the browser window after a while from the
LC script ?
I am not talking about the revbrowser, but the actual
default browser.
I guess the answer is "no", as I haven't found anything
in the doc nor in the forum, but I'm asking anyway.

And second question : when a URL is used in a revbrowser,
the default browser is used by LC, but does it use the
same http header as when the same url is entered in the
address bar of the actual browser ?

Thanks in advance

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


revBrowserNavigate

2021-04-14 Thread jbv via use-livecode

Hi list,
I am using revBrowserNavigate and have the following problem :
sometimes some urls won't display, but they display fine when
I enter them in the address bar of the browser.
What am I missing and what should I check ?
I am using LC Community 8.1.10.

Thanks in advance. Best,
jbv

___
use-livecode mailing list
use-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 question for LC and Windows 10 experts

2021-03-23 Thread jbv via use-livecode

Hi list,
I have a request from a client to sync an accounting software
running on a PC under Windows 10 and a database on a remote
server.
Below is a short description of the solution I have imagined,
and I would welcome opinions & critics from other list members,
as I'm not really familiar with Win 10.

- I will build a small standalone app with LC, that will launch
at start up along with Win 10 and will keep running in the
background. Let's name it "myApp".

- some programmable tasks in the accounting software will create
xml files in a local directory when some actions are performed,
for instance : entering a new customer or a new order.

- every 5 min or so, myApp will check the directory for possible
new files, and will send their content to the remote server as
parameters of a POST request.
If no file is found, the POST request will be sent to the server
anyway.

- on the server, a script will be triggered and will enter the
parameters of the request (the xml data) into the DB, and will
return data relative to possible events that happened on the server,
if any, in the form of xml.

- myApp will write the returned xml data as a file in a directory
on the PC, and another programmable task in the software will read
the file and import the data.

My main concern is the app running constantly in the background.
Is it safe ? Is it Win 10 compatible ? Is there anything I miss ?
Thanks in advance.

jbv

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

Thank you.
I will take a close look at it.

Meanwhile I have finetuned my LC script : it returns the same
results as the js script, and according to my tests, solves
1000 cubic equations in roughly 0.8 second.


Le 2021-03-23 07:14, Andreas Bergendal via use-livecode a écrit :

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


___
use-livecode mailing list
use-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-22 Thread jbv via use-livecode

Le 2021-03-22 12:14, John Balgenorth via use-livecode a écrit :

You might be able to get the info by running your javascript
from a shell command.  Here is a link that might be of help;

https://stackoverflow.com/questions/12659778/is-it-possible-to-run-javascript-files-from-the-command-line



Thank you, but if I run javascript, I would prefer to use a
browser objet and revBrowserCallScript...
BTW, as I haven't used browser controls in a long time, am I
forced to use a distant url, or can I point to some html + js
stored in my stack as a field or even a variable ?

Thanks in advance.

___
use-livecode mailing list
use-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-22 Thread jbv via use-livecode

Le 2021-03-22 12:03, jbv via use-livecode a écrit :

Hi Craig,

Thank you for the link, but it doesn't help much :

bigDivide(-0.007347880794884118999,10)
returns 0 , -0.01




Ooops, I just realized that I forgot to add
set numberformat to "0.##"
at the beginning of bigDivide...

now bigDivide(-0.007347880794884118999,10)
0 , -0.00734788079488411899919975

___
use-livecode mailing list
use-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-22 Thread jbv via use-livecode

Hi Craig,

Thank you for the link, but it doesn't help much :

bigDivide(-0.007347880794884118999,10)
returns 0 , -0.01

what I'm actually trying to do is to transpose in LC
an algo for solving cubic equations that runs perfectly
in javascript.
So my solution will finally be to multiply data by 10^6,
run the algo, and then divide the results by 10^6 by
treating them as strings and moving the dot...
It's not really elegant and especially quite slow, as I
need to process large amounts of data and am not sure
that I'll be able to use LC for that project (which is
so far only a prototype).

I don't mean to start another endless thread on this topic,
but one thing puzzles me though : I understand that LC doesn't
use decimal numbers for internal calculations for reasons
of speed, but then how come does js perform high precision
calculations without any speed issues ?

Best

Le 2021-03-22 09:41, Craig Newman via use-livecode a écrit :

Check out this thread in the forum:

https://forums.livecode.com/viewtopic.php?f=7=25132=130985=longadd#p130985
<https://forums.livecode.com/viewtopic.php?f=7=25132=130985=longadd#p130985>

Craig

On Mar 21, 2021, at 7:34 AM, jbv via use-livecode 
 wrote:


Paul, Sean,

Thank you both for your answers, although it doesn't really solve my 
problem.
The most surprising thing is that javascript runs these calculations 
without

problem :
(-0.007347880794884118999 / 10) returns 
-7.347880794884119e-16
(-0.007347880794884118999 / 1) returns 
-7.347880794884119e-19


Best


Le 2021-03-21 07:11, Sean Cole (Pi) via use-livecode a écrit :

Livecode can handle floating point numbers up to 2^52. But then
calculations would have to fit within that range in a floating point
perspective too. So, once you add that ninth zero to the end of your
divider, it struggles with the calculation and returns, effectively, 
number

out of range.
Fractions in FP binary are tremendously complicated. Calculation in 
it are

even more so.
https://www.h-schmidt.net/FloatConverter/IEEE754.html
On Sat, 20 Mar 2021 at 20:23, Paul Dupuis via use-livecode <
use-livecode@lists.runrev.com> wrote:

I don't have an answer, other than to say there has been a LOT of
discussion over the years about the limits of number precision in
LiveCode and a number of enhancement requests and 3rd party 
libraries
that have attempted to provide a framework for high precision math. 
You
might search the list archives or search the forum on the LC web 
site

for past discussions about number precision.
On 3/20/2021 3:06 PM, jbv via use-livecode wrote:
> Hi list,
> I am a bit lost :
>
>set numberformat to ".#"
>put -0.007347880794884118999 / 1000
> -- returns -0.07347880794884119  which is ok
>
>put -0.007347880794884118999 / 100
> -- returns -0.7347880794884 -> also ok
>
>put -0.007347880794884118999 / 1
> -- returns -0.0073478807949 -> still ok
>
>put -0.007347880794884118999 / 10
> -- returns 0 -> ?
>
> Any explanations ?
> Thanks in advance.
> Best,
> jbv
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


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

http://lists.runrev.com/mailman/listinfo/use-livecode


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


___
use-livecode mailing list
use-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-21 Thread jbv via use-livecode

Paul, Sean,

Thank you both for your answers, although it doesn't really solve my 
problem.
The most surprising thing is that javascript runs these calculations 
without

problem :
(-0.007347880794884118999 / 10) returns 
-7.347880794884119e-16
(-0.007347880794884118999 / 1) returns 
-7.347880794884119e-19


Best


Le 2021-03-21 07:11, Sean Cole (Pi) via use-livecode a écrit :

Livecode can handle floating point numbers up to 2^52. But then
calculations would have to fit within that range in a floating point
perspective too. So, once you add that ninth zero to the end of your
divider, it struggles with the calculation and returns, effectively, 
number

out of range.

Fractions in FP binary are tremendously complicated. Calculation in it 
are

even more so.

https://www.h-schmidt.net/FloatConverter/IEEE754.html


On Sat, 20 Mar 2021 at 20:23, Paul Dupuis via use-livecode <
use-livecode@lists.runrev.com> wrote:


I don't have an answer, other than to say there has been a LOT of
discussion over the years about the limits of number precision in
LiveCode and a number of enhancement requests and 3rd party libraries
that have attempted to provide a framework for high precision math. 
You

might search the list archives or search the forum on the LC web site
for past discussions about number precision.

On 3/20/2021 3:06 PM, jbv via use-livecode wrote:
> Hi list,
> I am a bit lost :
>
>set numberformat to ".#"
>put -0.007347880794884118999 / 1000
> -- returns -0.07347880794884119  which is ok
>
>put -0.007347880794884118999 / 100
> -- returns -0.7347880794884 -> also ok
>
>put -0.007347880794884118999 / 1
> -- returns -0.0073478807949 -> still ok
>
>put -0.007347880794884118999 / 10
> -- returns 0 -> ?
>
> Any explanations ?
> Thanks in advance.
> Best,
> jbv
>
> ___
> use-livecode mailing list
> use-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


numberformat question

2021-03-20 Thread jbv via use-livecode

Hi list,
I am a bit lost :

   set numberformat to ".#"
   put -0.007347880794884118999 / 1000
-- returns -0.07347880794884119  which is ok

   put -0.007347880794884118999 / 100
-- returns -0.7347880794884 -> also ok

   put -0.007347880794884118999 / 1
-- returns -0.0073478807949 -> still ok

   put -0.007347880794884118999 / 10
-- returns 0 -> ?

Any explanations ?
Thanks in advance.
Best,
jbv

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


FYI

2021-03-17 Thread jbv via use-livecode

https://arstechnica.com/science/2021/03/how-does-the-brain-interpret-computer-languages/

BTW I wonder how brain activity would look like with xTalk...

Best

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


Did I dream this ?

2021-03-04 Thread jbv via use-livecode

Hi list,

I thought I remembered a property like xloc or yloc
in LC that would return only the horizontal or
vertical location of an object...
Or was it before, in Metacard or even in OMO ?

jbv

___
use-livecode mailing list
use-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: "within graphic" question

2021-02-22 Thread jbv via use-livecode

Le 2021-02-22 15:26, Tore Nilsen via use-livecode a écrit :


Since the properties of the arc is available even if it is invisible,
this will work though:

on mouseDown

put isWithin("myGraphic",the clickLoc)

end mouseDown


function isWithin pGraphic pClickLoc

if pClickLoc is within the rect of grc pGraphic then

return true

else

return false

end if

end isWithin


Thank you, but this won't work for I need to test the
exact shape of the graphics, not its bounding box...

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


"within graphic" question

2021-02-22 Thread jbv via use-livecode

Hi list,

I have a graphic made of a list of points. This graphic is opaque
and invisible, its filled property is set to true (according to
the doc).
In my card script I have something like :
on mousedown
  put within(grc "mygraphic", the clickloc)
end mousedown

but it always returns false, even when I click
inside the clickable area of the graphic...
What am I missing ?

Thanks in advance.
jbv

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


scrollbar question

2021-02-19 Thread jbv via use-livecode

Hi lust,

How can I prevent the thumb of a scrollbar to move when user
clicks on the scrollbar, but not on the thumb, when it's set
as a slider ?
I tried to trap scrollbarLineDec and scrollbarLineInc, and
also to set the lineincrement to 0, but to no avail.
What am I missing ?
Thanks in advance.

jbv

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

2021-02-14 Thread jbv via use-livecode

Le 2021-02-14 20:46, William Prothero via use-livecode a écrit :

Jacqueline:
I didn’t know about http://lessons.livecode.com
. Thank you for letting me know of that
resource. It looks very useful and I like the user feedback part.



I find this a bit surprising, because every time I have a doubt about
the syntax of a LC command or function, I go and google "livecode" + the
name of the command/function, and the related LC lesson appears within
the first links of the search results...
And I've been doing that for years...

jbv

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


numberformat, trunc and round

2021-02-02 Thread jbv via use-livecode

Hi list,

This might sound like a dumb question, but I'm scratching my head trying
to find a workaround.
I have this portion of script :
  set numberformat to "#.000"
  if myvar = trunc(myvar) then
get myarray[myvar]
  end if

The problem seems to be that when numberformat is set, both trunc() and 
round()
keep the fractional part of myvar (2.00); and since the indexes of 
myarray

are integers (1,2,3,etc), "get myarray[myvar]" always returns empty...
And I need to set numberformat to "#.000", because there are some 
rather
complex computations processed with the values in myarray inside a main 
loop.
And for various other reasons I can't use indexes with fractional part 
in the

array.
Of course, I could use :
  set numberformat to "#.000"
  set itemdelimiter to "."
  if myvar = trunc(myvar) then
get myarray[item 1 of myvar]
  end if
But that's not very elegant and slows down the script a bit...
Any help would be much appreciated.

Best,
jbv

___
use-livecode mailing list
use-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: Call lc from php?

2021-01-20 Thread jbv via use-livecode

Hi,

Le 2021-01-20 18:53, Neville Smythe via use-livecode a écrit :

Quick question: is it possible to execute a .lc server script from
within php (eg from an index.php page)?



I don't know if it will be useful, but here's the method I've been
using for years :

$data = 'https://www.mydomain.com/myscript.lc?a=' . $mydata;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);

___
use-livecode mailing list
use-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: disabling a group

2021-01-14 Thread jbv via use-livecode

Hi Paul,
Thank you for sharing.
I think I will stick with 1 single line of script that changes the
graphic color.
But I still need to understand why graphics colors don't change
when disabled.

Le 2021-01-13 22:29, Paul Hibbert via use-livecode a écrit :

I have just used setProp in a behaviour button that was assigned to
several groups made up of two graphic controls to represent a toggle
switch. By setting one custom property the whole appearance of the
group can easily be changed. I predefined the colours for each state
in more custom properties, I’m sure this could be adapted to suit your
case.

Rather than explain everything in detail here, I have uploaded a
stripped down stack to dropbox which I’m sure you could easily modify
the behaviour script to change the appearance of your graphics in a
similar way. If you need any more explanation, just ask, but I’m sure
you will get the idea.

Dropbox Link;
https://www.dropbox.com/s/misiog5bwathpgy/Toggle%20Switch.livecode?dl=0

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: disabling a group

2021-01-13 Thread jbv via use-livecode

Le 2021-01-13 15:34, Mark Wieder via use-livecode a écrit :

On 1/13/21 11:32 AM, jbv via use-livecode wrote:

Hi list,
I have a group that contains various controls, including graphic 
objects.

When I disable the group, the colors of every object becomes lighter,
except for graphics whose colors remain the same.
What is the best way to make colors of graphics become lighter when 
the

group is disabled ?
I tried blending, but then the portions of other controls underneath 
the

graphic become visible...


A thought:

You might try overlaying the group or the graphic objects with another
graphic rectangle, set the blending to make it translucent, and then
toggle the visibility of said rectangular graphic.


yes, I thought of that; but since I have 20 groups on my card, it will
be simpler to add a line of script and change the graphic color when
toggling between enable & disable.
I was just wondering if there was a secret trick to disable the graphic
and make it look disabled like the rest of the group.

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


disabling a group

2021-01-13 Thread jbv via use-livecode

Hi list,
I have a group that contains various controls, including graphic 
objects.

When I disable the group, the colors of every object becomes lighter,
except for graphics whose colors remain the same.
What is the best way to make colors of graphics become lighter when the
group is disabled ?
I tried blending, but then the portions of other controls underneath the
graphic become visible...

Thanks in advance.

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


Basic mobile app question

2020-12-23 Thread jbv via use-livecode

Hi list,
A friend of mine has a website with a responsive version, and would like 
to have a mobile app as well.
Of course, he has next to zero budget, so I was wondering if it could be 
possible to use Livecode to
make a basic app that would create a browser object at startup, and the 
url of the website would

load into it...
Of course this is technically feasible, but is it an acceptable solution 
?

And last but not least, would it be accepted on the Appstore ?

Thanks in advance.
jbv

___
use-livecode mailing list
use-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: play command and wav file

2020-12-19 Thread jbv via use-livecode

Martin, Richmond, thank you both for your answers.
My problem is that the data of the wav file is already
in memory, because I open the wav file, read it, store
it in a variable, and apply various processes to the content.
And finally what I want to do is play the wav data after
processing, without having to store it as a file and then
use "play".
Ideally it would be nice to be able to use a variable as
an audioclip...

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


play command and wav file

2020-12-19 Thread jbv via use-livecode

Hi list,
Is there a way to play a wav file that is already loaded
in memory as binary data ?
The doc only says that "play" takes a file name as parameter...

Thank you in advance.
jbv

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

2020-12-07 Thread jbv via use-livecode

Never mind folks,

I found another (and easier solution) : I'm using bytetonum() to
convert the binary data from the file, and then, after processing,
numtobyte() to write the data as binary in the file.

Le 2020-12-07 04:53, jbv via use-livecode a écrit :

Hi list,

I have a script that opens a binary file (actually a .wav) file,
converts binary data to hex, do some processing on parts of the
data, and then saves the result as a new .wav file.
I managed to convert the binary data to hex and do the processing,
but now I'm stuck trying to convert hex back to binary using the
binaryencode function, to get a playable .wav file.

Here's the code that works so far :
   put "/sounds/my.wav" into path
   open file path for binary read
   read from file path at 45 for 200
   close file path
   put it into mybin

   put "" into tHex
   put 1 into tCount

   repeat until tCount=155
  put byte tCount of mybin into theByte

  put binarydecode("H*", theByte, tHex) into theNumConversions
  put tHex after theHex
  add 1 to tCount
   end repeat

After processing the content of theHex, I need to save it as a .wav 
file.
I am aware of all the requirements for a .wav header, my only problem 
is

to convert the whole thing to binary before saving.

Can someone help ?
Thanks in advance.

jbv

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


binaryencode question

2020-12-07 Thread jbv via use-livecode

Hi list,

I have a script that opens a binary file (actually a .wav) file,
converts binary data to hex, do some processing on parts of the
data, and then saves the result as a new .wav file.
I managed to convert the binary data to hex and do the processing,
but now I'm stuck trying to convert hex back to binary using the
binaryencode function, to get a playable .wav file.

Here's the code that works so far :
   put "/sounds/my.wav" into path
   open file path for binary read
   read from file path at 45 for 200
   close file path
   put it into mybin

   put "" into tHex
   put 1 into tCount

   repeat until tCount=155
  put byte tCount of mybin into theByte

  put binarydecode("H*", theByte, tHex) into theNumConversions
  put tHex after theHex
  add 1 to tCount
   end repeat

After processing the content of theHex, I need to save it as a .wav 
file.

I am aware of all the requirements for a .wav header, my only problem is
to convert the whole thing to binary before saving.

Can someone help ?
Thanks in advance.

jbv

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


Question about Windows 10 for Surface

2020-10-20 Thread jbv via use-livecode

Hi list,
I have a request from a potential client for an app that should run on 
iOS, Android and Microsoft devices.

AFAIK, Microsoft has dropped Windows 10 Phone in 2019.
But what about devices like Surface tablets that run Windows 10 ? Can a 
LC app compiled for windows run on

these devices ?
Thanks in advance.
jbv

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


[OT] experience with open source marketplace software anyone ?

2020-07-24 Thread jbv via use-livecode

Hi list,
Does anyone have any experience with open source marketplace software ?
I don't mean regular ecommerce website, but Open Source Multi-Vendor
marketplace software.
There are several solutions available and would appreciate if anyone
would like to share some experience on this matter.
Please contact me off-list.

Thanks in advance.
jbv

___
use-livecode mailing list
use-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 equivalent of php utf8_encode and utf8_decode ?

2020-04-13 Thread jbv via use-livecode

Hello list,
Suddenly I'm having a blank : what is the LC equivalent
of utf8_encode and utf8_decode in php for a string ?

Thanks in advance
jbv

___
use-livecode mailing list
use-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: Displaying & caching PDF files

2020-02-05 Thread jbv via use-livecode

Thanks for your answer.
I have just checked the doc, and unless I'm wrong, the PDF Widget is
available with the business license only...

Le 2020-02-04 15:37, Ralph DiMola via use-livecode a écrit :
Android will not natively display a pdf in the browser. The PDF Widget 
is

supported on all platforms. You can watch for a pdf in the browser and
download and cache it to the device then display it in the PDF Widget.



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


Displaying & caching PDF files

2020-02-04 Thread jbv via use-livecode

Hello list,

I have a request from a client for a mobile app that would display pdf 
files.

I know I can use a browser object to display those files, I've done that
numerous times.
My question is more about caching the files, and displaying them again
later without having to download them each time.
I assume that the files are stored in the default browser cache of the
mobile device, but if the same file is being displayed again, does the
browser object look up the default browser cache, or do I have to
implement some sort of cache function in the LC app itself ?

Thanks in advance.
jbv

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


Re: Raspberry Pi 4

2020-01-23 Thread jbv via use-livecode

Hi,

Did they fix the USB-C issue they had last summer on the first release 
of the Pi 4 ?


Best,

Le 2020-01-22 14:34, Kevin via use-livecode a écrit :

I’ve had my push notification server running on a Pi 3 for some years.
Just bought a Pi 4, 4gb, will try installing live code on that.

Always found the biggest overhead on the Pi is running the monitor.
Seems quicker via VNC




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


Realtime sound generation in LC

2019-06-06 Thread jbv via use-livecode

Hi list,

I was wondering if it could be possible to generate sound
in real time with LC. I don't mean to play a sound file,
but to put together samples at a certain sample rate
(like 44.1 or 45 KHz) and output them, while changing
some parameters like signal frequency or amplitude.

I am currently exploring the generation of wav files
with LC for play back, but am much more interested in
real time generation & manipulation.
I'm sure other environments could be more suitable for
such a project, but the fact that LC is great for building
sophisticated interfaces makes me feel like trying...
Probably an external is the way to go...

Any ideas ?
Thanks in advance.
jbv

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

2019-05-22 Thread jbv via use-livecode

Hi list,
Is there a way to handle IPTV within LC, via built-in functions or an 
external ?
I've search this list and the forum and have found next to nothing, 
expect a post
from 2012 on the forum about the possibility to use vlc code in an 
external, but

that finally looked like a dead end...

Thanks in advance.
jbv

___
use-livecode mailing list
use-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 and live video streaming

2019-05-20 Thread jbv via use-livecode

I don't think I made myself clear : the links I mentioned are actually
a TVIP m3u list, that's why it's different for each ISP.

Le 2019-05-20 14:40, JJS via use-livecode a écrit :

well best thing to do is, create a simple app with a browser widget
and put the url that you have from one of the isp's into the URL input
of the widget settings

then see what it does, if the computer where you test on has access on
their (intra) network then probably it could work

Is the link you talk about reachable outside their network or only 
internal?


How does the link look like?

Op 20-5-2019 om 20:33 schreef jbv via use-livecode:

yes, that was my first guess, but unfortunately the live tv stream my
client wants to display isn't available on youtube, only via a 
specific

link (different for each ISP) and unless I'm wrong, can only be viewed
with apps such as vlc, at least according to my google searches...

Le 2019-05-20 14:16, JJS via use-livecode a écrit :

But you could create an app with the Browser Widget and set the URL 
of

the browser to the MPEG file or the streaming URL

I use the widget to stream some YouTube videos after selection, but
one at a time



___
use-livecode mailing list
use-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: LC and live video streaming

2019-05-20 Thread jbv via use-livecode

yes, that was my first guess, but unfortunately the live tv stream my
client wants to display isn't available on youtube, only via a specific
link (different for each ISP) and unless I'm wrong, can only be viewed
with apps such as vlc, at least according to my google searches...

Le 2019-05-20 14:16, JJS via use-livecode a écrit :


But you could create an app with the Browser Widget and set the URL of
the browser to the MPEG file or the streaming URL

I use the widget to stream some YouTube videos after selection, but
one at a time



___
use-livecode mailing list
use-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 and live video streaming

2019-05-20 Thread jbv via use-livecode

Thanks for the reply.
Actually the difference here would be that the app would have to
switch from an online tv stream to a local AVI or MPEG file and
then back to the online tv stream...


Le 2019-05-20 13:36, JJS via use-livecode a écrit :

We did something similair with a simple HDMI-stick on which Android
was running, with an auto-startup and then it run several AVI files
from internal memory.

I don't remember if a list can be made using VLC, but probably it
could. Very cheap and simple to do. No need for LC, but if you want to
have more fun maybe write a nice app for it

Op 20-5-2019 om 18:03 schreef jbv via use-livecode:

Hi list,

I have a request from a client who needs an app that would play
a streaming tv continuously in the lobby of his company, and the
tv stream should be interrupted from time to time to display a
short corporate video, and then back to the video stream.

I am wondering if this could be done with LC, may be using VLC
as player...

Any suggestion ?
Thanks in advance.

jbv

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

LC and live video streaming

2019-05-20 Thread jbv via use-livecode

Hi list,

I have a request from a client who needs an app that would play
a streaming tv continuously in the lobby of his company, and the
tv stream should be interrupted from time to time to display a
short corporate video, and then back to the video stream.

I am wondering if this could be done with LC, may be using VLC
as player...

Any suggestion ?
Thanks in advance.

jbv

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


Question about auto-save

2019-05-01 Thread jbv via use-livecode

Hi list,
I am working on a web app (with LC server-side) in which end users
will be able to add & manipulate various svg elements to complete
custom designs.
My client asked me to implement some kind of auto-save function so
that users can automatically retrieve the last step of their design
each time they log on to the site. I am planing to use cgi requests
to record the svg tags & attributes on the server.
I was wondering : what is the best way to handle this :
- send a cgi request every time the user changes something
- send a cgi request every minute (for instance) and record the
content of the design at that specific time
- send a cgi request only when users leave the page or the site,
and record only the last step of the design during a specific session...

Thanks in advance for any useful tip & advice.
Best,
jbv

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


Livecode & prestashop

2019-04-20 Thread jbv via use-livecode

Hello list,
Is there any connexion between LC and e-commerce frameworks
like Prestashop ? I thought I've seen a thread about something
like that a couple of years ago on this very list but can't
retrieve it, and searching the archives is not an easy task...
Long story short, a friend of mine is working on a website
with prestashop, and needs a specific module. I was wondering
if I could build it with LC, export it as html5 and use it as
a prestashop plug-in...
Any advice ?

Thanks in advance.
jbv

___
use-livecode mailing list
use-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: goofy question about "repeat for each"

2019-03-25 Thread jbv via use-livecode

Hi again,

I finally solved the problem by modifying the loop
as follows :
repeat for each line j in cc
  get item 1 of j
  add 1 to it
  put return & it & "," & item 2 of j after var2
end repeat

But I still don't understand why the previous version
led to unexpected values...

Le 2019-03-25 15:31, jbv via use-livecode a écrit :

Hi list,

I have a list of values such as :
  540,20
  542,22...
one per line in a variable named cc.

Now I'm running the following loop :
   repeat for each line j in cc
 add 1 to item 1 of j
 put return & j after var2
   end repeat

goofy question : does each iteration of the loop
change the values of each line of cc, or does it
only change the value of j ?

I'm asking because it seems that I am facing some
weird and unexpected modifications in the variable
with a huge number of lines...

Thanks in advance.
jbv

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

goofy question about "repeat for each"

2019-03-25 Thread jbv via use-livecode

Hi list,

I have a list of values such as :
  540,20
  542,22...
one per line in a variable named cc.

Now I'm running the following loop :
   repeat for each line j in cc
 add 1 to item 1 of j
 put return & j after var2
   end repeat

goofy question : does each iteration of the loop
change the values of each line of cc, or does it
only change the value of j ?

I'm asking because it seems that I am facing some
weird and unexpected modifications in the variable
with a huge number of lines...

Thanks in advance.
jbv

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


Checking xml string

2019-01-09 Thread jbv via use-livecode
Hi list,
Does anyone has a function that would remove "ghost tags" from
an xml string, for instance a  tag when there's no 
tag before ? More generally, a script that checks the consistency
of an xml string and points errors would do perhaps ?
Thanks in advance.
jbv


___
use-livecode mailing list
use-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: semi-OT : mySQL oddities

2018-11-28 Thread jbv via use-livecode
Hi list,
This is a quick follow-up to my post from a couple of months ago.
After weeks of tweeking and testing, I am now 99.99% sure there's
an issue with auto-increment in the latest versions of mySQL, at
least with large tables with several indexes and complex scripts
that insert and update several rows in one pass.

Long story short, I finally removed auto-increment on a primary
key (integer) and added the following lines to my script (pseudo code) :
  select MAX(id) from myTable limit 1
  put it into tMaxID
  add 1 to tMaxID

I've been watching & checking the table content for several weeks,
and random duplicates / corruption of rows have totally disappeared.
I hope I found the solution, but will keep checking.
I also thing I will bypass auto-increment in future projects.

All the best,
jbv

On Tue, October 9, 2018 10:13 pm, jbv via use-livecode wrote:
> Hi list,
> I'm not 100% sure yet, but I think I'm experiencing some problems with
> mySQL 5.6.41 and LC server, the most annoying one being random duplicate
> entries in some tables, especially the biggest ones, for instance 71 Mb
> and nearly 14 entries. I have searched the web for more info and have
> found a few posts on stackoverflow and some other blogs mentioning
> problems with autoincrement, but the symptoms are slightly different... I
> was wondering if anyone had experienced similar issues ?
>
> Thanks in advance.
> Best,
> jbv
>
>
> ___
> use-livecode mailing list use-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


[solved] Re: https, 301 redirection and get URL

2018-11-11 Thread jbv via use-livecode
Hello again,
As a follow-up to this thread : if anyone's interested, the problem
was that the permanent redirection was set to port 80; after removing
that line from the htaccess file, everything started working like a charm.

Best.

On Sun, November 11, 2018 10:17 am, jbv via use-livecode wrote:
> Hi list,
> I am updating an old standalone for a client of mine who has
> just migrated his domain to HTTPS. There is also a permanent redirection
> 301 from http to https in the htaccess file.
>
>
> The standalone uses numerous commands in the form
> get URL "http://www.mydomain.com/irev/myScript.lc; which I am updating to
> get URL "https://www.mydomain.com/irev/myScript.lc;
>
> The problem is that both forms return empty when the 301
> redirection is on; otoh everything works fine when the 301 redirection is
> removed from the htaccess file.
>
> I haven't found any post nor any relevant tutorial on
> the LC list or forum. So my question is : how can I update all those "get
> URL" commands with a 301 redirection
> in htaccess ?
>
> Thanks in advance.
> jbv
>
>
> ___
> use-livecode mailing list use-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


https, 301 redirection and get URL

2018-11-11 Thread jbv via use-livecode
Hi list,
I am updating an old standalone for a client of mine who has
just migrated his domain to HTTPS. There is also a permanent
redirection 301 from http to https in the htaccess file.

The standalone uses numerous commands in the form
  get URL "http://www.mydomain.com/irev/myScript.lc;
which I am updating to
  get URL "https://www.mydomain.com/irev/myScript.lc;

The problem is that both forms return empty when the 301
redirection is on; otoh everything works fine when
the 301 redirection is removed from the htaccess file.

I haven't found any post nor any relevant tutorial on
the LC list or forum. So my question is : how can I
update all those "get URL" commands with a 301 redirection
in htaccess ?

Thanks in advance.
jbv


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


semi-OT : mySQL oddities

2018-10-09 Thread jbv via use-livecode
Hi list,
I'm not 100% sure yet, but I think I'm experiencing some problems with
mySQL 5.6.41 and LC server, the most annoying one being random duplicate
entries in some tables, especially the biggest ones, for instance 71 Mb
and nearly 14 entries.
I have searched the web for more info and have found a few posts on
stackoverflow and some other blogs mentioning problems with autoincrement,
but the symptoms are slightly different...
I was wondering if anyone had experienced similar issues ?

Thanks in advance.
Best,
jbv


___
use-livecode mailing list
use-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: On Performance of Array Access

2018-08-31 Thread jbv via use-livecode
Mark,

Thank you so much for following up on this thread.

Once something "suitable for including in a 9.0.x maintenance release"
is available, could you please include it to LC server, and especially
the version of LC9 server installed on on-rev sage server ?
I'm in the process of improving for a client the speed a server-side
script that makes heavy use of arrays, and was originally written with
LC 4.- and then improved with LC 6.- .
Thanks in advance.

jbv





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

2018-08-22 Thread jbv via use-livecode
Brian,

Thanks for running all these tests.

On the same topic, I'd like to mention that I use "intersect" with
arrays a lot in some scripts (for complex requests it is sometimes
faster to load raw data from mySQL and process it with arrays),
and "intersect" is really fast in LC9...

On Tue, August 21, 2018 4:24 pm, Brian Milby via use-livecode wrote:
> I expanded my test stack and ran it on the versions I had available.
> Here's a couple of tests from each version:
>




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

2018-08-20 Thread jbv via use-livecode
I made a test with the same loops and the same data on LC 6.5.2
desktop Mac, and arrays run 20% faster than items...
On LC9 server I get opposite results : items are 2 times faster then arrays.

As said in my original post, AFAIR U have always used arrays instead
of items & lines because it has always been faster, even with
multidimensional
arrays...


On Mon, August 20, 2018 9:57 pm, Alex Tweedly via use-livecode wrote:
> Not really a huge surprise ... access to chunks such as 'item' and
> 'line' are (potentially) slow when you are searching relatively large
> strings. So the archetypal example
>
> repeat with i = 1 to N    get line i of tBigString
> end repeat
>
> can get slow if N is large, because of repeatedly scanning over large
> leading sub-strings to get to line 'i'.
>



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

Surprise...

2018-08-20 Thread jbv via use-livecode
Hi list,

I have the following script :

repeat with a = 1 to 34
 repeat with b = 1 to 10
  repeat with c = 1 to 11
   repeat with d = 1 to 10
repeat with e = 1 to 34
 --get item a of line 1 of tvar & tab & item b of line 2 of tvar & tab
& item c of line 3 of tvar & tab & item d of line 4 of tvar & tab &
item e of line 5 of tvar
 --get T[1][a] & tab & T[2][b] & tab & T[3][c] & tab & T[4][d] & tab &
T[5][e]
end repeat
   end repeat
  end repeat
 end repeat
end repeat

When I run these nested loops with the line "get item a of line 1 of
tvar...",
it is twice faster than with the line "get T[1][a]...".
This a surprise to me because I have used arrays for years to speed up
things, and AFAIK it takes forever to count items and lines at each repeat
iteration...
Or am I missing something ?
This is on LC9 server, on-rev account.

Best,
jbv


___
use-livecode mailing list
use-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: Intersect outputs different result in desktop and LC server

2018-08-09 Thread jbv via use-livecode
Hi Alex,
Thanks for the tip. I'm on sage too.
Is it me or is LC9 server much faster than previous versions ?

One more thing : you wrote :
"any file with extension .lc9 will use the latest stable release of LC9"
Does that mean that LC server will be updated every time a new stable
version is released ? And if yes, is it safe to fo into production with
.lc9 scripts ?

Best,

On Thu, August 9, 2018 1:02 pm, Alex Tweedly via use-livecode wrote:
> I sent a support request asking for it :-)
>
>
> AFAIK, at least on sage, it is installed systemwide - so any file with
> extension .lc9 will use the latest stable release of LC9 (this is a similar
> scheme to what HostM use).
>
> I suspect you can use .htaccess to ensure it is used for all .lc files,
> but I didn't do that; I kept all the old stuff unchanged, and use the .lc9
> extension in the two files I need it (they then load other .livecodescript
> libraries, and some other .lc files, so I got all my old functionality by
> renaming these two files, and redirecting a couple of URLs).
>
>
> -- Alex.
>
>
>
> On 09/08/2018 06:52, jbv via use-livecode wrote:
>
>> How do you run LC9 server on on-rev ?
>> Thanks.
>>
>>
>>
>> On Thu, August 9, 2018 1:40 am, Alex Tweedly via use-livecode wrote:
>>
>>> Oops - sent before I meant to ...
>>>
>>>
>>>
>>> With LC7 server on on-rev, I get
>>>
>>>
>>>
>>> 4141 5378 18699 28365 41200 50230 58901 62983 63416 65984 71574 73426
>>>  74288 112360 115826 121386 126039 141224
>>>
>>>
>>>
>>> while with LC9 server on on-rev I get
>>>
>>> 4141
>>>
>>>
>>>
>>> -- Alex.
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>> ___
>> use-livecode mailing list use-livecode@lists.runrev.com Please visit this
>> url to subscribe, unsubscribe and manage your subscription preferences:
>>  http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
> ___
> use-livecode mailing list use-livecode@lists.runrev.com Please visit this
> url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



___
use-livecode mailing list
use-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: Intersect outputs different result in desktop and LC server

2018-08-08 Thread jbv via use-livecode
How do you run LC9 server on on-rev ?
Thanks.


On Thu, August 9, 2018 1:40 am, Alex Tweedly via use-livecode wrote:
> Oops - sent before I meant to ...
>
>
> With LC7 server on on-rev, I get
>
>
> 4141 5378 18699 28365 41200 50230 58901 62983 63416 65984 71574 73426
> 74288 112360 115826 121386 126039 141224
>
>
> while with LC9 server on on-rev I get
>
> 4141
>
>
> -- Alex.
>
>
>
>




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


Intersect outputs different result in desktop and LC server

2018-08-08 Thread jbv via use-livecode
Hi list,
As the title says, I am getting different results when running the script
below with LC desktop and LC server (on-rev account)...
The result is fine on desktop, but flawed on server. What am I missing ?

Thanks in advance.
jbv

on mouseUp
   get "3622 4141 4288 5378 38090 8786 13439 16483 17329 18699 27799 28365
41200 35242 39109 41212 75320 43898 44702 47891 50227 50230 50232 50233
58901 58902 62983 63415 63416 65984 71574 73426 74288 85278 85775
101084 112360 113094 113355 115807 115826 116601 118017 121386 126039
131141 141224"
   repeat for each word w in it
  put 1 into Te[w]
   end repeat

   get "4141 3141 3184 3661 31910 40671 41657 48351 48490 55001 57269
65986 69706 73885 75741 80910 131210 82759 87543 88837 90394 92956
102158 102528 115929 116753 117446 128006 133712 140582"
   repeat for each word w in it
  put 1 into Ta[w]
   end repeat

   intersect Te with Ta
   put the keys of Te into tkeys
   sort lines of tkeys ascending numeric
   put tkeys
end mouseUp


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


Re: How to get the dimensions of an image with LC server ?

2018-06-23 Thread jbv via use-livecode
Hi Alex,
Indeed it works.
Thank you very much.

On Sat, June 23, 2018 7:08 pm, Alex Tweedly via use-livecode wrote:
> Short answer - just the same as with LC :-)
>
>
> It wasn't there in the initial versions of LC, but for quite a ong time
> now the standard image functions have worked. Here's a quick (tested - on
> on-rev/sage) demo with an image I happened to have:
>
> 
>
> import paint from file "images/ardenstur.jpg" put the name of the last
> image into t set the name of t to "Im1"
>
> put the name of img "Im1"  put the width of img "Im1" & cr
>
> and it works as you'd expect.
>
> Alex.
>
>
>
> On 23/06/2018 17:30, jbv via use-livecode wrote:
>
>> Hi list,
>> IS there a way to get the dimensions (width & height) of an img
>> (jpeg or png) with livecode server ? The image is located somewhere
>> on the same server.
>>
>> Thanks in advance,
>> jbv
>>
>>
>> ___
>> use-livecode mailing list use-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


How to get the dimensions of an image with LC server ?

2018-06-23 Thread jbv via use-livecode
Hi list,
IS there a way to get the dimensions (width & height) of an img
(jpeg or png) with livecode server ? The image is located somewhere
on the same server.

Thanks in advance,
jbv


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

2018-05-22 Thread jbv via use-livecode
Hello Heather,
Thanks for your reply.
I had already checked the Privacy Policy, and sorry for being so picky,
but it doesn't contain all the details required by the GDPR, especially
regarding procedures in case of security breach among other things.

Just curious : has any other list member located in the EU already worked
on this subject ?

Thanks.
jbv



On Tue, May 22, 2018 9:59 am, Heather Laine via use-livecode wrote:
> Please go here:
>
>
> https://livecode.com/hosting/support/
> <https://livecode.com/hosting/support/>
>
>
> You will find all the documentation relating to LiveCode hosting at the
> foot of this page.
>
> Regards,
>
>
> Heather
>
>
>
>> On 22 May 2018, at 07:34, jbv via use-livecode
>> <use-livecode@lists.runrev.com> wrote:
>>
>>
>> Hi list,
>> I have just emailed Livecode Hosting about the new General Data
>> Protection
>> Regulation (GDPR) effective in the EU starting May 25th 2018, asking if
>> they're planing to send to their customers all necessary documents
>> regarding hosting, backup and security for themselves and their
>> affiliates Cleverbridge and LiquidWeb.
>> Has anyone already got any details on this matter ?
>>
>>
>> Thanks in advance.
>> jbv
>>
>>
>> ___
>> use-livecode mailing list use-livecode@lists.runrev.com Please visit this
>> url to subscribe, unsubscribe and manage your subscription preferences:
>>  http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
> ___
> use-livecode mailing list use-livecode@lists.runrev.com Please visit this
> url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



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


Livecode Hosting and GDPR

2018-05-22 Thread jbv via use-livecode
Hi list,
I have just emailed Livecode Hosting about the new General Data Protection
Regulation (GDPR) effective in the EU starting May 25th 2018, asking if
they're planing to send to their customers all necessary documents
regarding hosting, backup and security for themselves and their affiliates
Cleverbridge and LiquidWeb.
Has anyone already got any details on this matter ?

Thanks in advance.
jbv


___
use-livecode mailing list
use-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 and Google Analytics?

2018-05-22 Thread jbv via use-livecode
Hi
Have you tried to include in your app a browser object that would
load web pages with the necessary GA js script ?
I know it's a brute-force strategy and that it would probably slow
down the app a bit, but I don't have any better solution so far...

Best,
jbv

On Tue, May 22, 2018 4:03 am, Jose Enrique Montero via use-livecode wrote:
> Hi Dan Friedman,
>
>
> Do you found a solution ?
>
>
> best regards.
>
> Jose
>
>
> 2018-02-15 14:37 GMT-04:00 Dan Friedman via use-livecode <
> use-livecode@lists.runrev.com>:
>
>
>> Greetings!
>>
>>
>> Is there a method to implement Google Analytics in a LiveCode Mobile
>> app? Client wants to see the analytic data.
>>
>>
>> -Dan
>>
>>
>> ___
>> use-livecode mailing list use-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: imagedata and alpha byte

2018-05-09 Thread jbv via use-livecode
On Wed, May 9, 2018 7:51 pm, Richmond Mathewson via use-livecode wrote:
> The inevitable question has to be why you are doing that in such a
> fiddly sort of way.
>
> Richmond.
>

It would be too long to explain, but in short some users of a client
app will modify pixels of images that will then be exported as PNG to
a server and then displayed in a website.
I have successfully modified the alpha channel of images with php for
years, and am just wondering why this doesn't work in LC...


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


imagedata and alpha byte

2018-05-09 Thread jbv via use-livecode
Hi list,
Still struggling with imagedata, I am trying to modify the transparency
of an image by manipulating pixel by pixel the alpha byte.
I tried with numToChar(0) and binaryEncode("B*","") but to no
avail...
OTOH manipulating the RVB channel works fine.

Any idea on how modify the alpha channel of the imagedata of a image,
and then exporting the image as PNG with the modified transparency ?

Thanks in advance.
jbv


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


export imagedata into a file ?

2018-05-08 Thread jbv via use-livecode
Hi list,
I have a script that starts as follows :

   put URL "binfile:/myFile.jpg" into tImageData
   put tImageData into image "Image_test"
   put the imagedata of image "Image_test" into tImageData
   -- tImageData processing

After tImageData is processed, I would like to export
its content directly into a file.
I tried :
   put tImageData into URL "binfile:/test.jpg"
but the file is considered corrupted and can't be opened.

I also tried :
   put tImageData into URL "binfile:/test.jpg" as JPEG
but it returns an error.

I know I can set the imagedata of an image to the content
of tImageData, and then use "export snapshot", but for some
reasons too long to explain, I would like to follow a different
path.
So, How can I export the binary content of tImageData to
a jpeg or png file that can be opened like any similar
file ?

Thanks in advance,
jbv



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

2018-03-07 Thread jbv via use-livecode
Mike,
Thanks for your help. Yes, I will contact on-rev support and I will
let you know how it goes.
Best.

On Tue, March 6, 2018 5:33 pm, Mike Bonner via use-livecode wrote:
> Well, it looks like fontconfig is installed in on-rev, but neither
> /home//.fonts or /home//.local/share/fonts are being updated
> automatically.  I tried to run fc-cache -f -v /home//.fonts and the
> font is indeed found, but I don't think I have all the required support
> directories, so there is no writable place to actually store the cache
> data. The command fails because of this.  If it were me, I'd contact
> on-rev and see if they could help set things up to actually look at a
> fonts directory in your account and add any fonts there.  All the software
> seems to be installed to do this, I just don't know enough about
> fontconfig to force it from the user side. (It should be possible, but
> again I don't know enough about fontconfig to know what to do yet)
>
> As for start using font file.. Yep, it fails every time with an error
> message that is just a bit lacking.  Getting on-rev/fontconfig set up to
> handle this for you sounds like the way to go.
>
> On Tue, Mar 6, 2018 at 7:41 AM, Mike Bonner <bonnm...@gmail.com> wrote:
>
>
>> Sure, i'll dig up a font file and try.
>>
>>
>> On Tue, Mar 6, 2018 at 7:37 AM, jbv via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>
>>> "start using font file.." is the first option that I tried, but
>>> unfortunately it returns "can't load font file"... The ttf file is on
>>> the server next to my script, and I have also tried with the full
>>> absolute path for that ttf file. Could you please make a test on your
>>> own on-rev account with any ttf file (different from the default fonts
>>> in fontnames) and let us know of it works ?
>>>
>>> Thanks in advance.
>>>
>>>
>>> On Tue, March 6, 2018 3:03 pm, Mike Bonner via use-livecode wrote:
>>>
>>>> My apologies.. Had a brain fritz, it should be "start using font
>>>> file.." load url would just load whatever url into cache and not
>>>> font it up.
>>>>
>>>> On Tue, Mar 6, 2018 at 1:07 AM, jbv via use-livecode <
>>>> use-livecode@lists.runrev.com> wrote:
>>>>
>>>>> When using
>>>>> load font file "nameofyourfont.ttf" the result contains Handler:
>>>>> can't find handler (file)
>>>>>
>>>>> It looks like "load" is accepted only in the form "load URL"...
>>>>>
>>>>>
>>>>>
>>>>> On Mon, March 5, 2018 9:28 pm, Mike Bonner via use-livecode
>>>>> wrote:
>>>>>
>>>>>
>>>>>> Hmm. Not sure what to do about loading a fontfile then.  Out of
>>>>>>  curiosity, what is the error?
>>>>>>
>>>>>> On Mon, Mar 5, 2018 at 11:39 AM, jbv via use-livecode <
>>>>>> use-livecode@lists.runrev.com> wrote:
>>>>>>
>>>>>>> Hi Mike,
>>>>>>> Thanks for your reply.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Yes, I managed to set the textfont of a btn or fld to one of
>>>>>>> the fonts available in the fontnames, but I still can't figure
>>>>>>> how to use any
>>>>> other
>>>>>>> ttf font... load font file "nameofyourfont.ttf" -> returns an
>>>>>>> error I
>>>>>>> tried load URL "nameofyourfont.ttf", it works, but then the
>>>>>>> textfont property isn't updated...
>>>>>>>
>>>>>>> On Mon, March 5, 2018 3:59 pm, Mike Bonner via use-livecode
>>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> With on-rev, I put up this script..
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> >>>>>>> create button "mybtn"
>>>>>>>>
>>>>>>>> repeat for each line tLIne in the fontnames -- will make 1
>>>>>>>> png per font
>>>>>>>>
>>>>>>>> set the label of btn "mybtn" to tLine set the textf

Re: LC server and fonts

2018-03-06 Thread jbv via use-livecode
"start using font file.." is the first option that I tried, but
unfortunately it returns "can't load font file"...
The ttf file is on the server next to my script, and I have also
tried with the full absolute path for that ttf file.
Could you please make a test on your own on-rev account with any
ttf file (different from the default fonts in fontnames) and let us
know of it works ?

Thanks in advance.

On Tue, March 6, 2018 3:03 pm, Mike Bonner via use-livecode wrote:
> My apologies.. Had a brain fritz, it should be "start using font file.."
> load url would just load whatever url into cache and not font it up.
>
> On Tue, Mar 6, 2018 at 1:07 AM, jbv via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> When using
>> load font file "nameofyourfont.ttf" the result contains Handler: can't
>> find handler (file)
>>
>> It looks like "load" is accepted only in the form "load URL"...
>>
>>
>> On Mon, March 5, 2018 9:28 pm, Mike Bonner via use-livecode wrote:
>>
>>> Hmm. Not sure what to do about loading a fontfile then.  Out of
>>> curiosity, what is the error?
>>>
>>> On Mon, Mar 5, 2018 at 11:39 AM, jbv via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>>
>>>> Hi Mike,
>>>> Thanks for your reply.
>>>>
>>>>
>>>>
>>>> Yes, I managed to set the textfont of a btn or fld to one of the
>>>> fonts available in the fontnames, but I still can't figure how to
>>>> use any
>> other
>>>> ttf font... load font file "nameofyourfont.ttf" -> returns an error
>>>> I
>>>> tried load URL "nameofyourfont.ttf", it works, but then the textfont
>>>>  property isn't updated...
>>>>
>>>> On Mon, March 5, 2018 3:59 pm, Mike Bonner via use-livecode wrote:
>>>>
>>>>
>>>>> With on-rev, I put up this script..
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> >>>> create button "mybtn"
>>>>>
>>>>> repeat for each line tLIne in the fontnames -- will make 1 png
>>>>> per font
>>>>>
>>>>> set the label of btn "mybtn" to tLine set the textfont of button
>>>>> "mybtn"
>>>>> to tLine set the width of button "mybtn" to the formattedwidth of
>>>>> button "mybtn" + 5
>>>>>
>>>>>
>>>>>
>>>>> export snapshot from button "mybtn" to file (tLine & ".png") as
>>>>> PNG
>>>>>
>>>>>
>>>>> put the textfont of button "mybtn" && ">>>> & quote & ">" & cr
>>>>> end repeat ?>
>>>>>
>>>>>
>>>>> And it works fine, with the exception of fonts with a - in the
>>>>> name. All
>>>>> of them are Hershey fonts, so not sure if its the font family that
>>>>> is broken, or the dashes causing the issue.
>>>>>
>>>>> If you have a ttf font file to use, you can probably put it on
>>>>> your server next to your script and: load font file
>>>>> "nameofyourfont.ttf"
>>>>> and
>>>> then
>>>>> set the textfont to "nameofyourfont" and it will likely work.
>>>>>
>>>>> To see my script in action, check here:
>>>>> http://guidezone.info/fonttest.lc
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Sun, Mar 4, 2018 at 8:21 AM, Warren Samples via use-livecode <
>>>>>  use-livecode@lists.runrev.com> wrote:
>>>>>
>>>>>> On 03/02/2018 04:14 AM, jbv via use-livecode wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hello list
>>>>>>> How can I load ttf font files with LC server, at least version
>>>>>>> 7.1
>>>>>>> available on my on-rev account ? Neither "revFontLoad" nor
>>>>>>> "start using
>>>>>>> font file" seem to work... And the list of available fonts
>>>>>>> returned by "the fontNames" is quite limited...
>>>>>>>
>>>>>&

Re: LC server and fonts

2018-03-06 Thread jbv via use-livecode
When using
  load font file "nameofyourfont.ttf"
the result contains
  Handler: can't find handler (file)

It looks like "load" is accepted only in the form "load URL"...

On Mon, March 5, 2018 9:28 pm, Mike Bonner via use-livecode wrote:
> Hmm. Not sure what to do about loading a fontfile then.  Out of
> curiosity, what is the error?
>
> On Mon, Mar 5, 2018 at 11:39 AM, jbv via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> Hi Mike,
>> Thanks for your reply.
>>
>>
>> Yes, I managed to set the textfont of a btn or fld to one of the fonts
>> available in the fontnames, but I still can't figure how to use any other
>> ttf font... load font file "nameofyourfont.ttf" -> returns an error I
>> tried load URL "nameofyourfont.ttf", it works, but then the textfont
>> property isn't updated...
>>
>> On Mon, March 5, 2018 3:59 pm, Mike Bonner via use-livecode wrote:
>>
>>> With on-rev, I put up this script..
>>>
>>>
>>>
>>> >> create button "mybtn"
>>>
>>> repeat for each line tLIne in the fontnames -- will make 1 png per
>>> font
>>>
>>> set the label of btn "mybtn" to tLine set the textfont of button
>>> "mybtn"
>>> to tLine set the width of button "mybtn" to the formattedwidth of
>>> button "mybtn" + 5
>>>
>>>
>>>
>>> export snapshot from button "mybtn" to file (tLine & ".png") as PNG
>>>
>>> put the textfont of button "mybtn" && ">> & quote & ">" & cr
>>> end repeat ?>
>>>
>>>
>>> And it works fine, with the exception of fonts with a - in the name.
>>> All
>>> of them are Hershey fonts, so not sure if its the font family that is
>>> broken, or the dashes causing the issue.
>>>
>>> If you have a ttf font file to use, you can probably put it on your
>>> server next to your script and: load font file "nameofyourfont.ttf"
>>> and
>> then
>>> set the textfont to "nameofyourfont" and it will likely work.
>>>
>>> To see my script in action, check here:
>>> http://guidezone.info/fonttest.lc
>>>
>>>
>>>
>>> On Sun, Mar 4, 2018 at 8:21 AM, Warren Samples via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>>
>>>> On 03/02/2018 04:14 AM, jbv via use-livecode wrote:
>>>>
>>>>
>>>>
>>>>> Hello list
>>>>> How can I load ttf font files with LC server, at least version 7.1
>>>>>  available on my on-rev account ? Neither "revFontLoad" nor
>>>>> "start using
>>>>> font file" seem to work... And the list of available fonts
>>>>> returned by "the fontNames" is quite
>>>>> limited...
>>>>>
>>>>> Thanks in advance.
>>>>> jbv
>>>>>
>>>>>
>>>>>
>>>> Does on-rev run on Linux? If you create a directory called '.fonts'
>>>>  under your user name and install the fonts you want to use in your
>>>>  images in that directory, LiveCode will find them.
>>>>
>>>> A quick test shows this to be true using LC Server 8.1.4, but you
>>>> may have to do some experimenting to get them working in a script
>>>> accessed through your web server. Executing a script to show the
>>>> fontnames works from the command line but without having done any
>>>> real investigating, I have to admit it's not working when accessed
>>>> through my server. This isn't an on-rev nor an Apache server so
>>>> ymmv. If you decide to go the standalone route, you should be able
>>>> to install your fonts this way to use them in the standalone.
>>>>
>>>> Good luck!
>>>>
>>>>
>>>>
>>>> Warren
>>>>
>>>>
>>>>
>>>>
>>>> ___
>>>> use-livecode mailing list use-livecode@lists.runrev.com Please visit
>>>>
>> this
>>>> url to subscribe, unsubscribe and manage your subscription
>>>> preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>>>
>>>>
>>> ___
>>> use-livecode mailing list use-livecode@lists.runrev.com Please visit
>> this
>>> url to subscribe, unsubscribe and manage your subscription
>>> preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>>
>>>
>>
>>
>>
>> ___
>> use-livecode mailing list use-livecode@lists.runrev.com Please visit this
>> url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
> ___
> use-livecode mailing list use-livecode@lists.runrev.com Please visit this
> url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



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

2018-03-05 Thread jbv via use-livecode
Hi Mike,
Thanks for your reply.

Yes, I managed to set the textfont of a btn or fld to one of the fonts
available in the fontnames, but I still can't figure how to use any
other ttf font...
load font file "nameofyourfont.ttf" -> returns an error
I tried load URL "nameofyourfont.ttf", it works, but then the textfont
property isn't updated...

On Mon, March 5, 2018 3:59 pm, Mike Bonner via use-livecode wrote:
> With on-rev, I put up this script..
>
>
>  create button "mybtn"
>
> repeat for each line tLIne in the fontnames -- will make 1 png per font
>
> set the label of btn "mybtn" to tLine set the textfont of button "mybtn"
> to tLine set the width of button "mybtn" to the formattedwidth of button
> "mybtn" + 5
>
>
> export snapshot from button "mybtn" to file (tLine & ".png") as PNG
>
> put the textfont of button "mybtn" && " & quote & ">" & cr
> end repeat ?>
>
>
> And it works fine, with the exception of fonts with a - in the name.  All
>  of them are Hershey fonts, so not sure if its the font family that is
> broken, or the dashes causing the issue.
>
> If you have a ttf font file to use, you can probably put it on your
> server next to your script and: load font file "nameofyourfont.ttf" and
then
> set the textfont to "nameofyourfont" and it will likely work.
>
> To see my script in action, check here:
> http://guidezone.info/fonttest.lc
>
>
> On Sun, Mar 4, 2018 at 8:21 AM, Warren Samples via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> On 03/02/2018 04:14 AM, jbv via use-livecode wrote:
>>
>>
>>> Hello list
>>> How can I load ttf font files with LC server, at least version 7.1
>>> available on my on-rev account ? Neither "revFontLoad" nor "start using
>>> font file" seem to work... And the list of available fonts returned by
>>> "the fontNames" is quite
>>> limited...
>>>
>>> Thanks in advance.
>>> jbv
>>>
>>>
>>>
>> Does on-rev run on Linux? If you create a directory called '.fonts'
>> under your user name and install the fonts you want to use in your
>> images in that directory, LiveCode will find them.
>>
>> A quick test shows this to be true using LC Server 8.1.4, but you may
>> have to do some experimenting to get them working in a script accessed
>> through your web server. Executing a script to show the fontnames works
>> from the command line but without having done any real investigating, I
>> have to admit it's not working when accessed through my server. This
>> isn't an on-rev nor an Apache server so ymmv. If you decide to go the
>> standalone route, you should be able to install your fonts this way to
>> use them in the standalone.
>>
>> Good luck!
>>
>>
>> Warren
>>
>>
>>
>> ___
>> use-livecode mailing list use-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: LC server and fonts

2018-03-03 Thread jbv via use-livecode
On Sat, March 3, 2018 5:29 pm, Tom Glod via use-livecode wrote:
> That would work perfectly in desktopbut on server.. its different
>  for some reason.
>
> You are displaying field and exporting from a browser window correct?
>
>

Actually no : I want to layout text, images, and graphics
server-side, in the same way as what can be done with php
librairies such as gd2 or image magik.



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

2018-03-03 Thread jbv via use-livecode
Hello
Thanks for the reply, but that's not what I need.
For instance, here's what I want to do :
   create field
   put "my text" into fld 1
   set the textfont of fld 1 to "myfont.ttf'
   export snapshot from fld 1 to file "File1.png" as PNG
Therefore I need to "load" ttf fonts somehow.

Best
jbv

On Sat, March 3, 2018 4:10 pm, Tom Glod via use-livecode wrote:
> LC server generates html code to display text. so you need to use
> inline CSS, external CSS to generate the text you want using HTML
>
> On Fri, Mar 2, 2018 at 5:14 AM, jbv via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> Hello list
>> How can I load ttf font files with LC server, at least version 7.1
>> available on my on-rev account ? Neither "revFontLoad" nor "start using
>> font file" seem to work... And the list of available fonts returned by
>> "the fontNames" is quite
>> limited...
>>
>> Thanks in advance.
>> jbv
>>
>>
>> ___
>> use-livecode mailing list use-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


LC server and fonts

2018-03-02 Thread jbv via use-livecode
Hello list
How can I load ttf font files with LC server, at least version 7.1
available on my on-rev account ?
Neither "revFontLoad" nor "start using font file" seem to work...
And the list of available fonts returned by "the fontNames" is quite
limited...

Thanks in advance.
jbv


___
use-livecode mailing list
use-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: Another server question (mixing node.js and LC)

2018-03-02 Thread jbv via use-livecode
Indeed, on sage the engine version is 7.1
I did a few quick tests last evening and things like "create btn"
or "export snapshot" work. I need to do more tests, but so far it's
a nice surprise.

jbv


On Thu, March 1, 2018 11:33 pm, Alex Tweedly via use-livecode wrote:
> On 01/03/2018 18:48, Richard Gaskin via use-livecode wrote:
>
>
>> jbv wrote:
>>
>>> And is this feature already available on the LC version of on-rev
>>> accounts ?
>>
>> Hard to say. I have an on-rev account, but haven't set it up.  I would
>> imagine that the mother ship is using the latest Stable build, no?
>>
> Yeah, right :-(
> The default on on-rev (at least, on sage) is 7.1 !!
>
>
> You can, I believe, request any particular version to be enabled
> per-domain. Or you can specify a specific version (but I couldn't find a
> way to predict which versions might be available).
>
> Or, my choice, just give up on on-rev and use hostM (uses latest stable
> release by default, and gives you a simple way to specify which major
> release you would prefer to use), or Dreamhost (can't remember how they
> did it, but I remember it worked OK).
>
> -- Alex.
>
>
> ___
> use-livecode mailing list use-livecode@lists.runrev.com Please visit this
> url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



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

Re: Another server question (mixing node.js and LC)

2018-03-01 Thread jbv via use-livecode
On Thu, March 1, 2018 5:38 pm, Richard Gaskin via use-livecode wrote:
> It's nice that we now have
> graphics capabilities in Server,

Is there any doc on this somewhere ?
And is this feature already available on the LC version of on-rev accounts ?

Thanks,
jbv



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


Re: Question about the result

2018-02-25 Thread jbv via use-livecode
On Sun, February 25, 2018 5:36 pm, Mike Bonner via use-livecode wrote:
> Ah, well the only useful part of my answer then would regard the first
> issue. The result remaining empty was the correct response because the
> base url was valid, so the command didn't fail to connect to the url, and
> no 404 type or other type errors were returned as part of the headers.
>

Actually, when I wrote "never went through", that's exactly what happened :
the request never went through, the server never received that request and
therefore never returned anything. And even more surprising, the line
   put URL ("http://mydomain.com/index.php?; & it) into myVar
didn't block the execution of the script and the following lines were
executed,
and myVar was empty.

That's the reason why I was surprised to see that the result was empty as
well;
I would expect something like "data corrupted" or "impossible to send
request"...
And also to have the script blocked by that line...



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


Re: Question about the result

2018-02-25 Thread jbv via use-livecode
Mike
Thanks for your reply.
Actually, in the 2 cases I mentioned, I was able to find the origin of the
problem.
The only point I was trying to make is that each time the result was of no
help since it remained empty.

On Sun, February 25, 2018 3:48 pm, Mike Bonner via use-livecode wrote:
> In the first case, I would check all 3 locations.. Since i'm assuming the
>  first part of the url (yourdomain.com/index.php?) is correct, the put
> URL
> is most likely succeeding in connecting to the url, so you would need to
> look at the contents of myVar to see what if anything was actually
> returned.  In a case where the url is actually able to be hit, 'the
> result' will be empty, but the value returned from the server may be
> invalid data. It still wouldn't hurt to look at "it" also, IIRC sometimes
> useful info will appear there. (though in this case, my guess is that
> garbled info is in myVar)  Of course, if the url is invalid, then the
> result should tell you so.
>
> As for the second.. If I test from the message box, revzipopenarchive
> seems to do pretty much.. um.. Nothing.  Doesn't open an archive, doesn't
> return an error message.. Nothing in it, or the result.. Weird.  So I put
> code in a button and things behaved as expected. (when specifying a path
> with no permissions, the result told me so.  Same with an invalid path.
> (this is
> on 9 dp 11)
>
> No clue why it won't work from the message box, or if its related to what
>  happened on your end.
>
> On Sun, Feb 25, 2018 at 6:50 AM, jbv via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> Hi list
>>
>>
>> According to LC dictionary, the result "Returns the status of the last
>> command that was executed". But I had 2 unexpected experiences on my
>> on-rev account recently : 1- a line such as
>> put URL ("http://mydomain.com/index.php?; & it) into myVar never went
>> through (because it was corrupted : contained some extra characters such
>> as ascii 10), however the result remained empty.
>>
>> 2- when trying to create a zip archive
>> revZipOpenArchive "home/myaccount/public_html/dir1/dir2/dir3", "write"
>> the name of directory "dir2" had been changed and therefore "dir3"
>> could not be found; however the result remained empty.
>>
>> I know that in the 2nd case I could use the sysError function, but
>> according to the doc, the result shouldn't be empty anyway... So my
>> question : am I expecting too much from the result, like containing some
>> useful error message every time something doesn't work as expected ?
>>
>> Thanks in advance.
>> jbv
>>
>>
>> ___
>> use-livecode mailing list use-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


Question about the result

2018-02-25 Thread jbv via use-livecode
Hi list

According to LC dictionary, the result "Returns the status of the last
command that was executed". But I had 2 unexpected experiences on my
on-rev account recently :
1- a line such as
   put URL ("http://mydomain.com/index.php?; & it) into myVar
never went through (because it was corrupted : contained some extra
characters such as ascii 10), however the result remained empty.

2- when trying to create a zip archive
   revZipOpenArchive "home/myaccount/public_html/dir1/dir2/dir3", "write"
the name of directory "dir2" had been changed and therefore "dir3" could
not be found; however the result remained empty.

I know that in the 2nd case I could use the sysError function, but
according to the doc, the result shouldn't be empty anyway...
So my question : am I expecting too much from the result, like containing
some useful error message every time something doesn't work as expected ?

Thanks in advance.
jbv


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


Re: get URL problem on on-rev account

2018-01-25 Thread jbv via use-livecode
On Thu, January 25, 2018 9:28 pm, Mark Waddingham via use-livecode wrote:
> Try checking 'the result' after each get URL line and see if it gives an
> error indication - that might help work out what the problem is.
>

I did that, but the result is always empty; both requests just don't go
through...

jbv


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


get URL problem on on-rev account

2018-01-25 Thread jbv via use-livecode
Hi list,
I have a problem on my on-rev account for which I am awaiting an answer
from the support; but since I haven't got it yet, I am asking this list.
In an LC script I have 3 successive requests in the form :

get URL "http://www.mydomain.fr/irev/myscript.lc?0_4;

get URL ("http://www.mydomain.fr/irev/myscript.lc?0_1_; & it)

get URL "http://www.mydomain.fr/irev/myscript.lc?0_0;

The domain is the same as the one running the main script containing these
requests. This script has been running perfectly for years. But suddenly,
a few days ago, the second and third requests started to returned empty.
The first one returns the expected result though. The rest of the script
doesn't crash, but the results are flawn because some data is obviously
missing. I checked the logs of the server, but the 2nd and 3rd requests
don't appear in the logs, as if they were never sent.
On the other hand, when I send each request from a browser, it works fine
and returns a consistent result.
I tried to replace the second request in the same script with :
get URL "http://www.mydomain.fr;
and it works fine and returns the html code of the home page.

Last but not least, I have the same scripts running on the same server,
but in another account and with a different domain, and everything's ok.

Needless to say I'm puzzled... Whet could be the problem, and what should
I look at ?

Thanks in advance,
jbv


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


PHP vs LC server + 504 Gateway Timeout

2018-01-24 Thread jbv via use-livecode
Hi list

On my on-rev account I have a LC script that calls a php script via the
shell, and the php dumps the content of a mySQL db. Then another LC script
(triggered later by another cgi request) builds a zip archive (using
revzip) of the dump + a few small files.
This scripts have been running for years without problem, even if the size
of the db dump was constantly growing.
Then suddenly a couple of days ago, the 2nd script (building the zip
archive) started returning a "504 gateway timeout" error.

As a solution, I modified the 1st script (php) to dump & gzip the db
content in one single pass. And to my surprise, this didn't return any
error, but is also twice faster than the 2nd LC script that was only
zipping the content of the dump.
This was a surprise because I thought that dumping + zipping would be a
heavier task than zipping only, and would take more time...

Any rational explanation for that ?

Thanks in advance
jbv


___
use-livecode mailing list
use-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: Server-side xml validator anyone ?

2018-01-13 Thread jbv via use-livecode
On Sat, January 13, 2018 2:08 pm, Mark via use-livecode wrote:
> If your XML is UTF8-enconded and your UTF8 data is correct, it will
> work. Your probably isn't invalid XML but either a problem with the
> encoding of the entire file or a particular string.
>
> The best way to validate XML on your server is to install a little
> command line utility and use the shell function.
>
>

Thanks for your reply.
Yes, that's exactly what I'm doing : I'm using a small php script
I found on the web; but as the xml can be quite large, I need to
use temporary files, and things get a bit slow at times.
That's why I was hoping for a 100% LC solution.

Best.


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


Server-side xml validator anyone ?

2018-01-12 Thread jbv via use-livecode
Hi list,
I have several server-side LC scripts that transform text and data
uploaded by end users on web pages into xml to be stored in a database and
used later in other web pages or apps.
The problem is, despite all the correction scripts I have added, that
sometimes the uploaded content corrupts the xml structure. This happens
for instance when some weird UTF-8 text is uploaded.
Is there a ready-to-use piece of code that would check the conformity of
some xml data that I could include in my LC scripts ?

Thanks in advance,
jbv


___
use-livecode mailing list
use-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: The coming of SVG

2017-11-10 Thread jbv via use-livecode
On Fri, November 10, 2017 2:31 pm, David Bovill via use-livecode wrote:
> Mark one of the most important applications of SVG / canvas object
> implementation is the ability to create rich interactive graphics - not
> simply imagery.

Tools for animation of the svg graphics would be great too.
SMIL is a good example, although it's not supported on every platform.

jbv


___
use-livecode mailing list
use-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: Completely OT - flat earth

2017-08-22 Thread jbv via use-livecode
On Mon, August 21, 2017 10:17 pm, J. Landman Gay via use-livecode wrote:
>
> I read recently that the flat-earther movement is growing.

That's because of global warming : earth is slowly melting and will get 100%
flat by the year 2100...




___
use-livecode mailing list
use-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: keeping keys of an array in the order they came in?

2017-08-19 Thread jbv via use-livecode
Hi Klaus
I've been there and the only solution I found was to maintain
a second array :

  put 0 into x
  put "abc" into array1[60]
  add 1 to x
  put 60 into array2[x]
  put "xyz" into array1[30]
  add 1 to x
  put 30 into array2[x]

  put the keys of array2 into tkeys
  sort lines of tkeys ascending numeric
  repeat for each line j in tkeys
put array1[array2[j]] & return after myvar
  end repeat

You can also use a two-dimentional array instead
of 2 separate arrays...

jbv


On Sat, August 19, 2017 1:33 pm, Klaus major-k via use-livecode wrote:
> Hi dfriends,
>
>
> need a little help, I am filling an array (to eliminate doublettes) and
> really need to keep the order of the keys as they came in.
>
> Example:
> ...
> put "60,30,40" into tK repeat for each item tItem in tK put "sdsdsdsddsd"
> into tArray[tItem] end repeat put the keys of tArray ...
> Now I would like to get:
> 60
> 30
> 40
>
>
> This is just an example, I cannot control the content of tK.
> Know what I mean?
>
>
> Any hints very welcome, thank you!
>
>
>
> Best
>
>
> Klaus
>
>
> --
> Klaus Major
> http://www.major-k.de
> kl...@major-k.de
>
>
> ___
> use-livecode mailing list use-livecode@lists.runrev.com Please visit this
> url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



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


Re: answer with...

2017-08-16 Thread jbv via use-livecode
works like a charm...

Thanks a lot.


On Wed, August 16, 2017 10:13 pm, J. Landman Gay via use-livecode wrote:
> On 8/16/17 10:07 pm, jbv via use-livecode wrote:
>
>
>> I have a blank...
>> I need to use a prompt in the form of
>> answer "Your choice" with "John" or "Mary" or "Cancel"
>>
>> the problem is that the number of options depends on the result of a DB
>> request, and can vary from 2 to 6...
>
> I think the answer command has always accepted CR instead of "or" if I
> remember right. At any rate, if you don't want to use a field, you can just
> replace the commas with CR and use that.
>
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
>
>
> ___
> use-livecode mailing list use-livecode@lists.runrev.com Please visit this
> url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



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


answer with...

2017-08-16 Thread jbv via use-livecode
Hi
I have a blank...
I need to use a prompt in the form of
  answer "Your choice" with "John" or "Mary" or "Cancel"

the problem is that the number of options depends on the
result of a DB request, and can vary from 2 to 6...
I tried to put ("John" or "Mary" or "Cancel") in a string
but (answer "Your choice" with myString) doesn't work as
expected...
Any idea ?

Thanks in advance
jbv


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


Maximum size of SQLQuery with revDataFromQuery ?

2017-08-06 Thread jbv via use-livecode
Hello
Is there a size limit for the SQLQuery parameter when using
revDataFromQuery ?
I might end up with mySQL queries of at least 75 Kb...
I know the best way to know is to try, but any experience would be
apreciated...

FYI some of there queries have been tested in PHPmyAdmin and run in 0.0054
sec;
my concern was rather the buffer size between LC engine and mySQL...

Thanks in advance.
jbv


___
use-livecode mailing list
use-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: menuHistory & menuPick

2017-08-05 Thread jbv via use-livecode
On Sat, August 5, 2017 2:52 pm, Klaus major-k via use-livecode wrote:
>

>> Am 05.08.2017 um 14:15 schrieb jbv via use-livecode
>> <use-livecode@lists.runrev.com>:
>>
>>
>> well, not exactly...
>
> But it answered exactly your initial question, Sir!
>
>
>> here's the thing : I have a hidden option button with several choices :
>>  choice1 choice2 choice2
>>
>> At some point the content of the btn gets updated and it becomes
>> visible with the following script : put "choice4" & return & "choice5" &
>> return & "choice6" into btn 1 set label of btn 1 to line 2 of btn 1 set
>> menuhistory of btn 1 to 2
>>
>> The purpose of the "menuhistory" line is, when user press the btn,
>> to have all the choices "centered around" the visible one on the label,
>> which is more elegant imho...
>
> Well, this is a completely different situation and I am a bit clueless.
> Now do you want to execute the menupick handler or not?
>

Nope, I want to bypass the menupick message.
Your suggestion to block messages would block all messages, not just
menupick.
As mentioned in my original post, I managed to do it with a boolean variable.
I was just wondering about the availability of a more elegant solution, using
LC built-in features for instance...
Best regards



___
use-livecode mailing list
use-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: menuHistory & menuPick

2017-08-05 Thread jbv via use-livecode
well, not exactly...
here's the thing : I have a hidden option button with several choices :
  choice1
  choice2
  choice2

At some point the content of the btn gets updated and it becomes visible
with the following script :
  put "choice4" & return & "choice5" & return & "choice6" into btn 1
  set label of btn 1 to line 2 of btn 1
  set menuhistory of btn 1 to 2

The purpose of the "menuhistory" line is, when user press the btn,
to have all the choices "centered around" the visible one on the label,
which is more elegant imho...

jbv


On Sat, August 5, 2017 1:10 pm, Klaus major-k via use-livecode wrote:
>

>> Am 04.08.2017 um 23:27 schrieb Bob Sneidar via use-livecode
>> <use-livecode@lists.runrev.com>:
>>
>>
>> Hi JB.
>>
>>
>> To set the menu display value without triggering menuPick, set the
>> label of the menu button. In order to trigger the menuPick handler when
>> changing the value, use menuHistory. No need to suspend messages or
>> anything fancy like that.
>>
>> Bob S
>>
>
> and the winner is: Mr. Bob S.! :-)
>
>>> On Aug 4, 2017, at 11:04 , jbv via use-livecode
>>> <use-livecode@lists.runrev.com> wrote:
>>>
>>>
>>> Hi
>>> According to the doc, when you set the menuHistory property, a
>>> menuPick message is sent to the button. I managed to block the menupick
>>> message with a boolean variable, but is there an easier/more elegant
>>> way to momentary block that message when setting menuhistory ?
>>>
>>> Thanks in advance.
>>> jbv
>
> Best
>
>
> Klaus
>
>
> --
> Klaus Major
> http://www.major-k.de
> kl...@major-k.de
>
>
> ___
> use-livecode mailing list use-livecode@lists.runrev.com Please visit this
> url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



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


Re: menuHistory & menuPick

2017-08-04 Thread jbv via use-livecode
Hi Klaus
Thanks for the reply.
Actually that option crossed my mind, but what if other useful messages
need to be sent in the meantime, or if there are any pending messages ?
What gets blocked actually ?

Thanks
jbv

On Fri, August 4, 2017 8:07 pm, Klaus major-k via use-livecode wrote:
> Hi jbv,
>
>
>> Am 04.08.2017 um 20:04 schrieb jbv via use-livecode
>> <use-livecode@lists.runrev.com>:
>>
>>
>> Hi
>> According to the doc, when you set the menuHistory property, a menuPick
>> message is sent to the button. I managed to block the menupick message
>> with a boolean variable, but is there an easier/more elegant way to
>> momentary block that message when setting menuhistory ?
>
> ...
> lock messages set the menuhistory of btn "a wonderful menu button" to 42
> unlock messages ...
> will do the job. :-)
>
>> Thanks in advance.
>> jbv
>
> Best
>
>
> Klaus
>
>
> --
> Klaus Major
> http://www.major-k.de
> kl...@major-k.de
>
>
> ___
> use-livecode mailing list use-livecode@lists.runrev.com Please visit this
> url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



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


menuHistory & menuPick

2017-08-04 Thread jbv via use-livecode
Hi
According to the doc, when you set the menuHistory property, a menuPick
message is sent to the button.
I managed to block the menupick message with a boolean variable, but is
there an easier/more elegant way to momentary block that message when
setting menuhistory ?

Thanks in advance.
jbv


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


Livecode server, timeout and processes

2017-07-17 Thread jbv via use-livecode
Hello forum

A few days ago I ran into a severe problem with livecode server.
A subtil and unexpected change in the way one of my clients inputs
data via his app caused an endless loop to appear in one of the LC
scripts on the server, which lead to a 504 Gateway Timeout error.
As this script is called during a login procedure, it triggered
pretty quickly a kind of chain reaction with many side effects :
- many 504 Gateway Timeout errors in browsers
- many 500 Internal server errors
- huge slow down of the server
- emails not sent/nor received in webmails
- several other services unavailable due to server slowdown...

All these problems were caused by the accumulation of livecode
server processes on the server that kept running even if timeout
errors were issued.
As the source of the problem took a few hours to track down and
to fix, we (on-rev support and I) had to kill dozens of processes
manually to avoid any server crash.

I know this might sound amateuristic to most of you, but nevertheless
I was wondering if there is any way to prevent something like that,
like for instance having all timedout processes to be killed
automatically, or even better : avoiding any endless loop in the first
place...

Thanks in advance.
jbv



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

2017-07-12 Thread jbv via use-livecode
On Wed, July 12, 2017 5:34 pm, jonathandly...@gmail.com wrote:
> If the data is always the same, then I would update a page and have the
> browser read it.
>
> Are you looking to reload the whole page or just update a few data
> points?
>

I really need to reload the xml data only, as the user will have the
possibility to make some choices and changes on the page, and according
to those changes, only some parts of the data will be displayed, or
will be displayed in a different way...

Thanks
jbv


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


Refreshing question

2017-07-12 Thread jbv via use-livecode
Hi guys
I have a web page that displays various informations
that need to be updated/refreshed every minute.
What is the best way to achieve that ?

1- client side : a settimeout in a js script that
triggers a LC script on a remote server via xmlhttp,
and returns xml data that is analyzed and displayed;

2- server side : a cron job triggers the script
every minute and writes the output data in a
specific location on the server; and then the
web page reads that data via a simple LC script
via an xmlhttp request...

I forgot to mention : the data are the same for
anyone connected to the web page.

Thanks in advance.
jbv


___
use-livecode mailing list
use-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 do you guys debug a webpage...

2017-04-24 Thread jbv via use-livecode
Hi list,
How do you guys debug a webpage that doesn't behave the same
way (especially js scripts) when opened in a browser and in
revBrowser ?
More specifically my problem is with xmlhttp.send which I have
used zillions of times, and which works fine in my webpage in
a browser and seems to throw an error when opened in revBrowser...
IOW is there a way to catch the error (or display js console
in revBrowser) ?
Thanks in advance.

jbv


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

2017-04-23 Thread jbv via use-livecode
ompare 5 programming "environments" (I'm using those quotation
> marks to point out that they are NOT comparing GUI-based IDEs with more
> 'traditional' programming
> methods, such as BASIC) that all, to a lesser or greater extent provide the
> programmer with a toolbox of premade objects, thereby cutting out a very
> large part of any cognitive apprenticeship that has, historically been
> required to attain competence in programming.
>
> I would argue that LiveCode, at least, does require quite a bit of
> cognitive effort, at least at the start, for programmers to understand how
> each of the premade controls/objects functions, and how each of them can be
> addressed to do what the end-user wants them to do. While LiveCode allows
> programmers to bypass a lot of 'stuff' that PASCAL. C++ and so on require
> a programmer to know, it presents them with another lot of 'stuff' which
> they have to know instead. The only thing that may make LiveCode easier to
> acquire some initial level of competence in is that the object-oriented
> visual metaphor adopted by LiveCode is, in some ways, nearer to the real
> world that what other, more traditional programming languages present.
>
> However, you will notice that I "argue", I don't present my subjective
> experience working with school children as 'facts'.
>
>
> Until about 1600 is was a "well-known fact" that the world was flat: but
> I have a funny feeling that it wasn't and
> that the world did not suddenly change shape when people started believing
> it was vaguely spherical. Now that people have gone up into space with
> rockets and taken photos of the earth the argument seems to be over
> whether the world "is" a sphere or an "oblate spheroid", and only nutty
> fruitcakes believe otherwise:
>
> https://www.tfes.org/
>
>
> "So, Listen, I drive from coast to coast, and this shit is flat to me."
> Dr. Shaquille O'Neal.
>
>
> Anyone else wanting a doctorate can mail me $100 to the usual address
> and with a week they will recieve a doctoral diploma lovingly printed out
> from my laser printer :)
>
> Well, I enjoyed myself this weeked; hope you all did :)
>
>
> Richmond.
>
>
> On 4/23/17 3:36 pm, jbv via use-livecode wrote:
>
>> On Sun, April 23, 2017 9:55 am, Richmond Mathewson via use-livecode
>> wrote:
>>
>>> I'm not sure why smaller should necessarily be better.
>>>
>>>
>> It is actually, and the cognitive load approach, especially for
>> programmers newbies, is quite relevant. Newbies have to deal with 2 or 3
>> things simultaneously : 1- the language itself
>> 2- the programming "rules" (variables, loops...)
>> 3- the program itself they're attempting to write.
>>
>>
>> It is a well-known fact that the workload that human minds can
>> process per unit of time is limited (AFAIR 7 bits/sec), so the less
>> cognitive load is needed by step 1 above, the more remains available for
>> the other steps...
>>
>>
>> ___
>> use-livecode mailing list use-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: Cognitive load

2017-04-23 Thread jbv via use-livecode
On Sun, April 23, 2017 9:55 am, Richmond Mathewson via use-livecode wrote:
> I'm not sure why smaller should necessarily be better.
>

It is actually, and the cognitive load approach, especially for
programmers newbies, is quite relevant.
Newbies have to deal with 2 or 3 things simultaneously :
1- the language itself
2- the programming "rules" (variables, loops...)
3- the program itself they're attempting to write.

It is a well-known fact that the workload that human minds can
process per unit of time is limited (AFAIR 7 bits/sec), so the
less cognitive load is needed by step 1 above, the more remains
available for the other steps...


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