Re: Double sided PDF Problem

2021-02-03 Thread Ben Rubinstein via use-livecode

On 03/02/2021 05:33, Richard Gaskin via use-livecode wrote:

Paul McClernan wrote:

 > I'm sure this could all be worked out as far as how to do the
 > layout and printing directly from LiveCode... but why?

Why? On a LiveCode list you have to ask why? :)


For what it's worth, a while back (when I had time and access to a laser 
cutter) I built a little flap card box (this sort of thing 
https://cdn.shopify.com/s/files/1/0099/2822/products/flipbookit-dove-animation_540x.gif?v=1568704931).


Then I had to write code in LC to lay out the frames of a gif so that when 
printed double-sided on card, they'd be cut out with top half of one frame on 
one side of a flap, followed by the bottom half of the next frame on the other 
side. (And also to generate the SVG to cut out all the flaps.)


LC is _obviously_ the right choice for this kind of thing!

Ben

___
use-livecode mailing list
use-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: Using MySQL on (headless) Linux

2021-02-03 Thread Ben Rubinstein via use-livecode

Yes sorry Richard et al for confusion.

I was using LC standard on a headless Linux machine, i.e. launching the IDE 
but with -ui. It worked fine and ran my stack OK, until it tried to access a 
database. At that point I listened to advice and made a minimal standalone 
configured as a launcher - and built with the necessary libraries - and all 
was right with the world.


At no point was I using LC Server (for whatever reason).

Thanks to everyone who helped me!

Ben


On 03/02/2021 07:01, Mark Waddingham via use-livecode wrote:

On 2021-02-03 00:31, Richard Gaskin via use-livecode wrote:

As for my post, it was a question in reply to Mark Waddingham's note
about how only standalones can be expected to use externals.  That is,
at least as I read it.


Mark said nothing of the sort :)

LC Server had already been ruled out (for whatever reason) in an earlier part 
of the thread so I was just advising on how to solve Ben's issue of wanting a 
non-server engine that can be run in -ui mode which has dependencies.


Warmest Regards,

Mark.



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


Re: Using MySQL on (headless) Linux

2021-02-02 Thread Ben Rubinstein via use-livecode



Hi Mark,

On 02/02/2021 09:03, Mark Waddingham via use-livecode wrote:

I'll report (2) and (3) formally when I've done a bit more
investigation. I'd still love to know what I'm doing wrong, in
relation to (1).


Please don't - as neither are bugs :)


The "investigation" I referred to was putting this message on the mailing list 
and waiting to be corrected! Investigation complete.


And more generally -

If you want a headless (community) engine which has dependencies then all
you have to do is deploy a standalone with a launcher stack embedded into
it.
 - thank you. A very long time ago I think I knew this, and indeed used to 
send colleagues to Ken Ray's page where he made some handy standalones 
available. I'll take your advice.


best regards,

Ben

___
use-livecode mailing list
use-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: Using MySQL on (headless) Linux

2021-02-02 Thread Ben Rubinstein via use-livecode
Thanks Mark. The issue here is that the stack was running headless, not in the 
IDE. But I had it write the externals to stdout and indeed the result was 
empty, so then I resaved it with the embedded property... etc. But this is 
moot given other-Mark's message.


cheers,

Ben

On 02/02/2021 00:55, Mark Wieder via use-livecode wrote:

On 2/1/21 2:25 PM, Ben Rubinstein via use-livecode wrote:

1. I've not found how to access externals (in this case the database 
library) without explicitly setting the 'externals' property of the stack to 
a (generally unreliably) full path before the stack is saved.


If you type in the messagebox

put the externals of stack "Home"

you should see everything there. If not, your system is misconfigured.



___
use-livecode mailing list
use-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: Using MySQL on (headless) Linux

2021-02-01 Thread Ben Rubinstein via use-livecode

Devin, thank you - that was the last bit I needed.

So my complete stack now works. Hurrah! Thanks everyone who helped me.


Undesirable things found:

1. I've not found how to access externals (in this case the database library) 
without explicitly setting the 'externals' property of the stack to a 
(generally unreliably) full path before the stack is saved.


2. revGetDatabaseDriverPath crashes the app if invoked before using 
revSetDatabaseDriverPath


3. revSetDatabaseDriverPath is required even when the drivers are in the 
standard location inside the app 'bundle'.


I'll report (2) and (3) formally when I've done a bit more investigation. I'd 
still love to know what I'm doing wrong, in relation to (1).


thanks all,

Ben

On 01/02/2021 21:48, Devin Asay via use-livecode wrote:

Ben,

I have seen the “invalid database type” error on Linux because of a case error. 
Make sure you use “mysql” as the database type, not “MySQL” or anything else 
with upper case letters. LiveCode is not case-sensitive, but Linux is.

Hope this helps.

Devin


On Feb 1, 2021, at 2:32 PM, Ben Rubinstein via use-livecode 
 wrote:

Update. I have managed to get access to the Rev database external by explicitly 
setting the `externals` property of the stack before saving it (on Mac) to the 
full path on the linux machine to `revdb.so`.

Consequently the functions such as `revOpenDatabases` and `revOpenDatabase` no 
longer throw error 219. Hurrah. Indeed `externalCommands` and 
`externalFunctions` now list all the expected commands and functions of the 
database library.

This is obviously an appalling solution, since it relies on me knowing the 
exact path to the LiveCode bundle on the destination machine. (My recollection 
from a decade or so ago is that this property has to already be set at the time 
that the stack is opened, i.e. it can't be set dynamically. This may be 
erroneous.) However, it will get me going for now.

Now my issue is that when the code tries to open the database, `revOpenDatabase` returns 
"revdberr,invalid database type". That suggests that the drivers aren't found.

I've tried to get past this using `revSetDatabaseDriverPath`.

The documentation says

Use the revSetDatabaseDriverPath command if you want to place the database
drivers your application uses somewhere other than the same folder as the
application.

