Accessing files on a local network file server - BEST PRACTICE?

2020-09-24 Thread Paul Dupuis via use-livecode
This question may have an obvious answer, but I am brain dead today, so 
here goes:


I have a app installed with some customers in a Windows network 
environment. They have all their laptops set so that their Home 
directories are on a local network server.


So, where as on a local laptop, specialFolderPath("documents") might 
return "C:/Users//Documents" as the path, for them 
specialFolderPath("documents") returns something like 
"//s1.somedomain.com/mountPoint//Documents"


We save a number of folders and files in the user's Documents folder. In 
some cases, if the file is not present (i.e. if there is a file tFile is 
false) we regenerate the file from a default.


Sometime, the server is offline or the user is disconnected from the 
network.


What is a good way to differentiate between:

1) one of these files is not present so must be regenerated, i.e

if there is not a file (specialFolderPath("documents")&slash&tFilename) then
  -- regenerate the file tFile at location specialFolderPath("documents")

Versus

2) The Server (//s1.somedomain.com/ is disconnected to down?

So that in case (1) , we regenerate the file and in case (2) we present 
a warning that the server is disconnected or down?


Mu gut says this should be simple, but I just can not wrap my brain 
around it today.


___
use-livecode mailing list
use-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: Converting from unicode to ASCII

2020-09-23 Thread Paul Dupuis via use-livecode

On 9/22/2020 6:48 PM, J. Landman Gay via use-livecode wrote:
I have a stack with an index. When a user clicks a line, a handler 
uses the clicktext to create a file name which is always the clicktext 
plus the ".livecode" extension. The stack is then downloaded from an 
AWS server and displayed.


We are now translating some stacks to other languages which require 
unicode text. AWS recommends not using accented characters in file 
names, so we need to translate the clicktext into plain ASCII.


Is there a good way to do that without using a lookup table or 
metadata? The file names doesn't need to make sense syntactically. For 
example,


   l’Académie française -> lAcademiefrancaise.livecode

...or similar, whatever works. The user will never see the file name.



You should probably use the same model as LiveCOde uses to match files 
names returned from the files("detailed-utf8") function:


urlEncode(textEncode(normalizeText(,"NFC"),"utf8"))

Converts:
Russian-русский-Lipsum.docx

To:
Russian-%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9-Lipsum.docx

For what your doing, I think that using:

urlEncode(textEncode(,"utf8")) -> gets 

and

textDecode(urlDecode(),"utf8") -> gets 

should be enough.


___
use-livecode mailing list
use-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: Converting from unicode to ASCII

2020-09-22 Thread Paul Dupuis via use-livecode

On 9/22/2020 6:58 PM, Devin Asay via use-livecode wrote:

But it that doesn’t help, and if nobody ever sees the filenames, why not just 
loop through the string and delete anything that’s not in ASCII range?


Well, if the name is in Chinese,  you would delete the entire name.

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


Re: HOw to get htmltext from the field to display in another field

2020-09-17 Thread Paul Dupuis via use-livecode

OR

set the text of fld "Dest" to the htmText of fld "Src"


IF you want to see what the htmlText (i.e. the tags) of fld 
"Src"actually is.



On 9/17/2020 3:31 PM, Ralph DiMola via use-livecode wrote:

BR,

set the htmltext of fld "Dest" to the htmlText of fld "Src"

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 Sannyasin Brahmanathaswami via use-livecode
Sent: Thursday, September 17, 2020 3:14 PM
To: How LiveCode
Cc: Sannyasin Brahmanathaswami
Subject: HOw to get htmltext from the field to display in another field

--set the htmltext of fld "mainText" into fld "checkHTML"

put text of fld "mainText" into  fld "checkHTML"


??

___
use-livecode mailing list
use-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: How do we set layers for groups

2020-09-17 Thread Paul Dupuis via use-livecode

see the 'relayer' command in the dictionary


On 9/17/2020 2:34 PM, Sannyasin Brahmanathaswami via use-livecode wrote:

if the layer of fld "checkHtml" > 3 then
   set the layer of fld "checkHtml" to 3
else
   set the layer of fld "checkHtml" to 20 
end if

# do not work.

stack "SlideShowSetUp": execution error at line 107 (Object: can't set layer 
(card not open, or control in group)), char 1

??

___
use-livecode mailing list
use-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: sudo apt-get install livecode

2020-09-14 Thread Paul Dupuis via use-livecode

On 9/13/2020 10:39 PM, Eric A. Engle via use-livecode wrote:

  I just get tired of downloading the silly installer app etc. why isn't it in 
a repo?

any way i will google it but if there is a terminal command line interface set 
of commands which will gksudo aptitude livecode OR SIMILAR please tell me


It probably isn't in a 'repo' because I, like probably a number of other 
people on this list who use LiveCode a lot, have no idea what 'gksudo 
aptitude livecode' is other than probably some Linux commands.


I'd much rather download and run the installer than need to learn some 
more esoteric commands to install the 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


Re: text manipulation with Chinese characters (unicode): guide?

2020-09-09 Thread Paul Dupuis via use-livecode
As mentions, Unicode in a field just works (there is a known issue with 
Thai word breaks and another with printing Hindi)


If you want to get Chinese (traditional or simplified) into a field, you 
can:


1)  get the text from a Utf8 ot utf16 text file and textDecode it i.e 
put url ("file:"&filepath) into tContent; put 
textDecode(tContent,"utf8") into fld "someField"
2) get the text from an RTF file, like the above, but set the rtfText of 
the field to the imported rtf data
3) use a 3rd party library, like Wordlib (see the livecode store) to 
read Microsoft Word .docx or Open Office .odt files



On 9/8/2020 11:55 PM, Eric A. Engle via use-livecode wrote:

Hi!

I would like to be able to copy and paste into fields and scripts Chinese 
characters, which are of course unicode and then manipulate the resulting 
strings.

Is this possible in livecode? How? Are there any good Recent guides to working 
with unicode in 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: formattedRect, formattedLeft, formattedWidth of chunks

2020-09-01 Thread Paul Dupuis via use-livecode
If you control the content, it is probably not an issue. In our case, 
the content and the ranges (char x to y) are set by the people that use 
our product - we have no control - so we end up with customer's trying 
to do their research and suddenly our product hard crashes, sometimes 
resulting in lost work. They don't understand why since bunches of other 
documents they are working with all process fine. Even the document that 
is causing the crash may seem fine UNTIL they add a bookmarked range 
that includes the tabs. As tabs are invisible in MS-Word and a lot of 
MS-Word user are not really skilled at formatting, they may end up with 
tabs in their documents that they are not even aware they are there.


This one really was a pain to track down as we had to get a customer, 
with the crashing, who was willing to provide their whole research study 
so we could reproducethe error in-house and then tracing it down in the 
IDE took a very long time to go through the 1000's of lines of code to 
find the crash on the 'formattedRect' call.



On 9/1/2020 5:49 PM, Bob Sneidar via use-livecode wrote:

I have a great many of these. I’ll keep a lookout.

Bob S


On Sep 1, 2020, at 6:25 AM, Paul Dupuis via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

formattedWidth

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


formattedRect, formattedLeft, formattedWidth of chunks

2020-09-01 Thread Paul Dupuis via use-livecode
Just a heads up to anyone else out there who may be having VERY hard to 
track down crashes in LC 9.x.x.


The following functions: formattedRect, formattedLeft, formattedWidth 
when operating on chunk expressions (i.e. char X to Y of field Z) can 
cause an engine crash for certain field content.


This is present in all versions of LC 9.x.x (actual back to some version 
of LC8)


The issue is when the chuck contains tab characters.

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

FYI: formattedTop and formattedHeight of chunks still work.


___
use-livecode mailing list
use-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: Playing movies in LC_ Docs??

2020-08-20 Thread Paul Dupuis via use-livecode
Yes, there is a lot of information that circulates on the forums or 
lists or in people's head that probably should be in the LC documentation


In the LC9.x.x series, the Player supports any audio or video formats 
supported by Apple Video Foundation (AVF) on macOS - google the apple 
developer docs for AVF formats supported by macOS version. The Player 
supports any audio of video formats supported by DirectShow on Windows. 
Google DirectShow formats supported to find those.


NOTE while there is over lap, there are also formats supported only on 
one platform or the other.


Also, unfortunately, if you are planning on doing anything more complex 
that placing a video in a player and letting the user play it, you 
should search the LiveCode quality center for player bugs - there are 
many dozens. Some minor, some more serious.




On 8/20/2020 6:15 PM, William Prothero via use-livecode wrote:

Folks:
I’m building an app that needs to play movies. It’s a desktop app that I need 
to work on Mac and Windows. But, when looking at the dictionary and the 
lessons, all I get is references to Quicktime and the dictionary is hopelessly 
uninformative about what formats are required.

I haven’t done this in a while. But, when I searched my emails from the users 
list, the most recent reference I have is 2016. What the heck? The dictionary 
entries are ancient and the lesson is totally useless. Sorry if I’m being 
critical about this, but “what the heck is up with movie players??”. Have I 
missed something? I really hope so.

Best,
Bill

William A. Prothero
https://earthlearningsolutions.org


___
use-livecode mailing list
use-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: Old stack will not save or save as...

2020-08-19 Thread Paul Dupuis via use-livecode

On 8/19/2020 12:02 PM, Bob Sneidar via use-livecode wrote:

Just a shot in the dark, suppress messages before opening?




Good guess, but no winner. However, your suggestion did put me on to the 
answer.


The stack was set to "modeless". If I execute in the message box

save stack "XYZ" as "C:/Users/MyUser/Desktop/XYZ.livecode" -- no lock. 
No error, but no save.


However, after I execute in the message box:

topLevel "XYZ" -- everything now works. The File save and save as menus 
items as enable and behave correctly.


Why I can't save or save as a modeless stack in IDE is a mystery to me.

It is also a mystery to me how Bob suggesting "suppress messages" led my 
brain to look at a stacks Modality, but it did, so thank you Bob!



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


Old stack will not save or save as...

2020-08-19 Thread Paul Dupuis via use-livecode

I have a really old stack (the file ends in .mc for Metacard)

When I open it in LiveCode, the save and save as are disabled in the 
File menu. This us under Windows and the same in LC 4.6.4, LC 6.7.11 and 
in LC 9.6.0, the Save and Save As are enabled, but when I select the 
stack and try to Save As... it thinks it is saving "revRefactor" not my 
stack.


My stack opens and I can see and edit UI objects, properties and 
scripts. I just don't seem to be able to save it.


Just changing the extension to .rev or .livecode makes the stack 
unreadable in LC464, but it will still open in LC960, but still can save 
or save as (File menu items greyed out)


Anyone seen this? Know what to do?


___
use-livecode mailing list
use-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: More Standalone Building Weirdness...

2020-08-14 Thread Paul Dupuis via use-livecode
The stack where building a Windows Standalone just stays on "Attaching 
Engine..." forever had no 'closeStack' handlers at all.


I added the following:

on closeStack
   -build close issue--
   if the environment is "development" and \
 there is a stack "revStandaloneProgress" and \
 the mode of stack "revStandaloneProgress" > 0 then
  exit closeStack
   end if
   ---
   pass closeStack
end closeStack

An there was no change in behavior. Under LC960 (I have not tried other 
versions), it builds the standalone, but then just remains on "Attaching 
engine..." and I have to force LC to exit.


If no one else has seen anything like this, then it is probably 
something about the stack. I don't have problems building other 
standalones in LC960.



On 8/13/2020 1:06 PM, JeeJeeStudio via use-livecode wrote:

Put this in every stack you build, and i mean the "build close issue" part
in the on closeStack Handler

It was in one of the release notes.

Maybe that is holding your build to complete



on shutdownRequest
answer question "Are you sure you want to stop?" with "Y" or "N"
if it is "Y" then
   pass shutdownRequest
end if
end shutdownRequest

on closeStack
-build close issue--
if the environment is "development" and \
  there is a stack "revStandaloneProgress" and \
  the mode of stack "revStandaloneProgress" > 0 then
   exit closeStack
end if
---
lock messages
quit --triggers shutdownrequestmessage, if not handled then it hangs
pass closeStack
end closeStack

Op wo 12 aug. 2020 om 20:32 schreef Paul Dupuis via use-livecode <
use-livecode@lists.runrev.com>:


I have a stack that when I build into a Windows Standalone (only
Windows) in LC 9.6.0 under Windows, the dialog that says "Attaching
Engine..." never finishes.

The Standalone gets built and runs properly, but the "Attaching
engine..." dialog in the building process never finishes (waiting over
an hour for a tiny stack) and I have to bring up teh Task Manager and
force the LiveCode app to exit.

Anyone seen anything like this? Have any idea what causes it?

Since the app does get built and runs fine, and I am under a deadline, I
don't really have time to troubleshoot it. It is easier to just force LC
to exit, but if someone has seen this and knows the cause, please let me
know.

Thanks in advance.

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


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


More Standalone Building Weirdness...

2020-08-12 Thread Paul Dupuis via use-livecode
I have a stack that when I build into a Windows Standalone (only 
Windows) in LC 9.6.0 under Windows, the dialog that says "Attaching 
Engine..." never finishes.


The Standalone gets built and runs properly, but the "Attaching 
engine..." dialog in the building process never finishes (waiting over 
an hour for a tiny stack) and I have to bring up teh Task Manager and 
force the LiveCode app to exit.


Anyone seen anything like this? Have any idea what causes it?

Since the app does get built and runs fine, and I am under a deadline, I 
don't really have time to troubleshoot it. It is easier to just force LC 
to exit, but if someone has seen this and knows the cause, please let me 
know.


Thanks in advance.

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


Re: Building a Windows standalone without tsNet?

2020-08-12 Thread Paul Dupuis via use-livecode

Thank you Matthias and Ralph.

In general, I am more of a Windows person than a macOS person, but one 
thing I really wish Windows would adopt is .exe folder, like macOS .app 
folders so that things like the Externals folder and anything else the 
app needed could app "appear" to be inside the .EXE



On 8/12/2020 1:21 PM, matthias rebbe via use-livecode wrote:

As Ralph wrote,

execute this in message box

dispatch "revunloadlibrary" to stack tsnetliburl

and then build your standalone.


-
Matthias Rebbe
Life Is Too Short For Boring Code


Am 12.08.2020 um 17:59 schrieb Ralph DiMola via use-livecode 
:

Paul,

Disable:
dispatch "revunloadlibrary" to stack tsnetliburl

Enable:
dispatch "revloadlibrary" to stack tsnetliburl

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 Paul Dupuis via use-livecode
Sent: Wednesday, August 12, 2020 11:40 AM
To: How to use LiveCode
Cc: Paul Dupuis
Subject: Building a Windows standalone without tsNet?

I have a very simple stack that I want to build a Windows standalone for
(.exe). I do not use any internet/networking related commands or functions
in my scripts

The standalone builder for LC9.6.0 insists on including the "Externals"
folder with tsNet dll in it.

Can some one remind me how I tell the LC not to include tsNet? I knew it
once, have forgotten, and can't find in anywhere in any documentation.

Thank you in advance.

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


___
use-livecode mailing list
use-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: Building a Windows standalone without tsNet?

2020-08-12 Thread Paul Dupuis via use-livecode

On 8/12/2020 11:59 AM, Ralph DiMola via use-livecode wrote:

Paul,

Disable:
dispatch "revunloadlibrary" to stack tsnetliburl


If I execute this in the message box in the IDE does that then prevent 
the Standalone builder from including it? Or do I need to execute this 
in the startup of the Standalone itself?





Enable:
dispatch "revloadlibrary" to stack tsnetliburl

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 Paul Dupuis via use-livecode
Sent: Wednesday, August 12, 2020 11:40 AM
To: How to use LiveCode
Cc: Paul Dupuis
Subject: Building a Windows standalone without tsNet?

I have a very simple stack that I want to build a Windows standalone for
(.exe). I do not use any internet/networking related commands or functions
in my scripts

The standalone builder for LC9.6.0 insists on including the "Externals"
folder with tsNet dll in it.

Can some one remind me how I tell the LC not to include tsNet? I knew it
once, have forgotten, and can't find in anywhere in any documentation.

Thank you in advance.

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


___
use-livecode mailing list
use-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 a Windows standalone without tsNet?

2020-08-12 Thread Paul Dupuis via use-livecode
I have a very simple stack that I want to build a Windows standalone for 
(.exe). I do not use any internet/networking related commands or 
functions in my scripts


The standalone builder for LC9.6.0 insists on including the "Externals" 
folder with tsNet dll in it.


Can some one remind me how I tell the LC not to include tsNet? I knew it 
once, have forgotten, and can't find in anywhere in any documentation.


Thank you in advance.

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


Re: Ansi-Pantsy

2020-06-30 Thread Paul Dupuis via use-livecode

On 6/30/2020 5:18 AM, Richmond via use-livecode wrote:
Why does fontLanguage return ANSI for English language fonts instead 
of romething like 'Roman'?


There is a fundamental mismatch between 'ANSI' and Unicode.

Richmond.

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

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


I asked a similar question back on June 5th under the subject "Unicode 
and languages" and Mark Waddingham provided the following answer 
(essentially the fontLanguages function no longer applies)


--
Unicode doesn't deal in languages but 'scripts' e.g. English and French 
are both written in the Latin script, whereas Ukrainian can be written 
in either the Latin or Cyrillic script.