In fact the drivers are in the standard location, so this shouldn't be needed, 
but hey... I started by reporting `revGetDatabaseDriverPath` - but calling that 
causes LiveCode to immediately exit on signal 11. (This was in a try-catch 
block, but that doesn't stop it crashing out.)

However, after using `revSetDatabaseDriverPath`, `revGetDatabaseDriverPath` no 
longer crashes but faithfully reports the value set.

Unfortunately, this doesn't seem to help - although "set the defaultFolder to 
revGetDatabaseDriverPath()/put the files" does list the folder which includes dbmysql.so - 
revOpenDatabase still returns "revdberr,invalid database type".

Any suggestions gratefully received!

Ben


On 01/02/2021 20:24, Ben Rubinstein via use-livecode wrote:

Hi Mark,

"error in function handler" is a pretty generic response - sort of the
engine's version of ¯\_(ツ)_/¯. Is the MySQL database local to the server
machine or on a different computer?

I should point out that this error is thrown - I take it to mean that the 
function isn't even located. I don't think the problem is with the details of 
the database connection, I don't think it gets that far.
To test this, I've added a call to revOpenDatabases before doing anything else 
- sure enough, this throws the same error.

Does this work locally before moving the
stack to the headless linux box?

The whole shebang works on my Mac. I tried to see if I could run LiveCode 
headless on Mac, to minimise the differences that might be at issue, and got
 Startup error - cannot run in command line mode
I don't know if that's a generic issue that LiveCode can't run headless on Mac, 
or if there's something else going on there.
Ben
On 01/02/2021 19:37, Mark Wieder via use-livecode wrote:

On 2/1/21 11:15 AM, Ben Rubinstein via use-livecode wrote:


With thanks to friends here who helped me install and start using LC on a 
headless Linux box. I've now another little problem... my stack tries and fails 
to connect to a MySQL database.

When it attempts to call revOpenDatabase, it throws error 219, "error in function 
handler". I take it that this means it can't find or hasn't loaded the revdb 
external.

I've installed livecodecommunity-9.6.1.x86_64, and I launch it with
~/.runrev/components/livecodecommunity-9.6.1.x86_64/LiveCode\ Community.x86_64 
-ui 

I can see revdb.so and dbmysql.so are in the Externals directory. Is there 
something explicit I need to do to load these?


"error in function handler" is a pretty generic response - sort of the engine's 
version of ¯\_(ツ)_/¯. Is the MySQL data

Re: Using MySQL on (headless) Linux

2021-02-01 Thread Ben Rubinstein via use-livecode
Update. I have managed to get access to the Rev database external by 
explicitly setting the `externals` property of the stack before saving it (on 
Mac) to the full path on the linux machine to `revdb.so`.


Consequently the functions such as `revOpenDatabases` and `revOpenDatabase` no 
longer throw error 219. Hurrah. Indeed `externalCommands` and 
`externalFunctions` now list all the expected commands and functions of the 
database library.


This is obviously an appalling solution, since it relies on me knowing the 
exact path to the LiveCode bundle on the destination machine. (My recollection 
from a decade or so ago is that this property has to already be set at the 
time that the stack is opened, i.e. it can't be set dynamically. This may be 
erroneous.) However, it will get me going for now.


Now my issue is that when the code tries to open the database, 
`revOpenDatabase` returns "revdberr,invalid database type". That suggests that 
the drivers aren't found.


I've tried to get past this using `revSetDatabaseDriverPath`.

The documentation says

Use the revSetDatabaseDriverPath command if you want to place the database
drivers your application uses somewhere other than the same folder as the
application.
In fact the drivers are in the standard location, so this shouldn't be needed, 
but hey... I started by reporting `revGetDatabaseDriverPath` - but calling 
that causes LiveCode to immediately exit on signal 11. (This was in a 
try-catch block, but that doesn't stop it crashing out.)


However, after using `revSetDatabaseDriverPath`, `revGetDatabaseDriverPath` no 
longer crashes but faithfully reports the value set.


Unfortunately, this doesn't seem to help - although "set the defaultFolder to 
revGetDatabaseDriverPath()/put the files" does list the folder which includes 
dbmysql.so - revOpenDatabase still returns "revdberr,invalid database type".


Any suggestions gratefully received!

Ben


On 01/02/2021 20:24, Ben Rubinstein via use-livecode wrote:

Hi Mark,

 > "error in function handler" is a pretty generic response - sort of the
 > engine's version of ¯\_(ツ)_/¯. Is the MySQL database local to the server
 > machine or on a different computer?

I should point out that this error is thrown - I take it to mean that the 
function isn't even located. I don't think the problem is with the details of 
the database connection, I don't think it gets that far.


To test this, I've added a call to revOpenDatabases before doing anything else 
- sure enough, this throws the same error.


 > Does this work locally before moving the
 > stack to the headless linux box?

The whole shebang works on my Mac. I tried to see if I could run LiveCode 
headless on Mac, to minimise the differences that might be at issue, and got

 Startup error - cannot run in command line mode

I don't know if that's a generic issue that LiveCode can't run headless on 
Mac, or if there's something else going on there.


Ben


On 01/02/2021 19:37, Mark Wieder via use-livecode wrote:

On 2/1/21 11:15 AM, Ben Rubinstein via use-livecode wrote:


With thanks to friends here who helped me install and start using LC on a 
headless Linux box. I've now another little problem... my stack tries and 
fails to connect to a MySQL database.


When it attempts to call revOpenDatabase, it throws error 219, "error in 
function handler". I take it that this means it can't find or hasn't loaded 
the revdb external.


I've installed livecodecommunity-9.6.1.x86_64, and I launch it with
   ~/.runrev/components/livecodecommunity-9.6.1.x86_64/LiveCode\ 
Community.x86_64 -ui 


I can see revdb.so and dbmysql.so are in the Externals directory. Is there 
something explicit I need to do to load these?


"error in function handler" is a pretty generic response - sort of the 
engine's version of ¯\_(ツ)_/¯. Is the MySQL database local to the server 
machine or on a different computer? Does this work locally before moving the 
stack to the headless linux 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


___
use-livecode mailing list
use-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: Using MySQL on (headless) Linux

2021-02-01 Thread Ben Rubinstein via use-livecode

Hi Mark,

> "error in function handler" is a pretty generic response - sort of the
> engine's version of ¯\_(ツ)_/¯. Is the MySQL database local to the server
> machine or on a different computer?

I should point out that this error is thrown - I take it to mean that the 
function isn't even located. I don't think the problem is with the details of 
the database connection, I don't think it gets that far.


To test this, I've added a call to revOpenDatabases before doing anything else 
- sure enough, this throws the same error.


> Does this work locally before moving the
> stack to the headless linux box?

The whole shebang works on my Mac. I tried to see if I could run LiveCode 
headless on Mac, to minimise the differences that might be at issue, and got

Startup error - cannot run in command line mode

I don't know if that's a generic issue that LiveCode can't run headless on 
Mac, or if there's something else going on there.


Ben


On 01/02/2021 19:37, Mark Wieder via use-livecode wrote:

On 2/1/21 11:15 AM, Ben Rubinstein via use-livecode wrote:


With thanks to friends here who helped me install and start using LC on a 
headless Linux box. I've now another little problem... my stack tries and 
fails to connect to a MySQL database.


When it attempts to call revOpenDatabase, it throws error 219, "error in 
function handler". I take it that this means it can't find or hasn't loaded 
the revdb external.


I've installed livecodecommunity-9.6.1.x86_64, and I launch it with
   ~/.runrev/components/livecodecommunity-9.6.1.x86_64/LiveCode\ 
Community.x86_64 -ui 


I can see revdb.so and dbmysql.so are in the Externals directory. Is there 
something explicit I need to do to load these?


"error in function handler" is a pretty generic response - sort of the 
engine's version of ¯\_(ツ)_/¯. Is the MySQL database local to the server 
machine or on a different computer? Does this work locally before moving the 
stack to the headless linux 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


Using MySQL on (headless) Linux

2021-02-01 Thread Ben Rubinstein via use-livecode



With thanks to friends here who helped me install and start using LC on a 
headless Linux box. I've now another little problem... my stack tries and 
fails to connect to a MySQL database.


When it attempts to call revOpenDatabase, it throws error 219, "error in 
function handler". I take it that this means it can't find or hasn't loaded 
the revdb external.


I've installed livecodecommunity-9.6.1.x86_64, and I launch it with
  ~/.runrev/components/livecodecommunity-9.6.1.x86_64/LiveCode\ 
Community.x86_64 -ui 


I can see revdb.so and dbmysql.so are in the Externals directory. Is there 
something explicit I need to do to load these?


many thanks,

Ben

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


Re: installing and running LC on 'headless' linux server

2021-02-01 Thread Ben Rubinstein via use-livecode

Superb, thank you Matthias. Apologies not having RTFM'd properly myself.

Ben

On 01/02/2021 12:07, matthias rebbe via use-livecode wrote:



Am 01.02.2021 um 10:52 schrieb Ben Rubinstein via use-livecode 
mailto:use-livecode@lists.runrev.com>>:

Thanks Mark (and Matthias). That's very useful info which I'll stash for 
another time.

In this case I really don't want to use the LC code over HTTP. It is purely a 
utility to run locally on this machine at scheduled intervals, in support of 
some other processes.

For several reasons it would be more convenient to run it as a stack rather 
than just a script, though it would be possible to go the latter way.

So two questions:

- just to be clear, does LiveCode Server only work receiving requests from 
Apache/nginx/whatever? Or can it be run from the command line?


You can run LiveCode Server from the command line


- is there a way to install ordinary LiveCode on a headless linux box? Or will 
the installer demand a GUI to complete?



According to page 7 of the Livecode 9.6.2 Release Notes, it is possible to run 
the installer without a gui.
https://downloads.livecode.com/livecode/9_6_2/LiveCodeNotes-9_6_2_rc_2.pdf 
<https://downloads.livecode.com/livecode/9_6_2/LiveCodeNotes-9_6_2_rc_2.pdf>

Excerpt...



Command-line installation
It is possible to invoke the installer from the command-line on Linux and 
Windows. When doing command-line installation, no GUI will be displayed. The 
installation process is controlled by arguments passed to the installer.
Run the installer using a command in the form:

   install -ui [OPTION ...]

where  should be replaced with the path of the installer executable 
or app (inside the DMG) that has been downloaded. The result of the installation 
operation will be written to the console.

The installer understands any of the following options:

-allusers
Install the IDE for "All Users". If not specified, LiveCode will be installed 
for the current user only.

- desktopshortcut
Place a shortcut on the Desktop (Windows-only)

-startmenu
  Place shortcuts in the Start Menu (Windows-only)

-location LOCATION
The folder to install into. If not specified, the LOCATION defaults to those described in 
the "Installation" section above.

-log LOGFILE
The file to which to log installation actions. If not specified, no log is 
generated.

Note: the command-line installer does not do any authentication. When installing for 
"All Users", you will need to run the installer command as an administrator.
As the installer is actually a GUI application, it needs to be run slightly 
differently from other command-line programs.
On Windows, the command is:
start /wait  install -ui [OPTION ...]
<


Regards,
Matthias



-
Matthias Rebbe
Life Is Too Short For Boring Code

___
use-livecode mailing list
use-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: installing and running LC on 'headless' linux server

2021-02-01 Thread Ben Rubinstein via use-livecode
Thanks Mark (and Matthias). That's very useful info which I'll stash for 
another time.


In this case I really don't want to use the LC code over HTTP. It is purely a 
utility to run locally on this machine at scheduled intervals, in support of 
some other processes.


For several reasons it would be more convenient to run it as a stack rather 
than just a script, though it would be possible to go the latter way.


So two questions:

- just to be clear, does LiveCode Server only work receiving requests from 
Apache/nginx/whatever? Or can it be run from the command line?


- is there a way to install ordinary LiveCode on a headless linux box? Or will 
the installer demand a GUI to complete?


Many thanks,

Ben

On 31/01/2021 02:22, Mark Talluto wrote:

Hi Ben,

My favorite method is to build server code with standalones and script only 
stacks. You can run them headless using the -ui method as you proposed earlier.
You can have the standalone act as a starter stack that loads in your script 
only stacks as libraries. This model makes it easy to do future updates 
because they are not built into the standalone itself.


Place standalone and stack files here:
- Apache
IP Number/home/standalone
/home/libaries/stack files here

- nginx
IP/usr/local/bin/standalone
/bin/libraries/stack files here

Each executable is always on for performance. They use very little cpu when 
they are waiting for something to do. In my experience, they rest a 0% between 
loops and jump to around 3% when checking on the workload. They will jump up 
to some other value when they are processing. When done, they return to the 
0-3% consumption.


We use PHP to receive incoming posts to the VM. After PHP does its thing, it 
passes the posted request to the LiveCode standalone. The process repeats 
itself as data is posted to the VM.


This has been a proven model for us. We have used it for many years with 
LiveCloud.


You can use this model in many ways. It will depend on what you are trying to 
accomplish.


Best regards,

Mark Talluto
livecloud.io <http://livecloud.io>
nursenotes.net <http://nursenotes.net/>
canelasoftware.com <http://www.canelasoftware.com/>




On Jan 30, 2021, at 8:34 AM, Ben Rubinstein via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:


Hi Matthias,

Thanks for answering.

I haven't looked into Livecode Server. When you say I could run livecode 
scripts directly from shell, does that means scripts, but not stacks?


Is Livecode Server easier to install on a 'headless' system? Is there 
somewhere I should look to find explanation of differences/pros/cons of 
Server versus IDE editions?


thank you,

Ben

On 29/01/2021 20:30, matthias rebbe via use-livecode wrote:

Ben,
is there a reason why you do not install/use Livecode Server instead of 
Livecode IDE on your system?

You could run livecode scripts directly from shell.
Regards,
Matthias
-
Matthias Rebbe
Life Is Too Short For Boring Code
Am 29.01.2021 um 19:44 schrieb Ben Rubinstein via use-livecode 
mailto:use-livecode@lists.runrev.com>>:


So I want to install LC on a headless - i.e. no GUI, access over SSH - 
Ubuntu 20.


(Then I'll be using it to run a particular stack on a cron job.)

I've done this a long time ago with a standalone - but in this case I'd 
rather be able to do it with a stack.


The only thing that I know about is "-ui" but I'm not even far enough 
along to make use of this.


My first question is what's the best way to install it? Do I download the 
installer, e.g. "LiveCodeCommunityInstaller-9_6_1-Linux.x64", move it to 
the server and run it there? Or is that going to be a GUI installer?


Are there options I need to know about like where it should go?

And then are there tips about where I put my stacks, how to see error or 
debugging output, how the stack reads command line parameters etc?


Any and all advice welcome - especially of course "go and read this guide 
over here you idiot".


TIA,

Ben

___
use-livecode mailing list
use-livecode@lists.runrev.com <mailto:use-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 <mailto:use-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 <mailto:use-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@li

Re: installing and running LC on 'headless' linux server

2021-01-30 Thread Ben Rubinstein via use-livecode

Hi Matthias,

Thanks for answering.

I haven't looked into Livecode Server. When you say I could run livecode 
scripts directly from shell, does that means scripts, but not stacks?


Is Livecode Server easier to install on a 'headless' system? Is there 
somewhere I should look to find explanation of differences/pros/cons of Server 
versus IDE editions?


thank you,

Ben

On 29/01/2021 20:30, matthias rebbe via use-livecode wrote:

Ben,

is there a reason why you do not install/use Livecode Server instead of 
Livecode IDE on your system?

You could run livecode scripts directly from shell.


Regards,
Matthias


-
Matthias Rebbe
Life Is Too Short For Boring Code


Am 29.01.2021 um 19:44 schrieb Ben Rubinstein via use-livecode 
:

So I want to install LC on a headless - i.e. no GUI, access over SSH - Ubuntu 
20.

(Then I'll be using it to run a particular stack on a cron job.)

I've done this a long time ago with a standalone - but in this case I'd rather 
be able to do it with a stack.

The only thing that I know about is "-ui" but I'm not even far enough along to 
make use of this.

My first question is what's the best way to install it? Do I download the installer, e.g. 
"LiveCodeCommunityInstaller-9_6_1-Linux.x64", move it to the server and run it 
there? Or is that going to be a GUI installer?

Are there options I need to know about like where it should go?

And then are there tips about where I put my stacks, how to see error or 
debugging output, how the stack reads command line parameters etc?

Any and all advice welcome - especially of course "go and read this guide over here 
you idiot".

TIA,

Ben

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


installing and running LC on 'headless' linux server

2021-01-29 Thread Ben Rubinstein via use-livecode

So I want to install LC on a headless - i.e. no GUI, access over SSH - Ubuntu 
20.

(Then I'll be using it to run a particular stack on a cron job.)

I've done this a long time ago with a standalone - but in this case I'd rather 
be able to do it with a stack.


The only thing that I know about is "-ui" but I'm not even far enough along to 
make use of this.


My first question is what's the best way to install it? Do I download the 
installer, e.g. "LiveCodeCommunityInstaller-9_6_1-Linux.x64", move it to the 
server and run it there? Or is that going to be a GUI installer?


Are there options I need to know about like where it should go?

And then are there tips about where I put my stacks, how to see error or 
debugging output, how the stack reads command line parameters etc?


Any and all advice welcome - especially of course "go and read this guide over 
here you idiot".


TIA,

Ben

___
use-livecode mailing list
use-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 set up a library?

2020-12-31 Thread Ben Rubinstein via use-livecode
Thanks for responding Bob. Apologies for the confusion, I wasn't suggesting 
adding it in the actual application bundle; I was wondering whether there is a 
corresponding location in what used to be the "My LiveCode" folder in 
Documents. I.e. in that folder on my machine I see subfolders

Extensions
Externals
Plugins
Projects
Resources
Runtime

and I wondered whether any of those had some blessed quality which would allow 
library stacks stored there to be loaded more easily than 'ordinary' stacks.


Ben

On 31/12/2020 17:12, Bob Sneidar via use-livecode wrote:

Trouble with putting a library in the Livecode libraries folder is every time 
you upgrade Livecode, those may get deleted. This is especially true for OS X, 
where those libraries are in the app bundle. I would not put a library in that 
location.

Also, you do not have to specify the path. Add the library to the Stack Files 
of the stack, and then start using it by the stack short name. If you are using 
a script only stack, you should also add the SOS to the stack files, mainly 
because when you create a standalone these will get included in the standalone. 
Otherwise I suppose you *could* start using a stack by full path name or else 
it has to be in the current default folder.

Setting the behavior of something is a one time thing. Start Using is something 
that has to be done every time a stack is opened, unless another stack in the 
IDE has done so. Doing it more than once has no effect, other than pushing the 
script to the back of the stacks in use.

The difference between the two is that a behavior is in the message path of the 
object itself, and so it’s handlers are not accessible to any other object 
unless you send or dispatch to that object.

Start Using makes the script globally accessible to ALL stacks running in the 
IDE (or in the Standalone).

On Dec 31, 2020, at 3:55 AM, Ben Rubinstein via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Thanks Alex and Bob for your responses.

And if I make it a script-only stack, is there a clever place to store it - 
e.g. the standard distribution libraries are in
.../Tools/Toolset/libraries/

Is there a convention or location which would allow me to reference the library 
without having to specify the full path, for example?

thanks,

Ben

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



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


Re: How to set up a library?

2020-12-31 Thread Ben Rubinstein via use-livecode

Thanks Alex and Bob for your responses.

And if I make it a script-only stack, is there a clever place to store it - 
e.g. the standard distribution libraries are in

 .../Tools/Toolset/libraries/

Is there a convention or location which would allow me to reference the 
library without having to specify the full path, for example?


thanks,

Ben

On 29/12/2020 23:40, Alex Tweedly via use-livecode wrote:

I'd make it a script-only stack, and then

start using stack "..."

(probably in an openstack handler - but could be anywhere you like for your 
own use).


By far the easiest to share (and for others to accept when shared).

Alex.

P.S. And, should this library be useful in LCServer context, it means you can 
upload the stack to the server without getting annoying error messages about 
mixed line endings which Coda-2 and some others give on binary stacks).



On 29/12/2020 19:34, Ben Rubinstein via use-livecode wrote:


What is the best way to structure a library these days?

Currently I've got buttons with a script, and a 'mouseup' handler to 'insert 
the script of me into back' in my object library. But I don't think that's 
very modern.


What's the right way to do it? Especially if I want to share it?

TIA,

Ben

___
use-livecode mailing list
use-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 set up a library?

2020-12-29 Thread Ben Rubinstein via use-livecode



What is the best way to structure a library these days?

Currently I've got buttons with a script, and a 'mouseup' handler to 'insert 
the script of me into back' in my object library. But I don't think that's 
very modern.


What's the right way to do it? Especially if I want to share it?

TIA,

Ben

___
use-livecode mailing list
use-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: Mac standalone install in menu bar

2020-11-24 Thread Ben Rubinstein via use-livecode

On 24/11/2020 16:01, matthias rebbe via use-livecode wrote:

On Mac there is the Mac Status Menu library available in  LC9.6 and lower.


Thank you Matthias - just what I needed.

Ben

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


Mac standalone install in menu bar

2020-11-24 Thread Ben Rubinstein via use-livecode
Is it possible to create an using LC that once launched installs itself in the 
menu bar?


TIA,

Ben

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

2020-11-15 Thread Ben Rubinstein via use-livecode

Hi Graham,

By no means a complete answer to your question, but if you have a bluetooth 
sensor to work with, take a look at mergBLE. I don't think I'd be confident 
enough to code with it for an abstract case, but if you have an actual unit to 
test I would expect you should be able to interface to it.


Ben

On 13/11/2020 13:26, Graham Samuel via use-livecode wrote:

A couple of more general questions about mobile sensor functions in LC.

1. The dictionary seems to offer messages only from those sensors which are 
associated with native sensors in the device such as an accelerometer. Suppose 
I have an external sensor, for example a heart monitor connected via Bluetooth 
- how do I access that?

2. If a script processes sensor input by responding to messages from the sensor 
as they come in (as for example it does with locationChanged messages 
associated with GPS), what happens when the processing time for the sensor 
message exceeds the time between sensor inputs? Is it necessary for the script 
to detect that an instance of the message is already running, or does LC itself 
inhibit this recursion-like behaviour? Up to now I have kind of dealt with this 
by limiting the processing of locationChanged messages via a timer, but this is 
not a general solution. Can anyone explain what happens - I think the answer 
lies in the message queue, which I don’t fully understand.

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



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


Re: Is the DateFormat read only?

2020-11-08 Thread Ben Rubinstein via use-livecode
This enhancement request (which from various paths has a 14 year history) is 
still relevant IMHO:


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

(It also has a handy suggestion from Mark Waddingham of a function to return 
"ISO date time" (as the discussions in the report shows, a misnomer), complete 
with presumed correct time zone.)


On 30/10/2020 21:28, J. Landman Gay via use-livecode wrote:
Good point. For our situation, hours were enough so I guess I ignored the rest 
(it was a long time ago and the code is old.)


On 10/30/20 3:24 PM, Alex Tweedly via use-livecode wrote:
But that will only work for those time zones whose variation from UTC is an 
exact number of hours.


the internet date has 4 digits so that it can handle hour and minute 
variations - you could change


   subtract (char 1 to -3 of last word of the internet date) from item 4 of 
tTime


to

   put the last word of the internet time into tmp
   subtract (char 1 to -3 of tmp) from item 4 of tTime
   subtract (char 1 of tmp & char -2 to -1 of tmp) ) from item 5 of tTime

and then you would be handling all cases correctly.

Alex.

On 30/10/2020 20:06, J. Landman Gay via use-livecode wrote:

On 10/29/20 4:33 PM, Graham Samuel via use-livecode wrote:
The only souci with this format is that it gives the month in alpha, 
presumably according to the nationality of the OS. But it’s easy to get 
the numeric month in other ways. Still, it is just a little bit fiddly to 
create a full UTC date of the format:


-MM-DDThh:mm:ssTZD


Here's something I use:

  put the seconds into tTime
  convert tTime to dateitems
  subtract (char 1 to -3 of last word of the internet date) from item 4 of 
tTime

  convert tTime to dateitems
  set the numberformat to "00"
  put item 1 of tTime &"-"& (item 2 of tTime)+0 &"-"& (item 3 of tTime)+0 & 
"T" & (item 4 of tTime)+0 &":"& \

    (item 5 of tTime)+0 &":"& (item 6 of tTime)+0 & "Z" into tTimestamp



___
use-livecode mailing list
use-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: iOS sharing extension - anyone ever made one?

2020-09-02 Thread Ben Rubinstein via use-livecode

Hi David,

Yes, I did have this working on iOS.

... unfortunately that's all I've got to offer!

It's a couple of years since I worked on this project, and it was an internal 
app only - not distributed to the app store.


I'm actually currently disbarred from testing apps on iOS - my current 
profile/certificate/whatever expired last month and I had a couple of goes at 
the whole dance, but failed, and since it was only for a fun personal app I 
haven't had time to get back to it.


I can tell you it should work (or at least used to). My app appeared in the 
list of destinations for sharing, and IIRC I had it tuned to accept either 
text files or mp3 audio, and that worked as well.


Is your issue that the app doesn't launch at all; or doesn't appear as a 
sharing destination; or does both those things but doesn't respond when 
something is shared to it?


Ben



On 02/09/2020 15:59, David Bovill wrote:
I’m still having no joy figuring our how to make a sharing extension for a 
Livecode app. Has anyone ever done this?

On 25 Jun 2020, 21:05 +0100, David Bovill , wrote:

Having another go at creating an iOS Share extension in Livecode.

Ben I had a go with the code snippets you supplied, but I’m not getting my 
app appearing in the list of apps available to share. I had a bit of a goose 
around and tried a bunch of options for the info.plist file without result - 
well in fact I’m getting the app launching with a black screen and then 
crashing if I use the following style recipe:


NSExtension

 

 NSExtensionAttributes

 

 NSExtensionActivationRule

 TRUEPREDICATE

 

 NSExtensionMainStoryboard

 MainInterface

 NSExtensionPointIdentifier

 com.apple.share-services

 


This type of plist addition:

CFBundleDocumentTypes



CFBundleTypeName
Sound Garden
CFBundleTypeRole
Editor
LSItemContentTypes

public.plain-text

LSHandlerRank
Alternate


CFBundleTypeName
Audio
CFBundleTypeRole
Editor
LSItemContentTypes

public.audio

LSHandlerRank
Alternate



Does not crash the app - but appears to do nothing? The following lesson 
appears related - 
http://lessons.livecode.com/m/4069/l/1069016-associating-a-file-type-file-extension-with-an-lc-ios-app and 
I note there are / were issues with iPhone X and this lesson.


My basic question is how do I get an iOS app to work with as an iOS sharing 
extension such that in any app (say a web browser) where I select the share 
icon I can use my Livecode app as something that handles the share?
On 20 Nov 2018, 18:40 +, Ben Rubinstein via use-livecode 
, wrote:

You need to do two things:

- add code in your app to handle the "urlWakeUp" message, see the dictionary
entry and
http://lessons.livecode.com/m/4069/l/58672-using-custom-url-schemes

- add entries in the app's plist to tell the operating system what file types
your app can handle, see
https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-101685

The latter is the bit you need to do for iOS - not sure what the Android
equivalent is.


On 19/11/2018 20:35, David Bovill via use-livecode wrote:

How could I create the ability for Livecode mobile apps - say iOS but
ideally also on Android) to add the ability for other apps to share to them?

-
https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/Share.html

I can't find any thread here or in the forums?
___
use-livecode mailing list
use-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


Google API Oauth - refresh tokens?

2020-07-30 Thread Ben Rubinstein via use-livecode
Back in 2018 when I was originally working with Google sheets, the OAuth 
authorisation once granted seemed to refresh automatically.


That is, if a call returned the 'unauthorised' error, calling OAuth with the 
same parameters would briefly display a sheet dialog, but it would go away 
automatically.


Then I finished working on that project, and when six months I briefly looked 
at this again, fell victim to bug #22557.


Now that this is fixed, I'm happily working with the system again (and will 
shortly release my code in case it's of use to anyone) - but now when the 
authorisation expires (which is does after an hour or so), calling Oauth2 goes 
through the process requiring user activity.


There's an OAuth2Refresh command in LiveCode; but the issue is that I don't 
get a refresh token from the Google API. From my reading of the docs, only 
certain kinds of app registered with Google get refresh tokens - but I don't 
seem to be able to figure this out.


Has anyone managed to register an app with Google (in 
https://console.developers.google.com/apis/) in a way that means it gets 
refresh tokens?


___
use-livecode mailing list
use-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: OAuth2 was Re: google sheets - anybody doing anything besides mergGoogle

2020-07-27 Thread Ben Rubinstein via use-livecode

Hi Bill (and Neville)

Happy to post it - I'll try to do a bit of cleanup and commenting first. 
(Honestly I think it's probably just going to be an email to the list.) Afore 
I do, I had this question:



(I say library - currently it's a button I copy and paste to stacks where I
need it, and "insert the script of". I've completely lost track of how real
"libraries" should be packaged. Where should I look?)

What is the currently approved method for a "library"?

TIA,

Ben

On 22/07/2020 20:04, Prothero@earthlearning via use-livecode wrote:

Ben,
Any chance of posting a demo stack somewhere? It sounds very useful.
Thanks,
Bill

William Prothero
http://es.earthednet.org


On Jul 22, 2020, at 10:13 AM, Ben Rubinstein via use-livecode 
 wrote:

Ah, shame. It turned out it was (IIUC) just a change in the way Google did 
their tokens which exposed a bug, now fixed, in how LC did OAuth - nothing to 
do with the general API changing.

At any rate, I do have a very basic library which I use to read and write 
Google sheets, in case it's of use to anyone.

(I say library - currently it's a button I copy and paste to stacks where I need it, and 
"insert the script of". I've completely lost track of how real "libraries" 
should be packaged. Where should I look?)

Ben


On 21/07/2020 14:49, Mike Kerner wrote:
I got impatient/spooked so we went another direction.  I think we're going to 
use other tools.
On Thu, Jul 16, 2020 at 10:00 AM Ben Rubinstein via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:
Hi Mike,
Brian Milby put me on to the solution for the OAuth problem:
 > Check out bug 22557 / PR 7381.
 > Line 247 of oath2.livecodescript need urlEncode removed
Are you still interested in this, or are you covered now?
    regards,
    Ben
On 11/03/2020 20:45, Ben Rubinstein via use-livecode wrote:
 > Hi Mike,
 >
 > I haven't forgotten, but finally found time to take a look today and
started
 > writing minimal comments, and thought I should at least test it - for 
some
 > reason the authorisation isn't working. For whatever reason, the call to
 > OAuth2 results in the error "Malformed auth code." So I can't get to
test what
 > I'm sending.
 >
 > I'm unclear whether I've done something strange or wrong, or whether
Google
 > has changed something that breaks LC's implementation. I've come across
 > references which suggest that, but they date back to last year, and I
believe
 > I've used this stack in January. (I also tried using LC 9.0.4 with the
same
 > result.)
 >
 > I will try to get back to this. In the meantime, have you - or anyone -
found
 > issues recently with OAuth2, in particular against any of the Google 
APIs?
 >
 > Ben
 >
 >
 > On 08/03/2020 22:22, Mike Kerner via use-livecode wrote:
 >> it might help us get started.  i'm going to probably put out an rfq to
wrap
 >> the v4 rest api, because we're going to have to come to a solution, 
either
 >> using lc or some other tool.
 >>
 >> On Sun, Mar 8, 2020 at 6:01 PM Ben Rubinstein via use-livecode <
 >> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>>
wrote:
 >>
 >>> Mike,
 >>>
 >>> Very happy to share what I've got, but it's really not much - just a 
very
 >>> thin
 >>> wrapper round Google's API - and it's undocumented, mostly rough code -
 >>> copied
 >>> from one stack to the next, usually done in a tearing hurry!
 >>>
 >>> I'll try to pull something together, but please promise not to judge
me...
 >>>
 >>> Ben
 >>>
 >>> On 06/03/2020 15:13, Mike Kerner via use-livecode wrote:
 >>>> Ben,
 >>>> would you send me what you've got?  I was considering paying someone 
to
 >>>> wrap the entire v4 api and dropping mergGoogle, so any head start 
would
     >>> be
 >>>> useful.  LC wants tribute to do the work (which is a little
disappointing
 >>>> since we financed the original external, so we sort-of hoped that it
 >>> would
 >>>> become a thing, and it would get updated as required, but crap 
happens).
 >>>>
 >>>> On Thu, Mar 5, 2020 at 6:04 PM Ben Rubinstein via use-livecode <
 >>>> use-livecode@lists.runrev.com
<mailto:use-livecode@lists.runrev.com>> wrote:
 >>>>
 >>>>> On 04/03/2020 20:37, Mike Kerner via use-livecode wrote:
 >>>>>> is anyone using anything besides m

Re: Using OAuth2 with Microsoft API services

2020-07-24 Thread Ben Rubinstein via use-livecode
This may be too obvious, but with OAuth on Google APIs I found I had to add 
(or was it remove) a trailing slash on the redirect. Also that localhost 
didn't work. E.g. only one of

http://127.0.0.1:56789
http://127.0.0.1:56789/

and definitely not
http://localhost:56789


(I can't tell you which because I've currently got both with and without a 
trailing slash authorised on the Google dashboard, and I can't remember which 
was the one that did it!)


On 7/22/20 12:00 PM, Richard Gaskin via use-livecode wrote:


Oddly, it appears as though we're authentincating fine as it is using
shared secret, the only problem being that we're not getting the redirect
to close the browser widget and return the auth code to us.


___
use-livecode mailing list
use-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: OAuth2 was Re: google sheets - anybody doing anything besides mergGoogle

2020-07-22 Thread Ben Rubinstein via use-livecode
Ah, shame. It turned out it was (IIUC) just a change in the way Google did 
their tokens which exposed a bug, now fixed, in how LC did OAuth - nothing to 
do with the general API changing.


At any rate, I do have a very basic library which I use to read and write 
Google sheets, in case it's of use to anyone.


(I say library - currently it's a button I copy and paste to stacks where I 
need it, and "insert the script of". I've completely lost track of how real 
"libraries" should be packaged. Where should I look?)


Ben

On 21/07/2020 14:49, Mike Kerner wrote:
I got impatient/spooked so we went another direction.  I think we're going to 
use other tools.


On Thu, Jul 16, 2020 at 10:00 AM Ben Rubinstein via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:


Hi Mike,

Brian Milby put me on to the solution for the OAuth problem:
 > Check out bug 22557 / PR 7381.
 > Line 247 of oath2.livecodescript need urlEncode removed

Are you still interested in this, or are you covered now?

regards,

    Ben

On 11/03/2020 20:45, Ben Rubinstein via use-livecode wrote:
 > Hi Mike,
 >
 > I haven't forgotten, but finally found time to take a look today and
started
 > writing minimal comments, and thought I should at least test it - for 
some
 > reason the authorisation isn't working. For whatever reason, the call to
 > OAuth2 results in the error "Malformed auth code." So I can't get to
test what
 > I'm sending.
 >
 > I'm unclear whether I've done something strange or wrong, or whether
Google
 > has changed something that breaks LC's implementation. I've come across
 > references which suggest that, but they date back to last year, and I
believe
 > I've used this stack in January. (I also tried using LC 9.0.4 with the
same
 > result.)
 >
 > I will try to get back to this. In the meantime, have you - or anyone -
found
 > issues recently with OAuth2, in particular against any of the Google 
APIs?
 >
 > Ben
 >
 >
 > On 08/03/2020 22:22, Mike Kerner via use-livecode wrote:
 >> it might help us get started.  i'm going to probably put out an rfq to
wrap
 >> the v4 rest api, because we're going to have to come to a solution, 
either
 >> using lc or some other tool.
 >>
 >> On Sun, Mar 8, 2020 at 6:01 PM Ben Rubinstein via use-livecode <
 >> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>>
wrote:
 >>
 >>> Mike,
 >>>
 >>> Very happy to share what I've got, but it's really not much - just a 
very
 >>> thin
 >>> wrapper round Google's API - and it's undocumented, mostly rough code -
 >>> copied
 >>> from one stack to the next, usually done in a tearing hurry!
 >>>
 >>> I'll try to pull something together, but please promise not to judge
me...
 >>>
 >>> Ben
 >>>
 >>> On 06/03/2020 15:13, Mike Kerner via use-livecode wrote:
 >>>> Ben,
 >>>> would you send me what you've got?  I was considering paying someone 
to
 >>>> wrap the entire v4 api and dropping mergGoogle, so any head start 
would
 >>> be
 >>>> useful.  LC wants tribute to do the work (which is a little
disappointing
 >>>> since we financed the original external, so we sort-of hoped that it
 >>> would
 >>>> become a thing, and it would get updated as required, but crap 
happens).
 >>>>
 >>>> On Thu, Mar 5, 2020 at 6:04 PM Ben Rubinstein via use-livecode <
 >>>> use-livecode@lists.runrev.com
<mailto:use-livecode@lists.runrev.com>> wrote:
 >>>>
 >>>>> On 04/03/2020 20:37, Mike Kerner via use-livecode wrote:
 >>>>>> is anyone using anything besides mergGoogle to work with google
sheets?
 >>>>>> care to share, if you are?
 >>>>>
 >>>>> I'm just using the Google Sheets API directly from LiveCode - just
 >>> pushing
 >>>>> JSON back and forth. The API is limited, but what's there is very 
easy
 >>> to
 >>>>> work
 >>>>> with - much better than manipulating xlsx files.
 >>>>>
 >>>>> I started using it to get data from clients, and then processing data
 >>> and
 >>>>> pushing it back into the sheets. I've also used on some experimental
 >>> image
 >>>>> proc

Re: OAuth2 was Re: google sheets - anybody doing anything besides mergGoogle

2020-07-16 Thread Ben Rubinstein via use-livecode

Hi Mike,

Brian Milby put me on to the solution for the OAuth problem:

Check out bug 22557 / PR 7381.
Line 247 of oath2.livecodescript need urlEncode removed


Are you still interested in this, or are you covered now?

regards,

Ben

On 11/03/2020 20:45, Ben Rubinstein via use-livecode wrote:

Hi Mike,

I haven't forgotten, but finally found time to take a look today and started 
writing minimal comments, and thought I should at least test it - for some 
reason the authorisation isn't working. For whatever reason, the call to 
OAuth2 results in the error "Malformed auth code." So I can't get to test what 
I'm sending.


I'm unclear whether I've done something strange or wrong, or whether Google 
has changed something that breaks LC's implementation. I've come across 
references which suggest that, but they date back to last year, and I believe 
I've used this stack in January. (I also tried using LC 9.0.4 with the same 
result.)


I will try to get back to this. In the meantime, have you - or anyone - found 
issues recently with OAuth2, in particular against any of the Google APIs?


Ben


On 08/03/2020 22:22, Mike Kerner via use-livecode wrote:

it might help us get started.  i'm going to probably put out an rfq to wrap
the v4 rest api, because we're going to have to come to a solution, either
using lc or some other tool.

On Sun, Mar 8, 2020 at 6:01 PM Ben Rubinstein via use-livecode <
use-livecode@lists.runrev.com> wrote:


Mike,

Very happy to share what I've got, but it's really not much - just a very
thin
wrapper round Google's API - and it's undocumented, mostly rough code -
copied
from one stack to the next, usually done in a tearing hurry!

I'll try to pull something together, but please promise not to judge me...

Ben

On 06/03/2020 15:13, Mike Kerner via use-livecode wrote:

Ben,
would you send me what you've got?  I was considering paying someone to
wrap the entire v4 api and dropping mergGoogle, so any head start would

be

useful.  LC wants tribute to do the work (which is a little disappointing
since we financed the original external, so we sort-of hoped that it

would

become a thing, and it would get updated as required, but crap happens).

On Thu, Mar 5, 2020 at 6:04 PM Ben Rubinstein via use-livecode <
use-livecode@lists.runrev.com> wrote:


On 04/03/2020 20:37, Mike Kerner via use-livecode wrote:

is anyone using anything besides mergGoogle to work with google sheets?
care to share, if you are?


I'm just using the Google Sheets API directly from LiveCode - just

pushing

JSON back and forth. The API is limited, but what's there is very easy

to

work
with - much better than manipulating xlsx files.

I started using it to get data from clients, and then processing data

and

pushing it back into the sheets. I've also used on some experimental

image

processing, where I found that pushing the results of LiveCode functions
into
a google sheet immediately gave me an nice interface in which to review
the
data, and then I could also use the spreadsheet functions to do

evaluation

and
testing.

Ben




___
use-livecode mailing list
use-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: OAuth2 invalid_grant: Malformed auth code (Google Sheets API)

2020-07-09 Thread Ben Rubinstein via use-livecode

Thanks Brian!

I've patched my copy for now. What a PITA.

Ben

On 09/07/2020 13:29, Brian Milby via use-livecode wrote:

Check out bug 22557 / PR 7381.

Line 247 of oath2.livecodescript need urlEncode removed

Sent from my iPad


On Jul 9, 2020, at 7:33 AM, Ben Rubinstein via use-livecode 
 wrote:

I had code that did stuff with Google sheets, it worked fine, I haven't used 
it for about nine (?) months. Now it doesn't work.

To cut a long story short, I've started all over again on a clean base.

Created a new Client ID at
https://console.developers.google.com/apis/api/sheets.googleapis.com/credentials

Make the call to Oauth2, with all the parameters from the Google creds, get a 
suitable authorisation screen, all seems to go OK. But the result (i.e. 'it') 
is set to the array:
error: invalid_grant
error_description: Malformed auth code.

OAuth2 is working for me with other services - e.g. Slack.

client_id and client_secret contain only a-z, 0-9, full stop and hyphen - 
nothing that might want to be encoded.

Redirect ID is registered both with and without a slash, because I've been 
caught that way before.

(My old code had an API Key, but the OAuth2 command doesn't take this as a 
param, so I don't think that's relevant at this point.)

Is anyone currently using the Google APIs successfully? Has anyone been through 
this before?

Any help gratefully received,

Ben


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


OAuth2 invalid_grant: Malformed auth code (Google Sheets API)

2020-07-09 Thread Ben Rubinstein via use-livecode
I had code that did stuff with Google sheets, it worked fine, I haven't used 
it for about nine (?) months. Now it doesn't work.


To cut a long story short, I've started all over again on a clean base.

Created a new Client ID at
https://console.developers.google.com/apis/api/sheets.googleapis.com/credentials

Make the call to Oauth2, with all the parameters from the Google creds, get a 
suitable authorisation screen, all seems to go OK. But the result (i.e. 'it') 
is set to the array:

error: invalid_grant
error_description: Malformed auth code.

OAuth2 is working for me with other services - e.g. Slack.

client_id and client_secret contain only a-z, 0-9, full stop and hyphen - 
nothing that might want to be encoded.


Redirect ID is registered both with and without a slash, because I've been 
caught that way before.


(My old code had an API Key, but the OAuth2 command doesn't take this as a 
param, so I don't think that's relevant at this point.)


Is anyone currently using the Google APIs successfully? Has anyone been 
through this before?


Any help gratefully received,

Ben


___
use-livecode mailing list
use-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: Replacement for Video Library on Mac (webcam feed)

2020-05-15 Thread Ben Rubinstein via use-livecode

Thanks Klaus, that's what I needed.

Perhaps this will be my first contribution to the code: add a sentence to the 
dictionary entries for video grabber libary to point at this.


Cheers!

Ben

On 15/05/2020 10:12, Klaus major-k via use-livecode wrote:

Hi Ben,


Am 15.05.2020 um 11:08 schrieb Ben Rubinstein via use-livecode 
:

I needed to do something with a webcam feed, and confidently set out to do this using 
revInitializeVideoGrabber/revPreviewVideo etc. After several times scratching my head wondering why 
it didn't work I finally read the note in the dictionary that says "Support for the 
"Video Grabber" library on Mac OS X ended in LiveCode 9.0."
But I can't seem to figure out what the replacement is?
What's the most straight forward way to display the feed from a webcam in LC 9 
and later, on macOS?


check -> cameracontrol in the dictionary, I think this is the crossplatform 
successor of the (Mac Only) videograbber.


TIA,

Ben


Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de




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


Replacement for Video Library on Mac (webcam feed)

2020-05-15 Thread Ben Rubinstein via use-livecode
I needed to do something with a webcam feed, and confidently set out to do 
this using revInitializeVideoGrabber/revPreviewVideo etc. After several times 
scratching my head wondering why it didn't work I finally read the note in the 
dictionary that says "Support for the "Video Grabber" library on Mac OS X 
ended in LiveCode 9.0."


But I can't seem to figure out what the replacement is?

What's the most straight forward way to display the feed from a webcam in LC 9 
and later, on macOS?


TIA,

Ben

___
use-livecode mailing list
use-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: Small and strange problem

2020-05-11 Thread Ben Rubinstein via use-livecode

And re this part:

>> Interestingly this
>>
>> on mouseUp pMouseButton
>>   try
>> put (tMins/60) into tMins
>>   catch tError
>> if tError then answer "An Error Occurred;"  && tError & return & 
"tMins =" && tMins

>>   end try
>> end mouseUp
>>
>> does NOT through an error or a catch error message

You're not seeing that there was an error thrown because 'tError' would be set 
to the error message; the code above is testing for it being true, before 
deciding to display the message. But it won't be true it, it will be an 
expression of the error. If you removed "if tError then", so always execute 
the answer statement in the catch section, you should see the error message.


HTH,

Ben


On 11/05/2020 15:31, Rick Harrison via use-livecode wrote:

Hi Andy,

Yes, tMins has to have a value or the statement makes no sense because LC has no
context for what you are trying to do.  LC doesn’t know if tMins is a string or 
something else.

Rick



On May 11, 2020, at 4:24 AM, AndyP via use-livecode 
 wrote:

I seem to have my posts dropped at the moment hence this,

I'm seeing the same error

with

on mouseUp pMouseButton
  put (tMins/60) into tMins
  answer tMins
end mouseUp

button "Button": execution error at line 2 (Operators /: error in left 
operand), char 1

Interestingly this

on mouseUp pMouseButton
  try
put (tMins/60) into tMins
  catch tError
if tError then answer "An Error Occurred;"  && tError & return & "tMins =" 
&& tMins
  end try
end mouseUp

does NOT through an error or a catch error message


If however tMins is initialized then all works as expected

on mouseUp pMouseButton
  put 20 into tMins
  put (tMins/60) into tMins
  answer tMins
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: Wildcard? replaceText, offset?

2020-04-29 Thread Ben Rubinstein via use-livecode
Not sure what 'previous post' referred to. Reg ex "[0-9]+" (or equivalently 
"\d+") would match one or more integers.


Provided this is the first/only instance of the pattern, I would have thought 
that regex does provide the neatest solution, e.g.:


put "(" & iNewNumber ")" into tReplacement
put replaceText(tOldString , "\(\d+\)", tReplacement) into tNewString


On 26/04/2020 20:15, dunbarx--- via use-livecode wrote:

Pay no attention to the previous post, which only dealt with a single integer. 
Sloppy.
THIS old fashioned method works, though:
on mouseUpput offset("(",yourString) into startCharput offset(")", yourString) 
into endCharput random(999) into char (startChar + 1) to (endChar -1) of yourStringend mouseUp

Craig

-Original Message-
From: doc hawk via use-livecode 
To: How to use LiveCode 
Cc: doc hawk 
Sent: Sun, Apr 26, 2020 2:41 pm
Subject: Re: Wildcard? replaceText, offset?


On Apr 26, 2020, at 11:24 AM, Rick reasoned


In the middle-end part of the string I have “(x)” where x represents some 
integer.
it could be (4) or (10) or (5) etc.



If you’re certain that this is the only, or even the first, integer, a regular 
expression search and replace or [0-9]+  would  do the trick.


___
use-livecode mailing list
use-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: Native Switch Button?

2020-04-23 Thread Ben Rubinstein via use-livecode
Hi Graham - I can't answer this in detail, but I have used the native 
switchbutton widget, a bit, without seeing any problem of the kind you 
describe. I'm catching the hiliteChanged message in the widget itself, not in 
the card script, for what that's worth.


(By the way, it scales - it's just that the default size is probably a bit 
excessive.)


On 23/04/2020 11:04, Graham Samuel via use-livecode wrote:

To add to my query below, there’s something even more strange. In my beta app 
there is a card with three Native Switch Buttons on it (they all have different 
names). i have another test card, as described before, with its own switch. 
When a button script on yet another card executes a ‘go' to the 3-switch card, 
the hiliteChanged handler in the test card fires, even though the card isn’t 
open! Again, the switch on this card has a different name - I read somewhere 
that widget names have to be unique - but this CAN’T be expected behaviour, can 
it? I am about to issue a bug report, but it may take too long to get a recipe.

Graham


On 23 Apr 2020, at 11:28, Graham Samuel via use-livecode 
 wrote:

Is anyone using the Native Switch Button? It looks OK (a bit big on my iOS 
simulator, but it will do) and it works - although the insanity of spelling 
“highlight” two ways in the one object is apparent - but running an experiment 
just now in which I go to a card with such an on object on it and not much 
else, certainly nothing in the card script, a ‘hiliteChanged’ event is 
triggered even though AFAIKS the highlight (see what I did there?) hasn’t 
changed.

Is this expected behaviour? I can’t really believe it, but as usual I can’t see 
what i’m doing wrong. I certainly don’t want the message to be triggered unless 
the user touches the screen or I deliberately change the state by script.

Graham


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


Re: Is there a general mobile picker available?

2020-04-23 Thread Ben Rubinstein via use-livecode
Also, a standard LiveCode "Options" menu renders as a native picker on iOS 
(not sure about Android). This is convenient, because it works in a sensible 
way on desktop, and in a native way on iOS. Of course, it looks like a shitty 
motif button until the user touches it...


On 23/04/2020 13:48, Klaus major-k via use-livecode wrote:

Hi Graham,


Am 23.04.2020 um 14:39 schrieb Graham Samuel via use-livecode 
:

Another mobile question:

We have a Native Date Picker, and a Native Time Picker, but what about a picker 
where you construct your own picking list? I would like to use a picker on iOS 
to replace radio buttons, but I don’t know a way to do it. Have I just missed 
it, or isn’t it possible?


you just missed it! :-)
Check -> mobilepick
in the dictionary, that will let you create your own list and let the user pick 
one!