LiveCode gives you access to the unicode properties of all codepoints 
(as held by ICU) via the 'codepointProperty(codepoint, property)' function.


e.g. codepointProperty("A", "Script") => "Latin"
 codepointProperty(numToCodepoint(0x03B1), "Script") => "Greek"

This might at least help to cut out trying to spellcheck things which 
are definitely not the languages you do have dictionaries for.

--

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


Mora Catalina permissions woes....

2020-06-29 Thread Paul Dupuis via use-livecode

List Folks: A head up of a Catalina issue:

If your code signed Standalone is trying to access stacks that are 
OUTSIDE the app bundle under Catalina, sometimes Catalina will not 
properly detect your apps need for access. You will not get an "App 
wants access to blah blah: Allow or Deny" dialogs and you app will throw 
a script error (if you have assumed successful access and not coded for 
errors)


In our case, we have the App (bundle) and a folder of stacks that sits 
next to it, both in a containing folder that is what is installed where 
the user installs it. So


FOLDER: OurAppFolder
> OurApp.app
>FOLDER: OurStacks
>> Some library stacks

We construct a full path to each library stack in "OurStacks" in a 
variable called tLibrary and when we execute

if there is a file tLibrary then
  start using tLibrary
end if
for the 1st library, we get a script error on the start using statement. 
The test for existence does return true.


start: can't find object

If you go to Apple (menu) > System Preferences (menu item) > Security & 
Privacy (panel) > Privacy (tab) > Full Disk Access and grant 
"OurApp.app" access, then subsequent launches work flawlessly.


This is clearly a Catalina entitlements/permissions issue.

We have distilled a test stack and have seen the error occur multiple 
times. The problem is we have not found a recipe that reproduces the 
error 100% reliably.


I have seen discussions that suggest Apple has provided NO entitlement 
you can code sign your app with to allow full disk access. They see 
individual folder access (like Documents, Desktop, etc.) and Full Disk 
Access (which subsumes all individual folder access) as being only 
grantable by the user.


QUESTIONS:

1) Any one else run into any situations where Catalina is failing to 
detect and ask for ANY given entitlement?


2) Any one else run into failures in detecting and asking for disk 
access entitlements?


3) If you have this problem, do you you tell customers to grant the app 
full disk access before running it? If so, how do you phrase that in a 
way that makes them comfortable and works?


4) Does anyone know of an entitlement for macOS Catalina that allows 
full disk access? Or even access to say the Applications folder?



P.S. If we can produce a recipe that is reliable, we will file a bug 
report on this. At the very least, LC may want to update "start using" 
to return an error code so you don't have to trap it with a try...end 
try block.





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

2020-06-23 Thread Paul Dupuis via use-livecode
We make and sell a desktop application (Windows and macOS) for a niche 
research market. I expect when Apple does their migration to a common 
processor and OS, Apple Developer's will have to go through all of Apple 
hoops for all their platforms.Most of our customer don't care about UI 
widget animations. They want the app to do certain functions and do them 
well and quickly to work with their data. As long as the UI is 
effective, whether it conforms precisely to Microsoft or Apple UI 
guidelines is secondary. So, even if you only care about desktops, your 
app will have to be sold through Apple's single App Store, conform to 
all screen sizes on all their devices, and follow all their UI 
guidelines, etc.


At that point, given that Windows is 2/3rd of our market and macOS 
1/3rd, we'll drop support for macOS sadly. I say sadly because our 
application originated way back in the late 1980 as a HyperCard App for 
MacOS.


But, to your point, your concern IS valid for those people wanting Apps 
from you that they insist MUST conform to all of Apple's esoteric 
requirements. It is likely it will become increasingly harder for the 
LiveCode ideal of develop once and deploy everywhere.



On 6/23/2020 2:56 PM, Jim Lambert via use-livecode wrote:

This year’s WWDC shows Apple is moving to a unified ‘system' for all their 
products: Mac, iPhone, iPad, Apple Watch, AppleTV.
The Apple development environment promises to produce a single app capable of 
running on all, or almost all, of Apple devices. This unification promises to 
be quite convenient for Apple developers.

In contrast, over the last decade or so there has been an ever increasing 
divergence in UX between major operating systems: Apple, Windows, Linux, 
Android. The days when systems were so similar that you could rely on the 
commonality of a handful of UI elements across platforms seems over to me. 
That’s troubling because such commonality is fundamental to LiveCode’s approach 
- write once, run everywhere.

In watching WWDC sessions it’s pretty clear that even simple UI elements have 
become more like UX elements having intrinsic and complex properties, such as 
certain visual and behavioral animations. Users readily learn to expect these 
behaviors. Yet such things are increasing difficult to fake with LiveCode’s 
basic palette of objects.

Enter LiveCode Builder and LC Widgets. They offer the promise of 
platform-specific UI elements - a promise fulfilled with some simple elements 
like iOS Native Button or Android Native Field. But I’m concerned that as 
platforms diverge in the interface experiences they present to users, that LC 
and LC developers will have difficulty satisfying users' divergent expectations.

Is my concern valid?

Jim Lambert


___
use-livecode mailing list
use-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: Catalina Entitlements or Permissions (was Possible Catalina problem)

2020-06-17 Thread Paul Dupuis via use-livecode

Arghh!

So I am Googling and Googling and hunting around the Apple Developer 
site to try to find a comprehensive list of macOS entitlements so I can 
code sign my app with the the entitlements my app needs to not generate 
errors under Catalina.


I want to execute: codesign --verbose --deep --force --sign 
"" --entitlements 
 
with an entitlements.plist file with entitlemenst to grant my app 
certain disk access, internet access, email access, and finder integration.


Finally, I find this article that basically says Apple has no 
comprehensive list - their published developer documentation has not 
kept up with the additions they have been making in point release 
updates to macOS: 
https://eclecticlight.co/2019/02/26/entitlements-how-apps-get-back-what-theyve-given-up/


The lack of an up-to-date comprehensive entitlements list was apparently 
bad enough that a guy by the name of Jonathan Levin built a database to 
keep track of them since Apple couldn't (or wouldn't), so at least there 
is this hand database at http://newosxbook.com/ent.jl


Now, if only I could figure out from the database which ones I need to add.

Perhaps, it is time to switch to Mark Talluto's suggestion to use 
AppWrapper!



On 6/16/2020 6:28 PM, Paul Dupuis via use-livecode wrote:

Hi Panos,

Thank you very much. The discussion in the bug entry answered  lot of 
my questions. I have one last thing I hope you or someone can point me 
two, which is a list of Apple macOS "entitlements"


From the bug entry I see:

com.apple.security.device.audio-input

com.apple.security.device.camera


I need to figure out the ones for email access, finder integration 
(drag/drop), internet access, and disk access.


We've seen Catalina ask the user for:

1. HyperRESEARCH requests access to the Internet (if Apple Firewall is
   turned on). - We assume this is because out app needs to check for
   new versions and updates and for license management.
2. HyperRESEARCH requests access to the "Finder". - We assume this is
   to receive AppleEvents (system messages) if a Study file is double
   clicked or dragged and dropped on HyperRESEARCH to open the Study.
3. HyperRESEARCH requests access to your "Contacts". We assume this is
   for access to send an email for an error report if an error occurs.
   Our App does not accessing any names or addresses.

I have tried Google for macOS or Catalina and entitlements but all I 
seem to be able to find is articles from the user's perspective, not 
developers information.





On 6/15/2020 12:21 PM, panagiotis merakos via use-livecode wrote:

Hello Paul,

I guess you can sign the standalone mac app with entitlements, i.e. 
use a

file that will contain all the necessary entitlements, and include it in
the params passed to the codesign command. See this report for more 
details:


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

Kind regards,
Panos
--

On Mon, 15 Jun 2020 at 14:56, Paul Dupuis via use-livecode <
use-livecode@lists.runrev.com> wrote:


We're having some macOS Catalina permissions/entitlements issues

We have applications that we deliver for Catalina where the application
(LiveCode standalone) is code-signed. It is then packaged in an
installers (LiveCode standalone) and the installer is code signed. That
is then placed in a DMG, which is code-signed, notarized, and stapled.

This has worked for us since October when Catalina was released.

It still works, except sometimes, after successful downloading and
installation, when the applications is first launched, Catalina does 
not

ask for the permissions the Application needs. Instead certain handler
throw an execution error. The handlers that produce the errors on
startup when Catalina fails to ask for permissions have the 
following in

common:

The set the defaultFolder to folders such as:

/Library/PreferencePanes
/Users//Library/Preferences -- this is using the code: the
home folder & "/Library/PreferencePanes/"
or
/private/var/folders/fj/0llnt4vs44vfzy4r97k_wngcgp/T/TemporaryItems
-- this is 'the temporary folder' on Mojave or Catalina. On Mavericks
and earlier teh temporaty folder was
/Users//Library/Caches/TemporaryItems

After setting the defaultFolder, the code gets 'the files' or 'the
folders' and fails (actually we've not pinned down whether it fails on
set the defaultFolder OR on the call to 'the files/folders')

Going to Apple (menu) > System Preferences (menu item) > Security &
Privacy (control) > Privacy (tab) and selecting Full Disk Access and
adding our applications prevents these errors from occuring.

The issue is clearly with Catalina failing to detect and ask for the
correct permissions. This is a known issue a number of developers have
run into. See https://forums.developer.apple.com/thread/125438 as one
example where an Apple support person admits tha

Re: Catalina Entitlements or Permissions (was Possible Catalina problem)

2020-06-16 Thread Paul Dupuis via use-livecode

Hi Panos,

Thank you very much. The discussion in the bug entry answered  lot of my 
questions. I have one last thing I hope you or someone can point me two, 
which is a list of Apple macOS "entitlements"


From the bug entry I see:

com.apple.security.device.audio-input

com.apple.security.device.camera


I need to figure out the ones for email access, finder integration 
(drag/drop), internet access, and disk access.


We've seen Catalina ask the user for:

1. HyperRESEARCH requests access to the Internet (if Apple Firewall is
   turned on). - We assume this is because out app needs to check for
   new versions and updates and for license management.
2. HyperRESEARCH requests access to the "Finder". - We assume this is
   to receive AppleEvents (system messages) if a Study file is double
   clicked or dragged and dropped on HyperRESEARCH to open the Study.
3. HyperRESEARCH requests access to your "Contacts". We assume this is
   for access to send an email for an error report if an error occurs.
   Our App does not accessing any names or addresses.

I have tried Google for macOS or Catalina and entitlements but all I 
seem to be able to find is articles from the user's perspective, not 
developers information.





On 6/15/2020 12:21 PM, panagiotis merakos via use-livecode wrote:

Hello Paul,

I guess you can sign the standalone mac app with entitlements, i.e. use a
file that will contain all the necessary entitlements, and include it in
the params passed to the codesign command. See this report for more details:

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

Kind regards,
Panos
--

On Mon, 15 Jun 2020 at 14:56, Paul Dupuis via use-livecode <
use-livecode@lists.runrev.com> wrote:


We're having some macOS Catalina permissions/entitlements issues

We have applications that we deliver for Catalina where the application
(LiveCode standalone) is code-signed. It is then packaged in an
installers (LiveCode standalone) and the installer is code signed. That
is then placed in a DMG, which is code-signed, notarized, and stapled.

This has worked for us since October when Catalina was released.

It still works, except sometimes, after successful downloading and
installation, when the applications is first launched, Catalina does not
ask for the permissions the Application needs. Instead certain handler
throw an execution error. The handlers that produce the errors on
startup when Catalina fails to ask for permissions have the following in
common:

The set the defaultFolder to folders such as:

/Library/PreferencePanes
/Users//Library/Preferences -- this is using the code: the
home folder & "/Library/PreferencePanes/"
or
/private/var/folders/fj/0llnt4vs44vfzy4r97k_wngcgp/T/TemporaryItems
-- this is 'the temporary folder' on Mojave or Catalina. On Mavericks
and earlier teh temporaty folder was
/Users//Library/Caches/TemporaryItems

After setting the defaultFolder, the code gets 'the files' or 'the
folders' and fails (actually we've not pinned down whether it fails on
set the defaultFolder OR on the call to 'the files/folders')

Going to Apple (menu) > System Preferences (menu item) > Security &
Privacy (control) > Privacy (tab) and selecting Full Disk Access and
adding our applications prevents these errors from occuring.

The issue is clearly with Catalina failing to detect and ask for the
correct permissions. This is a known issue a number of developers have
run into. See https://forums.developer.apple.com/thread/125438 as one
example where an Apple support person admits that detecting what
permissions a process is requesting that is tied back to your user
visible app (something Apple calls 'responsibility tracking') is really
hard.

For iOS and Android, you can specify entitlements or requested
permissions in the Standalone Builder Settings. How do you do this for
macOS Catalina?

Does anyone know if there is a way to specify entitlements for a macOS
desktop app built in LiveCode? I have been googling and googling and can
seem to find anything. I found one discussion on stackExchange that seem
to imply that the PLIST file could be edited to specify entitlements. I
have tried the Apple Developer site, but SO MUCH of it is orient towards
people with lots of Apple Developer experience and focuses of C and
SWIFT and Apple specific technologies I don't understand.

I can edit the XML in a PLIST file in the standalone bundle IF I only
knew what to add?


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

Catalina Entitlements or Permissions (was Possible Catalina problem)

2020-06-15 Thread Paul Dupuis via use-livecode

We're having some macOS Catalina permissions/entitlements issues

We have applications that we deliver for Catalina where the application 
(LiveCode standalone) is code-signed. It is then packaged in an 
installers (LiveCode standalone) and the installer is code signed. That 
is then placed in a DMG, which is code-signed, notarized, and stapled.


This has worked for us since October when Catalina was released.

It still works, except sometimes, after successful downloading and 
installation, when the applications is first launched, Catalina does not 
ask for the permissions the Application needs. Instead certain handler 
throw an execution error. The handlers that produce the errors on 
startup when Catalina fails to ask for permissions have the following in 
common:


The set the defaultFolder to folders such as:

/Library/PreferencePanes
/Users//Library/Preferences -- this is using the code: the 
home folder & "/Library/PreferencePanes/"

or
/private/var/folders/fj/0llnt4vs44vfzy4r97k_wngcgp/T/TemporaryItems 
-- this is 'the temporary folder' on Mojave or Catalina. On Mavericks 
and earlier teh temporaty folder was 
/Users//Library/Caches/TemporaryItems


After setting the defaultFolder, the code gets 'the files' or 'the 
folders' and fails (actually we've not pinned down whether it fails on 
set the defaultFolder OR on the call to 'the files/folders')


Going to Apple (menu) > System Preferences (menu item) > Security & 
Privacy (control) > Privacy (tab) and selecting Full Disk Access and 
adding our applications prevents these errors from occuring.


The issue is clearly with Catalina failing to detect and ask for the 
correct permissions. This is a known issue a number of developers have 
run into. See https://forums.developer.apple.com/thread/125438 as one 
example where an Apple support person admits that detecting what 
permissions a process is requesting that is tied back to your user 
visible app (something Apple calls 'responsibility tracking') is really 
hard.


For iOS and Android, you can specify entitlements or requested 
permissions in the Standalone Builder Settings. How do you do this for 
macOS Catalina?


Does anyone know if there is a way to specify entitlements for a macOS 
desktop app built in LiveCode? I have been googling and googling and can 
seem to find anything. I found one discussion on stackExchange that seem 
to imply that the PLIST file could be edited to specify entitlements. I 
have tried the Apple Developer site, but SO MUCH of it is orient towards 
people with lots of Apple Developer experience and focuses of C and 
SWIFT and Apple specific technologies I don't understand.


I can edit the XML in a PLIST file in the standalone bundle IF I only 
knew what to add?



___
use-livecode mailing list
use-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: Possible Catalina problem...

2020-06-08 Thread Paul Dupuis via use-livecode

Torsten,

Thank you. That is encouraging. I may take you up on your offer later to 
run a test on your Catalina Mac.


-- Paul

On 6/8/2020 11:10 AM, Torsten Holmer via use-livecode wrote:

Hi Paul,

I have started three LiveCode standalones on Catalina with no problems. But 
they are just standalones created frome the IDE with no signing etc.

If you like, I can test your apps on my MacBook with Catalina in order to check 
if the problems are replicable.

CU,
Torsten



Am 08.06.2020 um 16:55 schrieb Paul Dupuis via use-livecode 
:

We have run into a possible problem. Researchware makes two applications, 
HyperRESEARCH and HyperTRANSCRIBE. We have new forthcoming versions of both 
built on LiveCode 9.5.1.

These two applications are code signed and the DMG is code signed, notarized, 
and stapled for Catalina. They both work fine on testing on macOS ranging from 
Mavericks (10.9) to Mojave (10.14).

We also only have a single Catalina system to test on. On that single system, 
each application seems to work fine, but if we run them at the same time, the 
second app to launch throws a script error on startup - and it looks like it 
may be related to network actions on startup.

We have a TON more testing to do, but I wanted to ask if anyone have seen ANY 
Catalina specific problems running multiple LiveCode standalones at the same 
time?

Our hope is that this is a problem SPECIFIC to our single Catalina mac and not 
a LC Engine or tsNet Catalina specific bug of some sort. To know that some one 
else has run multiple LC 9 standalones at the same time on Catalina and seen no 
errors would be kind of encouraging right now.






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


Possible Catalina problem...

2020-06-08 Thread Paul Dupuis via use-livecode
We have run into a possible problem. Researchware makes two 
applications, HyperRESEARCH and HyperTRANSCRIBE. We have new forthcoming 
versions of both built on LiveCode 9.5.1.


These two applications are code signed and the DMG is code signed, 
notarized, and stapled for Catalina. They both work fine on testing on 
macOS ranging from Mavericks (10.9) to Mojave (10.14).


We also only have a single Catalina system to test on. On that single 
system, each application seems to work fine, but if we run them at the 
same time, the second app to launch throws a script error on startup - 
and it looks like it may be related to network actions on startup.


We have a TON more testing to do, but I wanted to ask if anyone have 
seen ANY Catalina specific problems running multiple LiveCode 
standalones at the same time?


Our hope is that this is a problem SPECIFIC to our single Catalina mac 
and not a LC Engine or tsNet Catalina specific bug of some sort. To know 
that some one else has run multiple LC 9 standalones at the same time on 
Catalina and seen no errors would be kind of encouraging right now.







___
use-livecode mailing list
use-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: Unicode and languages

2020-06-05 Thread Paul Dupuis via use-livecode

On 6/5/2020 1:46 PM, Mark Waddingham via use-livecode wrote:

On 2020-06-05 18:15, Paul Dupuis via use-livecode wrote:

I don't even know if language exists in the IBM Unicode engine as some
exportable property a future version of LiveCode could expose.

Any clever ideas or thoughts on this problem are welcome.


Unicode doesn't deal in languages but 'scripts' e.g. English and 
French are both written in the Latin script, whereas Ukrainian can be 
written in either the Latin or Cyrillic script.


LiveCode gives you access to the unicode properties of all codepoints 
(as held by ICU) via the 'codepointProperty(codepoint, property)' 
function.


e.g. codepointProperty("A", "Script") => "Latin"
 codepointProperty(numToCodepoint(0x03B1), "Script") => "Greek"

This might at least help to cut out trying to spellcheck things which 
are definitely not the languages you do have dictionaries for.


Warmest Regards,

Mark.



Thank you Mark!

That is a least a start as to minimizing the problem for our customers. 
We can make a table of Scripts to Dictionaries and at least prevent 
erroneous spell checking of Chinese with an English Dictionary!




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


Unicode and languages

2020-06-05 Thread Paul Dupuis via use-livecode
In all the added stuff the LC7 and higher Unicode engine includes, is 
there any way to determine the LANGUAGE of a range of text?


USE-CASE

We have a tool that helps researchers transcribe text from digital 
media. It is used internationally. We have added spell checking using 
lclSpell form Live Code Labs, a LiveCode store add-on.


For lclSpell, we only have Dictionaries for a small set of languages. 
You can build you own Dictionaries for lclSpell, but we'll still only 
have Dictionaries for a small subset of the languages people transcribe 
in. We also have people who do BOTH transcription AND translations.


For example, transcribing a Chinese language media recording, typing in 
the Simplified or Traditional Chinese characters AND then translate it 
to English, typing the English translation after the transcription.


With lclSpell (or I suspect ANY LiveCode compatible spell checker) if 
you try to spell check a reasonably large chunk of text that is NOT in 
the same language as your Dictionary, it ties up LiveCode forever, or at 
least such a long time and most people would force-quit. It is after all 
marking every word as misspelled and trying to do whatever it does to 
determine  that.


Now, you can react, that the researcher should just KNOW better than to 
do Spell check a text in a language that is not their loaded Dictionary! 
However, people are people, and will do such things and expect software 
to protect them from their own mistakes. Also, with mixed transcription 
and translation, you do want to spell check the English part and skip 
the Chinese (if you do not have a Chinese Dictionary)


So, we're looking for a way to detect the LANGUAGE of a range of text, 
in a LiveCode field, to be able to then determine whether it matches the 
current (or any available) dictionary or not and act accordingly.


There is a "fontLanguage" function in LC, but that seem to predate 
Unicode Everywhere and seem pretty useless now.


For example. in a new stack, with a single scrolling field, we paste in 
a Chinese text and then execute:


put the fontLanguage of (the effective textfont of char 1 to -1 of fld 1)

and get "ansi". Even you you set the range (char 2 to 3) that is 
specifically Chinese (no white space), it still returns "ansi". The 
textFont returns empty and the effective textFont returns "Segue UI"


I don't even know if language exists in the IBM Unicode engine as some 
exportable property a future version of LiveCode could expose.


Any clever ideas or thoughts on this problem are welcome.



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

2020-05-28 Thread Paul Dupuis via use-livecode

On 5/26/2020 6:56 PM, Dan Friedman via use-livecode wrote:

Has anyone done anything in regards to ADA compliancy in mobile apps built with 
LiveCode?   Using the apple or android accessibility tools such as Screen 
reading, for example.




I have been periodically looking at assistive technologies for LiveCode 
built applications on desktop platforms (vs mobile) over the years. 
Certain OS bases assistive tool like screen magnifiers do work as they 
are application independent. Unfortunately, screen readers and voice 
recognition tools generally don't work with LiveCode because the 
application independent tools look to act on OS native controls which 
most LC app don't use through out.


With LC 9 and the FFI/Widgets it may be possible to build integration 
libraries for one or more of those assistive tools that require 
application specific integration, but I don't think anyone has done it.


For mobile ADA compliance, you best bet is to test your app with 
whatever OS level assistive tools are provided with iOS and Android or 
look in the associated App store for application independent assistive 
app to test with your app.


If you mobile uses all native controls it *may* work better with OS or 
3rd party assistive tool, but that is a guess. I have no mobile app 
experience.



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


AW: Drawing a blank on simple code...

2020-05-20 Thread Paul Dupuis via use-livecode

On 5/19/2020 6:46 PM, Phil Davis via use-livecode wrote:

You're almost there Paul!

On 5/19/20 2:18 PM, Paul Dupuis via use-livecode wrote:
I have a set of custom properties in stack "X", a lot of which begin 
with "options_"


So I assume these are members of a customPropertySet, whose name I'll 
call "myOptions".


Actually, the custom properties were NOT part of a customPropertySet, 
but were custom properties in the DEFAULT property set AND I apparently 
either never knew or had forgotten that you can not use array notation 
to set custom properties in the default property set since the default 
property set has no name. I could put the  customer properties array in 
an array variable and get the values that way, but to set them I had to 
construct a DO command. They all really should be moved to a custom 
property set (called "options" for example), but I don't have the time 
to change that much 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


Drawing a blank on simple code...

2020-05-19 Thread Paul Dupuis via use-livecode
I have a set of custom properties in stack "X", a lot of which begin 
with "options_"


I want to loop through them and get the values, so I have:

  local tDisplayList
  put the customKeys of stack "X" into tProperties
  filter lines of tProperties with "options_*"
  if tProperties is empty then exit to top

  repeat for each line tLine in tProperties
    put the customKeys[tLine] of stack "X" into tProp

    -- do stuff here
  end repeat


When I walk through this code in the debugger, I see that tProperties 
gets a list of the names of all custom properties in the "X" stack. YEA!


Then I see that that list correctly gets filtered to just those that 
begin with "options_" YEA!


Then I see the in the repeat loop the variable "tLine" get the name of 
each "options" property in succession. YEA!


PROBLEM: put the customKeys[tLine] of stack "X" into tProp DOES NOT 
fetch the value of the indicated property into tProp


I know this is simple - and I have coded it before - but I can seem to 
find my past code in prior projects and obviously am missing something.


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


AW: Re: I need some DataGrid performance help

2020-05-07 Thread Paul Dupuis via use-livecode
Reduced to a consistent 1.5 to 2 minutes by revising the setting of 
datagrid column properties


the columns themselves, widths, and alignments set all at one. Tooltips, 
sort type and sort direction set in a loop in revised code.


I still do not understand why in the original code, when 1st set in a 
session it took 3 min and on subsequent updates in the same session, it 
took 30 minutes. The datagrid must be slow erasing certain properties 
for updating.


Thank you to everyone who responded with advice.


___
use-livecode mailing list
use-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: I need some DataGrid performance help

2020-05-06 Thread Paul Dupuis via use-livecode

On 5/6/2020 1:53 PM, Mark Waddingham via use-livecode wrote:
In reality, 'lock messages' is a sledge-hammer and like a 
sledge-hammer it can cause fallout if not wielded carefully.




Slightly off topic, but I have run into time where I wish I could lock a 
specific message or set of messages. Something like:


Lock messages for "mouseUp,mouseDown"

Generally, like so many many things in LiveCode, you can code this with 
a flag in the handlers or a bunch of alternatives. However, I still find 
myself running into this now and then.


___
use-livecode mailing list
use-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: I need some DataGrid performance help

2020-05-06 Thread Paul Dupuis via use-livecode

On 5/6/2020 7:58 AM, zryip theSlug via use-livecode wrote:

After each call to a column property such as dgColumnWidth, the datagrid is
resized (header, column, rectangles, etc)


This I did not know. Thank you.


Instead of having them in the loop, prepare the column size, columns label,
etc and uses the table properties existing for setting all the values at
once. In this case the refresh of the datagrid is internally made only one
time.


This I did know. As I said in my initial message:

I realize that I could use: 'set the dgProp["column widths"] of grp  
to ' as a single set action vs a loop where 
I am using 'set the dgColumnWidth[tColumnName] of grp  to 
'.


However, there are only Datagid properties so set attributes for ALL 
columns for alignments, visibility, widths, and labels. Therefore, I 
have to use a loop anyway to set the tooltip, sorttype, sortdirection, 
end editability



SO, while I can change the code to set the column ALIGNMENTS and WIDTHS 
all at once, I am still stuck setting the TOOLTIP, SORTTYPE, 
SORTDIRECTION, and EDITABILITY column by column in a repeat loop. So 
what do I do about setting the TOOLTIPs? There is NO 'set the 
dgProp["column tooltips"] of grp  to '


Obviously, I can just TRY using LOCK MESSAGES (as Paul Hibbert 
suggested), but I am concerned that may cause more problems that it 
solves. Does anyone KNOW for sure?


___
use-livecode mailing list
use-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: I need some DataGrid performance help

2020-05-06 Thread Paul Dupuis via use-livecode

On 5/6/2020 6:55 AM, Pi Digital via use-livecode wrote:

What handler do you have this code? From what you are saying it seems it’s 
deploying this formatting script every time it redraws which itself is very 
inefficient and unnecessary. It should only have to deal with the data itself 
ideally.


This code is called only when the data is changed such as columns added 
or removed or rows added or removed or both.


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


I need some DataGrid performance help

2020-05-05 Thread Paul Dupuis via use-livecode
I have a datagid operation that should be fast that is taking a long 
time and I don't understand why.


I use a datagrid to display a table of data as part of an analysis. The 
columns are file names and the rows are selected phrases found in those 
files. The first column is the list of phrases (162 in this example). 
The remaining columns are all the file name (254 in this example). So 
each cell (2 to 254) represents a count of the number of times the 
phrase (in column 1 of the row) was found the the file that column 
represents.


I have the following code:

  set the dgColumnWidth[tRowColumnName]  of grp 
"rwMatrixObj_DataGrid" to 200
  set the dgColumnAlignment[tRowColumnName]  of grp 
"rwMatrixObj_DataGrid" to "left"
  set the dgColumnSortType[tRowColumnName]   of grp 
"rwMatrixObj_DataGrid" to "text"
  set the dgColumnIsEditable[tRowColumnName] of grp 
"rwMatrixObj_DataGrid" to false

  repeat with i=2 to the number of lines in tColumnNames
    put line i of tColumnNames into tColumnName
    set the dgColumnTooltip[tColumnName]    of grp 
"rwMatrixObj_DataGrid" to tColumnName
    set the dgColumnWidth[tColumnName]  of grp 
"rwMatrixObj_DataGrid" to 75
    set the dgColumnAlignment[tColumnName]  of grp 
"rwMatrixObj_DataGrid" to "right"
    set the dgColumnSortType[tColumnName]   of grp 
"rwMatrixObj_DataGrid" to "numeric"
    set the dgColumnSortDirection[tColumnName] of grp 
"rwMatrixObj_DataGrid" to "descending"
    set the dgColumnIsEditable[tColumnName] of grp 
"rwMatrixObj_DataGrid" to false

  end repeat

The first time this executes it takes just under 3 minutes for this size 
of data (254 columns). However, the second and each successive time in 
the same session it takes just under 30 minutes!


Any idea why it would take so long?

Thoughts on how to speed it up?

I realize that I could use: 'set the dgProp["column widths"] of grp  
to ' as a single set action vs a loop where 
I am using 'set the dgColumnWidth[tColumnName] of grp  to 
'.


However, there are only Datagid properties so set attributes for ALL 
columns for alignments, visibility, widths, and labels. Therefore, I 
have to use a loop anyway to set the tooltip, sorttype, sortdirection, 
end editability


The column names (in the variable tColumnNames) are file names. Some are 
long (longest is 113 characters) and some contain assorted punctuation. 
I wonder is the column NAMES should be somehting plain ASCII and short 
and the column LABELS contain the file names?


This is all in LiveCode 9.5.1 on Windows. Timing is approximately the 
same in a Standalone or the IDE.


Anyway, if anyone has a good idea of what is taking this 30 minutes, 
ideas would be very welcome!


___
use-livecode mailing list
use-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: OT: How to graph a specific data set?

2020-05-05 Thread Paul Dupuis via use-livecode

On 5/5/2020 11:17 AM, Prothero-ELS via use-livecode wrote:

Paul,
The first question I have is: “what are you trying to communicate with your 
chart?” The answer to that question will point to a charting strategy.
Bill


I am trying to visually call attention to those intersections with high 
occurrences.


However, the labels that I replaced with the alphabet for 
confidentiality have meaning to the researchers looking at this and they 
may equally be fascinated when a pair has NO intersections in the data.


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


OT: How to graph a specific data set?

2020-05-05 Thread Paul Dupuis via use-livecode

This is NOT a "How to do this in LiveCode" question.

I have a data set (below), produced by a LiveCode program and the data 
is exported to Excel.


I am trying to figure out:

1) What the "best" style of graph to visualize this data is? I thought 
perhaps a "Bubble Chart" but  - in Excel at least - does not seem to 
work for this data.



2) After determining the "best" chart style is, what charting tool (if 
not Excel) can generate that style of chart for this data?


Any tips anyone may have would be very welcome.

The data set is below. This shows that "A" intersects with B once and C 
intersects with J 4 times (as example of how to read the data). I have 
replaced the actual labels (text strings for rows and columns) with the 
English alphabet for simplicity.




	A 	B 	C 	D 	E 	F 	G 	H 	I 	J 	K 	L 	M 	N 	O 	P 	Q 	R 	S 	T 	U 	V 	W 	X 
Y 	Z
A 	0 	1 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 
0 	0 	0

B   
0   0   0   0   0   0   0   0   0   
0   0   0   0   0   0   0   0   0   0   
0   0   0   0   0   0
C   

0   0   0   0   0   1   0   4   1   
0   2   0   0   1   1   0   0   1   0   
0   1   0   1   1
D   


0   0   0   1   0   0   0   1   0   
0   0   1   0   0   0   1   0   0   0   
0   0   1   0
E   



0   1   0   0   0   0   1   0   1   
0   0   0   0   0   0   0   0   0   0   
0   0   0
F   




0   0   0   0   0   0   0   0   0   
0   0   0   0   0   0   0   0   0   0   
0   0
G   





0   0   0   0   0   0   0   0   0   
0   0   0   0   0   0   0   0   0   1   0
H   






0   0   0   0   0   0   0   0   1   
0   0   0   0   0   0   0   0   0   0
I   







0   0   0   1   0   0   0   0   0   
0   0   0   0   0   0   0   0   0
J   








0   1   0   1   0   0   0   0   0   
0   0   0   0   0   0   0   0
K   









0   0   1   0   0   0   0   0   1   
0   0   1   1   0   0   0
L   










0   0   0   2   0   0   0   0   0   
0   0   0   0   0   0
M   











0   0   0   0   0   0   0   0   0   
0   0   0   0   0
N   












0   0   0   0   0   0   0   0   0   
0   0   0   0
O   













1   0   0   0   1   0   0   0   0   
1   0   0
P   














0   0   1   0   1   0   0   0   0   
1   1
Q   















0   0   0   0   0   0   0   0   0   0
R   
















0   0   0   0   0   0   0   0   0
S   

















0   0   0   0   0   0   0   0
T   








   

Re: What is a real?

2020-04-25 Thread Paul Dupuis via use-livecode

On 4/25/2020 10:40 AM, Bob Sneidar via use-livecode wrote:

Apparently nothing is a real. Neither is anything strictly a real.


I have never heard a more philosophical statement in all my life ;-)

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


Re: LC equivalent of php utf8_encode and utf8_decode ?

2020-04-13 Thread Paul Dupuis via use-livecode

On 4/13/2020 9:07 AM, jbv via use-livecode wrote:

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

Thanks in advance
jbv

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

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


textEncode and textDecode -- see dictionary for syntax

___
use-livecode mailing list
use-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: Maximum field height?

2020-04-06 Thread Paul Dupuis via use-livecode