Graham


Best

Klaus


___
use-livecode mailing list
use-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: Android Release Requires 21 but 911 Devices Get Dropped?

2020-04-23 Thread Ben Rubinstein via use-livecode

On 17/04/2020 20:58, Ralph DiMola via use-livecode wrote:

From the release notes: 4.x support is dropped. That represents 5% of all
active installs but may be a higher percentage of devices.


It very much depends where you're looking (or more to the point, where you're 
looking to distribute). It obviously varies widely by region.


E.g. Worldwide, according to 
https://www.statista.com/statistics/271774/share-of-android-platforms-on-mobile-devices-with-android-os/ 
Android 4.4 is 6.9% (of all Android, not of all mobile), and earlier versions 
together add up to 3.8%. But US only 
(https://www.statista.com/statistics/865837/mobile-android-version-share-in-the-us/), 
4.4 is just 0.68% of all Android.


E.g. using Device Atlas data from Q2 2019 
https://deviceatlas.com/blog/mobile-os-versions-by-country gives Android 4.4 
share (nothing below 4.4 is registered) as:

Egypt   7.80%
Indonesia   5.59%
South Korea 4.32%
Romania 4.04%
Argentina   3.27%
South Africa2.47%
Nigeria 2.42%
India   1.53%

These numbers are percentage of all mobile (i.e. including iOS). These 
countries are the only ones for which Android 4 registers. For the UK, the 
oldest recorded version is Android 5.1 on 1.5%; for US it's Android 6 on 2.61%.


Ralph, can you give more information about that "5% of all active installs" 
figure?


TIA,

Ben

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


Re: Getting started with geographical coordinates

2020-04-07 Thread Ben Rubinstein via use-livecode
What a beautiful view you have! Interesting that Google Maps doesn't accept 
what3words yet - possibly viewed as a competitor.


On 04/04/2020 01:49, Alex Tweedly via use-livecode wrote:
And I'm at plump.magpie.tightest (sorry, no calculated height available, not 
even in annoying feet - but I'd guess somewhere around 2 or 3 metres).


Alex.

On 03/04/2020 23:07, Graham Samuel via use-livecode wrote:
A long way from me at 43°16′43″N 2°09′36″E 
 
- and much higher (I’m about 130m). Sorry not to be quite so accurate!


Thanks

Graham
On 3 Apr 2020, at 22:28, Devin Asay via use-livecode 
 wrote:


Graham,

You get back lat and long in degrees and fractions of degrees, as a decimal 
numeral. For instance, I get latitude: 40.248676 and longitude: 
-111.651062, and for good measure altitude in meters at 1398.380493. Wow, 
now you all know exactly where I am!


Devin



On Apr 3, 2020, at 1:49 PM, Graham Samuel via use-livecode 
 wrote:


This is cheeky but I can’t run up my mobile simulation today - can someone 
tell me the format of the geographical coordinates produced by 
mobileSensorReading et al. I mean, is say latitude just one integer 
showing seconds, or is it deg, min, sec - and are fractional seconds 
returned (so, floating point)? I shall find out for myself eventually but 
it would help a little to know now. AFAIKS there’s nothing in the LC 
documentation about it.


Graham


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


Re: Guessing the encoding of a test file...

2020-03-25 Thread Ben Rubinstein via use-livecode

On 19/03/2020 20:31, Paul Dupuis via use-livecode wrote:
There is an enhancement request to support MacRoman decoding under WIndows and 
vice versa at https://quality.livecode.com/show_bug.cgi?id=22391 if you want 
to CC yourself to show interest.


See also
https://quality.livecode.com/show_bug.cgi?id=12205

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


OAuth2 was Re: google sheets - anybody doing anything besides mergGoogle

2020-03-11 Thread Ben Rubinstein via use-livecode

Hi Mike,

I haven't forgotten, but finally found time to take a look today and started 
writing minimal comments, and thought I should at least test it - for some 
reason the authorisation isn't working. For whatever reason, the call to 
OAuth2 results in the error "Malformed auth code." So I can't get to test what 
I'm sending.


I'm unclear whether I've done something strange or wrong, or whether Google 
has changed something that breaks LC's implementation. I've come across 
references which suggest that, but they date back to last year, and I believe 
I've used this stack in January. (I also tried using LC 9.0.4 with the same 
result.)


I will try to get back to this. In the meantime, have you - or anyone - found 
issues recently with OAuth2, in particular against any of the Google APIs?


Ben


On 08/03/2020 22:22, Mike Kerner via use-livecode wrote:

it might help us get started.  i'm going to probably put out an rfq to wrap
the v4 rest api, because we're going to have to come to a solution, either
using lc or some other tool.

On Sun, Mar 8, 2020 at 6:01 PM Ben Rubinstein via use-livecode <
use-livecode@lists.runrev.com> wrote:


Mike,

Very happy to share what I've got, but it's really not much - just a very
thin
wrapper round Google's API - and it's undocumented, mostly rough code -
copied
from one stack to the next, usually done in a tearing hurry!

I'll try to pull something together, but please promise not to judge me...

Ben

On 06/03/2020 15:13, Mike Kerner via use-livecode wrote:

Ben,
would you send me what you've got?  I was considering paying someone to
wrap the entire v4 api and dropping mergGoogle, so any head start would

be

useful.  LC wants tribute to do the work (which is a little disappointing
since we financed the original external, so we sort-of hoped that it

would

become a thing, and it would get updated as required, but crap happens).

On Thu, Mar 5, 2020 at 6:04 PM Ben Rubinstein via use-livecode <
use-livecode@lists.runrev.com> wrote:


On 04/03/2020 20:37, Mike Kerner via use-livecode wrote:

is anyone using anything besides mergGoogle to work with google sheets?
care to share, if you are?


I'm just using the Google Sheets API directly from LiveCode - just

pushing

JSON back and forth. The API is limited, but what's there is very easy

to

work
with - much better than manipulating xlsx files.

I started using it to get data from clients, and then processing data

and

pushing it back into the sheets. I've also used on some experimental

image

processing, where I found that pushing the results of LiveCode functions
into
a google sheet immediately gave me an nice interface in which to review
the
data, and then I could also use the spreadsheet functions to do

evaluation

and
testing.

Ben




___
use-livecode mailing list
use-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: google sheets - anybody doing anything besides mergGoogle

2020-03-08 Thread Ben Rubinstein via use-livecode

Mike,

Very happy to share what I've got, but it's really not much - just a very thin 
wrapper round Google's API - and it's undocumented, mostly rough code - copied 
from one stack to the next, usually done in a tearing hurry!


I'll try to pull something together, but please promise not to judge me...

Ben

On 06/03/2020 15:13, Mike Kerner via use-livecode wrote:

Ben,
would you send me what you've got?  I was considering paying someone to
wrap the entire v4 api and dropping mergGoogle, so any head start would be
useful.  LC wants tribute to do the work (which is a little disappointing
since we financed the original external, so we sort-of hoped that it would
become a thing, and it would get updated as required, but crap happens).

On Thu, Mar 5, 2020 at 6:04 PM Ben Rubinstein via use-livecode <
use-livecode@lists.runrev.com> wrote:


On 04/03/2020 20:37, Mike Kerner via use-livecode wrote:

is anyone using anything besides mergGoogle to work with google sheets?
care to share, if you are?


I'm just using the Google Sheets API directly from LiveCode - just pushing
JSON back and forth. The API is limited, but what's there is very easy to
work
with - much better than manipulating xlsx files.

I started using it to get data from clients, and then processing data and
pushing it back into the sheets. I've also used on some experimental image
processing, where I found that pushing the results of LiveCode functions
into
a google sheet immediately gave me an nice interface in which to review
the
data, and then I could also use the spreadsheet functions to do evaluation
and
testing.

Ben

___
use-livecode mailing list
use-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: Targeting iOS 5.1

2020-03-06 Thread Ben Rubinstein via use-livecode

Thanks Panos (and Monte).

While I've got you on the line, Monte... I'm also hoping to get mergBLE 
working there, and I think I recall using it _way_ before LC 7. Are there any 
gotchas I should be aware of?


On 06/03/2020 07:55, panagiotis merakos via use-livecode wrote:

Hello Ben,

You can definitely build an app for the iPad 1st Gen in 7.1.4, and probably
(Ι don't remember now) in some early versions of LC 8.x.

Just make sure you choose "5.1.1 or later" in the iOS standalone settings,
and check the checkbox "build 32bit slice only"

The version of Xcode you'll need with LC 7.1.4 depends on the version of
your MacOS:

LiveCode 7.1.4 Xcode 7.2 Mac OS 10.10
LiveCode 7.1.4 Xcode 7.3 Mac OS 10.11

If you are on a newer MacOS, I am not sure if you will be able to install
Xcode 7.2 or 7.3.

Hope this helps,
Panos
--


On Fri, 6 Mar 2020 at 01:22, Monte Goulding via use-livecode <
use-livecode@lists.runrev.com> wrote:


Panos is the oracle for this kind of detail (he would be asleep right now
I think) but basically you will need an old version Xcode which you will
only be able to run on an old version of macOS and then the version of
LiveCode that matches said Xcode/macOS combo. The information is in the
release notes which you can download from
https://downloads.livecode.com/livecode/ <
https://downloads.livecode.com/livecode/>

I’d take a stab at LiveCode 6.7.11

Cheers

Monte


On 6 Mar 2020, at 10:12 am, Ben Rubinstein via use-livecode <

use-livecode@lists.runrev.com> wrote:


We've got some first generation iPads, which can't be updated past iOS

5.1. I think I could find useful roles for them around the office, if I
could build to them.


The essential https://livecode.com/docs/9-5-0/faq/faq/ doesn't go back

as far as 5.1. But I know that LiveCode could in the past build to these
machines - some of the apps I built in the past are still on them, though
sadly since they were built with developer provisioning profiles they've
expired! So I'm guessing that the compilers of the above table just felt it
wasn't worth going that far back in time.


Does anyone know what the latest versions of LiveCode and Xcode (and

MacOS) are that I can use to target iOS 5.1?


Many thanks,

Ben


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


Targeting iOS 5.1

2020-03-05 Thread Ben Rubinstein via use-livecode
We've got some first generation iPads, which can't be updated past iOS 5.1. I 
think I could find useful roles for them around the office, if I could build 
to them.


The essential https://livecode.com/docs/9-5-0/faq/faq/ doesn't go back as far 
as 5.1. But I know that LiveCode could in the past build to these machines - 
some of the apps I built in the past are still on them, though sadly since 
they were built with developer provisioning profiles they've expired! So I'm 
guessing that the compilers of the above table just felt it wasn't worth going 
that far back in time.


Does anyone know what the latest versions of LiveCode and Xcode (and MacOS) 
are that I can use to target iOS 5.1?


Many thanks,

Ben


___
use-livecode mailing list
use-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: google sheets - anybody doing anything besides mergGoogle

2020-03-05 Thread Ben Rubinstein via use-livecode

On 04/03/2020 20:37, Mike Kerner via use-livecode wrote:

is anyone using anything besides mergGoogle to work with google sheets?
care to share, if you are?


I'm just using the Google Sheets API directly from LiveCode - just pushing 
JSON back and forth. The API is limited, but what's there is very easy to work 
with - much better than manipulating xlsx files.


I started using it to get data from clients, and then processing data and 
pushing it back into the sheets. I've also used on some experimental image 
processing, where I found that pushing the results of LiveCode functions into 
a google sheet immediately gave me an nice interface in which to review the 
data, and then I could also use the spreadsheet functions to do evaluation and 
testing.


Ben

___
use-livecode mailing list
use-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: Synchronisation of sound and vision

2020-02-13 Thread Ben Rubinstein via use-livecode
I held off contributing to this discussion because it sounded like callbacks 
were a solid solution. However if that's not necessarily true it might be 
worth thinking about text tracks.


This depends of course on what effect you want to achieve, and what platforms 
you're targeting. But way back when (cue more CD-ROM nostalgia) we produced a 
CD-ROM including some interviews. We put the transcript in a text track in 
Quicktime, but hid the text track from the player, and intercepted it in code 
so that we could present it in the way we wanted.


I don't think LC let's you do that, but it does let you enable and disable 
tracks. So if you were happy with the default presentation of the text, that 
might be a very straightforward solution.


Ben

On 12/02/2020 18:57, Devin Asay via use-livecode wrote:

Tore,

I would agree if callbacks were 100% reliable. I have tried them in the past 
and found that in some cases they were missed. I never had any trouble when 
using time indices. But I should say that I haven’t needed to do this for 
several years, and the callbacks in the new player object might be completely 
reliable.

In other ways creating time indices makes your application more flexible, 
however. It’s dead simple, for instance, to set up an application where you can 
click on a line of text and play just that line. Set the startTime, set the 
endTime, set the playSelection to true, start playing. Done. That would be a 
little more challenging if all you had was callbacks.

One of the great things about LiveCode is that there is almost always more than 
one way to do what you want.

Regards,

Devin


On Feb 12, 2020, at 9:55 AM, Tore Nilsen via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Using callbacks negate the need to fiddle with duration or  timescales and 
start or stop times. It uses the sampling intervals as is, regardless of time. 
In my opinion it is much easier than trying to calculate start and end times. 
You can easily handle large audio/video files using callbacks. I would 
recommend using one file per poem though, this simplifies the handling of the 
messages sent from the player. You can basically use the same message for all 
files, resetting a counter variable each time you load a new file to handle 
with line you would like to act upon.

You could also store the callbacks for each audio file in a text file and set 
the callbacks as a part of the handler used to load each audio file.

Regards
Tore

12. feb. 2020 kl. 16:49 skrev Devin Asay via use-livecode 
mailto:use-livecode@lists.runrev.com>>:

Graham,

Take a look at the duration and the timeScale properties of player objects. By 
dividing duration by timeScale you get the length of the video in seconds.


put the duration of player  “foo” / the timescale of player  “foo” into 
totalSeconds

What you are contemplating is very doable, but you’ll have to do a fair amount 
of work to do to get the synching right. You can take one of several approaches:

- Calculate times as above to predict when to show/highlight the next line. Can 
be tricky with long video files and rounding errors.

- Check the currentTime property of the player to determine the startTime and 
endTime of each spoken line, and set the playSelection of the player to true. 
When the played segment ends, immediately load the following start and end 
times and play again. Something like this, from memory:

set the startTime of player “foo” to 444
set the endTime of player “foo” to 999
set the currentTime of player “foo” to the startTime of player “foo”
set the playerSelection of player “foo” to true
start player “foo"
- Break up the video or audio file into separate files, one line per file, then 
play each succeeding file when the previous one reaches its end. The 
playStopped message is your friend here.

Like I said, it’s doable, but takes a bit of thought and planning, creating 
segment indexes, that sort of thing.

Hope this helps.

Devin


On Feb 12, 2020, at 5:28 AM, Graham Samuel via use-livecode 
mailto:use-livecode@lists.runrev.com>>
 wrote:

Thanks, that’s a start - I will look at the dictionary. I suppose the callbacks 
rely on one analysing how long each line/word takes the performer to say. It’s 
a lot of work, but there’s no way around it since potentially every line takes 
a different length of time to recite. If it’s too much work, I guess I can just 
display the whole text and have one callback at the end of each recording. 
Maybe that is really the practical solution for a large body of work (say all 
the Shakespeare sonnets, for example).

Anyway thanks for the hint.

Graham

On 12 Feb 2020, at 12:16, Tore Nilsen via use-livecode 
mailto:use-livecode@lists.runrev.com>>
 wrote:

You will have to use the callbacks property of the player to do what you want 
to do. The callbacks list would be your cues. From the dictionary:

The callbacks of a player <> is 

Re: HyperCard: the Myst story

2020-02-11 Thread Ben Rubinstein via use-livecode
Bah, I can only claim #17. Raw C (not even C++) on the CD-ROM, but vast 
amounts of HyperCard used in the production process.


Mind you, if Cosmic Osmo only got #29, I consider their rankings very suspect!


On 11/02/2020 05:07, Colin Holgate via use-livecode wrote:

Thanks for that. Voyager did well in the list, 15 out of the 50. 10 of which 
were in HyperCard. #1 I programmed on my own, and I also did some work on #4 
and #15.



On Feb 10, 2020, at 3:53 PM, Alejandro Tejada via use-livecode 
 wrote:

Hi Colin,

I found this Mac User magazine!
https://vintageapple.org/macuser/pdf/MacUser_9311_November_1993.pdf

Al

On Tue, Feb 4, 2020 at 9:21 PM
Colin Holgate wrote:

In 1993 Mac User magazine had a review
of the top 50 CD-ROMs, and of those there
was an overall winner.
The A Hard Day’s Night CD-ROM I made
in HyperCard was the overall winner.
I was lucky that it was before Myst was
released. It would have easily won!

___
use-livecode mailing list
use-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: directory tree -> array

2020-02-03 Thread Ben Rubinstein via use-livecode

On 22/01/2020 18:26, Richard Gaskin via use-livecode wrote:
We have many handlers that deliver directory trees as lists, but arrays are a 
different beast.  Because the depth is both unknowable and varied, I can't 
think of a way to do this without resorting to "do".


Surely this is what recursion does for you?

e.g.

function directoryTreeAsArray tRoot, tSubPath --> aTree
   local aTree
   set the defaultFolder to tRoot & "/" & tSubPath
   put the files into aTree["files"]
   repeat for each line f in the folders
  if char 1 of f = "." then next repeat -- unix gotcha
  put directoryTreeAsArray(tRoot, tSubPath & "/" & f) into 
aTree["folders"][f]

   end repeat
   return aTree
end directoryTreeAsArray

(initially invoked with empty second parameter)

Or have I misunderstood the requirement?


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


Bluetooth promiscuity - mergBLE confusion

2020-02-03 Thread Ben Rubinstein via use-livecode



If I execute `mergBLEScanForPeripheralsWithServices` with no parameters, I 
then get a shed-load of `mergBLEDidDiscoverPeripheral` messages, as expected 
(and as warned by the documentation for the service UUIDs parameter:

If empty all discovered peripherals are returned regardless of their supported 
services (not recommended).



One of the many peripherals that `mergBLEDidDiscoverPeripheral` reports has 
the service I'm expecting. If I specify this service UUID in 
`mergBLEScanForPeripheralsWithServices`, I get... exactly the same result as 
before, i.e. all the peripherals in range are discovered, regardless of the 
fact that only one is advertising the service.


I'm also monitoring the `mergBLEPeripheralDidDiscoverServices` message; but 
this is never received.


Another indication that I may not fully understand what I'm doing: I notice 
that of all the peripherals reported via `mergBLEDidDiscoverPeripheral`, only 
one includes any service info - the one which is actually a phone running 
another LiveCode stack which has used `mergBLECreateService`. While it is 
gratifying to find this one, it's surprising to me that none of the large 
cloud of other BLE devices that the scan is picking up advertise any services.


What am I doing wrong?

TIA,

Ben

___
use-livecode mailing list
use-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: Basic URL loading on Android - can't resolve host

2020-01-31 Thread Ben Rubinstein via use-livecode

Yes it does!

Thanks Panos,

Ben

On 31/01/2020 13:59, panagiotis merakos via use-livecode wrote:

Hello Ben,

Does checking the "Internet" permission in the Android Standalone Settings
(not in the Inclusions) fix the problem?

Kind regards,
Panos
--

On Fri, 31 Jan 2020 at 15:50, Ben Rubinstein via use-livecode <
use-livecode@lists.runrev.com> wrote:


I've just started trying to create an Android app after a year or two.
Restored Android studio etc, fine.

The first thing I try to do is load a simple URL. But I get
 tsneterr:(6) Could not resolve host: google.com

(or any other hostname from any other URL).

Using the browser on the device to access the same URL works fine.

Any URL I've tried has the same effect.

I've tried on another Android device, running a different version of
Android -
same effect.

I've tried de-selecting "automatic inclusion" and selected (among other
things)
 Internet
 SSL & Encryption
 tsNet

What am I doing wrong?

TIA,

Ben

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


Basic URL loading on Android - can't resolve host

2020-01-31 Thread Ben Rubinstein via use-livecode
I've just started trying to create an Android app after a year or two. 
Restored Android studio etc, fine.


The first thing I try to do is load a simple URL. But I get
tsneterr:(6) Could not resolve host: google.com

(or any other hostname from any other URL).

Using the browser on the device to access the same URL works fine.

Any URL I've tried has the same effect.

I've tried on another Android device, running a different version of Android - 
same effect.


I've tried de-selecting "automatic inclusion" and selected (among other things)
Internet
SSL & Encryption
tsNet

What am I doing wrong?

TIA,

Ben

___
use-livecode mailing list
use-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: OMG text processing performance 6.7 - 9.5

2020-01-31 Thread Ben Rubinstein via use-livecode

Ooh, that's very likely to be a good tip.

(I think the database stuff is a red herring, by the way: the bulk of the 
delay is in the processing stage, which is just reading text files in and out.)


Thanks everyone for their input. I'll report back with what I can find (unless 
I can persuade IT to let me use the 32 bit drivers!)


Ben

On 30/01/2020 22:41, Ralph DiMola via use-livecode wrote:

I found this as well. Another thing, it's faster to truncate the string and
search from the beginning than using a "start at" on the entire string when
searching for all occurrences of a string . This was counter intuitive to me
until Mark explained that skipping chars requires more work because
repetitive skipping of Unicode chars is slower than many "memcpy"s on very
long strings.

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net


-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of Neville via use-livecode
Sent: Thursday, January 30, 2020 4:49 PM
To: use-livecode@lists.runrev.com
Cc: Neville
Subject: Re: OMG text processing performance 6.7 - 9.5

Are you perchance using lineOffset searches? I have found that lineOffset
performance on utf8 text degrades exponentially with the length of the file,
presumably as it searches for line breaks. Use offset instead which remains
fast (and much faster still if you can search on the raw text before
textencoding, then utf8 encode the found chunks)
___
use-livecode mailing list
use-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: OMG text processing performance 6.7 - 9.5

2020-01-30 Thread Ben Rubinstein via use-livecode

Hi Mark,

Thanks for taking the time to reply!

I'm indeed currently in the process of seeing whether I can persuade the 
client's IT department to install the 32-bit drivers on the new VM. I'm 
optimistic that will buy me some time, but it won't be a complete solution 
because they outsource support to a third company, which has warned that it 
doesn't intend to support the 32-bit drivers much longer (apparently they're 
just waiting for Crystal Reports to be updated!).


And if that fails, one of my options is as you suggest to use the LC 9.5-built 
app to retrieve the data through the 64-bit drivers, and the the LC 6.7-built 
app to process and (probably) build it. It will be shonky.


However, what you say certainly makes me feel more optimistic that something 
should be possible. There's really very little going on in the way of 
binary<->text conversion; there probably is a fair amount of word chunking - 
although half the work is about tracing cross-references etc, there's also a 
fair amount of processing of 'prose' and prose-like text. However, the nature 
of the text is that although 99% of it is probably ASCII, in any given table 
of text there will be just a few 'extended' characters - does that mean it all 
gets treated as four-byte data?


I'll see how the negotiations with IT get on...

Ben

On 30/01/2020 14:04, Mark Waddingham via use-livecode wrote:

On 2020-01-30 13:20, Ben Rubinstein via use-livecode wrote:

The context is that I'm finally forced to replace an app that's been
processing data for a client for well over a decade. To date the
standalone has been built on LC 6.7.11; but now we need to put it on a
new platform with 64-bit database drivers. The performance has gone
through the floor, through the floors below, through the foundations,
and is on its way to the centre of the earth.


What's the need for 64-bit database drivers? i.e. What are you currently
using to talk to the database and why can you not continue to use a 32-bit
Windows standalone?


The first stage of the app - which retrieves a load of data from
various databases and online sources, does minimal processing on it,
and dumps it to cache files - is approx 2x slower. The main core of
the app, which loads this data in and does a vast amount of processing
on it to generate various output data and reports, has gone from 12
minutes to over *six hours*.


I suspect it is probably a couple of things which are being done uniformly
causing the problem rather than lots of things all over the place...

Where exactly is the data coming from? (at a high-level) what sorts
of operations are being performed on it? what sort of I/O is being performed?

The main one I can think of is implicit binary<->text conversions. In 6.7
and below binary data and text were the same thing - in 7+ they are distinct
types which require a conversion operation. The functions which were always
really returning/taking binary data now actually do.

e.g. textEncode / Decode, compress / decompress, binaryEncode / binaryDecode,
the byte chunk, repeat for each byte, numToByte

Given the app is coming from 6.7 vintage, it is unlikely that any of the new
unicode text codepaths would be hit (unless there's something odd going on
somewhere) as binary data converts to native encoded text - unless of course
the means by which the data is getting into the app is being taken as unicode
strings (without knowing the exact I/O going on I can't really see how this
could happen, but I can't rule it out).

In general, native text processing (item detection, comparison, containment
and such) is all as fast if not faster in the post-7 engines than 6.7 as I
spent quite a while specializing a lot of lower level routines to make sure
it was.

I do know the word chunk has been somewhat adversely affected, however, as
that was never optimized in the same way.


The coding is gnarly - the oldest parts are probably at least 15 years
old - and I've no doubt it could be made more efficient; but we don't
have time or budget to rewrite it all. So, are there known gotchas,
functions which have taken a much greater hit than others, that I
could concentrate on to get the most ROI in speeding this up?


Given that you don't have time nor budget to really touch the code at all
in any depth then it would best to not have to touch it at all and keep
it in 6.7.11? i.e. Do you really need to move to 6?

Could you split the app into the bit which does the database communication
and caching (assuming that *really* needs to be 64-bit) and the bit which
does the data processing (which could remain as 32-bit in 6.7.11).

Note I should say that the reason I ask the above is not because of a lack
of confidence in getting your code to run as fast as it did before but
because of pure business reasoning - why spend time and money on something
which isn't necessarily really needed?

There's a difference between needing to update user-facing apps and true
back-office server apps after

OMG text processing performance 6.7 - 9.5

2020-01-30 Thread Ben Rubinstein via use-livecode
I'm looking for a hints about where the speed has gone in the current (Unicode 
era) LiveCode text processing. I've been vaguely aware that text processing 
performance suffered in the transition, but haven't needed to focus on it before.


The context is that I'm finally forced to replace an app that's been 
processing data for a client for well over a decade. To date the standalone 
has been built on LC 6.7.11; but now we need to put it on a new platform with 
64-bit database drivers. The performance has gone through the floor, through 
the floors below, through the foundations, and is on its way to the centre of 
the earth.


The first stage of the app - which retrieves a load of data from various 
databases and online sources, does minimal processing on it, and dumps it to 
cache files - is approx 2x slower. The main core of the app, which loads this 
data in and does a vast amount of processing on it to generate various output 
data and reports, has gone from 12 minutes to over *six hours*.


(The server itself is different, and running Windows Server 2016 rather than 
Windows Server 2008, rather than but they're both VMs, quite likely on the 
same underlying hardware, and if anything I'd expect the new server to be more 
performant. Of course I assume that a new version of the OS will always be 
slower )


The coding is gnarly - the oldest parts are probably at least 15 years old - 
and I've no doubt it could be made more efficient; but we don't have time or 
budget to rewrite it all. So, are there known gotchas, functions which have 
taken a much greater hit than others, that I could concentrate on to get the 
most ROI in speeding this up?


___
use-livecode mailing list
use-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: Script Editor disassociates - a lossy LC IDE bug

2019-12-06 Thread Ben Rubinstein via use-livecode
I've seen something similar - on Mac - it may be the same in which case I have 
some hope for you.


The bug I've seen is that I make some changes, run the script, am surprised 
that my changes haven't fixed the behaviour I'm trying to correct. Twiddle the 
script, swear, same. I try setting a breakpoint on the code, it doesn't fire.


Then I set a breakpoint in another script, which calls this one; and step into 
the handler that I've been editing. At that point it seems that I am stepping 
into the version of the code that I've been editing - and my fixes take effect 
and all is well.