On 4/5/2020 10:48 PM, JB via use-livecode wrote:

The question is why don’t they make them compatible?  Is their some
kind of FCC regulation that prevents Apple from using phone apps on
the desktop?  Back in the HyperCard days there was hyperDialer and
I really liked it a lot but I think the company was blocked from using it
by the phone companies or something like that.  Anyway there are no
replacements and I haven’t seen any others that survived so there is
a reason the desktop does not have simple phone capabilities.


Apple is absolutely working towards iOS and macOS being highly similar. 
However, if you're hoping that brings increased simplicity of 
application development to iOS, that isn't Apple's aim. The value to 
them of unification is to get macOS app into the same exclusivity an app 
store as iOS. Currently deployment of macOS apps can be through the 
macOS App store or outside of it. iOS app must be through the App store. 
Apple wants to gradually migrate the macOS base to the point where they 
can say macOS apps will only be available through the App store as well. 
Then they can drive the same developer changes on OSX that they do on 
iOS and take their same 30% cut.


___
use-livecode mailing list
use-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: Maximum field height?

2020-04-05 Thread Paul Dupuis via use-livecode

On 4/5/2020 1:16 AM, J. Landman Gay via use-livecode wrote:
I have a field that reports a formattedheight of 125396. I want to 
extend it to full height for use inside an enclosing scrolling group. 
But when I try to set the height to the formattedHeight, I get an 
error: Value is not a number.


If I try to set its height in the property inspector, it reverts to 
9,040.


Does it exceed some maximum? If I set a scrollbar on the field, it 
scrolls fine and includes all the text. But it won't expand to its 
full height for use inside a scrolling group, which I need for smooth 
scrolling on mobile.




I thought objects in LC still were limited to 32000px (or perhaps -32000 
to +32000 in coordinates) from the ancient QuickDraw days



___
use-livecode mailing list
use-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: DataGrid question: Suggestions for further enhancements

2020-04-02 Thread Paul Dupuis via use-livecode

On 4/2/2020 10:35 AM, Bob Sneidar via use-livecode wrote:

As far as I am concerned, datagrids make table fields obsolete.

I agree.


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


AW: Answer dialog enhancement...

2020-04-01 Thread Paul Dupuis via use-livecode
So I have a working mechanism to add a "Don't Ask Again" check box to 
the existing standard Answer Dialog on the fly. I offer it up to the 
community for anyone who needs it and for anyone who may want to improve 
the code. The scripts are below. There is a sample usage you can place 
in a clickable button and below that is a BEHAVIOR script that must be 
in button whose name matches what is used in the clickable button.


This is the first time I have really found a use for the "before" and 
"after" handlers. What a great addition to LiveCode!


Essentially, I add a behavior to the card of the standard "Answer 
Dialog" that positions and cleans up the Don't Ask Again check box AFTER 
the proOpenCard handler has positioned everything else AND a BEFORE 
mouseUp handler to trap clicks for changing the checkbox hilite that 
would otherwise close the dialog and return a clicked button name.


I needed to set a number of properties for the checkbox because the 
preOpenCard treats ANY button in the Answer Dialog like regular buttons 
and hides those not in use by making them 1px in size and moving them 
off screen. I may not have needed to change every property I did, but I 
didn't have the time to go through the Answer Dialog card script to 
determine exactly what properties those scripts were changing that I 
needed to reset.


I think it would be great in LC, Ltd. could fold this into the standard 
'answer' command some how.



-- Sent when the mouse is released after clicking
-- pMouseButton specifies which mouse button was pressed
on mouseUp pMouseButton
  dontaskagain "on"
  answer warning "Some message I may not want to see again." with 
"Cancel" or "OK" titled "A Message"

  put it into tAnswer
  put dontaskstatus() into tDontAskAgain
  dontaskagain "off"
  --
  put "Don't Ask is:"&&tDontAskAgain &&"And button clicked is:"&&tAnswer
end mouseUp

command dontaskagain pActivate
  switch pActivate
    case "on"
  set the behavior of cd 1 of stack "Answer Dialog" to the long id 
of btn "DontAskBehavior" of this cd

  break
    case "off"
  set the behavior of cd 1 of stack "Answer Dialog" to empty
  delete btn "DontAskAgain" of cd 1 of stack "Answer Dialog"
  break
  end switch
end dontaskagain

function dontaskstatus
  if exists(btn "DontAskAgain" of cd 1 of stack "Answer Dialog") then
    put the hilite of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" into tDontAskAgain

    return tDontAskAgain
  else
    return false
  end if
end dontaskstatus

BEHAVIOR BUTTON SCRIPT

after preOpenCard
  if exists(btn "DontAskAgain" of cd 1 of stack "Answer Dialog") then
    set the style    of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to "checkbox"
    set the autoHilite   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false
    set the opaque   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false
    set the threeD   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false
    set the showBorder   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false
    set the hiliteBorder of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false


    set the height   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to 25
    set the width    of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to 120
    set the bottomLeft   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to the bottomLeft of cd 1 of stack "Answer Dialog"

  else
    -- setup the templateButton
    set the style of the templateButton to "checkbox"
    set the label of the templateButton to "Don't Ask Again."
    --
    create btn "DontAskAgain" in cd 1 of stack "Answer Dialog"
    --
    reset the templateButton
    --
    set the style    of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to "checkbox"
    set the autoHilite   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false
    set the opaque   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false
    set the threeD   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false
    set the showBorder   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false
    set the hiliteBorder of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false


    set the height   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to 25
    set the width    of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to 120
    set the bottomLeft   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to the bottomLeft of cd 1 of stack "Answer Dialog"

  end if
end preOpenCard

before mouseUp pMouseButton
  -- if the target is the check box, check the box and do not pass mouseUp
  if the long ID of the target = the long id of btn "DontAskAgain" of 
cd 1 of stack "Answer Dialog" then
    set the hilite of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to not (the hilite of btn "DontAskAgain" of cd 1 of stack 
"Answer Dialog")

    

Re: Answer dialog enhancement...

2020-03-31 Thread Paul Dupuis via use-livecode

On 3/31/2020 7:12 PM, Bob Sneidar via use-livecode wrote:

Seems like most if not all this code has been done already in the dialog 
itself. I’ll look into it because I wanted at one point to make an enhanced 
answer dialog as well.

Bob S


I'm thinking that if I need to roll my own, then my approach might be to 
write a handler that adds or removes the button by script from the 
standard Answer Dialog. That was if LC Corporate every makes changed to 
the dialog, your project inherits them with a new built under a new 
version of the engine.


If you copy the dialog, then you either need to rename it and maintain 
it or do manual Inclusions and exclude the engine from conflicting with 
your copy.


I was thinking something like:

on mouseUp
  dontaskagain "on","Do not show this message again."
  answer warning "Some message I may not want to see again." with 
"Cancel" or "OK" titled "A Message"

  put it into tAnswer
  dontaskagain "off"
end mouseUp

command dontaskagain pActivate, pLabel
  -- usage:
  -- dontaskagain "on|off" [, ]
  --   dontaskagain "on","Do not show this message again."
  --   answer warning "Some message I may not want to see again." with 
"Cancel" or "OK" titled "A Message"

  --   put it into tAnswer
  --   dontaskagain "off"

  switch pActivate
    case "on"
  -- setup the templateButton
  set the style of the templateButton to "checkbox"
  set the label of the templateButton to pLabel
  set the width of the templateButton to the formattedWidth of the 
templateButton

  set the height of the templateButton to 23
  --
  create btn "DontAskAgain" in cd 1 of stack "Answer Dialog"
  --
  reset the templateButton
  break
    case "off"
  delete btn "DontAskAgain" of cd 1 of stack "Answer Dialog"
  break
  end switch
end dontaskagain

This adds the checkbox or removes it to the built in Answer Dialog 
dynamically. The problem is pre-positioning the checkbox. The dialog has 
a preOpenCard handler that does the position and if I position it ahead 
of time the code it the preOpenCard changes things


I think I need to insert a openCard handler into the stack dynamically, 
which would execute after preOpenCard, that positions the check box OR


attach a behavior script with an "after preOpenCard" handler, but I 
don't understand exactly how to do that??




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


Re: Answer dialog enhancement...

2020-03-31 Thread Paul Dupuis via use-livecode

On 3/31/2020 6:10 PM, Bob Sneidar via use-livecode wrote:

The answer dialog is simply a stack in and of itself if I am not mistaken. I’m 
wondering if you couldn’t find that stack and clone it for your own purposes…

Bob S


Yes. That is easy enough. Turn on "Show IDE Stacks in List" from the 
"View" menu and there are the Answer and Ask Dialogs.


Then you need to work out how the Answer command passes its data via 
"the dialogData" property into order to create an alternative calling 
routine that sets up the Don't Ask Again check box


You could copy the Answer to your own project  and in the Standalone 
Settings switch to Manual Inclusions and exclude the Answer Dialog. Then 
I believe the answer command will use the copy of the dialog in your 
project. Then you need to add the button, change the resizeStack 
handlers accordingly, script its show and hide, add code to get the 
return value


AND remember to see if the dialog needs updates with each new release of 
LiveCode.


That is why I asked if anyone has already done it so as to not re-invent 
the wheel.


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


Answer dialog enhancement...

2020-03-31 Thread Paul Dupuis via use-livecode

Here is another attempt to not reinvent the wheel:

We, like a lot of people, use:

answer [/iconType/]/prompt/[with/button1/[or/buttons/]] 
[titled/windowTitle/] [as sheet]


And we use the various iconTypes to who error, warning, or informational 
icons. We have a lot of these that are caution dialogs (are you sure 
that... sort of thing). We'd like to move to the (now) common UI 
convention of having a "Do not show this again." check box in the dialog 
combined with a set of saved preferences for whether the used indicated 
it should not be shown again. We already have a preferences system in place.


I am seeking if someone has already written code to ADD a "Do not ask 
this again." check box to the existing Answer Dialog, so you could do 
something like:


DontShowAgain "on"
answer warning "Are you sure you want to quit before saving?" with 
"Save" or "Quit" titled "Are You Sure?"

put it into tResponse
put line x of the dalogData into tDontShowAgain
DontShowAgain "off"

where a handler DontShowAgain creates and positions a check box in the 
existing Answer Dialog and adds a script to put the result in the 
dialogData (or some means to check it afterwards)


Alternatively, if no one has glued this onto the existing Answer Dialog 
has anyone created a custom Answer Dialog with a Do Not Show Again check 
box that has the same general capabilities (icon type by platform 
(Win/OSX), html text prompts, named buttons, and windowTitle as parameters)



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


AW: specialFolderPath, Microsoft Window, and 64 bits

2020-03-31 Thread Paul Dupuis via use-livecode

So, I think I may have answered by own question.

IF my app is 32 bit THEN
   specialFolderPath(38) returns the 32 bit app folder (C:\Program 
Files (x86)\)

  and
   specialFolderPath(42) returns the 32 bit app folder (C:\Program 
Files (x86)\)


IF my app is 64 bit THEN
   specialFolderPath(38) returns the 64 bit app folder (C:\Program Files\)
  and
   specialFolderPath(42) returns the 32 bit app folder (C:\Program 
Files (x86)\)


I don't want to change to building a 64-bit Windows version of my - 
mostly because we are just not geared up to QA test for that and 32 bit 
builds.


My main concerns is where the Window OS is installed to a not standard 
volume, so you have something like:


D:\Program Files\
or
\\system07\C$\Program Files\
or
etc.

However, I can write a custom function to get the 32 bit path 
(C:\Program Files (x86)\) and take everything before "Program Files" as 
the VOLUME\ or \\SERVER\VOLUME\ and just put it in front of the 64 bit 
Program Files folder name to get a correct 64 bit path.


I don't believe that the 64bit Program Files and 32 Bit Program Files 
folders can be on different volumes.


Both Mark and Trevor's suggestions of Shell environment variables OR LCB 
wrapped windows API) (respectively) potentially offer a more stable and 
reliable solution that my thought above and I'll look into them.


Thank you all who responded.



___
use-livecode mailing list
use-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: specialFolderPath, Microsoft Window, and 64 bits

2020-03-31 Thread Paul Dupuis via use-livecode

On 3/31/2020 1:13 PM, Trevor DeVore via use-livecode wrote:


Paul,

I had a similar situation recently where I needed to get some DPI
information about the monitors that wasn't available through my LC main
application. I ended up writing a simple command line tool in Visual Studio
that used the Windows APIs and returned the proper information. I included
that exe with my app and called it from within LC. In your case you would
create a 64-bit command line app and I'm guessing you could find sample
code for such a common API call.



That's a good idea! I will  look into that for a more solid and reliable 
fix.


___
use-livecode mailing list
use-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: specialFolderPath, Microsoft Window, and 64 bits

2020-03-31 Thread Paul Dupuis via use-livecode

On 3/31/2020 12:54 PM, Bob Sneidar via use-livecode wrote:

Well that certainly complicates things! :-)




Yea! Our application is used by researchers in Academia, and more are 
shifting to served application for distance learning, especially with 
the pandemic.


We know we work under Citrix App Server, but this is the first (in 
recent times) Microsoft Terminal Server and every app server is slightly 
different.


We're big enough to have customers with weird configuration, but in no 
way big enough to be able to afford to have app servers we can test on, 
so each one is a sudden new support and development challenge!



___
use-livecode mailing list
use-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: specialFolderPath, Microsoft Window, and 64 bits

2020-03-31 Thread Paul Dupuis via use-livecode

On 3/31/2020 12:26 PM, Bob Sneidar via use-livecode wrote:

The Windows Registry uses 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths as the 
path to the installation folder for all installed applications.

put queryRegistry("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App 
Paths\AcroRd32.exe\path")

seems to work.


Thanks for the suggestion, but that will not work in our case

In at least one actual customer instance we have - out customer is 
running our app on a Microsoft Terminal Server and users get a remote 
desktop access to the server to run our app. In this specific case, 
REGISTRY queries get the users local registery on the CLIENT, but PATH 
queries check file paths on the SERVER, so registry checks do not work 
in this case.


___
use-livecode mailing list
use-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: specialFolderPath, Microsoft Window, and 64 bits

2020-03-31 Thread Paul Dupuis via use-livecode

On 3/31/2020 12:12 PM, Mark Waddingham via use-livecode wrote:

On 2020-03-31 17:07, Paul Dupuis via use-livecode wrote:

On 3/31/2020 8:37 AM, Paul Dupuis via use-livecode wrote:
Under LiveCode 9.x.x (up to 9.6.0dp3) I can see no way to obtain the 
64bit application installation folder using SpecialFolderPath? Does 
anyone know if this is correct or am I missing something?


So answering my own question, as of LC9.6.0dp3 here are all the
Windows paths for any given CSIDL number between 0 and 255). None
return the 64-bit applications folder path. I will file an enhancement
request.


Is your app running as 32-bit?

Just to note (looking at the MSDN reference you mentioned):

FOLDERID_ProgramFilesX64
This value is not supported on 32-bit operating systems. It also is 
not supported for 32-bit applications running on 64-bit operating 
systems. Attempting to use FOLDERID_ProgramFilesX64 in either 
situation results in an error. See Remarks for more information.


So even if we did move to FOLDERIDs it wouldn't make much difference 
if the app is 32-bit as 32-bit apps won't return 64-bit related OS 
paths (it seems).


If the app is running as 64-bit then I think the relevant CSIDLs 
return the right thing?


Warmest Regards,

Mark.



Okay, I was running LC960dp3 (32 bit) so I downloaded LC960dp2 (64 bit) 
[I chose dp2 only because I didn't want 32 and 64 bits of the same 
version installed in case of some unknown conflict). Reran my paths test 
and your DO get different results!


Most interestingly:
specialFolderPath(38) = C:/Program Files is the 64 bot applications folder
and
specialFolderPath(42) = C:/Program Files (x86) is teh 32 bit 
applications folder


So, if I am using LC to build a Windows 64 bit standalone that 64 bit 
standalone can get BOTH the 64 bit Programs folder path AND the 32 bit 
Program folders path to check for the presence of a 3rd party 
application that could be installed as either 32 or 64 bit.


HOWEVER, if I have built a 32-Bit LC standalone, that can not get the 
path for the 64 bit Programs folder. It can ONLY get the path for the 32 
bit Programs folder


A little disappointing. My use case remains. My app (currently 32 bit)  
needs to check if a 3rd party app is installed. That 3rd party app could 
be have either a 32 bit version or a 64 bit version installed. I would 
like to use some sort of "specialFolderPath" precisely so it a user has 
a non standard installation I get the correct paths.


In at least one actual customer instance we have - out customer is 
running our app on a Microsoft Terminal Server and users get a remote 
desktop access to the server to run our app. In this specific case, 
REGISTRY queries get the users local registery on the CLIENT, but PATH 
queries check file paths on the SERVER, so registry checks do not work 
in this case.



Folder paths for 64-bit LiveCode 960dp2
specialFolderPath("home") = C:/Users/paul
specialFolderPath("desktop") = C:/Users/paul/Desktop
specialFolderPath("documents") = C:/Users/paul/Documents
specialFolderPath("support") = C:/Users/paul/AppData/Roaming
specialFolderPath("system") = C:/Windows
specialFolderPath("start") = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Start Menu