So, my inference is that the script editor is holding on to the latest version 
of the script; but that 'apply' is not doing its job, and - if this is the 
same as the bug you've seen - the script is also not being actually saved to 
the object. But stepping into the script in the debugger seems to break it out 
of this dissociative state - so then you can save the script, and save the 
stack, and keep your changes.


No recipe, but I've seen this a number of times, most recently yesterday.

On 06/12/2019 01:29, Paul Dupuis via use-livecode wrote:

Windows 10 for me


On 12/5/2019 8:11 PM, Tom Glod via use-livecode wrote:

Are you all on Mac?  This does not ring a bell.

On Thu, Dec 5, 2019 at 8:02 PM Paul Dupuis via use-livecode <
use-livecode@lists.runrev.com> wrote:


On 12/5/2019 6:38 PM, Bob Sneidar via use-livecode wrote:

On Dec 5, 2019, at 15:04 , Paul Dupuis via use-livecode <

use-livecode@lists.runrev.com> wrote:

On 12/5/2019 5:42 PM, Curry Kenworthy via use-livecode wrote:

Wondering if this bug has already been reported?

I've seen a wonderful LC 9 IDE bug: sometimes the Script Editor window

seems to disassociate from the object being edited. Thus after this bug is
triggered, any typed script changes may not really be applied and saved,
although they are shown as applied. Next LC session, those changes are
gone; the stack code is still as it was prior to the bug being triggered
and prior to editing the script.

An alternate form is that the script changes actually are applied, but

in a bad way: first the script disassociates completely and is empty, then
the empty script is saved, overwriting the previous script. Nice! (I think
this is my favorite variation; if we're going to cause loss of work/code,
might as well do it boldly and not beat around the bush.)

I suspect this happens more on Mac than Windows, but since I don't

have a recipe, not sure. I've seen this happen to other people rather than
on my own machine. On LC 905 for sure, and probably on 950 also.

If Script Editor disassociation does happen, I advise immediate but

careful no-save quit or force quit, and pray that you're already in the
habit of backing up beforehand. Copy and paste the current script text to
an external text editor if necessary. Of course this particular bug just
might be able to defeat the safety of stack backups too in some situations,
but hey, that's why it's an extra-fabulous bug!

So, in addition to being a bit crashy and glitchy, the 9 IDE is a bit

work-lossy. That could turn off both new and old users if they are the
humor-deficient type to frown on losing some work. But shucks, ain't no
thang! Only features features features (and new side projects) matter! Glad
we all agree on that.

Any reports or recipes on this issue? I'll post a report if there is

none. Thanks

I saw a similar error in earlier versions of LC9 where the script I was

editing was for a different object that what was indicate the Project
Browser. So the Project Browser was showing (highlighting) Object A but
actually thought it was on Object B.

It occurred fairly intermittently. I never developed a recipe and I

have not see this in the most recent releases (9.0.5 and 9.5.1)

Ditto. Hasn't happened for a while though.

Bob S



Of course, I am not saying that the bug isn't still in the current
releases, just that I have not noticed it in the current releases ;-)


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


scrollbars on iOS

2019-12-05 Thread Ben Rubinstein via use-livecode
I'm trying to make a very simple app featuring a large browser widget in a 
small group. Not entirely to my surprise, the browser widget is displayed over 
the scrollbars of the group (it's cropped to the outer borders of the group, 
but not taking account of the scrollbars).


That's OK I thought (this app is for my own use) - I'll tell the group not to 
bother displaying scrollbars, and add my own scrollbars outside it, to scroll 
the group. This works fine on desktop. On iOS (which is what I want it for) 
the scrollbars sort of work - but they have tiny 'thumbs', the draggable 
moving bit.


I was surprised because I know I've done another iOS app on which the 
scrollbars seemed to behave normally (with proportional thumbs). When I went 
to look however, I found that this was a case where I'd had a group displaying 
its own scrollbars, and that seemed fine.


Is there some trick to make normal scrollbars work OK on mobile (specifically 
iOS)?


TIA,

Ben

___
use-livecode mailing list
use-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: Thermal printer bluetooth

2019-11-05 Thread Ben Rubinstein via use-livecode
Not sure of the current status but a couple of years ago I had excellent 
results using the mergBLE extensions - I was able to do both high- and low- 
level bluetooth things on Mac and on iOS. http://mergext.com/home/mergble/


I can't recall - when Monte joined LiveCode, did the mergExt package get 
rolled in somehow?


Ben

On 05/11/2019 11:46, General 2018 via use-livecode wrote:

Hi ,

Something we need on LC Mac , LC Android and LC IOS also.

Bluetooth and USB works fine on LC Windows using Virtual Com port.
Serial over USB.
Serial over Bluetooth.

Unfortunately no current cross platform solution with LC which would open up 
solution for all those apps that communicate with external hardware if put 
right.

Regards Camm


On 5 Nov 2019, at 11:17, Riko Abdul via use-livecode 
 wrote:

Why does LC not support Bluetooth. I want to use a thermal printer for my
application. I use LC for Android but I found a problem using Bluetooth for
Android. whether LC cannot be used for printers with Bluetooth?

Thanks


___
use-livecode mailing list
use-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: cr, lf, and reading in terminals/vim

2019-10-31 Thread Ben Rubinstein via use-livecode

My suggestion is to just bite the bullet and build LC where 'file' exports
using LF on Mac


Oh please yes!

It's been 18 years since the Mac standardised on LF. (And AFAIK Metacard only 
started supporting the Mac eight years before that, so 
Metacard/Revolution/LiveCode has already been writing the 'wrong' files for 
twice as long as it was writing the 'right' ones.)


As you say, it's moot on import to LC; so the only instance where this change 
could cause a compatibility issue would be where an LC-based tool is 
generating files for consumption by some other system which is dependent on 
them being CR format. Such a tool is presumably going to be Mac based - a 
Windows or *nix system would be more likely to reject that format than depend 
on it, if it accepts the format it's probably sophisticated enough to accept 
LF as well. So we're talking about a Mac based system which is still running 
but which in 18 years hasn't been updated to at least also accept the native 
format of the OS that it runs on. And this will only be an issue if someone 
updates their app producing these files to the latest version of LC (in which 
case they will surely anyway be having to take special precautions and write 
the file as binary to avoid confusing an ancient system with UTF8??). I don't 
know if such a case exists; I certainly doubt if there are very many such.


Brian - what would be required before you could submit your work as a PR again?

Ben


On 31/10/2019 03:26, Brian Milby via use-livecode wrote:

My suggestion is to just bite the bullet and build LC where 'file' exports
using LF on Mac.  The change required is literally a couple of characters
in one file (maybe two files to include the server default, but you can
already change it there on demand).  Leave the constants as they are (LF).
It could be announced as something for 9.6 to give the community time to
test.  The only way it would be a problem is if you were exporting a text
file on a Mac that was going to be consumed by a program that depended on
CR line endings.

Since LC consumes all 3 formats equally well, it would be no issue on the
read side.

Internally the concern is the build tools/environment.  I've built LC with
it changed (actually submitted it as part of a PR, but had to reverse it)
before 9 was GM.  It passed the automated tests when I did it.

On Wed, Oct 30, 2019 at 10:28 PM Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:


Brian Milby wrote:

  > The reason for the difficulty is that internally LC uses LF as the
  > line ending.  The cr, lf, and return constants all actually map to LF.
  > When you write a text file, LC will convert line endings to the native
  > format.  So for Windows you get CRLF, Linux gets LF, and Mac gets CR.
  > I take issue with this because as of OS X the native line ending for
  > the OS is actually now LF...

Agreed.

The hard question is: What shall we do about it?

On the one hand, we have millions of lines of code in our community that
use CR, and a certain percentage of those are dependent on CR having a
specific value (even if that value is inconsistent with the true ASCII
value).

On the other hand, we have a constant that suggests it's one thing when
it's really something else, and at this point that design decision
benefits no one and confuses many.

Favor backward compatibility, or language learnability/usability?

--
   Richard Gaskin
   Fourth World Systems
   Software Design and Development for the Desktop, Mobile, and the Web
   
   ambassa...@fourthworld.comhttp://www.FourthWorld.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


Re: Using LiveCode & AppleScript to make mouse selection in another Mac application

2019-09-11 Thread Ben Rubinstein via use-livecode

Keyboard Maestro is indeed the best solution, thank you Bob.

FWIW I'd just managed to find a horrible hack, by enabling the "Mouse Keys" 
facility, and using System Events to send numeric keypad codes to lock the 
mouse down and move it - one pixel at a time


Keyboard Maestro is a rather better solution, and looks excellent.

Thanks for the tip!

Ben

On 11/09/2019 05:28, Rick Harrison via use-livecode wrote:

Hi Bob,

Thanks for telling us about Keyboard Maestro!

I used to use Quikeys for Mac for a long time, but
they haven’t updated it for quite some time and
I was hoping to find a substitute.  It looks like
Keyboard Maestro is like Quikeys on Steroids!

Thanks again,

Rick


On Sep 10, 2019, at 5:52 PM, Bob Sneidar via use-livecode 
 wrote:

You need a Macro program. I like Keyboard Maestro.

Bob S


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


Re: Using LiveCode & AppleScript to make mouse selection in another Mac application

2019-09-10 Thread Ben Rubinstein via use-livecode

Hi Tom and Martin,

Thanks for the responses. That's where I'm at the moment; the problem is that 
I AFAICT I can click at a position using System Events; but I can't click at 
one location and release at another. The issue is that I'm trying to make a 
rectangular selection, encompassing a number of elements; rather than trying 
to select an actual element.


This is actually to crop each page of a many page PDF, using the rectangular 
selection tool in either Preview or PDFpen. (AFAICT ImageMagick is no good 
because it rasterises PDF pages before cropping them, whereas I want to retain 
 all the PDF fidelity goodness, but just mask each page.)


I can click: but I can't mouse down in one location, and release it in another.

Ben

On 05/09/2019 20:59, Tom Glod via use-livecode wrote:

I dunno if this works but you can try

do myscript as "Applescript"

abd your myscript can be

tell application "System Events"
   click at {123,456}end tell

I'm currently working on debugging a tool that uses applescript to
send keystrokes..and i'm finding it inconsistent ...but it could just
be me, so for now I won't say that its the applescript functionality.





On Thu, Sep 5, 2019 at 2:38 PM Ben Rubinstein via use-livecode <
use-livecode@lists.runrev.com> wrote:


As the title says...

I had a recollection that it was possible to construct a tool in LiveCode
that
would use AppleScript, System Events, and the accessibility framework to
perform actions on another (not naturally scriptable) app.

I can do menu items, I can do keystrokes - but can I move the mouse? Or
more
to the point, can I move the mouse to a location, then click and drag to a
new
location?

Automator appears to be able to do this as a recording, which works once
as a
single step - but ever since hangs on playback (amusingly, it moves the
mouse
to the first point and then refuses to let it be moved anywhere else -
pulling
it back if it is - the only escape seems to be to use the keyboard to open
a
terminal and kill Automator).

Did I dream this, or is it possible?

TIA,

Ben

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


Using LiveCode & AppleScript to make mouse selection in another Mac application

2019-09-05 Thread Ben Rubinstein via use-livecode

As the title says...

I had a recollection that it was possible to construct a tool in LiveCode that 
would use AppleScript, System Events, and the accessibility framework to 
perform actions on another (not naturally scriptable) app.


I can do menu items, I can do keystrokes - but can I move the mouse? Or more 
to the point, can I move the mouse to a location, then click and drag to a new 
location?


Automator appears to be able to do this as a recording, which works once as a 
single step - but ever since hangs on playback (amusingly, it moves the mouse 
to the first point and then refuses to let it be moved anywhere else - pulling 
it back if it is - the only escape seems to be to use the keyboard to open a 
terminal and kill Automator).


Did I dream this, or is it possible?

TIA,

Ben

___
use-livecode mailing list
use-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: Problems with segmented control widget

2019-08-30 Thread Ben Rubinstein via use-livecode
I forgot to mention that both these issues can be worked around - but 
surprisingly, the second is easier than the first.


Using "wait 0 seconds with messages" after changing the hilitedItems allows 
the hiliteChanged message to be processed immediately; but even then testing 
the lockMessages is unhelpful - it's always false (presumably because it's in 
a different thread? Although I thought that lockMessages was a global property?)


So the complete solution is to have a global set to mirror lockMessages, and 
wait with messages whenever the state is changed by script.


Anyway, my real question is: is it just a bug, fixable in the widget 
definiton, that messages emitted by some widgets (at least Navbar is the same) 
are not handled in the same way as native controls? Or is this a fundamental 
limitation of LCB?


Ben

On 30/08/2019 09:30, Ben Rubinstein via use-livecode wrote:
I've been using this widget and found some issues. Before I report the bug(s) 
I want to check if I'm missing some knowledge or understanding.


At various times I need to change the hilitedItems on the control by script; 
at other times I need to react when the user does so. For the latter case I 
respond to the "hiliteChanged" message.


The problem came when I change the hilitedItems by script: it triggered 
hiliteChanged causing all sorts of hilarity. I had trouble tracking it down 
because when I stepped through the code I couldn't see any point when the 
problems occurred. Setting lockMessages didn't help.  And even when I checked 
the lockMessages in my hiliteChanged handler, the aberrant behaviour continued..


After further investigation, the upshot is that there are two issues:

- the widget pays no attention to the lockMessages in deciding to post 
"hiliteChanged"


- although it redraws immediately in response to a change in hilitedItems, the 
hiliteChanged message (or potentially multiple messages stacked up) is not 
sent until idle time.


(The latter issue explains my problem with spotting where the issue was 
occurring, and also why checking the lockMessages in my hiliteChanged handler 
didn't help - because by the time the handler was invoked, the lockMessages 
*was* false.)


The first issue is presumably straightforward to address.

Is there some fundamental property of widgets that make it impossible to fix 
the second issue?


TIA,

Ben

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


Problems with segmented control widget

2019-08-30 Thread Ben Rubinstein via use-livecode
I've been using this widget and found some issues. Before I report the bug(s) 
I want to check if I'm missing some knowledge or understanding.


At various times I need to change the hilitedItems on the control by script; 
at other times I need to react when the user does so. For the latter case I 
respond to the "hiliteChanged" message.


The problem came when I change the hilitedItems by script: it triggered 
hiliteChanged causing all sorts of hilarity. I had trouble tracking it down 
because when I stepped through the code I couldn't see any point when the 
problems occurred. Setting lockMessages didn't help.  And even when I checked 
the lockMessages in my hiliteChanged handler, the aberrant behaviour continued..


After further investigation, the upshot is that there are two issues:

- the widget pays no attention to the lockMessages in deciding to post 
"hiliteChanged"


- although it redraws immediately in response to a change in hilitedItems, the 
hiliteChanged message (or potentially multiple messages stacked up) is not 
sent until idle time.


(The latter issue explains my problem with spotting where the issue was 
occurring, and also why checking the lockMessages in my hiliteChanged handler 
didn't help - because by the time the handler was invoked, the lockMessages 
*was* false.)


The first issue is presumably straightforward to address.

Is there some fundamental property of widgets that make it impossible to fix 
the second issue?


TIA,

Ben

___
use-livecode mailing list
use-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: building to iOS 5.1

2019-07-03 Thread Ben Rubinstein via use-livecode

That's great, thank you Panos.

Ben

On 03/07/2019 11:38, panagiotis merakos wrote:

Hello Ben,