specialFolderPath("fonts") = C:/Windows/Fonts
specialFolderPath("temporary") = C:/Users/paul/AppData/Local/Temp
specialFolderPath("engine") = C:/Program Files/RunRev/LiveCode Business 
9.6 (dp 2)

specialFolderPath("resources") = C:/Users/paul/Desktop
specialFolderPath(0) = C:/Users/paul/Desktop
specialFolderPath(2) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Start Menu/Programs

specialFolderPath(5) = C:/Users/paul/Documents
specialFolderPath(6) = C:/Users/paul/Favorites
specialFolderPath(7) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup
specialFolderPath(8) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Recent
specialFolderPath(9) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/SendTo
specialFolderPath(11) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Start Menu

specialFolderPath(13) = C:/Users/paul/Music
specialFolderPath(14) = C:/Users/paul/Videos
specialFolderPath(16) = C:/Users/paul/Desktop
specialFolderPath(19) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Network Shortcuts

specialFolderPath(20) = C:/Windows/Fonts
specialFolderPath(21) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Templates

specialFolderPath(22) = C:/ProgramData/Microsoft/Windows/Start Menu
specialFolderPath(23) = C:/ProgramData/Microsoft/Windows/Start Menu/Programs
specialFolderPath(24) = C:/ProgramData/Microsoft/Windows/Start 
Menu/Programs/StartUp

specialFolderPath(25) = C:/Users/Public/Desktop
specialFolderPath(26) = C:/Users/paul/AppData/Roaming
specialFolderPath(27) = 
C:/Users/paul/AppData/Roaming/Microsoft/Windows/Printer Shortcuts

specialFolderPath(28) = C:/Users/paul/AppData

Re: specialFolderPath, Microsoft Window, and 64 bits

2020-03-31 Thread Paul Dupuis via use-livecode

On 3/31/2020 8:37 AM, Paul Dupuis via use-livecode wrote:
Under LiveCode 9.x.x (up to 9.6.0dp3) I can see no way to obtain the 
64bit application installation folder using SpecialFolderPath? Does 
anyone know if this is correct or am I missing something?


So answering my own question, as of LC9.6.0dp3 here are all the Windows 
paths for any given CSIDL number between 0 and 255). None return the 
64-bit applications folder path. I will file an enhancement request.


specialFolderPath(0) = C:/Users//Desktop
specialFolderPath(2) = 
C:/Users//AppData/Roaming/Microsoft/Windows/Start Menu/Programs

specialFolderPath(5) = C:/Users//Documents
specialFolderPath(6) = C:/Users//Favorites
specialFolderPath(7) = 
C:/Users//AppData/Roaming/Microsoft/Windows/Start 
Menu/Programs/Startup
specialFolderPath(8) = 
C:/Users//AppData/Roaming/Microsoft/Windows/Recent
specialFolderPath(9) = 
C:/Users//AppData/Roaming/Microsoft/Windows/SendTo
specialFolderPath(11) = 
C:/Users//AppData/Roaming/Microsoft/Windows/Start Menu

specialFolderPath(13) = C:/Users//Music
specialFolderPath(14) = C:/Users//Videos
specialFolderPath(16) = C:/Users//Desktop
specialFolderPath(19) = 
C:/Users//AppData/Roaming/Microsoft/Windows/Network Shortcuts

specialFolderPath(20) = C:/Windows/Fonts
specialFolderPath(21) = 
C:/Users//AppData/Roaming/Microsoft/Windows/Templates

specialFolderPath(22) = C:/ProgramData/Microsoft/Windows/Start Menu
specialFolderPath(23) = C:/ProgramData/Microsoft/Windows/Start Menu/Programs
specialFolderPath(24) = C:/ProgramData/Microsoft/Windows/Start 
Menu/Programs/StartUp

specialFolderPath(25) = C:/Users/Public/Desktop
specialFolderPath(26) = C:/Users//AppData/Roaming
specialFolderPath(27) = 
C:/Users//AppData/Roaming/Microsoft/Windows/Printer Shortcuts

specialFolderPath(28) = C:/Users//AppData/Local
specialFolderPath(29) = 
C:/Users//AppData/Roaming/Microsoft/Windows/Start 
Menu/Programs/Startup
specialFolderPath(30) = C:/ProgramData/Microsoft/Windows/Start 
Menu/Programs/StartUp

specialFolderPath(31) = C:/Users//Favorites
specialFolderPath(32) = 
C:/Users//AppData/Local/Microsoft/Windows/INetCache
specialFolderPath(33) = 
C:/Users//AppData/Local/Microsoft/Windows/INetCookies
specialFolderPath(34) = 
C:/Users//AppData/Local/Microsoft/Windows/History

specialFolderPath(35) = C:/ProgramData
specialFolderPath(36) = C:/Windows
specialFolderPath(37) = C:/Windows/System32
specialFolderPath(38) = C:/Program Files (x86)
specialFolderPath(39) = C:/Users//Pictures
specialFolderPath(40) = C:/Users/
specialFolderPath(41) = C:/Windows/SysWOW64
specialFolderPath(42) = C:/Program Files (x86)
specialFolderPath(43) = C:/Program Files (x86)/Common Files
specialFolderPath(44) = C:/Program Files (x86)/Common Files
specialFolderPath(45) = C:/ProgramData/Microsoft/Windows/Templates
specialFolderPath(46) = C:/Users/Public/Documents
specialFolderPath(47) = C:/ProgramData/Microsoft/Windows/Start 
Menu/Programs/Administrative Tools
specialFolderPath(48) = 
C:/Users//AppData/Roaming/Microsoft/Windows/Start 
Menu/Programs/Administrative Tools

specialFolderPath(53) = C:/Users/Public/Music
specialFolderPath(54) = C:/Users/Public/Pictures
specialFolderPath(55) = C:/Users/Public/Videos
specialFolderPath(56) = C:/Windows/Resources
specialFolderPath(59) = 
C:/Users//AppData/Local/Microsoft/Windows/Burn/Burn



___
use-livecode mailing list
use-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: specialFolderPath, Microsoft Window, and 64 bits

2020-03-31 Thread Paul Dupuis via use-livecode

On 3/31/2020 11:24 AM, Bob Sneidar via use-livecode wrote:

Isn’t the defaultFolder the app folder when you launch it?



Yes, but I am interested in where OTHER applications have been installed 
(a specific other application that could have ts 32 bit OR its 64 bit 
version installed)



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


specialFolderPath, Microsoft Window, and 64 bits

2020-03-31 Thread Paul Dupuis via use-livecode
On Windows, the SpecialFolderPath function can use Constant Special Item 
ID List (CSIDL) values, but since Windows Vista, developer were supposed 
to switch to using the Microsoft Known Folder ID system instead (I just 
learned this, so there's that!) (see 
https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid)


Under CSIDL, specialFolderPath("38") is the equivalent of 
CSIDL_PROGRAM_FILES or C:\Program Files\ on older systems or C:\Program 
Files (x86)\ on Windows 8 or 10 (for 32 bit apps)


Under KNOWNFOLDERID, this is FOLDERID_ProgramFiles and there is a 
seconds KNOWNFOLDERID, FOLDERID_ProgramFilesX64 that on 64 bit Window 8 
and 10 gets you the 64 bit app installation folder, typically C:\Program 
Files\



Under LiveCode 9.x.x (up to 9.6.0dp3) I can see no way to obtain the 
64bit application installation folder using SpecialFolderPath? Does 
anyone know if this is correct or am I missing something?


And does anyone know if LC plans to update the specialFolderPath 
function on Windows to use KNOWNFOLDERID? Or if it currently uses 
KNOWNFOLDERID (for all I know).



My use case is that I need to check both the 32 bit app installation 
folder and the 64 bit app installation folder to see if a particular app 
is installed (either the 32 or 64 bit version could be present) and I 
would rather NOT hard code the paths since we do run into non-standard 
installations among our customer base.




___
use-livecode mailing list
use-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: Cross-platform Bluetooth and Speech to text

2020-03-27 Thread Paul Dupuis via use-livecode

On 3/27/2020 1:38 PM, R.H. via use-livecode wrote:

Cross-platform Speech to Text

Has anybody ever implemented "speech to text" (not TTS)? It should be
possible with the browser widget using web API's: Microsoft Cognitive
Serrvices, IBM Watson, Speechmatics...? But ideally, it would not depend on
available Internet connection and use some good enough text recognition
engine.


For last year's LiveCode conference, Trevor DeVore kindle wrapped Pocket 
Sphinx in a widget library for LC for OSX. He left Window and other 
platforms as an exercise for any one interested. However, this effort 
represents the current - and best - work at STT for LC


https://github.com/trevordevore/lc-pocketsphinx

Should you do the FFI wrapping for any other platforms, please let 
people know.



___
use-livecode mailing list
use-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: Its very quiet

2020-03-27 Thread Paul Dupuis via use-livecode

On 3/27/2020 11:16 AM, Bob Sneidar via use-livecode wrote:

All I am doing right now is working in Livecode! Very refreshing. How about we 
all chime in on what we are currently working on?


I'm working on implementing a frozen left column pane "Datagrid" based 
on the code zryip theSlug kindly provided yesterday in response to my 
"DataGrid question..." thread on this list.


But I am only doing that for about another hour or two and then since 
this Friday is finally warm and sunny where I live, I am planning on 
taking the afternoon to get some year chores done.


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

2020-03-26 Thread Paul Dupuis via use-livecode

On 3/26/2020 4:31 PM, zryip theSlug via use-livecode wrote:

The "Freeze pane" stack is available here:
https://www.aslugontheroad.com/download/category/4-lab

It demonstrates how to scroll, select and sort two datagrids synchronizaly.


 Thank you. That is really a helpful time saver. All I need to add to 
it for my use is a overlaid resize between the fixed datagrid and the 
scrolling one and I have multi-field resized code all over the pace to 
reuse.


Thanks again for sharing!

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

2020-03-26 Thread Paul Dupuis via use-livecode

On 3/26/2020 9:54 AM, zryip theSlug via use-livecode wrote:

Paul,

I have somewhere a stack demonstrating how to use a second datagrid
with the columns to freeze and how to synchronize this second datagrid
with the main datagrid when the rows are scrolled.

If you may interested I can share it.




Very interested!

Given everyone's responses, I was just about to code something up myself 
using two Datagids for consistency in user interface.


Thank you!

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


DataGrid question...

2020-03-24 Thread Paul Dupuis via use-livecode
Has anyone come up with a way to configure a DataGrid (LC9) so that the 
left most column remains visible when the other columns are scrolled 
horizontally?


Or is the only way to to do this is to have a separate field to the left 
of the DataGrid that holds the left column?


Anyone solved this already?


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

On 3/22/2020 8:41 AM, Mark Waddingham via use-livecode wrote:

On 2020-03-21 14:09, Paul Dupuis via use-livecode wrote:

So far the only person who has read my post and replied with what I
was looking for was Peter - and although the routine was written in
Rebol rather than LiveCode, he kindly provided a link to information
about it.


It might have got lost in amongst other replies but I did suggest:

<https://pypi.org/project/chardet/>


Thank Mark.

I apologize. I did miss the reference to Chardet. At one point we looked 
at wrapping a C++ interface to the Mozilla code, but we don't have 
anyone here who has had the time to learn LCB and FFI, I know! We should 
make the time!





It even comes with a command-line script (chardetect) which would 
allow to compare your detector with that one.


However, on further digging it appears that this does not (as it 
stands) detect MacRoman which is obviously a key requirement here.


MacRoman detection is a essential requirement. One of our selling 
points, since many Universities these days have people on mixed 
platforms, is that our tool is nearly identical across macOS and Windows 
to facility researcher collaborations, so we do have people sending 
files created on their Macs to Windows team members and vice versa, so 
we have to detect MacRoman and CP1252 on both platforms.




There is a stale PR for that though 
<https://github.com/chardet/chardet/pull/5> so the method used here is 
obviously possible to extend to that.


From what I have read the Python one is a python reimplementation of 
Mozilla's 'Universal Charset Detector' which, from what I have read, 
is/was pretty much state of the art - reading through the chardet docs 
(https://chardet.readthedocs.io/en/latest/how-it-works.html#single-byte-encodings 
is perhaps the most pertinent) it sounds like its single-byte 
detectors use 2-byte sequences to try and distinguish.


There is a special case for Latin-1 (1252) which is needed because 
English text looks the same in a large number of encodings - this 
works by looking for curly quotes and other special symbols by the 
look of it. (The MacRoman addition in the stale PR above, is also a 
Latin-1 like special-case - which makes sense as Latin-1 and MacRoman 
are almost just permutations of each other).


My general feeling is that if you already have a process which works 
to detect the differences between MacRoman and Latin-1, then it is 
likely largely equivalent to any other means which exists (the 
accepted answer here 
<https://stackoverflow.com/questions/4198804/how-to-reliably-guess-the-encoding-between-macroman-cp1252-latin1-utf-8-and> 
sounds like it pretty much sums up the situation!) so beyond fixing 
the bug(s) you found recently, you might find that there is nothing 
more you can do.


And we arrive at the same place! Our review of our code, which failed to 
handle a particular MacRoman detection, and comparing to other encoding 
guessing algorithms, turned up a couple issues - all fixable in our 
code, and only one was a encoding guessing issue.


In our guessEncoding routine, there was a misspelled variable that was 
preventing the detection of MacRoman from line ending comparisons from 
working properly. I'm not sure how this got past our QA, but - as you 
know - sometimes things do and it did. With that fixed, we getting 
accurate detection of C1252, MacRoman, ASCII, UTF8, UTF16 BE/LE, and 
UTF32 BE/LE on our suite of about 30 different test files.


We also ran into an edge case of Mac cr (ASCII 13) line ending in UTF8 
or UTF16 file needed an adjustment to convert the line ending to linefeeds.


So at this point our code is detecting the encoding for and reading text 
files into LC with a pretty high rate of accuracy.


For anyone else needed such code, I will try to pulling into a single 
library and somehow make it available. All I will ask is that if anyone 
does us it and improved upon it to share the improvement back.



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

Nope.

The reason I refer to the routine as "guessEncoding" is that I 
absolutely know that it is a "guess" based on the presence of nulls and 
other bytes for UTF files and by statistical sampling for various 
characters for MacRoman vs CP1252. We also offer a optional way for the 
user to pick the encoding IF THEY KNOW IT (or I suppose they can keep 
guessing until they get it right),


I'll say it again, I was looking to see if ANY one else had implemented 
a guessEncoding routine and was willing to share of license for 
comparison to my own in hopes of either concluding mine is the best it 
can be OR learning something someone else is doing that improves it a 
little bit.


So far the only person who has read my post and replied with what I was 
looking for was Peter - and although the routine was written in Rebol 
rather than LiveCode, he kindly provided a link to information about it.


On 3/21/2020 4:20 AM, Quentin Long via use-livecode wrote:

I strongly suspect that the desired goal, to have a nice, robust algorithm 
which automagically identifies the encoding of *ABSOLUTELY ANY* text document 
with zero need for human involvement, simply isn't possible. Because text 
encoding is intrinsically arbitrary—see also: the many variations on extended 
(8-bit) ASCII, the various mutually-incompatible versions of EBCDIC, etc ad 
nauseam.
Seems to me, therefore, that in the general case, human involvement is an 
*unavoidable necessity* in determining which encoding an arbitrary text 
document uses. So the goal of any encoding-ID algorithm should *not* be the 
impossible task of determining that encoding *without* human involvement. 
Rather, the goal should be to *minimize* that human involvement, make that 
human involvement as *simple and painless* as practically feasible. So, here 
goes with some semi-random rambling…  Pretty sure the best, most nearly 
bulletproof way to ID a document's text-encoding involves applying that 
encoding to the bits of the document, and showing the resulting 
character-sequence to a human. If there's more than one possibility for the 
document's encoding, apply all of the possible encodings, and show a human all 
of the resulting character-sequences. I'm thinking that a good way to do this 
might be to put up N different text fields in a window, with all of the text 
fields controlled by one scrollbar, and the human clicks on all of the fields 
whose content looks good to them. Or maybe the human clicks on all the fields 
whose output looks *bad* to them? Whichever way works; as long as there *is* 
some human judgement in there somewhere.
Can we assume that once a particular document's text-encoding has been identified, that 
*all* documents which came from the same source as that document use that particular 
encoding? If so, that might simplify the continuing workflow; tell the software 
"This document came from Source X", and the software then uses whichever 
text-encoding it associates with that source. Even if there's more than one such 
text-encoding in play, that's at least easier to work with than having to sort thru an 
arbitrarily large number of text-encodings.
Is it possible to tell the software "hey, no character in $ThisSetOfChars will ever 
appear in this document"? If so, the software should be able to rule out any 
encoding which ends up putting one of the Forbidden Chars into the decoded 
character-sequence.

Given human error, it may be that the human's input ends up ruling out *any 
possible* text-encoding. Prolly a good idea to use something akin to fuzzy 
logic rather than strict Boolean operations.

___
use-livecode mailing list
use-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: Guessing the encoding of a test file...

2020-03-21 Thread Paul Dupuis via use-livecode

On 3/20/2020 8:49 PM, peterwawood via use-livecode wrote:

PaulI wrote a simple function to guess the encoding of a file but in Rebol not 
LiveCode. I'm not sure how it compares with your current function in terms of 
accuracy. It is being used by a company which does a lot of text processing. 
(Though I don't know if that is a good reccomendation or not). The method I 
used is explained in the brief documentation 
-http://www.rebol.org/documentation.r?script=str-enc-utils.r]. The rules could 
be used to create a LiveCode function.PeterPS Sorry for top posting, I'm 
replying from a mobile app.

Peter,

Thank you. While I would have loved to see this as a LC script for 
comparison to my own routine, this is the sort of replies I was looking 
for. Other routines I could compare mine to for seeking possible 
improvements in my own 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


Re: Guessing the encoding of a test file... [OT]

2020-03-20 Thread Paul Dupuis via use-livecode

On 3/20/2020 4:47 PM, doc hawk via use-livecode wrote:

On Mar 20, 2020, at 12:51 PM, Ralph DiMola via use-livecode 
 wrote:

Just for a laugh... one of the more esoteric codings I used in the quasi modern 
error (besides EBCDIC) was the 5 bit Quotron stock ticker system in the mid 
90s. It used different codes for requesting/receiving quotes because 2^5 is 
only 32 possible characters. Alpha in/numeric out.

They created a *new* five bit, shifted code, rather than just using Baudot




From a guessEncoding perspective, you just scan the bytes and if all 
byte values are in the 0-31 range, you have a 5-bit code.


Then it get harder to determine whether it is Quotron or Baudot...


___
use-livecode mailing list
use-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-20 Thread Paul Dupuis via use-livecode

On 3/20/2020 1:11 PM, doc hawk via use-livecode wrote:

On Mar 19, 2020, at 1:31 PM, Paul Dupuis via use-livecode 
 wrote:

“ASCII"

Wait, you’re not going to distinguish between six and seven bit ASCII?

:_)




Okay, now you going for the low blow :-)

Next, you'll be suggesting I need to check for EBCDIC encodings!

___
use-livecode mailing list
use-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-20 Thread Paul Dupuis via use-livecode

On 3/20/2020 1:44 PM, Richard Gaskin via use-livecode wrote:
I would be interested to learn more about the details of the 
subsequent refinements over the decade since, but also the ROI 
proposition for today:


I'll try to remember to share the current code after this current 
review. I'm happy to put it out there for others who may need something. 
It adds a few more statistical samplings for MacRoman vs CP1252/Latin 1 
over your excellent original routine that catches a few more correct 
guesses.


As for the diminishing returns and ROI for today, I am not sure there is 
any sort of general ROI for further enhancing the current routine. It 
does just about every best practice for detection there is (to the best 
of my knowledge). That said, the current case is of a researcher with a 
edge variant who happens to be a long time customer AND has a *LOT* of 
text file that should come up as MacRoman but were not. With one more 
tweak (a tiny bug of a mistypes variable name) they now do detect correctly.


If the customer wasn't a long time customer and someone with lots of 
data with this problem, I probably would not invest this level of effort.


___
use-livecode mailing list
use-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-20 Thread Paul Dupuis via use-livecode

To Sean and Bob,

Thank you for your replies. I may not have been clear enough in my 
original post:


We make and sell an App for macOS and Windows. It's uses around the 
world by researchers (not a lot of them as it is a niche product) on 
their computers. The research applications allows input of data from 
text files. The sources of those text files are from various source 
those researcher have. It would negatively impact our competitiveness in 
our market if we forced the users to convert their data all to some 
specific text encoding, so we need to try to "guess" the encoding of 
those text files.


There are many published algorithms for doing this and we have a past 
contractor of ours take a "best practice" algorithm and create a LCS 
"guessEncoding function. This replaced a previous guessEncoding function 
we had that from Richard Gaskin, which while quite good, did not cover 
as many test cases and the newer more robust one.


My main question to the list was: Has anyone out there ALSO written a 
guessEncoding function they might like to share or license?


Why did I ask this? Because I am interested in comparing the accuracy of 
our current handler to any other that may be available as, users being 
users, we recently have a user reveal a bug (mis named variable) in our 
current function that meant it was missing certain edge cases ( and this 
user has hundreds of text files that need this edge case to be properly 
recognized as MAcRoman encoding. So that bug has been fixed, but I am 
still interested in comparing any other giessEncoding routines to our 
current one to see if we can do better that we current are.


To Mark,

As always, thank for reading and responding Mark. We're actually doing 
what you suggest. We had a set of QA test cases (text files in many 
different line endings and encodings), some intended to fail (such as 
Windows Code Page's we don't support). We're expanding these and doing a 
review on macOS and Windows with our app. Ones that fail, that we think 
shouldn't fail, we will step through the code to see why they fail and 
if our algorithm can be further enhanced. I can's foresee any algorithm 
tweaks we can't code ourselves that we'd need LC or USE-LIST assistance for.


Back around LiveCode 7, Fraiser said, in response to some correspondence 
I had with him, that he would consider creating a "guessEncoding" to go 
along with the Unicode Everywhere work and the new textEncode/textDecode 
functions. I do understand the reluctance, as a business, to do so, as 
inevitably there will be some instances where it guesses wrong. Other 
than LC adding a guessEncoding function using some open source library, 
I would say the area where LC could be the most help would be with this 
enhancement https://quality.livecode.com/show_bug.cgi?id=22391


I am under the, perhaps false, impression that isoToMac and macToIso are 
sort of viewed as functions that may become deprecated and no longer 
updated in the future. However, they are still essential for us until I 
can textDecode(someData,"MacRoman") on a Windows system and vice versa.




___
use-livecode mailing list
use-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-19 Thread Paul Dupuis via use-livecode
Users of our application may use text files any whatever encoding their 
local system creates them in. We can not tell them to only create such 
files with a specific encoding. So, we need to detect the encoding of 
the text file the user selects.


As I mentioned, I have an LC script that implements a encoding guessing 
algorithm. I am looking for an alternative or better one if someone out 
there happened to have created one they might like to share or license.


Any such routine needs to work on macOS and Windows and return the types 
used by the LC textDecode function.


I already knew about file on OSX, but I needs a x-platform solution.


On 3/19/2020 6:15 PM, Pi Digital via use-livecode wrote:

On a mac it’s easy. Use
file -I “MyFile.txt”
  as a shell script.

On Windows it’s near impossible without running a whole bunch or arbitrary 
tests that may or may not be correct - certainly not accurate.

What kind of text were you hoping to see? Was you looking for a particular 
encoding? If it is grammatical text there’s are a bunch or runs you can do to 
see what character sets are used but even then it’s only a 
‘probably’/‘possibly’ response.

Sean Cole
Pi Digital



On 19 Mar 2020, at 20:31, Paul Dupuis via use-livecode 
 wrote:

This has come up many times before, but I'll ask once again in case something 
has changed or someone new sees this.


Does anyone have a routine that will take a filespec to a text file and return 
the guessed encoding of the text file?


First, please don't respond with your should know the encoding or the users 
should know the encoding of their files. Not possible in the widely 
uncontrolled real world.

I do already have a routine to guess file encodings. It was written by someone 
else. There are instances where it should work and does not. I fear there may 
be errors in the algorithm and I do not have the original algorithm to check it 
against. Hence, I am looking for an alternative that is either free to use or 
to be licensed for a modest fee.

My current routine attempts to return the encoding as a string that can be 
directly passed to textDecode(binaryData,encoding)

"ASCII"
"UTF-16"
"UTF-16BE"
"UTF-16LE"
"UTF-32"
"UTF-32BE"
"UTF-32LE"
"UTF-8"
"CP1252" *
"MacRoman" *

* for these last 2, if the file is MacRoman on a Windows system, you actually have to 
textDecode(macToISO(data),"CP1252") and if you have CP1252 on the Mac, you need to do 
textDecode(isoToMac(data),"MacRoman"). 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.


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


Guessing the encoding of a test file...

2020-03-19 Thread Paul Dupuis via use-livecode
This has come up many times before, but I'll ask once again in case 
something has changed or someone new sees this.



Does anyone have a routine that will take a filespec to a text file and 
return the guessed encoding of the text file?



First, please don't respond with your should know the encoding or the 
users should know the encoding of their files. Not possible in the 
widely uncontrolled real world.


I do already have a routine to guess file encodings. It was written by 
someone else. There are instances where it should work and does not. I 
fear there may be errors in the algorithm and I do not have the original 
algorithm to check it against. Hence, I am looking for an alternative 
that is either free to use or to be licensed for a modest fee.


My current routine attempts to return the encoding as a string that can 
be directly passed to textDecode(binaryData,encoding)


"ASCII"
"UTF-16"
"UTF-16BE"
"UTF-16LE"
"UTF-32"
"UTF-32BE"
"UTF-32LE"
"UTF-8"
"CP1252" *
"MacRoman" *

* for these last 2, if the file is MacRoman on a Windows system, you 
actually have to textDecode(macToISO(data),"CP1252") and if you have 
CP1252 on the Mac, you need to do textDecode(isoToMac(data),"MacRoman"). 
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.



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


OT: Project Lasso

2020-03-16 Thread Paul Dupuis via use-livecode

On 3/16/2020 3:37 PM, Mark Wieder via use-livecode wrote:

On 3/16/20 11:37 AM, Paul Dupuis via use-livecode wrote:

Most time my Windows 10 laptop slows LC (IDE or SA) down it is due to 
some other process chewing up time. This is Off Topic, but does any 
know of a safe, reliable tool that will look at all the processes you 
see when you bring up the Task Manager and help you figure out what 
you really and need and what you don't?


Yep - Project Lasso...

https://bitsum.com/


Mark,

Thank you. One follow up question that I did not see looking through 
their web site. Does Project Lasso tell you what all those processes are 
for in any way?



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

2020-03-16 Thread Paul Dupuis via use-livecode

On 3/16/2020 2:27 PM, Richard Gaskin via use-livecode wrote:

Bob Sneidar wrote:
> Not complaining just reporting. The same standalone on a Mac takes 3
> seconds to load all the data from a series of sql queries. The same
> information on Windows standalone takes 13 seconds, both 32 bit and 64
> bit, and irregardless of whether or not it is running in a VM. It's
> just windows networking. It sucks!

Thank you for that info.  Do you have system specs and a sample script 
we might use to follow along?




Most time my Windows 10 laptop slows LC (IDE or SA) down it is due to 
some other process chewing up time. This is Off Topic, but does any know 
of a safe, reliable tool that will look at all the processes you see 
when you bring up the Task Manager and help you figure out what you 
really and need and what you don't?


For example, when I just brought up the Task Manager while working on 
this post, I have

Apps (6)
Background Processes (92)
Windows Processes (92)

(A pure coincidence that the number were both 92 when I did this!)

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


Re: Where is André ? André says "goodbye"

2020-03-14 Thread Paul Dupuis via use-livecode



It s revXMLText (idID) that converts high ASCII characters to HTML 
entities, so I don't think file vs binfile will make much difference.


___
use-livecode mailing list
use-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: Where is André ? André says "goodbye"

2020-03-14 Thread Paul Dupuis via use-livecode

On 3/14/2020 3:58 AM, Matthias Rebbe via use-livecode wrote:

revXMLPutIntoNode idID, "/identity/name",  textEncode (field  "name_source" ,"UTF8") -- 
fld contains "André"

When I write the XML file:

put revXMLText (idID) into URL **myFile.xml**

… I don’t find André any longer, but André


First, é is HTML for é which is correct, just encoded as an HTML 
character value.


If you code it as (below) with the textEncode to UTF8 removed

on mouseUp
  put 
revXMLCreateTree("",false,true,false) 
into idID
  revXMLPutIntoNode idID, "/identity/name",  field  "name_source" -- 
fld contains "André"
  put revXMLText (idID) into URL 
("file:"&specialFolderPath("desktop")&slash&"myFile.xml")

end mouseUp

You just get Andr - the é is removed

on mouseUp
  put 
revXMLCreateTree("",false,true,false) 
into idID
  revXMLPutIntoNode idID, "/identity/name",  field  "name_source" -- 
fld contains "André"
  put textEncode(revXMLText (idID),"UTF-8") into URL 
("file:"&specialFolderPath("desktop")&slash&"myFile.xml")

end mouseUp

You still just get Andr - the é is removed

I think revXMLText may convert all non-ASCII characters to HTML entities

Some of the rev* libraries are not fully Unicode aware, for example, for 
revZIP, I filed this confirmed bug: 
https://quality.livecode.com/show_bug.cgi?id=22202


Either by design or as a bug, any accented characters (non-ASCII) you 
may have to deal with HTTML encodings for


And a search of the LiveCode Quality Center shows the exact bug you are 
running into is: https://quality.livecode.com/show_bug.cgi?id=18927


___
use-livecode mailing list
use-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: Philosophical questions about the fontNames

2020-03-12 Thread Paul Dupuis via use-livecode

On 3/12/2020 3:24 PM, Richard Gaskin via use-livecode wrote:
With more substantial content (web authoring, printed materials, etc.) 
the user cares very much, and the likelihood of ever wanting the 
OS-specific default font is low, so assigning your own default font 
explicitly would work well (even better for some apps, let the user 
define a default).


So while I do support your request to extend "effective" to apply here 
(notwithstanding the considerable effort the team would need to do to 
figure out what the values of the OS constants refer to), I also 
recognize it's not a common use case.  Worth supporting, IMO, but of 
low priority.


Now, after Mark's explanation, I get it. I'll definitely go back to 
explicitly specifying default fonts by platform. As you know, if you do 
that right, because of LiveCode's inheritance, you really only need to 
do it for a few objects on startup.


I really did go down a rabbit hole. I saw the new (something) font 
names, look at what I thought they were for and thought I could make 
code cleaner by using them. Now I know, that is not the case for my 
specific application. For other people or for some future App of mine 
they may be ideal.


And, I agree with you. Of all the bugs and enhancement Curry and I have 
submitted in the past 6 month, making 'effective' work in this case 
would be near the bottom of my priority list.



And yes, I expect we'll always be stuck with pain points in 
cross-platform UI work that NO development environment will ever make 
truly seamless because the OS vendors themselves try to differentiate 
their products by their appearance and the way the UI works (among many 
other factors).


I can still wish it wasn't so though...

I am working on a new tool requested by a customer. The crunching and 
analysis of the research data coding is simple compared to the UI which 
will probably take me 10 times as long to code and get to look and 
function "right" on macOS and Windows.


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


Re: Philosophical questions about the fontNames

2020-03-12 Thread Paul Dupuis via use-livecode

On 3/12/2020 12:22 PM, hh via use-livecode wrote:

Indeed, the current implementation of
(Default),(Menu),(Message),(Styled Text),(System),(Text),(Tooltip)
is not very useful.

For example (System) at size 13 on MacOS 10.15 is on Windows 10
at about (System) at size 12. So one needs nevertheless a platform
switch.



I *do* find that cross-platform UI design and implementation to still be 
the hardest thing to do in LiveCode (on a relative scale of course, 
since LiveCode overall is easy)


I would just like to be able to say in a preferences box for my app that 
I am deploying to this platform and that platform and have the LiveCode 
IDE or engine (or both) figure out what fonts and what sizes everything 
should be to comply with the ever changing OS vendor HIGs!


I constantly run into things like we make a button with a label that 
fits on one platform and then on another the label is too long or a 
filed is sized to display x lines on this platform  but on that platform 
the line sizes are different! G! It really is infuriating at times. 
I would love the IDE to help, even by things like showing a bounding box 
for a button label that takes all platforms checked in the standalone 
setting into account. Fit Width seems to be platform specific.


(And yes, I know that is just shifting a huge burden from me to LiveCode).

Sorry, just using this thread to rant about UI building woes.

___
use-livecode mailing list
use-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: Philosophical questions about the fontNames

2020-03-12 Thread Paul Dupuis via use-livecode

On 3/12/2020 12:47 PM, Mark Waddingham via use-livecode wrote:

On 2020-03-12 15:53, Paul Dupuis via use-livecode wrote:

So here is the simple use-case I ran into. We have a field with an
editor toolbar for rich content editing in an app. The field is set to
(Text) upon start up, as in:

set the textFont of fld "X" to "(Text)"

So that the font is initially in the appropriate default font for the
platform the app is running on. In the toolbar we also have a Font pup
menu with the available fonts listed for the user to change the font
they want in the field. It is the UI standard that such a menu SHOW
the user the currently selected font.

...

If there is a good work-around for this apparent conflict, I'm
definitely open to giving it a try or if I simply missed something
obvious, I'm happy to be educated.


I think the conflict comes from the assumption that having the default 
be '(Text)' (or the font underlying them) is the correct thing to do.


If the field allows user-settable styling (even just font), then I'd 
suggest that it doesn't need to use the 'default system font for the 
platform' and you can just choose a sensible default - i.e. it isn't a 
UI text area from a HIG perspective, it is a user styled text 
area/document area.


As a comparison, TextEdit defaults to Helvetica and WordPad defaults 
to Calibri or Times New Roman (depending on version I think) [ I can't 
remember what Notepad uses on Windows 10, something horrendously ugly 
and bitmap based still, probably! ]


My point of view here is mainly motivated by the following...

A couple of weeks ago (or maybe longer?) Klaus noticed a really 
strange problem with text extraction from a PDF printed using LiveCode 
on macOS - specifically digits did not extract as digits (they looked 
absolutely fine). [ He seemed to get quite 
hot-under-the-collar-about-it, but they may have just been his 
Germanic enthusiasm ;) ].