You can definitely build an app for the iPad 1 in LC 7.1.4, and probably (Ι 
don't remember now) in some early versions of LC 8.x.


Just make sure you choose "5.1.1 or later" in the iOS standalone settings, and 
check the checkbox "build 32bit slice only"


The version of Xcode you'll need with LC 7.1.4 depends on the version of your 
MacOS:


LiveCode 7.1.4  Xcode 7.2   Mac OS 10.10
LiveCode 7.1.4  Xcode 7.3   Mac OS 10.11


If you are on a newer MacOS, I am not sure if you will be able to install 
Xcode 7.2 or 7.3.


Hope this helps,
Panos
--



On Wed, 3 Jul 2019 at 13:24, Ben Rubinstein via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:


I have an iPad 1 which I could save from the e-wasteheap if I could build a
simple app for it.

My current install of LiveCode will only build back to iOS 8 (enough to do
something useful for my iPad 2!).

The splendid

https://livecode.com/docs/9-0-4/faq/faq/#what-version-of-livecode-works-with-which-version-of-xcode-ios

only goes back to iOS 6.0; but of course at one time it was possible to use
LiveCode to build apps for iOS 5.

I'm not sure what the limiting factors are: do I need earlier version of
LiveCode, of Xcode, of MacOS, or all three?

To save me endless miserable experimentation, does anyone know the answer? 
Is
anyone else currently set up to do this?

TIA,

Ben

___
use-livecode mailing list
use-livecode@lists.runrev.com <mailto:use-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

building to iOS 5.1

2019-07-03 Thread Ben Rubinstein via use-livecode
I have an iPad 1 which I could save from the e-wasteheap if I could build a 
simple app for it.


My current install of LiveCode will only build back to iOS 8 (enough to do 
something useful for my iPad 2!).


The splendid
https://livecode.com/docs/9-0-4/faq/faq/#what-version-of-livecode-works-with-which-version-of-xcode-ios

only goes back to iOS 6.0; but of course at one time it was possible to use 
LiveCode to build apps for iOS 5.


I'm not sure what the limiting factors are: do I need earlier version of 
LiveCode, of Xcode, of MacOS, or all three?


To save me endless miserable experimentation, does anyone know the answer? Is 
anyone else currently set up to do this?


TIA,

Ben

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

2019-03-19 Thread Ben Rubinstein via use-livecode

Thanks for the reminder, Ralph, and glad you indeed had backups.

On which subject... my top tip to friends, family, and even casual 
acquaintances is *Backblaze* network backup.


It's not a substitute for local and off-site direct backups. I'm sure that as 
professionals in an IT-related field we all have all those in hand. And for 
those with just a laptop rather than a big raid array etc all the operating 
systems now make it trivially easy (and cheap) to plug in a little USB drive 
and be backed up. But our less technical friends and family may just not have 
got round to it yet; and if they have - especially with a laptop - they may 
not remember to plug the backup drive in very often.


There are lots of network backup options of course - I could never get round 
to setting it up for my family's machines because there were too many options 
to choose between, and surely I should go one of the free setups between 
computers... etc. Too many options, result inertia.


What makes Backblaze fantastic, in my opinion, is that they've cut through all 
of that, reducing to the absolute minimum the effort and choices required. Go 
to https://backblaze.com, click "try it for free", enter your email address 
and make up a password. It downloads a little installer - you run that and 
you're essentially done.


They bake your email/password into the installer so you don't have to do 
anything else. After a while they'll email you to tell you how it's going; 
eventually they'll email to invite you to give them your credit card if you 
want to keep going. There is a control panel, there are options, there are 
other groovy features - but if you never know about or touch them you'll still 
be getting backed up.


There are also no plans to choose between: it's $60/computer/year, regardless 
of how big (or how many) the drive(s) attached to that computer.


Backblaze are very clear that this shouldn't be your first- or second-line 
backup. They're right. But if I ask my spouse or child when they last plugged 
the backup drive into their laptop, I know the answer will make me cry. The 
fact that Backblaze will have kept running to the last minute they closed the 
lid is my sanity clause. When bad things inevitably happen - and of course it 
will fall to me to deal with it - I will be able to rescue their undeserving 
asses!


I don't want to give you an affiliate link because I'd rather you got backed 
up than doubted the purity of my evangelism! If you're all covered, good for 
you. But if you're not, or if your cousin, colleague, or chiropractor look 
like they need a clue - I think this is a very small amount of money to 
increase peace of mind.


Ben


On 19/03/2019 16:59, Ralph DiMola via use-livecode wrote:

Just a reminder... On Win 10 my 2 TB Raid 1 array using 1.3 TBs containing
all my data, 3 dev VMs and all my source code was corrupted. It took a very
annoying day to replace HW(controller) and recover data/VMs from my backups.
All is back with NO data loss.

As it has been said here before "Raid is not a substitute for backups". I
have multiple copies with at least 1 off-line(crypto locker/power surge) and
1 off-site(fire/theft). I don't use any cloud backups. Why? MySpace lost 12
years of user data last year. Although cloud backup reliability is high it's
not high enough for me to bet my business on not to mention how long it
would take to download 1.3 TBs. Although all my Mac data is an SMB to the
Win Raid I still use Time Machine on the Mac so I don't need to re-install
components needed development.

Stay vigilant my friends.

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net


___
use-livecode mailing list
use-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: Strip XMP Packet from the end of binary image data

2019-02-04 Thread Ben Rubinstein via use-livecode

On 01/02/2019 22:43, Richard Gaskin via use-livecode wrote:

Tom Glod wrote:

 > The problem for me was that Fireworks was updating the clipboard data
 > every second ..effectively changing the content of the clipboard even
 > if it didn't change..The image was not changing , but the meta
 > data was.  so I had a runaway "Clipboard changing message" ...

As one would expect.  Any word from Adobe on why they're hammering the user's 
clipboard for no apparent reason?


I think it's like the scorpion in Aesop's fable 
(http://www.aesopfables.com/cgi/aesop1.cgi?4) - Adobe 
can't help themselves, it's just in their nature.


___
use-livecode mailing list
use-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: Strip XMP Packet from the end of binary image data

2019-02-04 Thread Ben Rubinstein via use-livecode
Hey don't knock the invisible characters in PDFs - that's a feature. I just 
recently wrote something in LiveCode precisely to generate PDFs containing 
invisible (but search-able, select=able, copy-able) text.



On 01/02/2019 16:36, Bob Sneidar via use-livecode wrote:

Adobe does a LOT of crap when copying to the clipboard. Copy text from an OCR'd 
PDF sometime and paste it into a Livecode field. You may find the number of 
characters is more than are visible. This is what inspired me to write my 
cleanAscii function which filters out all chars before 32 and after 126.

Bob S



On Jan 31, 2019, at 14:23 , Tom Glod via use-livecode 
 wrote:

Scratch taht, its the modified date timestamp that changes.

I will try using regex to get the ID and check it to see if the clipboard
image really changed or not.

should be a safer and quicker workaround...I think all adobe software does
this when copying to clipboard.


___
use-livecode mailing list
use-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: screensChanged ? (was Re: screenRect and screenLoc weirdness)

2019-01-14 Thread Ben Rubinstein via use-livecode
Aha! Thanks Paul, that's just what I needed. I looked through all the 
'changed' messages in the dictionary but didn't spot that one.


Ben

On 14/01/2019 13:38, Paul Dupuis via use-livecode wrote:

This is the 'desktopChanged' message -- see Dictionary

On 1/14/2019 8:22 AM, Ben Rubinstein via use-livecode wrote:
Related to this: is there any possibility of getting a "screensChanged" 
message? I work on multi-monitor setups all the time, and have not been 
bothered by the issue with screenRects because they've always told the truth 
relative to each other.


However, the problem is that my set-up changes multiple times a day. Mostly 
it's taking my laptop in and out of meetings, so switching from one 
multi-monitor set-up to single monitor; but sometimes I'm plugging it into a 
meeting room screen, and sometimes mirroring, and sometimes I end up with 
the three screens.


Many apps (including, to some extent, the LiveCode IDE) respond when this 
happens. But my own apps can't unless I specifically ask them to.


AFAICT there is no message stacks can get to tell them to get the 
screenRects again and take another look. Could there be a "screensChanged" 
or similar? (Or we could even overload "orientationChanged" for this 
purpose, although that would be probably be an error.)


Ben


On 11/01/2019 15:59, Bob Sneidar via use-livecode wrote:
I was probably the first person to mention it. I get around it by setting 
the position of my stacks when opened or resumed to be within the bounds of 
the monitor. Actually, this will happen when switching from the single 
built-in display of a laptop to a dual display with the laptop closed 
(built-in monitor off). If the second display is a lower resolution (as it 
likely will be with retina displays) the OS will position open windows in 
the nearest spot that can display the entire window if possible.


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


screensChanged ? (was Re: screenRect and screenLoc weirdness)

2019-01-14 Thread Ben Rubinstein via use-livecode
Related to this: is there any possibility of getting a "screensChanged" 
message? I work on multi-monitor setups all the time, and have not been 
bothered by the issue with screenRects because they've always told the truth 
relative to each other.


However, the problem is that my set-up changes multiple times a day. Mostly 
it's taking my laptop in and out of meetings, so switching from one 
multi-monitor set-up to single monitor; but sometimes I'm plugging it into a 
meeting room screen, and sometimes mirroring, and sometimes I end up with the 
three screens.


Many apps (including, to some extent, the LiveCode IDE) respond when this 
happens. But my own apps can't unless I specifically ask them to.


AFAICT there is no message stacks can get to tell them to get the screenRects 
again and take another look. Could there be a "screensChanged" or similar? (Or 
we could even overload "orientationChanged" for this purpose, although that 
would be probably be an error.)


Ben


On 11/01/2019 15:59, Bob Sneidar via use-livecode wrote:

I was probably the first person to mention it. I get around it by setting the 
position of my stacks when opened or resumed to be within the bounds of the 
monitor. Actually, this will happen when switching from the single built-in 
display of a laptop to a dual display with the laptop closed (built-in monitor 
off). If the second display is a lower resolution (as it likely will be with 
retina displays) the OS will position open windows in the nearest spot that can 
display the entire window if possible.


___
use-livecode mailing list
use-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: Upgrading OpenSSL in 6.7.11

2019-01-08 Thread Ben Rubinstein via use-livecode
(Apologies for multi-sending previous message.)  Interestingly, I find that 
the issue doesn't occur in 6.7.11 on Mac, but only when the standalone is run 
on Windows (Server 2012 R2).


The reported error is:
error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert 
handshake failure

Ben

On 08/01/2019 14:54, Ben Rubinstein via use-livecode wrote:

Hi David,

I've just run up against exactly this issue. It's the last six months of a 
legacy app that's going to be retired, so I'm reluctant to go through the 
whole process of validating it under LC 8.


Did you ever get a solution to this?

Many thanks,

Ben

On 14/09/2017 00:34, David Beck via use-livecode wrote:

Hello,

For one of our applications we are still running LiveCode v6.7.11, and have
come across an issue hitting an API that only supports TLS 1.2 and later.
It appears that the version of OpenSSL / revsecurity that is being
distributed with v6.7.11 does not support TLS version 1.2. Upgrading to
LiveCode v8.1.6 solves the issue, however, there are some upgrade related
"bumps" that we will need some time to work through, so it will take some
time to resolve this issue through moving to LC8.

Does anybody know how we might obtain / build a version of revsecurity that
works with 6.7.11 with the most recent version of OpenSSL?

Thank you in advance for any help!

David Beck
Rotunda Software
___
use-livecode mailing list
use-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: Upgrading OpenSSL in 6.7.11

2019-01-08 Thread Ben Rubinstein via use-livecode

Hi David,

I've just run up against exactly this issue. It's the last six months of a 
legacy app that's going to be retired, so I'm reluctant to go through the 
whole process of validating it under LC 8.


Did you ever get a solution to this?

Many thanks,

Ben

On 14/09/2017 00:34, David Beck via use-livecode wrote:

Hello,

For one of our applications we are still running LiveCode v6.7.11, and have
come across an issue hitting an API that only supports TLS 1.2 and later.
It appears that the version of OpenSSL / revsecurity that is being
distributed with v6.7.11 does not support TLS version 1.2. Upgrading to
LiveCode v8.1.6 solves the issue, however, there are some upgrade related
"bumps" that we will need some time to work through, so it will take some
time to resolve this issue through moving to LC8.

Does anybody know how we might obtain / build a version of revsecurity that
works with 6.7.11 with the most recent version of OpenSSL?

Thank you in advance for any help!

David Beck
Rotunda Software
___
use-livecode mailing list
use-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: Upgrading OpenSSL in 6.7.11

2019-01-08 Thread Ben Rubinstein via use-livecode

Hi David,

I've just run up against exactly this issue. It's the last six months of a 
legacy app that's going to be retired, so I'm reluctant to go through the 
whole process of validating it under LC 8.


Did you ever get a solution to this?

Many thanks,

Ben

On 14/09/2017 00:34, David Beck via use-livecode wrote:

Hello,

For one of our applications we are still running LiveCode v6.7.11, and have
come across an issue hitting an API that only supports TLS 1.2 and later.
It appears that the version of OpenSSL / revsecurity that is being
distributed with v6.7.11 does not support TLS version 1.2. Upgrading to
LiveCode v8.1.6 solves the issue, however, there are some upgrade related
"bumps" that we will need some time to work through, so it will take some
time to resolve this issue through moving to LC8.

Does anybody know how we might obtain / build a version of revsecurity that
works with 6.7.11 with the most recent version of OpenSSL?

Thank you in advance for any help!

David Beck
Rotunda Software
___
use-livecode mailing list
use-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: IMAP library, or support via tsNet?

2019-01-04 Thread Ben Rubinstein via use-livecode

That's great, thank you Charles.

Ben

On 04/01/2019 00:08, Charles Warwick via use-livecode wrote:

Hi Ben,

Support for IMAP was added into tsNet a while ago. There are a few lessons that 
I’ve added to LiveCode’s website on IMAP.

Lessons:

http://lessons.livecode.com/m/4071/l/858279-how-to-use-tsnet-to-display-an-e-mail-message-from-an-imap-account

http://lessons.livecode.com/m/4071/l/858974-how-to-use-tsnet-to-display-the-folders-stored-in-an-imap-account

http://lessons.livecode.com/m/4071/l/860779-how-to-use-tsnet-to-delete-an-e-mail-message-from-an-imap-account

Regards,

Charles.


On 4 Jan 2019, at 5:56 am, Ben Rubinstein via use-livecode 
 wrote:

Aha! I didn't even realise that there was an imap URL protocol.

Thanks Matthias, that's exactly what I needed.

best regards,

Ben


On 03/01/2019 13:57, Matthias Rebbe via use-livecode wrote:
Ben,
i just did a quick test with my local test mai server. This script for example 
would output the number of messages in the imap folder to the message box.
put tUSERNAME into pSettings["username"]
put put into pSettings["password"]
put "STATUS INBOX (MESSAGES)" into pRequest
put "imap://192.168.7.25" into pURL
put tsnetCustomSync(pURL,pRequest,xHeaders,rOutHeaders,rResult,rBytes,pSettings)
Did not try ssl, but should work also.
Regards,
Matthias
Matthias Rebbe
free tools for Livecoders:
https://instamaker.dermattes.de
https://winsignhelper.dermattes.de

Am 03.01.2019 um 12:17 schrieb Ben Rubinstein via use-livecode 
:

Is there anything in the way of an IMAP library around?

My needs are relatively simple: I want to connect to an iMAP server, 
recursively list folders and fetch the size of each (if necessary by fetching 
the size of each message)

e.g. in JavaScript with this library
https://github.com/emailjs/emailjs-imap-client
I'd be using
connect()
listMailboxes()
listMessages(... ['RFC822.SIZE'])
...

Is there a library that would support this kind of access?

Does tsNet provide anything above the basic network primitives to support this? 
 Some time I ago there was a tantalising hint on this list:


On 24/08/2017 11:05, Charles Warwick via use-livecode wrote:
IMAP and POP3 support in tsNet under Linux is only available in tsNet 1.3.0+ 
which will be bundled with the next LC release.
All other platforms have had support for those protocols for a while.  I hope 
to have some documentation available in the next two weeks.


Did that ever come to fruition?


Many thanks,

Ben

___
use-livecode mailing list
use-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: IMAP library, or support via tsNet?

2019-01-03 Thread Ben Rubinstein via use-livecode

Aha! I didn't even realise that there was an imap URL protocol.

Thanks Matthias, that's exactly what I needed.

best regards,

Ben

On 03/01/2019 13:57, Matthias Rebbe via use-livecode wrote:

Ben,

i just did a quick test with my local test mai server. This script for example 
would output the number of messages in the imap folder to the message box.

put tUSERNAME into pSettings["username"]
put put into pSettings["password"]
put "STATUS INBOX (MESSAGES)" into pRequest
put "imap://192.168.7.25" into pURL
put tsnetCustomSync(pURL,pRequest,xHeaders,rOutHeaders,rResult,rBytes,pSettings)

Did not try ssl, but should work also.


Regards,

Matthias



Matthias Rebbe

free tools for Livecoders:
https://instamaker.dermattes.de
https://winsignhelper.dermattes.de


Am 03.01.2019 um 12:17 schrieb Ben Rubinstein via use-livecode 
:

Is there anything in the way of an IMAP library around?

My needs are relatively simple: I want to connect to an iMAP server, 
recursively list folders and fetch the size of each (if necessary by fetching 
the size of each message)

e.g. in JavaScript with this library
https://github.com/emailjs/emailjs-imap-client
I'd be using
connect()
listMailboxes()
listMessages(... ['RFC822.SIZE'])
...

Is there a library that would support this kind of access?

Does tsNet provide anything above the basic network primitives to support this? 
 Some time I ago there was a tantalising hint on this list:

On 24/08/2017 11:05, Charles Warwick via use-livecode wrote:

IMAP and POP3 support in tsNet under Linux is only available in tsNet 1.3.0+ 
which will be bundled with the next LC release.
All other platforms have had support for those protocols for a while.  I hope 
to have some documentation available in the next two weeks.


Did that ever come to fruition?


Many thanks,

Ben

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


IMAP library, or support via tsNet?

2019-01-03 Thread Ben Rubinstein via use-livecode

Is there anything in the way of an IMAP library around?

My needs are relatively simple: I want to connect to an iMAP server, 
recursively list folders and fetch the size of each (if necessary by fetching 
the size of each message)


e.g. in JavaScript with this library
https://github.com/emailjs/emailjs-imap-client
I'd be using
connect()
listMailboxes()
listMessages(... ['RFC822.SIZE'])
...

Is there a library that would support this kind of access?

Does tsNet provide anything above the basic network primitives to support 
this?  Some time I ago there was a tantalising hint on this list:


On 24/08/2017 11:05, Charles Warwick via use-livecode wrote:
IMAP and POP3 support in tsNet under Linux is only available in tsNet 1.3.0+ 
which will be bundled with the next LC release.


All other platforms have had support for those protocols for a while.  I hope 
to have some documentation available in the next two weeks.


Did that ever come to fruition?


Many thanks,

Ben

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

IMAP library, or support via tsNet?

2019-01-03 Thread Ben Rubinstein via use-livecode

Is there anything in the way of an IMAP library around?

My needs are relatively simple: I want to connect to an iMAP server, 
recursively list folders and fetch the size of each (if necessary by fetching 
the size of each message)


e.g. in JavaScript with this library
https://github.com/emailjs/emailjs-imap-client
I'd be using
connect()
listMailboxes()
listMessages(... ['RFC822.SIZE'])
...

Is there a library that would support this kind of access?

Does tsNet provide anything above the basic network primitives to support 
this?  Some time I ago there was a tantalising hint on this list:


On 24/08/2017 11:05, Charles Warwick via use-livecode wrote:
IMAP and POP3 support in tsNet under Linux is only available in tsNet 1.3.0+ 
which will be bundled with the next LC release.


All other platforms have had support for those protocols for a while.  I hope 
to have some documentation available in the next two weeks.


Did that ever come to fruition?


Many thanks,

Ben

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

Re: iOS sharing extension

2018-11-20 Thread Ben Rubinstein via use-livecode

You need to do two things:

- add code in your app to handle the "urlWakeUp" message, see the dictionary 
entry and

http://lessons.livecode.com/m/4069/l/58672-using-custom-url-schemes

- add entries in the app's plist to tell the operating system what file types 
your app can handle, see

https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-101685

The latter is the bit you need to do for iOS - not sure what the Android 
equivalent is.



On 19/11/2018 20:35, David Bovill via use-livecode wrote:

How could I create the ability for Livecode mobile apps - say iOS but
ideally also on Android) to add the ability for other apps to share to them?

-

https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/Share.html

I can't find any thread here or in the forums?
___
use-livecode mailing list
use-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: What is LC's internal text format?

2018-11-20 Thread Ben Rubinstein via use-livecode
This isn't about strongly typed variables though, but about when (correct) 
conversion is possible.


LC throws an error if you implicitly ask it to convert the wrong kind of 
string to a number - for example, add 45 to "horse". (Obviously multiplication 
is fine: the answer would be "45 horses".)


LC throws an error if you implicitly ask it convert the wrong kind of string 
or number to a colour: try setting the backcolor of a control to "horse".


LC throws an error if asked to convert a number, or the wrong kind of string, 
to a boolean: try setting the hilite of a button to 45.


In all these cases, LC knows it cannot do the right thing, so it throws an 
error to tell you so, rather than guessing, for example, what the truth value 
of "45" is.


I'm just suggesting that it cannot know how to correctly convert binary data 
into a string - so it should throw an error rather than possibly (probably?) 
do the wrong thing.



On 20/11/2018 17:55, Mark Wieder via use-livecode wrote:

On 11/20/18 8:33 AM, Ben Rubinstein via use-livecode wrote:

Would it not be better to refuse to make an assumption, i.e. require an 
explicit conversion?


While I'd love to have the option of strongly typed variables at the scripting 
level, I know better than to expect that this will ever happen.




___
use-livecode mailing list
use-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: What is LC's internal text format?

2018-11-20 Thread Ben Rubinstein via use-livecode

Hi Monte,

Thanks for this, sorry for delayed reply - I've been away.

>> Does textEncode _always_ return a binary string? Or, if invoked with 
"CP1252", "ISO-8859-1", "MacRoman" or "Native", does it return a string?

>
> Internally we have different types of values. So we have MCStringRef which 
is the thing which either contains a buffer of native chars or a buffer of 
UTF-16 chars. There are others.

...
> The return type of textEncode is an MCDataRef. This is a byte buffer, 
buffer size & byte count.

>
> So:
> put textEncode(“foo”, “UTF-8”) into tFoo # tFoo holds MCDataRef
>
> Then if we do something like:
> set the text of field “foo” to tFoo
>
> tFoo is first converted to MCStringRef. As it’s an MCDataRef we just move 
the buffer over and say it’s a native encoded string. There’s no checking to 
see if it’s a UTF-8 string and decoding with that etc.


So my question would be, is this helpful?  If, given any MCDataRef (i.e. 
'binary string') LC makes the assumption - when it needs an MCStringRef - that 
the binary string is 'native' - then I would think it will be wrong more often 
that is correct!


IIUC, the chief ways to obtain an MCDataRef are by reading a file in binary 
mode, or by calling textEncode (or loading a non-file URL???). Insofar as one 
could make an assumption at all, my guess is that in the first case the data 
is more likely to be UTF8; and whatever is most likely in the second case, 
'native' is about the least likely. (If the assumption was UTF16 it would at 
least make more sense.)


Would it not be better to refuse to make an assumption, i.e. require an 
explicit conversion? If you want to proceed on the assumption that a file is 
'native' text, read it as text; if you know what it is, read it as binary and 
use textEncode. If you used textEncode anyway (or numToByte) then obviously 
you know what it is, and when you want to make a string out of it you can tell 
LC how to interpret it. Wouldn't it be better to throw an error if passing an 
MCDataRef where an MCStringRef is required, than introduce subtle errors by 
just making (in my opinion implausible) assumptions?


And now that the thought has occurred to me - when a URL with a non-file 
protocol is used a source of value, what is the type of the value - 
MCStringRef or MCDataRef?


thanks for the continuing education!

Ben

On 13/11/2018 23:44, Monte Goulding via use-livecode wrote:




On 14 Nov 2018, at 6:33 am, Ben Rubinstein via use-livecode 
 wrote:

That's really helpful - and in parts eye-opening - thanks Mark.

I have a few follow-up questions.

Does textEncode _always_ return a binary string? Or, if invoked with "CP1252", "ISO-8859-1", 
"MacRoman" or "Native", does it return a string?


Internally we have different types of values. So we have MCStringRef which is 
the thing which either contains a buffer of native chars or a buffer of UTF-16 
chars. There are others. For example, MCNumberRef will either hold a 32 bit 
signed int or a double. These are returned by numeric operations where there’s 
no string representation of a number. So:

put 1.0 into tNumber # tNumber holds an MCStringRef
put 1.0 + 0 int0 tNumber # tNumber holds an MCNumberRef

The return type of textEncode is an MCDataRef. This is a byte buffer, buffer size 
& byte count.

So:
put textEncode(“foo”, “UTF-8”) into tFoo # tFoo holds MCDataRef

Then if we do something like:
set the text of field “foo” to tFoo

tFoo is first converted to MCStringRef. As it’s an MCDataRef we just move the 
buffer over and say it’s a native encoded string. There’s no checking to see if 
it’s a UTF-8 string and decoding with that etc.

Then the string is put into the field.

If you remember that mergJSON issue you reported where mergJSON returns UTF-8 
data and you were putting it into a field and it looked funny this is why.



CodepointOffset has signature 'integer codepointOffset(string)', so when you
pass a binary string (data) value to it, the data value gets converted to a
string by interpreting it as a sequence of bytes in the native encoding.


OK - so one message I take are that in fact one should never invoke 
codepointOffset on a binary string. Should it actually throw an error in this 
case?


No, as mentioned above values can move to and from different types according to 
the operations performed on them and this is largely opaque to the scripter. If 
you do a text operation on a binary string then there’s an implicit conversion 
to a native encoded string. You generally want to use codepoint in 7+ generally 
where previously you used char unless you know you are dealing with a binary 
string and then you use byte.


By the same token, probably one should only use 'byte', 'byteOffset', 
'byteToNum' etc with binary strings - would it be better, to avoid confusion, 
if char, offset, charToNum should refuse to operate on a binary s

Re: What is LC's internal text format?

2018-11-13 Thread Ben Rubinstein via use-livecode

For the avoidance of doubt, all my outrage is faux outrage.
Public life on both sides of the Atlantic (and around the world) has 
completely exhausted capacity for real outrage.


Come back Geoff!

Ben

On 13/11/2018 17:29, Mark Waddingham via use-livecode wrote:

On 2018-11-13 18:21, Geoff Canyon via use-livecode wrote:

Nothing I said in this thread has anything to do with optimizing the
allOffsets routines; I only used examples from that discussion because they
illustrate my puzzlement on the exact topic you (in general) raised: how
data types are handled by the engine. I'd generalize the responses, to say
that it seems how the engine stores data and how it presents that data are
not identical in all cases.


The best way to think about it is that the engine stores data pretty much in 
the form it is presented with it; however, what script sees of data is in the 
form it requests. In particular, if data has been through some operation, or 
mutated, then there is a good change it won't be in the same form it was before.


e.g. put tVar + 1 into tVar

Here tVar could start off as a string, but would end up as a number by virtue 
of the fact you've performed an arithmetic operation on it.



The above notwithstanding: sorry I outraged you; I'll exit this thread.


Obviously I'm not Ben, but I *think* it was 'faux outrage' (well I hope it was 
- hence my jocular comment about herding cats!) - so I don't think there's a 
reason to exit...