Changing the font to Courier or Arial solved the problem - digits 
could be copied as digits again.


It wasn't until I ran an internal tool I wrote for Kognition many 
moons ago on the generated PDF that I figured out what the cause was. 
The effective font of the offending field was '(System)' - this came 
out in the PDF as '.SFNSText'.


(Note: I still don't quite know why it munges digits - my guess is 
that it doesn't have a traditional CMAP table).


This is a font you won't find listed in the fontNames, nor (I don't 
think) In FontBook or anywhere else. It is a seemingly highly 
specialized and custom crafted font designed only for screen display 
in the macOS UI.


Indeed, if I interrogate the NSFont object we get internally when 
requesting the font for (Text), I get '.AppleSystemUIFont' - which is 
similarly not appropriate for what you want.


TL;DR version: Theme fonts '(...)' should only be used for 'fixed' UI 
display - they won't print in the same way and cannot be chosen in the 
same way by name. For text that might be printed, or where the font 
can be chosen by the user, you should choose sensible default fonts 
similar to those of the basic apps for styled text entry on the 
platform the program is running on.


Hope this helps,



Yes, it does. Lacking a detailed technical understanding of the 
ridiculous complexity of the macOS (or Windows for that matter), is one 
reason we used/use HyperCard, SuperCard, MetaCard, Revolution, LiveCode 
for the past 25+ years for our app development.


It *SEEMED* like a reasonable attempt at HIG compliance to set the fonts 
of our objects to the special names and also *SEEMED* like it was then 
reasonable to want to show what font was selected in a menu, but it is 
absolutely true that I was assuming that "(Text) became Segui UI on 
Windows and Calibri (or whatever) on macOS and NOT something like 
.AppleSystemUIFont!


So, we'll revert our code back to the classic conditional of:

switch platform()
   case "Win32"
  set the textFont of fld "X" to "Segue UI" -- or whatever seems 
appropriate

  set the textFont of fld "Y" to "Segue UI"
  ... set all the rest of the objects
  break
   case "MacOS"
 set the textFont of fld "X" to "something"
 
 break
   case "next platform"
etc.

We went down a rabbit hole where, without knowing better, it seemed that 
the above could be replaced with


set the textFont of fld "X" to "(Text)"
set the textFont of fld "Y" to "(Text)"
etc

and eliminate the switch statement entirely.


  set

___
use-livecode mailing list
use-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: Philosophical questions about the fontNames

2020-03-12 Thread Paul Dupuis via use-livecode

On 3/12/2020 3:46 AM, Mark Waddingham via use-livecode wrote:

On 2020-03-11 23:38, Paul Dupuis via use-livecode wrote:

I filled a bug report on this back in February:
https://quality.livecode.com/show_bug.cgi?id=22564

Mark Waddingham declared it was not a bug but a documentation issue,
so I filed and enhancement request:
https://quality.livecode.com/show_bug.cgi?id=22569

Personally, I think the following code SHOULD work:

set the textFont of fld "X" to "(Text)"
put the effective textFont of fld "X"