Warmest Regards,

Mark.



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


Re: What is LC's internal text format?

2018-11-13 Thread Ben Rubinstein via use-livecode

That's really helpful - and in parts eye-opening - thanks Mark.

I have a few follow-up questions.

Does textEncode _always_ return a binary string? Or, if invoked with "CP1252", 
"ISO-8859-1", "MacRoman" or "Native", does it return a string?


> CodepointOffset has signature 'integer codepointOffset(string)', so when you
> pass a binary string (data) value to it, the data value gets converted to a
> string by interpreting it as a sequence of bytes in the native encoding.

OK - so one message I take are that in fact one should never invoke 
codepointOffset on a binary string. Should it actually throw an error in this 
case?


By the same token, probably one should only use 'byte', 'byteOffset', 
'byteToNum' etc with binary strings - would it be better, to avoid confusion, 
if char, offset, charToNum should refuse to operate on a binary string?



e.g. In the case of &, it can either take two data arguments, or two
string arguments. In this case, if both arguments are data, then the result
will be data. Otherwise both arguments will be converted to strings, and a
string returned.
The second message I take is that one needs to be very careful, if operating 
on UTF8 or other binary strings, to avoid 'contaminating' them e.g. by 
concatenating with a simple quoted string, as this may cause it to be silently 
converted to a non-binary string. (I presume that 'put "simple string" 
after/before pBinaryString' will cause a conversion in the same way as "&"? 
What about 'put "!" into char x of pBinaryString?)


The engine can tell whether a string is 'native' or UTF16. When the engine is 
converting a binary string to 'string', does it always interpret the source as 
the native 8-bit encoding, or does it have some heuristic to decide whether it 
would be more plausible to interpret the source as UTF16?


Thanks again for all the detail!

Ben

On 13/11/2018 13:31, Mark Waddingham via use-livecode wrote:

On 2018-11-13 12:43, Ben Rubinstein via use-livecode wrote:

I'm grateful for all the information, but _outraged_ that the thread
that I carefully created separate from the offset thread was so
quickly hijacked for the continuing (useful!) detailed discussion on
that topic.


The phrase 'attempting to herd cats' springs to mind ;)


From recent contributions on both threads I'm getting some more
insights, but I'd really like to understand clearly what's going on. I
do think that I should have asked this question more broadly: how does
the engine represent values internally?


The engine uses a number of distinct types 'behind the scenes'. The ones
pertinent to LCS (there are many many more which LCS never sees) are:

   - nothing: a type with a single value nothing/null)
   - boolean: a type with two values true/false
   - number: a type which can either store a 32-bit integer *or* a double
   - string: a type which can either store a sequence of native (single byte) 
codes, or a sequence of unicode (two byte - UTF-16) codes
   - name: a type which stores a string, but uniques the string so that 
caseless and exact equality checking is constant time

   - data: a type which stores a sequence of bytes
   - array: a type which stores (using a hashtable) a mapping from 'names' to 
any other storage value type


The LCS part of the engine then sits on top of these core types, providing
various conversions depending on context.

All LCS syntax is actually typed - meaning that when you pass a value to any
piece of LCS syntax, each argument is converted to the type required.

e.g. charToNativeNum() has signature 'integer charToNativeNum(string)' meaning 
that it

expects a string as input and will return a number as output.

Some syntax is overloaded - meaning that it can act in slightly different (but 
always consistent) ways depending on the type of the arguments.


e.g. & has signatures 'string &(string, string)' and 'data &(data, data)'.

In simple cases where there is no overload, type conversion occurs exactly as 
required:


e.g. In the case of charToNativeNum() - it has no overload, so always expects 
a string
which means that the input argument will always undergo a 'convert to string' 
operation.


The convert to string operation operates as follows:

    - nothing -> ""
    - boolean -> "true" or "false"
    - number -> decimal representation of the number, using numberFormat
    - string -> stays the same
    - name -> uses the string the name contains
    - data -> converts to a string using the native encoding
    - array -> converts to empty (a very old semantic which probably does more 
harm than good!)


In cases where syntax is overloaded, type conversion generally happens in 
syntax-specific sequence in order to preserve consistency:


e.g. In the case of &, it can either take two data arguments, or two string 
arguments. In this case,
if

Re: What is LC's internal text format?

2018-11-13 Thread Ben Rubinstein via use-livecode
I'm grateful for all the information, but _outraged_ that the thread that I 
carefully created separate from the offset thread was so quickly hijacked for 
the continuing (useful!) detailed discussion on that topic.


From recent contributions on both threads I'm getting some more insights, but 
I'd really like to understand clearly what's going on. I do think that I 
should have asked this question more broadly: how does the engine represent 
values internally?



I believe from what I've read that the engine can distinguish the following 
kinds of value:

- empty
- array
- number
- string
- binary string

From Monte I get that the internal encoding for 'string' may be MacRoman, ISO 
8859 (I thought it would be CP1252), or UTF16 - presumably with some attribute 
to tell the engine which one in each case.


So then my question is whether a 'binary string' is a pure blob, with no clues 
as to interpretation; or whether in fact it does have some attributes to 
suggest that it might be interpreted as UTF8, UTF132 etc?


If there are no such attributes, how does codepointOffset operate when passed 
a binary string?


If there are such attributes, how do they get set? Evidently if textEncode is 
used, the engine knows that the resulting value is the requested encoding. But 
what happens if the program reads a file as 'binary' - presumable the result 
is a binary string, how does the engine treat it?


Is there any way at LiveCode script level to detect what a value is, in the 
above terms?


And one more question: if a string, or binary string, is saved in a 'binary' 
file, are the bytes stored on disk a faithful rendition of the bytes that 
composed the value in memory, or an interpretation of some kind?


TIA,

Ben

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


What is LC's internal text format?

2018-11-12 Thread Ben Rubinstein via use-livecode

This is something that I've been wondering about for a while.

My unexamined assumption had been that in the 'new' fully unicode LC, text was 
held in UTF-8. However when I saved some text strings in binary I got 
something like UTF-8 - but not quite. And the recent experiments with offset 
suggested that LC at the least is able to distinguish between a string which 
is fully represented as single-byte (or perhaps ASCII?). And the reports of 
the ingenious investigators using UTF-32 to speed up offsets, and discovering 
that offset somehow managed to be case-insensitive in this case, made me 
wonder whether after using textEncode(xt, "UTF-32") LC marks the string in 
some way to give a clue about how to interpret it as text?


So could someone who is familar with this bit of the engine enlighten us? In 
particular:

- What is the internal format?
- Is it different on different platforms?
- Given that it appears to include a flag to indicate whether it is 
single-byte text or not, are there any other attributes?

- Does saving a string in 'binary' file faithfully report the internal format?

TIA,

Ben

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


Re: How to find offsets in Unicode Text fast

2018-11-12 Thread Ben Rubinstein via use-livecode
Coming late to this discussion. Very excited by this approach of converting 
everything to UTF-32 in order to do fast offsets.


I'm really confused that case-insensitive should work at all for UTF-16 or 
UTF-32; at this point as far as I understand it, LC has no idea that how to 
correctly interpret the value of the variable as text. Or at least, I'd expect 
it work for some things - e.g. A/a which are the same as single bytes; and 
_also_ for Å/å because those are also equivalently 'single byte' - 0xC5 and 
0xE5; but not for e.g. Ă/ă which are are 0x0102 and 0x0103, where I wouldn't 
expect 0x03 to be considered as a case-shifted version of 0x02. All this just 
proves that I don't understand what the new(ish) engine is doing with strings. 
I'm going to start a new thread to explore this.


In the meantime I'd be suspicious about doing a case-insensitive search in 
this way; but my guess would be that, if your use-case will accept 
case-sensitivity, it would be safer (and faster?) to use byteOffset on the 
UTF-32 data rather than offset.