And return the actual font used for (Text) on the current platform
(for example Segue UI on Windows 10.

My goal was to be able to read somewhere like in the dictionary or
user guide or run some code to find out what the actual font is for
each of the "specials" on Windows and macOS.


To be accurate, your request / report is entirely different from 
Richard's

philosophical question.


True. I thought is was on the same topic though, so I responded.



You want 'the effective fontName' of a chunk / object to return the 
actual

name of the font which the system is using to render the glyphs - which
would be huge departure from its current (very LC-specific) meaning.

Also I did not declare it a documentation issue (because it is not). My
exact wording was:

"I suspect it is possible to get the names of the actual system-provided
fonts - but there is no facility in LiveCode for this at present. Please
file an enhancement request for this ability."


My apology for mis-characterizing what you said. Yes, I interpreted that 
a "enhancement" for what I wanted, could be delivered by a documentation 
request and I thought that documenting the fonts corresponding to the 
fontNames engine directives would be easier that any sort of technical 
change to the engine - another assumption based on observation of the 
rate of documentation fixes vs the rate of engine technical fixes. Both 
are impressive for the size of the team, but doc fixes do seem to out 
pace technical changes since they are generally easier.




This is precisely because the mapping is not fixed. Both Windows and 
Linux

allow the user to change the relevant fonts used at the system level, and
macOS uses highly-specialized UI fonts for the purpose (as Klaus and I
recently discovered when he was having a problem with text extraction 
from

PDFs printed from LC!).


True, and this point negates that a documentation approach would solve 
what I was looking for. So, my bad for being short sighted in asking for 
a documentation enhancement. That was a mistake, and I see that now.




My current point of view is that this need represents an edge-case, 
and it
is more than likely that changing your approach to whatever it is you 
believe

you need it for means you won't...

So, an important question is here why do you need to know the actual font
being used when an object is set to render with one of the meta-(theme)-
fonts?


So here is the simple use-case I ran into. We have a field with an 
editor toolbar for rich content editing in an app. The field is set to 
(Text) upon start up, as in:


set the textFont of fld "X" to "(Text)"

So that the font is initially in the appropriate default font for the 
platform the app is running on. In the toolbar we also have a Font pup 
menu with the available fonts listed for the user to change the font 
they want in the field. It is the UI standard that such a menu SHOW the 
user the currently selected font.


My problem, if I try to follow platfrom UI guidelines by setting the 
text field's font to (Text), I then can not - say get the effective 
textFont of fld "X" - to find out which Fontname in the UI standard 
popup font menu should be checked as the current font.


Now in the scheme of our own list of App bugs to fix and enhancements to 
build, whether the Font menu precisely corresponds to UI standards or 
not is not at the top of our list, but it still would have been nice not 
to have conflicting UI standards issues: Using textFont = (Text) gets me 
the appropriate fonts by platform, but then I can show what the selected 
font for the field is in a standard UI font menu.


If there is a good work-around for this apparent conflict, I'm 
definitely open to giving it a try or if I simply missed something 
obvious, I'm happy to be educated.



___
use-livecode mailing list
use-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: Philosophical questions about the fontNames

2020-03-11 Thread Paul Dupuis via use-livecode

On 3/11/2020 6:48 PM, J. Landman Gay via use-livecode wrote:

On 3/11/20 5:36 PM, Richard Gaskin via use-livecode wrote:

Querying the fontNames includes:

(Default)
(Styled Text)
(Menu)
(Text)
(Message)
(Tooltip)
(System)

These are not font names, but constants the engine accepts so that we 
can have good-looking, HIG-savvy UIs on multiple platforms.


But they're not font names.  They're not fonts at all.  They're 
engine directives.


So should they be included in the fontNames?

(Yes, I know I can exclude them. I've been doing this a while, I can 
do lots of things.  But if a newcomer wants to make a Fonts menu or 
list she also needs to know the filter command, and why she needs to 
use it to filter out things that aren't fonts. #learnability)




Maybe we need the "effective fontnames".



On 3/11/2020 6:48 PM, J. Landman Gay via use-livecode wrote:

On 3/11/20 5:36 PM, Richard Gaskin via use-livecode wrote:

Querying the fontNames includes:

(Default)
(Styled Text)
(Menu)
(Text)
(Message)
(Tooltip)
(System)

These are not font names, but constants the engine accepts so that we 
can have good-looking, HIG-savvy UIs on multiple platforms.


But they're not font names.  They're not fonts at all.  They're 
engine directives.


So should they be included in the fontNames?

(Yes, I know I can exclude them. I've been doing this a while, I can 
do lots of things.  But if a newcomer wants to make a Fonts menu or 
list she also needs to know the filter command, and why she needs to 
use it to filter out things that aren't fonts. #learnability)




Maybe we need the "effective fontnames".



I filled a bug report on this back in February: 
https://quality.livecode.com/show_bug.cgi?id=22564


Mark Waddingham declared it was not a bug but a documentation issue, so 
I filed and enhancement request: 
https://quality.livecode.com/show_bug.cgi?id=22569


Personally, I think the following code SHOULD work:

set the textFont of fld "X" to "(Text)"
put the effective textFont of fld "X"

And return the actual font used for (Text) on the current platform (for 
example Segue UI on Windows 10.


My goal was to be able to read somewhere like in the dictionary or user 
guide or run some code to find out what the actual font is for each of 
the "specials" on Windows and macOS.





___
use-livecode mailing list
use-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: StackSize limit on iOS

2020-03-06 Thread Paul Dupuis via use-livecode
just a guess, but does "printingStack" have a maxWidth value set (other 
than the default of 65535)?


On 3/5/2020 10:46 PM, Dan Friedman via use-livecode wrote:

I am trying to produce a landscape PDF on a iPhone…

open inv stack "printingStack"
set the width of stack "printingStack" to (11*72)
set the height of stack "printingStack" to (8.5*72)
answer the width of stack "printingStack" //---  this returns 414 ??? 
//

I am using LC Business 9.6
I know this was working on a prior version of LC / iOS

Is there some new trick to this?  Or, is there now some limitation on setting 
the size of a stack to something other than the width of the mobile device?   
If so, how do we generate a standard size PDF?

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



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


Re: Powerpoint to LiveCode

2020-03-03 Thread Paul Dupuis via use-livecode

On 3/2/2020 4:04 PM, Paul Dupuis via use-livecode wrote:
Out of curiosity, has anyone created a library that will import  - the 
parts of a Powerpoint presentation that can be recreated in Livecode 
-  into a LiveCode stack?


Of course .pptx files are actuall just ZIP archives with assorted XML 
files inside, while there is a path to importing .pptx files, it is 
not simple. Use revZIP to open the .pptx file, use revXML (or your 
howm grown xml parser) to extract the XML for each slide (each a 
separate file in the archive) and rectreate those slide elements 
support in LiveCode.


So, I know HOW to do it.

I am asking if any one has already built such a library (or even 
started it)?


I should preemptively add that I am not looking for the slides to be 
imported as images. The whole purpose of parsing the pptx file's XML is 
to convert the presentation into LiveCode elements (imported objects 
like 'image' for any art work, 'graphic' for all line drawing, and 
'field' for any text, so that the LC object are then manipulable in LC.


The work is not in revZip - I've worked with it a lot. And, as Richard 
said, the work is not with revXML - I've used that a lot too and it work 
very nicely for parsing XML quickly.


The work is entirely in mapping those Microsoft XML for Powerpoint 
elements that can be mapped to corresponding  LC elements and mapping 
all the properties (colors, sizes, etc.) and coding those mapping.


A lot of Microsoft stuff can be thrown away. I don't need it as a 
presentation, just the information in the file. So transitions, effects, 
presentation timings, etc, can all be ignored.


I hate reinventing the wheel. Which is why I was asking if anyone out 
there may have done such a library or even started such a library. I 
would rather build on something existing. It you have such a library and 
do not want to give it away, I'd like to discuss possible licensing. If 
you have such a library but it is only partially complete, I'd like to 
discuss a collaboration.


However, if nothing has been started or no library exists, I'll just do 
it in-house, if we go ahead and do a library at all..


___
use-livecode mailing list
use-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: Powerpoint to LiveCode

2020-03-02 Thread Paul Dupuis via use-livecode

Hi Rick,

Powerpoint can export to HTML, and while I have not looked at Keynote's 
HTML export, I think you would be just trading one problem at file 
parsing for another. Tools like PowerPoint and Keynote export to HTML 
with CSS, so you can't just:


set the htmlText of field x to URL tPresentationFile

You'd still have to parse the HTML/CSS into something LiveCode can 
understand.


Again, I know how to do this. My questions is: Has someone already done 
it or even part of it?



On 3/2/2020 7:39 PM, Rick Harrison via use-livecode wrote:

Hi Paul,

If you had access to a Mac you could import
your Powerpoint presentation to Keynote, make
whatever changes you want and then Export it
as HTML. It’s really cool how it works.

Keynote can also Export to Powerpoint too, as
well as PDFs.

Then import into LiveCode?

Just my 2 cents.

Rick


On Mar 2, 2020, at 4:04 PM, Paul Dupuis via use-livecode 
 wrote:

Out of curiosity, has anyone created a library that will import  - the parts of 
a Powerpoint presentation that can be recreated in Livecode -  into a LiveCode 
stack?

Of course .pptx files are actuall just ZIP archives with assorted XML files 
inside, while there is a path to importing .pptx files, it is not simple. Use 
revZIP to open the .pptx file, use revXML (or your howm grown xml parser) to 
extract the XML for each slide (each a separate file in the archive) and 
rectreate those slide elements support in LiveCode.

So, I know HOW to do it.

I am asking if any one has already built such a library (or even started it)?

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


Powerpoint to LiveCode

2020-03-02 Thread Paul Dupuis via use-livecode
Out of curiosity, has anyone created a library that will import  - the 
parts of a Powerpoint presentation that can be recreated in Livecode -  
into a LiveCode stack?


Of course .pptx files are actuall just ZIP archives with assorted XML 
files inside, while there is a path to importing .pptx files, it is not 
simple. Use revZIP to open the .pptx file, use revXML (or your howm 
grown xml parser) to extract the XML for each slide (each a separate 
file in the archive) and rectreate those slide elements support in LiveCode.


So, I know HOW to do it.

I am asking if any one has already built such a library (or even started 
it)?


___
use-livecode mailing list
use-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: Progressive Web App (PWA)

2020-02-19 Thread Paul Dupuis via use-livecode

The answer is EITHER:

Use LiveCode SERVER to generate the HTML5 and CCS for the app and layer 
your own Javascript into it [Much more work, but you can deliver exactly 
the front end you want - you have to keep track fo what HTML, CSS, and 
Javascript you use is standards-compliant)

OR
Use LievCode HTML to deploy your stacks/App as an HTML/CSS/Javascript 
app.(lLess work, but you are limited to what the HTML builder for 
LiveCode can produce [mostly, I think there is someone on this list who 
has posted many example of extending the generated web app with 
supplemental javascript])


However, in my opinion "intended to work on any platform that uses a 
standards-compliant browser." (from the definition of WPA) is marketing 
bullsh*t. I find way too many things that are *supposed* to work across 
all browsers that do not.




On 2/18/2020 8:42 PM, Peter Bogdanoff via use-livecode wrote:

Does anyone have a reply to Ingar’s original question?



On Feb 18, 2020, at 6:16 PM, Bob Sneidar via use-livecode 
 wrote:

Aren't all discussions political? ;-)

Bob S



On Feb 16, 2020, at 13:33 , doc hawk via use-livecode 
 wrote:

On Feb 16, 2020, at 5:15 AM, Paul Dupuis via use-livecode 
 wrote:

"A progressive web application is a type of application software delivered 
through the web, built using common web technologies including HTML, CSS and 
JavaScript. It is intended to work on any platform that uses a standards-compliant 
browser.”


And foolish me thought we were going to have a political discussion . . .

:)

___
use-livecode mailing list
use-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: Does any one know what Player "intervals" actually are?

2020-02-18 Thread Paul Dupuis via use-livecode

Hi Martin,

Thanks for you post/reply. As we are updating our application, all times 
are being stored in seconds (real number) and converted to and from 
intervals as needed. Just like you in your application.


The old version of our application stored data in user document files. 
In these files, some data was stored as only intervals, without a 
timeScale to properly translate back to seconds for newer frameworks. I 
was hoping there might be some rules I could apply to determine how 
these interval (only) values could be converted to times without a 
timescale value. In doing research and contacting LiveCode support, the 
answer is: They can not (or at least not practically). The only way 
would be to open the exact same media file in a helper app that is built 
in an old version of LIveCode that uses Quicktime to get the original 
Interval for each media file referenced in our user documents that needs 
intervals converted. This is impractical as we can not expect the 
installation of Quicktime under Windows any more and older LC helper app 
will not run under macOS Catalina to name just a few of the obstacles.


The table of timescales in my original post is also distorted as many of 
the media files are the exact same clip, just encoded in another format. 
I am sure if I sampled a wider variety of clips I would see a much wider 
range of timeScales.


Lastly, my inquiry was also looking to actually understand what 
"intervals" really are, mostly out of curiosity and interest.  I am 
still curious as to what exactly "intervals" are. LC support just says 
that they get them from the media frameworks and pass them along.


Thanks again for your reply.

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


Does any one know what Player "intervals" actually are?

2020-02-18 Thread Paul Dupuis via use-livecode
Or even more specifically, does any one know what player object 
"intervals" (the values for currentTime, startTime, endTime, timeScale, 
and duration properties of a player) actually are? Are they frames? 
Something else? And does anyone know why they vary by Media Framework 
(i.e Quicktime vs Apple Video Foundation vs DirectShow)


For example, the same MP3 file under Quicktime (macOS or Windows) has a 
timeScale of 600, and under AVF a timeScale of 44100 and under 
DirectShow a timeScale of 1000.


What's more if you get the duration and the timeScale and convert to 
seconds, the different frameworks give (slightly) different values 
(largest difference is 3s on a 2m45s MP3)


For example, look at the lengthy list of data below: This is timeScale 
and duration for different file formats by media frameworks. A file of 
the same name (i.e. audio.aac) is the SAME file on any media Framework 
that can read it. Formats readable by the player differ by Media 
Framework. The data is tab delimited, so if the listserv preserves the 
tabs, you should be able to cut and paste to a spreadsheet for easier 
viewing.


LC6.7.11 with QT for Windows                LC9.6.0dp2 with DirectShow w 
LAV Codecs                LC9.5.0 with AVF (OSX)
Interval    Duration    Media File        Interval    Duration Media 
File        Interval    Duration    Media File
600    7216    audio.aac        1000    119930840 audio.aac     
44100    525312    audio.aac
600    7202    audio.adts        1000    54016 audio.ac3     
48000    2592768    audio.ac3
600    7188    audio.aif        1000    119836600 audio.adt     
44100    531456    audio.adts
600    7188    audio.aifc        1000    119836600 audio.adts     
44100    528318    audio.aif
600    7188    audio.aiff        1000    11980 audio.aif     
44100    528318    audio.aifc
600    20280    audio.amr        1000    11980 audio.aifc     
44100    528318    audio.aiff
600    7188    audio.au        1000    11980 audio.aiff     
8000    271200    audio.amr
600    20926    audio.caf        1000    33900 audio.amr     
44100    528318    audio.au
9    2652480    audio.m1a        1000    11980 audio.au    
    44100    1538116    audio.caf
9    2652480    audio.m2a        1000    348779140 audio.caf    
    48000    1339776    audio.m1a
600    7188    audio.m4a        1000    348779140 audio.caff     
48000    1339776    audio.m2a
600    7188    audio.m4b        1000    29376 audio.m1a     
600    7188    audio.m4a
600    7188    audio.m4p        1000    29376 audio.m2a     
600    7188    audio.m4b
600    7188    audio.m4r        1000    11980 audio.m4a     
600    7188    audio.m4p
600    7188    audio.mov        1000    11980 audio.m4b     
600    7188    audio.m4r
9    2652480    audio.mp2        1000    11980 audio.m4p    
    600    7188    audio.mov
600    7225    audio.mp3        1000    11980 audio.m4r     
48000    1339776    audio.mp1
600    7188    audio.mp4        1000    11980 audio.mov     
9    2650320    audio.mp2
9    2652480    audio.mpa        1000    29376 audio.mp1    
    44100    529920    audio.mp3
600    7188    audio.qt        1000    29376    audio.mp2     
600    7188    audio.mp4
600    7188    audio.snd        1000    12016 audio.mp3     
48000    1339776    audio.mpa
600    7188    audio.wav        1000    11980 audio.mp4     
600    7188    audio.qt
600    7188    audio.wave        1000    29376 audio.mpa     
44100    528318    audio.wav
600    17779    video.3g2        1000    11980 audio.qt     
600    17779    video.3g2
600    17779    video.3gp        1000    11980 audio.snd     
600    17779    video.3gp
600    17779    video.3gp2        1000    543114970 audio.ulaw    
    600    17779    video.3gp2
600    17779    video.3gpp        1000    543114970 audio.ulw     
600    17779    video.3gpp
600    17680    video.avi        1000    11980 audio.wav     
100    29466372    video.avi
2997    88300    video.dif        1000    11980 audio.wave    
    3    882882    video.dv
2997    88300    video.dv        1000    11981 audio.wma.(WMA1 
codec).wma        9    2650320 video.m2v.(MPEG-2).m2v
9    2652480    video.m1v        1000    11981 
audio.wma.(WMA2 codec).wma        600    17677    video.m4v.(AAC codec).m4v
600    17677    video.m4v.(AAC codec).m4v        1000 296316670    
video.3g2        600    17677    video.m4v.(h264 codec).m4v
600    17677    video.m4v.(h264 codec).m4v        1000 296316670    
video.3gp        600    17677    video.mov
600    17677    video.mov        1000    296316670 video.3gp2     
9    2656130    video.mp4
9    2656131    video.mp4        1000    296316670 video.3gpp    
    9    2650320    video.mpeg.(MPEG-1).mpeg
600    17677    vide

Re: Progressive Web App (PWA)

2020-02-16 Thread Paul Dupuis via use-livecode

On 2/16/2020 6:58 AM, Ingar Roggen via use-livecode wrote:

Are there any examples around of PWA’s written in LiveCode? Would like to 
experience it!



Wiipedia defines a PWA as:
"A progressive web application is a type of application software 
delivered through the web, built using common web technologies including 
HTML, CSS and JavaScript. It is intended to work on any platform that 
uses a standards-compliant browser."


So, you when you speak of a PWA written in LiveCode, you are either 
talking about using LiveCode server to generate HTML5, CSS3 and 
Javascript that forms some application?


OR

You are talking about using the HTML build option for LiveCode 
standalones. For this latter, there have been a bunch of samples posted 
to this list in the past.



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


AW the fontnames and special names like (Menu)

2020-02-10 Thread Paul Dupuis via use-livecode

A confirmed bug:

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

On 2/4/2020 12:27 PM, Paul Dupuis via use-livecode wrote:

The fontnames() function returns certain special font names like:
(Default)
(Styled Text)
(Menu)
(Text)
(Message)
(Tooltip)
(System)

How do I find out what fonts these really are on a given platform. The 
effective textFont does not seem to work.


For example the following code on Windows 10,

set the textFont of fld 1 to "(Text)"
put the effective textFont of fld 1

outputs "(Text)" when I would have expected it to output "Segoe UI"

Is this a bug?

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


AW: LC9.6dp2 and the property inspector

2020-02-09 Thread Paul Dupuis via use-livecode
Okay, so the property inspector in LC9.6 uses the tree widget t show 
custom property sets and their properties and values


As I am afraid I know next to nothing about LCB and widgets, I will have 
to wait until dp3 for the fix then. It's good to know it has been 
reported and that a fix is waiting for release.


On 2/9/2020 12:25 PM, Brian Milby via use-livecode wrote:

Just need to grab the tree view lcb file and build.  Replace the files in the 
dist for everything to work properly.  I can link to a zip file if needed with 
the files.  I use dp2 for everything currently.

Thanks,
Brian
On Feb 9, 2020, 12:22 PM -0500, Mark Wieder via use-livecode 
, wrote:

On 2/9/20 7:46 AM, Paul Dupuis via use-livecode wrote:

I may be slow to the party, but has someone already reported as a bug
that you can not edit custom property sets  using the property inspector
in LC 9.6dp2?


It's been reported several times.
https://quality.livecode.com/show_bug.cgi?id=22516
https://quality.livecode.com/show_bug.cgi?id=22539
https://quality.livecode.com/show_bug.cgi?id=22551
https://quality.livecode.com/show_bug.cgi?id=22509

There's a PR that's been merged into the 9.6.o-dp3 branch.
https://github.com/livecode/livecode/pull/7240


Any one know when 9.6dp3 will arrive with a fix for this as it make
working in 9.6 to test it really hard with no ability to use the PI to
edit properties!

Heh. Yeah, I no longer use 9.6 for anything serious.

--
Mark Wieder
ahsoftw...@gmail.com

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

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



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


LC9.6dp2 and the property inspector

2020-02-09 Thread Paul Dupuis via use-livecode
I may be slow to the party, but has someone already reported as a bug 
that you can not edit custom property sets  using the property inspector 
in LC 9.6dp2?


Any one know when 9.6dp3 will arrive with a fix for this as it make 
working in 9.6 to test it really hard with no ability to use the PI to 
edit properties!




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


Re: the fontnames and special names like (Menu)

2020-02-05 Thread Paul Dupuis via use-livecode

I filed this as a bug: https://quality.livecode.com/show_bug.cgi?id=22564

On 2/4/2020 12:27 PM, Paul Dupuis via use-livecode wrote:

The fontnames() function returns certain special font names like:
(Default)
(Styled Text)
(Menu)
(Text)
(Message)
(Tooltip)
(System)

How do I find out what fonts these really are on a given platform. The 
effective textFont does not seem to work.


For example the following code on Windows 10,

set the textFont of fld 1 to "(Text)"
put the effective textFont of fld 1

outputs "(Text)" when I would have expected it to output "Segoe UI"

Is this a bug?

___
use-livecode mailing list
use-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: HyperCard: the Myst story

2020-02-05 Thread Paul Dupuis via use-livecode
Miller has a Linken-In profile at 
https://www.linkedin.com/in/rand-miller-6b00041/ if someone wants to try 
to contact him to mention LiveCode



On 2/4/2020 9:12 PM, Roger Guay via use-livecode wrote:

Ah yes, of course. I see that now.




On Feb 4, 2020, at 7:07 PM, Mark Wieder via use-livecode 
 wrote:

On 2/4/20 6:00 PM, Roger Guay via use-livecode wrote:

Just curious, Mark… I loved Hypercard as well, but do you mean to say you would 
choose Hypercard over Livecode today?

Heh. Not my quote... that's from Rand Miller's talk.

--
Mark Wieder
ahsoftw...@gmail.com

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

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



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


Re: the fontnames and special names like (Menu)

2020-02-04 Thread Paul Dupuis via use-livecode

Exactly, but this does not answer my question, which is:

if I set the textFont of an object , say a button to "(Menu)" and the 
look at the effective textFont of that same object, I get "(Menu"), so 
how do I find out what the actual font really is?


For example, the default field font on Windows 10 is "Segoe UI", but if 
I set a the textFont of a fld to "(Text)" and the get the effective 
textFont of that same field, I get "(Text)" when I would expect to get 
"Segoe UI".



On 2/4/2020 12:37 PM, dunbarx--- via use-livecode wrote:

Here is some unhelpful information from the dictionary:
The list of font names includes a set of special-purpose names which automatically select 
the matching font for the platform. You can use these to request "the font used for 
buttons" without having to hard-code platform-specific font names. These fonts are:
- (Text) - the font used for fields and other controls with editable content
- (Menu) - the font used for menu items
- (Message) - the font used for buttons, labels and other communication 
from the app
- (Styled Text) - the font used by default for rich text
- (System) - the font for controls not covered by another category
- (Tooltip) - the font used for displaying tooltips
- (Default) - selects one of the UI fonts automatically based on the 
control type


-Original Message-
From: Paul Dupuis via use-livecode 
To: How to use LiveCode 
Cc: Paul Dupuis 
Sent: Tue, Feb 4, 2020 12:28 pm
Subject: the fontnames and special names like (Menu)

The fontnames() function returns certain special font names like:
(Default)
(Styled Text)
(Menu)
(Text)
(Message)
(Tooltip)
(System)

How do I find out what fonts these really are on a given platform. The
effective textFont does not seem to work.

For example the following code on Windows 10,

set the textFont of fld 1 to "(Text)"
put the effective textFont of fld 1

outputs "(Text)" when I would have expected it to output "Segoe UI"

Is this a bug?

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


the fontnames and special names like (Menu)

2020-02-04 Thread Paul Dupuis via use-livecode

The fontnames() function returns certain special font names like:
(Default)
(Styled Text)
(Menu)
(Text)
(Message)
(Tooltip)
(System)

How do I find out what fonts these really are on a given platform. The 
effective textFont does not seem to work.


For example the following code on Windows 10,

set the textFont of fld 1 to "(Text)"
put the effective textFont of fld 1

outputs "(Text)" when I would have expected it to output "Segoe UI"

Is this a bug?

___
use-livecode mailing list
use-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: Running LiveCode Standalones under Crossover on Linux

2020-02-01 Thread Paul Dupuis via use-livecode
Could the "Hi-DPI Support" support in the Windows setting of the 
Standalone builder be the cause of this issue?


I noticed that in LC6.7.11 it is unchecked by default and in LC9.0.5 it 
is checked by default



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


Running LiveCode Standalones under Crossover on Linux

2020-02-01 Thread Paul Dupuis via use-livecode

Hivemind,

I have a user who runs the Windows version of my software on Linux using 
Crossover. Our prior releases all have worked fine. Those releases were 
build under LiveCode 6.7.11


We just went to a new release built under LiveCode 9.0.5 and this user 
is getting menus and dialog boxes with no text (none at all) in them.


Any chance that someone in the larger LiveCode community has seen this 
issue and knows what may be going on? We test under Windows 7,8,10 and 
under macOS 10.9 to 10.15, but not on Linux running Windows emulators. 
We don't have a Linux system here to even test on, but I'd like to try 
an help the person.




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


Re: does this PNG have transparency?

2020-01-27 Thread Paul Dupuis via use-livecode
You should be able to use 'the templateImage' (see dictionary), and 
numToChar probably should be numToByte


As in:

on mouseUp
answer file "Pick an image:"
if it is empty then exit to top
set the filename of the templateImage to it

put numToByte(0) into tZero
put (tZero is in the alphaData of the templateImage) OR (tZero is in the 
maskData of the templateImage)
end mouseUp




On 1/27/2020 10:53 AM, Bob Sneidar via use-livecode wrote:

Phil,

Is img "my test" an existing image, or does setting the filename of img "my 
test" create the image on the fly? I'm trying to turn this into a function that returns true 
or false.

Bob S



On Jan 24, 2020, at 14:35 , Phil Davis via use-livecode 
 wrote:

Maybe this? It seems to work in my simple testing. Am I missing something?

on mouseUp
 answer file "Pick an image:"
 if it is empty then exit to top
 set the filename of img "my test" to it

 put numtochar(0) into tZero
 put (tZero is in the alphaData of img "my test") OR (tZero is in the maskData of img 
"my test")
end mouseUp

Phil


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


AW: Tree Widget question...

2020-01-27 Thread Paul Dupuis via use-livecode
Never mind. Answered my own question. You have to use the Keys, not the 
values, to get a true hierarchy. i.e.


Top Level A
Top Level B
    Sub Level B 1
    Sub Level B 2
Top Level C

On 1/27/2020 10:31 AM, Paul Dupuis via use-livecode wrote:

I need a hierarchical tree that looks like:

1 Top Level A
2 Top Level B
    1 Sub Level B 1
    2 Sub Level B 2
3 Top Level C
etc.


With the Tree Widget in 9.6dp2, all I can seem to get is:

1 Top Level A
2
    1 Sub Level B 1
    2 Sub Level B 2
3 Top Level C

i.e. is item 2 has sub levels, it can't seem to have a label?!?

Am I missing something? Trees generally have labels for each level?

___
use-livecode mailing list
use-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: Tree Widget question...

2020-01-27 Thread Paul Dupuis via use-livecode
Also, just filed this bug for the Tree Widget: 
https://quality.livecode.com/show_bug.cgi?id=22551
In LC 9.6dp2 under Windows 10 at least, you can not edit the array data 
in the property inspector after entering some and browsing the widget 
and then going back to the inspector to try to edit the tree.



On 1/27/2020 10:31 AM, Paul Dupuis via use-livecode wrote:

I need a hierarchical tree that looks like:

1 Top Level A
2 Top Level B
    1 Sub Level B 1
    2 Sub Level B 2
3 Top Level C
etc.


With the Tree Widget in 9.6dp2, all I can seem to get is:

1 Top Level A
2
    1 Sub Level B 1
    2 Sub Level B 2
3 Top Level C

i.e. is item 2 has sub levels, it can't seem to have a label?!?

Am I missing something? Trees generally have labels for each level?

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


Tree Widget question...

2020-01-27 Thread Paul Dupuis via use-livecode

I need a hierarchical tree that looks like:

1 Top Level A
2 Top Level B
    1 Sub Level B 1
    2 Sub Level B 2
3 Top Level C
etc.


With the Tree Widget in 9.6dp2, all I can seem to get is:

1 Top Level A
2
    1 Sub Level B 1
    2 Sub Level B 2
3 Top Level C

i.e. is item 2 has sub levels, it can't seem to have a label?!?

Am I missing something? Trees generally have labels for each level?

___
use-livecode mailing list
use-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: Can't add substack

2020-01-17 Thread Paul Dupuis via use-livecode

On 1/17/2020 3:36 PM, Mark Wieder via use-livecode wrote:

It has ever been thus. Substacks can't have substacks.
It's an unfortunate feature of the architecture and would require some 
er... fixing... to change that.




This is one enhancement - allowing nested stacks - that I would very 
much welcome. In our Apps stacks often represent windows, but windows 
may often have dialogs (other stacks) associated with them. It would be 
nice to be able to structure this accordingly other than by a naming 
convention for the stacks.


Mainstack
  - Substack (window)
 - Substack (custom dialog for this window)
   - Substack (icon, image, and media resources for the dialog)
   - Substack (another window)
    - Substack (custom dialog for this window)
    - Substack (floating tool palette for this window)

etc.


___
use-livecode mailing list
use-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: Display PDF on Android

2020-01-06 Thread Paul Dupuis via use-livecode

On 1/6/2020 11:28 AM, Klaus major-k via use-livecode wrote:


You just need to have the appropriate licensed version of LC. Check with 
LiveCode, Ltd.
This widget only comes with LC BUSINESS, not Indy!




Okay, then this (https://quality.livecode.com/show_bug.cgi?id=22521) is 
not a really a technical enhancement request.


I would expect LC to have to spend time reviewing the Bugzilla entry to 
then just make it as RESOLVED since XPDF widget is available for anyone 
who pays for it. Making this an technical enhancement request just 
doesn'tseem like the place for a licensing issue.


You would just like the XPDF widget for a lower cost (Indy pricing vs 
Business pricing). That is entirely a licensing issue to discuss with 
LiveCode, LTD. Ask them for a discount or a special package or something.


Not trying to be an A$$hole or anything, I just think you'd have more 
success negotiating some way you can afford to use the XPDF widget.



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


<    1   2   3   4   5   6   7   8   9   10   >