Mr Very Picky would also suggest that to be really correct, the code in this 
case should also check that the offset found was on a four-byte boundary (tPos 
mod 4 = 1); it's probably a purely theoretical consideration, but I think that 
the four-byte sequence (representing the character you're searching for) could 
in theory be incorrectly matched across two other characters.


On 12/11/2018 05:00, Brian Milby via use-livecode wrote:

I just tried one additional test.  Search for "åå" within "aaååÅÅååaa".
(On a Mac keyboard, the characters are made with A, Option-A, and
Shift-Option-A.)  The Offset UTF16 version does not return the correct
result if case sensitive is false (returns the same value as if it were
true: 3,7).  Every other version correctly performs the case folding
(3,4,5,6,7).
___
use-livecode mailing list
use-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: Using Dylibs in LiveCode?

2018-10-17 Thread Ben Rubinstein via use-livecode
That's great - thanks both. I'll find some time to dive in, and will doubtless 
need to come up for air either here or on the forums...


Ben

On 17/10/2018 22:49, Monte Goulding via use-livecode wrote:




On 18 Oct 2018, at 8:44 am, Monte Goulding via use-livecode 
 wrote:




On 16 Oct 2018, at 9:02 pm, Ben Rubinstein via use-livecode 
 wrote:

Thanks Monte. Where can I find some documentation as to how I can use this?



I forgot to mention examples in the repo that may be helpful:

C linking to shared libraries in the code folder:
https://github.com/livecode/livecode/tree/develop/extensions/libraries/ini 
<https://github.com/livecode/livecode/tree/develop/extensions/libraries/ini>
https://github.com/livecode/livecode/tree/develop/extensions/libraries/timezone 
<https://github.com/livecode/livecode/tree/develop/extensions/libraries/timezone>

A simple Objective-C example:
https://github.com/livecode/livecode/tree/develop/extensions/widgets/macbutton 
<https://github.com/livecode/livecode/tree/develop/extensions/widgets/macbutton>

Cheers

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


Set quality/compression of images in PDFs?

2018-10-17 Thread Ben Rubinstein via use-livecode
Is there any way to control the quality/compression of images in PDFs 
generated by LiveCode?


Putting a 1MB JPG on a card, and printing from the rect of the image to the 
page rect, makes about a 6MB PDF file. Changing the jpeg quality of the input 
JPG seems to make no difference.


Replacing the image with one that's been scaled 50%, and is 500KB, makes a 
2.5MB PDF.


What - if anything - can be done to reduce the filesize of a PDF created by 
"open printing to pdf"?


TIA,

Ben

___
use-livecode mailing list
use-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: Using Dylibs in LiveCode?

2018-10-16 Thread Ben Rubinstein via use-livecode

Thanks Monte. Where can I find some documentation as to how I can use this?

Many thanks,

Ben


On 15/10/2018 22:31, Monte Goulding via use-livecode wrote:




On 16 Oct 2018, at 1:29 am, Ben Rubinstein via use-livecode 
 wrote:

I've got a requirement for which there's a useful library, which is made 
available for MacOS as a 'dylib'.

What are my options for accessing this from LC? (I don't have a to ship an 
application using this library, I just want to be access it on my own machines, 
ideally within the IDE.)


LCB is your friend here.

Cheers

Monte


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


Using Dylibs in LiveCode?

2018-10-15 Thread Ben Rubinstein via use-livecode
I've got a requirement for which there's a useful library, which is made 
available for MacOS as a 'dylib'.


What are my options for accessing this from LC? (I don't have a to ship an 
application using this library, I just want to be access it on my own 
machines, ideally within the IDE.)


TIA,

Ben

___
use-livecode mailing list
use-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: Not many people know this.

2018-08-16 Thread Ben Rubinstein via use-livecode

Sorry, did somebody just give me an excuse to indulge in nostalgia?

On 16/08/2018 18:48, Richard Gaskin via use-livecode wrote:
AFAIK all xTalks have supported styled text.  It may be that HC 1.0 only 
provided that for the whole field (I can't recall),


It was definitely the case that HC 1.0 only supported one style per field; and 
I know this is so because when the Design Museum opened in London in 1989, it 
featured an interactive guide to its permanent collection on half-a-dozen Mac SEs.


We made the collection guide in HyperCard, and it featured hyperlinks which we 
wanted to be in bold:

https://www.dropbox.com/s/rj6zuxo1u5l2bfn/DM01_tudyCollRichSapper.jpg

There was a simple CMS mode for editing the text and defining links; when the 
user saved changes, it invoked a layout mode which wrapped the text around an 
image (i.e. we had two fields and split the text between them) and also made 
the links. But there was no facility for bold text; and none of the functions 
which can now be used to figure out where on the card a character in a field 
has been drawn existed then.


The solution we adopted, which could _possibly_ be described as overkill, was 
to use an XCMD we'd already made which could grab a screenshot and store it in 
the stack as an icon resource; and add a new one which could compare two 
icons. So when the code wanted to make a word bold, it made its best guess as 
to where the word that was to be linked would be on the card; took a 
screenshot centered on that position; then created a small field with the word 
(that would also act as a button for the link); and placed it at that 
location. Then it could take another screenshot and compare it to the base one 
without the link field: if the location was just right, the two would be the 
same, and it just needed to nudge the field one pixel to the right to make it 
a bold hyperlink. If the two were different, it moved the field in a spiral 
around the point, one pixel at a time, and taking another screenshot each 
step, until it finally found the correct spot. If after moving the field some 
hundreds of times it was unable to locate the perfect point, it played a sound 
sample "Please help by moving the word" and made the field track the mouse 
until the user clicked to indicate it was just right.


It is arguable whether the time spent creating this solution to make the 
layout process nearly automatic was actually less than the time saved by not 
requiring a more manual process. But I felt it was a triumph all the same!


I'm going to ask Nurse to bring my nightcap now.

Ben

___
use-livecode mailing list
use-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: Anyone using Older LC versions?

2018-08-13 Thread Ben Rubinstein via use-livecode

I still use 6.7.11 regularly for the same reason as Paul. (9 for all new work.)

Ben

On 12/08/2018 13:40, Paul Dupuis via use-livecode wrote:

We still have a few pre-Unicode stacks (all under LC 6.7.11). It is just
taking a lot of time (that we don't have) to get them all migrated and
tested to LC9+

I know you know this already, but I thought I would reply for any one
else interested in this informal poll


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

2018-07-31 Thread Ben Rubinstein via use-livecode

Hi John, welcome to the gang.

FWIW, if your needs are super-simple, saving the values of various fields - 
and especially if those fields are not going to have multi-line values, you 
may want to check out the keywords 'combine' and 'split'.


Combine takes a (simple, not nested) array and combines it into flat text with 
the delimiters you specify for keys and records; split does the reverse.


So what I've done for this kind of case - simple mobile app, storing some 
simple values in case it gets backgrounded - is keep all the data in an array; 
update the array when the data changes (e.g. user edits a field, or some other 
event) - and then calling a command along these lines:


command storeSettings
   global gaSettings
   local tPath, tFlat
   put gaSettings into tFlat
   combine tFlat using return and tab
   put format("file://%s/settings.txt", prefsFolder()) into tPath
   put tFlat into URL tPath
end storeSettings

The advantage over arrayEncode is that the file is very readable - with the 
above delimiters, each line is an entry from the array, in the format 
.  I know Richard questions why one would ever want to read 
"LSON": my answer is that during development it can be helpful, either 
directly when developing on desktop, or attaching to error reports once the 
app has moved onto a device.


The disadvantage is that you need a couple of characters that you know won't 
be included in either key or value. It doesn't have to be tab and return; you 
could use "◊" and "¶" - but if you have any doubts of what your users might 
ever need to enter, this is an issue.


HTH,

Ben


On 27/07/2018 19:37, John McKenzie via use-livecode wrote:


  Thanks for the extra comments everyone. Glad my thought process was
correct, databse is overkill, saving every text change is too much,
etc, etc.

  As I said I will not be able to really do anything until next week.

  Thanks for mentioning the closeField command guys. I will check it
out, but the name sounds like it explains it, loose focus on the field,
field is closed, handling activated.

  Because I like word play I might make my own text file format, the
"Extended Livecode Optimized Serialized Object Notation" format or
ELSON. It adds just enough features to LSON to make identical to JSON.
Being stupid and redundant it will be the hot new buzzword in the
computing industry.


  Using arrays intigues me, especially if I can just keep it in RAM (It
is a small amount of data for sure).

  Thanks for your continued help everyone. Off to super busy weekend
planning and working on an event for Sunday. Will update you/ask
follow-ups next week.



___
use-livecode mailing list
use-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: Oauth2 (Dropbox) on iOS

2018-07-31 Thread Ben Rubinstein via use-livecode

Thanks Monte.

> As I just commented on the bug report you should be able to resolve this 
using the following plist entry:


That solution does work, but only on iOS 10 or later, so prevents apps from 
earlier working.


> This is actually a general issue for anyone wanting to run a little in app 
HTTP server like the OAuth2 lib or the httpd lib.


Not that this is necessarily a priority, but can I check whether there's a 
theoretical capability to run such a server accepting HTTPS connections? Or is 
the only solution to keep using HTTP, and limit the apps to iOS > 10?


Many thanks,

Ben



On 25/07/2018 23:53, Monte Goulding via use-livecode wrote:




On 26 Jul 2018, at 12:54 am, Ben Rubinstein via use-livecode 
 wrote:

I've been trying with some variations of this - so far without success!


Hi Ben

As I just commented on the bug report you should be able to resolve this using 
the following plist entry:

NSAppTransportSecurity

NSAllowsLocalNetworking



This is actually a general issue for anyone wanting to run a little in app HTTP 
server like the OAuth2 lib or the httpd lib. So we need a checkbox on 
standalone settings and then including either of those libs should force the 
setting.

In the meantime a custom plist template should keep you going.

Cheers

Monte
___
use-livecode mailing list
use-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: Oauth2 (Dropbox) on iOS

2018-07-25 Thread Ben Rubinstein via use-livecode

Hi Panos,

Thanks for looking this up for me.

I've been trying with some variations of this - so far without success!

QC #21444 would also help!

best regards,

Ben

On 25/07/2018 15:21, panagiotis merakos wrote:
BTW if you want to add a whitelist for ATS in the plist, here are some more 
details on which keys/values you need and how to add them:


http://forums.livecode.com/viewtopic.php?f=49=28294

Best,
Panos
--

On Wed, Jul 25, 2018 at 3:16 PM, panagiotis merakos <mailto:merak...@gmail.com>> wrote:


Hi Ben,

The "App URL Query Whitelist" field is for specifying a list of custom url
schemes that the standalone can launch (using the "launch URL
custom_url_scheme" command) on iOS 9+.

See bug https://quality.livecode.com/show_bug.cgi?id=18687
<https://quality.livecode.com/show_bug.cgi?id=18687> for more details.

Best,
Panos
--

    On Wed, Jul 25, 2018 at 2:56 PM, Ben Rubinstein via use-livecode
mailto:use-livecode@lists.runrev.com>> 
wrote:

Aha! Thanks Sean, that was a good tip: I now understand the problem.

On simulator, my cut-down test app worked fine.

On device, console shows:

App Transport Security has blocked a cleartext HTTP (http://)
resource load since it is insecure. Temporary exceptions can be
configured via your app's Info.plist file.


The Oauth2 library requires the redirect URL to be of the form
`http://127.0.0.1:port` - you pass the port number to the library, it
assumes the `http://127.0.0.1`.

The Dropbox app setup allows you to specify an HTTP redirect (but only
for localhost redirect URLs). So this is all good - except it appears
that iOS is not so happy! Not sure why an http connection to localhost
should be insecure, but there you go. (Or indeed why ATS doesn't kick
in on the simulator?)

I've posted a report in the QCC (#21442) to extend Oauth2 command to
in some way allow the redirect URL to be HTTPs.

In the meantime, I resigned myself to doing a custom info.plist, but
found something that I'd not spotted before in the iOS Standalone Spp
Settings: "App URL Query Whitelist" - which I thought might be exactly
what I needed. Although I couldn't find any documentation for it.

I still don't know what it does - but it doesn't do this! Does anyone
know what it does do?

There is also a checkbox "Disable ATS" - checking this displays a dire
warning, doubtless correctly; but does indeed provide an easier way to
solve the problem, at least for development. What it would do to your
chances of getting an app into the App Store is another question.

I've also added a report in the QC (#21444) - I thought I'd done this
before, but maybe I just whinged on the mailing lists - for the
Standalone Builder to support generic additions to the info.plist
rather than requiring a completely separate one for anything 
unsupported.

Ben


On 24/07/2018 22:22, Pi Digital via use-livecode wrote:

Open a console with either the device connected or the simulator
and see what calls are made when the allow button is pressed


    On 24 Jul 2018, at 19:20, Ben Rubinstein via use-livecode
mailto:use-livecode@lists.runrev.com>> wrote:

I feel I've been through this before, but I've not been on it
for a while, and I'm still (again) stuck.

Using Oauth2 to connect an app to the Dropbox API works fine
on desktop.

On iOS, I get the overlay; with the Dropbox log-in; I sign in,
and it then shows the message that this app would like access
to the files in Dropbox, with buttons (from Dropbox) Cancel or
Allow (and a link "Learn more").

However, neither the Cancel nor Allow buttons do anything.
Fortunately there is now an LC 'cancel' button at the bottom
of the overlay (thanks Monte!
https://github.com/livecode/livecode/pull/6315
<https://github.com/livecode/livecode/pull/6315>).

But something's not happening which should (I assume) happen
when the user touches "Allow". (There is a tiny bit of visible
feedback.)

I know on a previous occasion I solved my issue with
inclusions, but I don't think that's the problem this time. I
have (manual inclusions) the Browser widget, the JSON and
Oauth2 libraries, and the internet library. The call to Oauth2
is wrapped in a try block, and I'm not seeing a catch (can't
be sure 

Re: Oauth2 (Dropbox) on iOS

2018-07-25 Thread Ben Rubinstein via use-livecode

Aha! Thanks Sean, that was a good tip: I now understand the problem.

On simulator, my cut-down test app worked fine.

On device, console shows:

App Transport Security has blocked a cleartext HTTP (http://) resource load 
since it is insecure. Temporary exceptions can be configured via your app's 
Info.plist file.


The Oauth2 library requires the redirect URL to be of the form 
`http://127.0.0.1:port` - you pass the port number to the library, it assumes 
the `http://127.0.0.1`.


The Dropbox app setup allows you to specify an HTTP redirect (but only for 
localhost redirect URLs). So this is all good - except it appears that iOS is 
not so happy! Not sure why an http connection to localhost should be insecure, 
but there you go. (Or indeed why ATS doesn't kick in on the simulator?)


I've posted a report in the QCC (#21442) to extend Oauth2 command to in some 
way allow the redirect URL to be HTTPs.


In the meantime, I resigned myself to doing a custom info.plist, but found 
something that I'd not spotted before in the iOS Standalone Spp Settings: "App 
URL Query Whitelist" - which I thought might be exactly what I needed. 
Although I couldn't find any documentation for it.


I still don't know what it does - but it doesn't do this! Does anyone know 
what it does do?


There is also a checkbox "Disable ATS" - checking this displays a dire 
warning, doubtless correctly; but does indeed provide an easier way to solve 
the problem, at least for development. What it would do to your chances of 
getting an app into the App Store is another question.


I've also added a report in the QC (#21444) - I thought I'd done this before, 
but maybe I just whinged on the mailing lists - for the Standalone Builder to 
support generic additions to the info.plist rather than requiring a completely 
separate one for anything unsupported.


Ben

On 24/07/2018 22:22, Pi Digital via use-livecode wrote:

Open a console with either the device connected or the simulator and see what 
calls are made when the allow button is pressed



On 24 Jul 2018, at 19:20, Ben Rubinstein via use-livecode 
 wrote:

I feel I've been through this before, but I've not been on it for a while, and 
I'm still (again) stuck.

Using Oauth2 to connect an app to the Dropbox API works fine on desktop.

On iOS, I get the overlay; with the Dropbox log-in; I sign in, and it then shows the 
message that this app would like access to the files in Dropbox, with buttons (from 
Dropbox) Cancel or Allow (and a link "Learn more").

However, neither the Cancel nor Allow buttons do anything. Fortunately there is 
now an LC 'cancel' button at the bottom of the overlay (thanks Monte! 
https://github.com/livecode/livecode/pull/6315).

But something's not happening which should (I assume) happen when the user touches 
"Allow". (There is a tiny bit of visible feedback.)

I know on a previous occasion I solved my issue with inclusions, but I don't think that's 
the problem this time. I have (manual inclusions) the Browser widget, the JSON and Oauth2 
libraries, and the internet library. The call to Oauth2 is wrapped in a try block, and 
I'm not seeing a catch (can't be sure that I would, but when I use the new emergency 
cancel, my script just reports "Not authorised" where if I drop the Oauth2 
library, I get a dialog reporting the catch).

What am I missing? Is anyone else able to succesfully connect to Dropbox using 
the Oauth2 library on LC 9.0.0, iOS 9.3 (or any similar environments)?

TIA,

Ben


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


Oauth2 (Dropbox) on iOS

2018-07-24 Thread Ben Rubinstein via use-livecode
I feel I've been through this before, but I've not been on it for a while, and 
I'm still (again) stuck.


Using Oauth2 to connect an app to the Dropbox API works fine on desktop.

On iOS, I get the overlay; with the Dropbox log-in; I sign in, and it then 
shows the message that this app would like access to the files in Dropbox, 
with buttons (from Dropbox) Cancel or Allow (and a link "Learn more").


However, neither the Cancel nor Allow buttons do anything. Fortunately there 
is now an LC 'cancel' button at the bottom of the overlay (thanks Monte! 
https://github.com/livecode/livecode/pull/6315).


But something's not happening which should (I assume) happen when the user 
touches "Allow". (There is a tiny bit of visible feedback.)


I know on a previous occasion I solved my issue with inclusions, but I don't 
think that's the problem this time. I have (manual inclusions) the Browser 
widget, the JSON and Oauth2 libraries, and the internet library. The call to 
Oauth2 is wrapped in a try block, and I'm not seeing a catch (can't be sure 
that I would, but when I use the new emergency cancel, my script just reports 
"Not authorised" where if I drop the Oauth2 library, I get a dialog reporting 
the catch).


What am I missing? Is anyone else able to succesfully connect to Dropbox using 
the Oauth2 library on LC 9.0.0, iOS 9.3 (or any similar environments)?


TIA,

Ben


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


Re: [ANN] Release 8.1.10

2018-05-22 Thread Ben Rubinstein via use-livecode

Hi Panos,

Thanks for this.

Can I just check:

> ** Note 8.1.10 STABLE is the last planned release in the 8.x series **

Is 8.2.0 a dead spur in that case? How does it relate to 8.1.10?

Many thanks,

Ben

___
use-livecode mailing list
use-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: Has Anyone Got A Directory "Walker" Available

2018-05-03 Thread Ben Rubinstein via use-livecode
FWIW I don't use recursion for directory walking. My typical routine (typing 
directly into email, may contain errors) is something along the following lines:


-- assumes tRootFolder is the path to start reviewing
put return into tFoldersToDo
repeat until tFoldersToDo = empty

-- process another folder
put line 1 of tFoldersToDo into tSubFolder
delete line 1 of tFoldersToDo
set the defaultFolder to (tRootFolder & tSubFolder)

-- note sub-folders
repeat for each line f in the folders
if char 1 of f = "." then next repeat
put tSubFolder & "/" & f & return after tFoldersToDo
end repeat

-- process files
repeat for each line f in the files
if char 1 of f = "." then next repeat
-- do something with f
-- or store the path, i.e. tSubFolder & "/" & f
end repeat

end repeat

HTH,

Ben

On 21/04/2018 09:15, Ali Lloyd via use-livecode wrote:

Ah, it will throw an error - so best to use try / catch around the function
calls.

On Sat, Apr 21, 2018 at 9:13 AM Ali Lloyd  wrote:


Now that we have files(pFolder), folder(pFolder) (and files(pFolder,
"detailed"), folders(pFolder, "detailed")), directory walking code can be
improved somewhat by not having to set the current folder.

Actually, I haven't checked what happens when you get
files(pRestrictedFolder)


On Fri, Apr 20, 2018 at 7:49 PM Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:


You may recall the dreaded recursion errors that have cropped up in
discussions of directory walkers.  They happen not because anyone has
directory trees > 40,000 folders deep, but because a permissions
restriction can prevent going into a subdirectory, causing the current
directory to be traversed again and again until the recursion error is
thrown.

The way to avoid this is to add an error check when setting the
directory, e.g.:

   set the directory to pFolder
   if the result is not empty then
 -- skip or report as needed
   end if


--
   Richard Gaskin
   Fourth World Systems


Sannyasin Brahmanathaswami wrote:

  >  I found this in a toolbox. Sent by some ago, by a LiveCode deva
  >
  > For what it's worth :
  >
  > # Filters the strings "." and ".." from a list
  > function filterDots pList
  >local tList
  >
  >put pList into tList
  >filter tList without "."
  >filter tList without ".."
  >
  >return tList
  > end filterDots
  > # Returns a filtered list of files in the current directory
  > function filteredFiles
  >return filterDots(the files)
  > end filteredFiles
  >
  > # Returns a filtered list of folders in the current directory
  > function filteredFolders
  >return filterDots(the folders)
  > end filteredFolders
  >
  > # Returns a list of files in the current directory including
  > # each file's full path.
  > function filteredFilesWithPaths
  >local tFiles, tFilesWithPaths
  >
  >put filteredFiles() into tFiles
  >repeat for each line tFile in tFiles
  >   put the directory & slash & tFile & return after \
  > tFilesWithPaths
  >end repeat
  >delete the last char of tFilesWithPaths
  >
  >return tFilesWithPaths
  > end filteredFilesWithPaths
  >
  >
  > # Returns a list of files in a given folder, using recursion to
  > # include files in subfolders if desired.
  > function listFiles pFolder, pRecurse
  >local tTotalFiles, tCurrentFiles, tFolders
  >
  > set the directory to pFolder
  >put filteredFiles() into tCurrentFiles
  >if not pRecurse then return tCurrentFiles
  >if tCurrentFiles is not empty then
  >   put tCurrentFiles & return after tTotalFiles
  >end if
  >put filteredFolders() into tFolders
  >
  > repeat for each line tFolder in tFolders
  >   put listFiles((pFolder & slash & tFolder), pRecurse) into \
  >   tCurrentFiles
  >   if tCurrentFiles is not empty then
  >  put tCurrentFiles & return after tTotalFiles
  >   end if
  >end repeat
  > delete the last char of tTotalFiles
  >
  >return tTotalFiles
  > end listFiles
  >
  > # Returns a list of files with their containing folders, using
  > # recursion
  > # if desired to descend into sub folders.
  > function listFilesWithFolders pFolder, pRecurse
  >local tTotalFiles, tCurrentFiles, tFolders
  >
  > set the directory to pFolder
  >put filteredFiles() into tCurrentFiles
  >if not pRecurse then return pFolder & return & "--" & return \
  >& tCurrentFiles
  >if tCurrentFiles is not empty then
  > put pFolder & return & "--" & return after tTotalFiles
  >   put tCurrentFiles & return & return after tTotalFiles
  >end if
  > put filteredFolders() into tFolders
  >repeat 

Re: Not sure what to do.....can I run this by you guys?

2018-03-18 Thread Ben Rubinstein via use-livecode
I think this depends on the base URL.  If it's with a simple URL, there's no 
reason why an appended '#' parameter should cause a browser to request it 
fresh; as Mike says, it indicates scrolling to an anchor in the page. So it's 
perfectly reasonable for a smart browser - or a caching layer on the server, 
or in a proxy somewhere between you and the server - to use a cached version 
of that page ignoring the '#' suffix.


With a simple URL, the better choice is to use "?" to append a parameter (I 
usually use 'the milliseconds' to guarantee that it's unique). Neither the 
browser nor any caching layer on the chain between the user agent and the 
source system should recognise it as the same URL, so this should force a 
fresh load. You can just use e.g.

put "?" & the milliseconds after tURL

or to be more explicit, name the parameter something e.g.
put "?nocache=" & the milliseconds after tURL
or

put "?uniqueid=" & the milliseconds after tURL

The only downside of using "?" is that if the URL may already includes 
parameters starting with "?" (which is what I mean by "not a simple URL"), you 
need to test for that and use "&" instead of "?" to indicate that this is an 
additional parameter; and if this is a dynamic request, which uses the 'query 
parameters' in the URL to decide what to return, you need to be sure that 
adding your parameter won't affect it!


On 16/03/2018 13:31, Mike Bonner via use-livecode wrote:

Another way around the cache problem is to use the #2 trick at the end of
the url.  Send each request with a pound and different number at the end of
the url and it'll be seen as a new request thus doing an end run around the
cache.  Since it designates an inline anchor position on the page, it
should have zero affect on the way the url functions.  (unless things have
changed, the associated anchor doesn't need to exist on the page)

Thanks for the neat trick Charles. :)

On Fri, Mar 16, 2018 at 7:24 AM, Tom Glod via use-livecode <
use-livecode@lists.runrev.com> wrote:


WowI'm impressedthats quite a hack Charles..I will study all this
see how far I get.

Thank you gentlemenyou are Rockstars!!

On Fri, Mar 16, 2018 at 7:13 AM, Lagi Pittas via use-livecode <
use-livecode@lists.runrev.com> wrote:


Maybe not 100% reliable but 

https://stackoverflow.com/questions/1341089/using-meta-
tags-to-turn-off-caching-in-all-browsers

Regards Lagi

On 16 March 2018 at 09:48, Charles Warwick via use-livecode
 wrote:

  Hi Tom,

If the site you are trying to contact has CORS enabled appropriately,

then you can do something like this...


With the LiveCode browser widget, you can call JavaScript functions

from

LC script and have the JavaScript functions call LC handlers in return.
JavaScript has the capability to perform asynchronous HTTP requests.


You can create a HTML page that you automatically load up in the

browser

widget that has a small JavaScript function which you can call from LC

with

‘do in widget’.   All this function needs to do is issue an asynchronous
HTTP call to the URL passed to it as a parameter and when it receives the
data, return it back to your LC script by calling a nominated LC handler
and passing the returned data as a parameter.


The HTML page would look something like this:



Javascript Async Test


function httpGetAsync(theUrl)
{
 var xmlHttp = new XMLHttpRequest();
 xmlHttp.onreadystatechange = function() {
 if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
 liveCode.httpRequestComplete(theUrl,
xmlHttp.responseText);
 }
 xmlHttp.open("GET", theUrl, true); // true for asynchronous
 xmlHttp.send(null);
}






You can either load that from a file into the browser widget’s URL or

set its htmlText property accordingly...


Then in LC, make sure you register the httpRequestComplete handler so

that the widget can call it:


set the javascriptHandlers of widget “browser” to “httpRequestComplete”

After that, add a httpRequestComplete handler to the card script to

handle the returned data:


on httpRequestComplete pUrl, pData
— pUrl will be the URL requested
— pData will be the data returned from the URL requested
end httpRequestComplete

Lastly, make your async requests

do (“httpGetAsync(‘http://www.livecode.com’);” in widget “browser”

Since the JavaScript in the browser widget is issuing the requests and

sending the data back to LC, it doesn’t need to display anything related

to

it in the browser widget itself - it can be a blank canvas.


Just be aware that the browser widget can cache URLs and there is no

easy way (that I know of?) in LC to clear the browser’s cache... 

When did 'throw' stop being handled properly in the IDE?

When I was a lad, you could use throw with abandon. In the IDE, if you didn't 
catch it, the IDE opened the debugger at the appropriate level, and threw up a 
polite dialog explaining:

The following user thrown error was
generated and not handled, so it was
intercepted by LiveCode

Now - in 8.1.9 and 9.0.0 rc1, instead it goes into the debugger, then simply 
halts. So you've lost the ability to inspect variables etc, you may not even 
know what the error was that was thrown - and in fact nothing explicitly tells 
you that the reason you are looking at your script is that there was an error 
thrown.


If you've gone to make a cup of tea while your script was running, you may not 
remember whether you'd left the script window open, and may not realise that 
your script didn't complete... err, according to a friend who this might have 
happened to.


I'm not sure when this happened. I presume it's a bug. But it's evidently been 
happening for a while, and nobody else seems to have QCC'd it, so I wanted to 
check first. Do other people see this?


TIA

Ben

___
use-livecode mailing list
use-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: "module format not supported"


Thanks Hermann, that filled me in.

Ben

On 05/02/2018 11:50, hh via use-livecode wrote:

There is also a forum thread to that problem with an answer
by LC-Mark.

http://forums.livecode.com/viewtopic.php?p=162674#p162674



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


"module format not supported"

I had a little module (two actually - both derivatives of the LiveCode Line 
Graph widget). In a stack that I only used in the IDE, so this is nothing to 
do with standalones. I last used this stack two weeks ago - almost certainly 
under LC 8.1.8, if not 8.1.7.


Last week I installed and at least briefly used both LC 8.1.9 rc 1 and 9.0.0. 
dp 11.


Today I went to use this stack again, and found the component on the page 
empty. Looking at the Extension Manager, both widgets are labelled "Module 
format not supported".  Quit and relaunch doesn't help. Just in case my memory 
is faulty, I tried opening the stack in 8.1.7 - one of the widgets doesn't 
appear in the list at all, the other is labelled "Module format not supported".


So I have two questions:

1) What does this mean and what should I do about it

2) Should launching a newer build of LC do something to corrupt user modules 
in this way?



I assume that there's been a change in module format, and LC 9 (I assume) 
automatically updated the ones it found to the new format, thus breaking them 
for earlier versions.  Obviously given that LC9 is dp, so it's reasonable to 
assume that the user is still running something more stable in parallel with 
reviewing LC9, it would be polite to at least ask the user if they want these 
modules updated or ignored.


So my third question is where should I have read something that would have 
told me about this change?


TIA,

Ben

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


Re: Reading from xls or xlsx - with style


Thanks all for the suggestions.

In fact I found that although the docs for xlsx (aka OpenXML aka ECMA-376 aka 
ISO/IEC 29500) are a dense nightmare*, simply taking a close look at the 
format shows it's pretty simple to parse by reading the files directly, at 
least for my needs (just text and other literal values, in some cases with 
style, not caring about formulas, charts etc).


(If I wanted a more straightforward life, and was prepared to do some manual 
work on each file before processing it, and I/my client didn't have concerns 
about sharing internal data with Google, I did before getting this far 
establish that the easiest solution would be to import the spreadsheet into 
Google Sheets, which has a nice straightforward API for getting the data.)


So, thanks all - and if a visitor from the future is reading this thread 
because they have a similar requirement, my suggestion is to either run it 
through Google Sheets, or hack the xslx directly.


Ben

*Part 1 of the reference is a 5,036 page document. I didn't bother downloading 
the following parts...


On 16/01/2018 21:55, zryip theSlug via use-livecode wrote:

Matthias, if by tooltip, you meant the comment associated to a cell,
yes this is something potentially possible, too.


On Tue, Jan 16, 2018 at 9:52 PM, Matthias Rebbe via use-livecode
<use-livecode@lists.runrev.com> wrote:

As i wrote “ at least i am not aware of it” ;)

good to know. That this is possible.

Btw.: Do you know if it is also possible to read/get the tooltip of a cell of 
better said of a range of cells?

Regards
Matthias


Matthias Rebbe
Tel +49 5741 31
‌https://matthiasrebbe.eu <https://matthiasrebbe.eu/>‌


Am 16.01.2018 um 21:32 schrieb zryip theSlug via use-livecode 
<use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>>:

In the Excel Lib, the command XCEL_Range_FontStyle_Get is returning
the style of the whole cell or range. We have no function to read the
style of each char, at this moment.
However, both VBA and AppleScript are offering this possibility, so
this is a function we can add. A possible solution would consist to
explore the style of each chars in a cell, then return the result in
html to have it directly usable in LiveCode. I'm not sure of the
performances of this approach, though. It will depend on how many
cells the sheet have and how many text each cells are containing.

On Tue, Jan 16, 2018 at 8:23 PM, Matthias Rebbe via use-livecode
<use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>> wrote:

Ben,

i am uising Spreadlib and Excel Libary. Both do not take care for text format.
At least i am not aware of it.

Regards,
Matthias



Matthias Rebbe
Tel +49 5741 31
‌https://matthiasrebbe.eu <https://matthiasrebbe.eu/> <https://matthiasrebbe.eu/ 
<https://matthiasrebbe.eu/>>‌


Am 16.01.2018 um 19:10 schrieb Ben Rubinstein via use-livecode <use-livecode@lists.runrev.com 
<mailto:use-livecode@lists.runrev.com> <mailto:use-livecode@lists.runrev.com 
<mailto:use-livecode@lists.runrev.com>>>:

I'm aware that there are a couple of libraries floating around for reading 
Excel documents - do any of them allow the formatting of runs of text within 
cells to be read? I want to import some data where some of the text in a cell 
may contain some parts which are in italics or bold. Are there existing 
libraries that support this use?

Many thanks,

Ben

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


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




--
Zryip TheSlug
http://www.aslugontheroad.com <http://www.aslugontheroad.com/>

___
use-livecode mailing list
use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode 
<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






__

Reading from xls or xlsx - with style

I'm aware that there are a couple of libraries floating around for reading 
Excel documents - do any of them allow the formatting of runs of text within 
cells to be read? I want to import some data where some of the text in a cell 
may contain some parts which are in italics or bold. Are there existing 
libraries that support this use?


Many thanks,

Ben

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


  1   2   >