Re: Sqlite and Monterey on M1

2022-05-12 Thread Paul Dupuis via use-livecode

On 5/12/2022 2:25 PM, Richard Gaskin via use-livecode wrote:

Bob Sneidar wrote:

> I don't think the latest Apple operating systems allow the writing
> to the App Support folder, even if you have explicit write
> permissions.

Where are we supposed to write application support files if not to 
Application Support?


First they demanded control of the file format apps use for Prefs, now 
this...




I did a little bit of research when I ran into my app breaking on 
Catalina and up when trying to reach a folder at 
specialFolderPath("temporary") and write files in that folder. The 
problem is that newer macOSes use an runtime algorithm to try to 
determine when an application is asking for access in "special" places. 
If the algorithm detect special access (sat to the Desktop or Documents 
folder or a Webcam and so on) the OS pops up the "Do you want to allow 
.. " dialog for the user to allow or deny access. An application signed 
and notarized WITH entitlements can specify some entitlements that are 
checked and if the App has declared these entitlements to protected 
resources, they are allowed. Some "protected" resources have NOT 
corresponding entitlements (at least currently). For disk access to 
folder paths without entitlements, the user can grant an application 
Full Disk Access, from System Preferences > Security, but and App can 
not specify an entitlement for Full Disk Access. It must be granted by 
the user.


Further, an Apple Engineer is a forum response (or someone claiming to 
be an Apple Engineer) noted that the algorithm to detect requests for 
special access resources can make mistakes and not recognize a request 
as a request and there for present a dialog to the user for allowing or 
denying and the default is to deny. So some circumstances, like apps 
running  in multiple processes (was an example cited, but it was implied 
there are other circumstances) your app MIGHT get the allow/deny dialog 
OR it might not - depending on your app. And for some resources, it just 
won't get any dialog and no entitlement will allow access, only 
instructions to the user to grant Full Disk Access (or some other 
similar ONLY allowed by the user permissions) will work.


In short, Apple's sandboxing is a developer mess. If you can, placing 
files in the Documents folder is best as (A) you can specify the 
Documents folder in an entitlement and (C) the sandboxing algorithm does 
seem to always detect (first time) Documents access requests and pop up 
the dialog.


DISCLAIMER: I did not have time to research this in detail and the 
"apple engineer" may or may not have been a real Apple engineer or knew 
what they were posting about. Our installer asks people on the last 
screen to grant our apps full disk access (if they are on Catalina+) and 
most people do and it solved a lot of recoding.




___
use-livecode mailing list
use-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: Re Pulldownmenu button bug on Windows

2022-05-12 Thread Richard Gaskin via use-livecode

Klaus wrote:

> Am 11.05.2022 um 20:27 schrieb Richard Gaskin wrote:
>> ... make sure the buttons you're using in the menu stack have
>> their autoArm set to true, ...
>
> Hint:
> that property "autoarm" did not make it into the inspector somehow,
> so you need to do this by script!

It's far from the only one.  LC objects have a LARGE number of 
properties we can work with. The Inspector shows only a subset of the 
most commonly-used ones.


Inspectors are great for consumer tools, but dev tools tend to provide 
Property Sheets so they can expose a much larger range of properties 
developers will want to work with.


LC attempts to straddle the space between consumer tool and dev tool, in 
both marketing and IDE design, and it sometimes leads to things one camp 
or the other may find confusing.


I threw together a quick Property Sheet a while back:
http://fourthworld.net/revnet/devolution/4W_Props.rev.gz

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

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


Re: Sqlite and Monterey on M1

2022-05-12 Thread Richard Gaskin via use-livecode

Bob Sneidar wrote:

> I don't think the latest Apple operating systems allow the writing
> to the App Support folder, even if you have explicit write
> permissions.

Where are we supposed to write application support files if not to 
Application Support?


First they demanded control of the file format apps use for Prefs, now 
this...


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

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


Re: Sqlite and Monterey on M1

2022-05-12 Thread J. Landman Gay via use-livecode

On 5/12/22 1:01 PM, Klaus major-k via use-livecode wrote:

on the Mac we have write permissions here -> specialFolderPath("preferences")
Works on Monterey as well and is "out of sight" of the user. ;-)


Am 12.05.2022 um 19:56 schrieb Bob Sneidar via 
use-livecode:

Sandboxing. I don't think the latest Apple operating systems allow the writing 
to the App Support folder,


That's kind of strange, since Mac OS provides the Application Support folder specifically for 
apps to store their data. Has that changed?


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

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


Re: Sqlite and Monterey on M1

2022-05-12 Thread Klaus major-k via use-livecode
Bonsoir Ludovic,

on the Mac we have write permissions here -> specialFolderPath("preferences")
Works on Monterey as well and is "out of sight" of the user. ;-)

> Am 12.05.2022 um 19:56 schrieb Bob Sneidar via use-livecode 
> :
> 
> Sandboxing. I don't think the latest Apple operating systems allow the 
> writing to the App Support folder, even if you have explicit write 
> permissions. It's better if you put the file into her documents folder 
> somewhere. To answer the question you are about to ask, it's likely that her 
> old Mac OS was not current enough to have the sandboxing limitations, and so 
> it worked. 
> 
> Bob S
> 
>> On May 12, 2022, at 10:10 , ludovic.thebault--- via use-livecode 
>>  wrote:
>> Hello All,
>> 
>> I've made an macOS app for my sister that use an sqlite database located in 
>> the application support folder (~/library/Application Support/myApp/base.db)
>> Since she replaced her old mac with an iMac M1, the app cannot write on the 
>> database. I've checked the permissions on the folder and the sqlite file and 
>> all seem ok.
>> (-rwxr-xr-x for the database).
>> The app is not notarized, but at first launch (I recompiled the app with 
>> Livecode 9.6.4), an alert to give permissions to the "document" folder is 
>> displayed (and accepted).
>> What I miss ?
>> Thanks !

Best

Klaus

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


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


Re: Sqlite and Monterey on M1

2022-05-12 Thread Bob Sneidar via use-livecode
Sandboxing. I don't think the latest Apple operating systems allow the writing 
to the App Support folder, even if you have explicit write permissions. It's 
better if you put the file into her documents folder somewhere. To answer the 
question you are about to ask, it's likely that her old Mac OS was not current 
enough to have the sandboxing limitations, and so it worked. 

Bob S


> On May 12, 2022, at 10:10 , ludovic.thebault--- via use-livecode 
>  wrote:
> 
> ‌
> 
> ‌
> 
> ‌
>  
> 
> Hello All,
> 
> I've made an macOS app for my sister that use an sqlite database located in 
> the application support folder (~/library/Application Support/myApp/base.db)
> 
> Since she replaced her old mac with an iMac M1, the app cannot write on the 
> database. I've checked the permissions on the folder and the sqlite file and 
> all seem ok.
> (-rwxr-xr-x for the database).
> 
> The app is not notarized, but at first launch (I recompiled the app with 
> Livecode 9.6.4), an alert to give permissions to the "document" folder is 
> displayed (and accepted).
> 
> What I miss ?
> 
> Thanks !
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-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: Re Pulldownmenu button bug on Windows

2022-05-12 Thread Klaus major-k via use-livecode
Hi all,

> Am 11.05.2022 um 20:27 schrieb Richard Gaskin via use-livecode 
> :

> ... make sure the buttons you're using in the menu stack have their autoArm 
> set to true, ...

Hint:
that property "autoarm" did not make it into the inspector somehow, so you need 
to do this by script!

> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web

Best

Klaus

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


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


Sqlite and Monterey on M1

2022-05-12 Thread ludovic.thebault--- via use-livecode
‌

‌

‌
 

Hello All,

I've made an macOS app for my sister that use an sqlite database located in the 
application support folder (~/library/Application Support/myApp/base.db)

Since she replaced her old mac with an iMac M1, the app cannot write on the 
database. I've checked the permissions on the folder and the sqlite file and 
all seem ok.
(-rwxr-xr-x for the database).

The app is not notarized, but at first launch (I recompiled the app with 
Livecode 9.6.4), an alert to give permissions to the "document" folder is 
displayed (and accepted).

What I miss ?

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


Re: LC subscription and special characters

2022-05-12 Thread Paul Dupuis via use-livecode

On 5/12/2022 6:18 AM, panagiotis m via use-livecode wrote:

Hello Paul,

Does Alt+A9 work for you?

Cheers,
Panos
--



No. Alt+A9 does not work. I checked my Registry (per 
https://quality.livecode.com/show_bug.cgi?id=18702#c15) and in 
Computer\HKEY_CURRENT_USER\Control Panel\Input Method there is no 
"EnableHexNumpad". There is only "(Default)" and "Show Status" and a 
"Hot Keys" sub key list.


I thought I would be clever and write a bit of LC script (see below) 
using listRegistry, queryRegistry, and setRegistry. However, none of the 
registry functions appear to be working in the IDE under LC 9.6.7 and I 
vaguely recall that they now only work if the application executing them 
has Administrative privileges? Is that correct?


I guess the larger question is: For a person developing an LC based app 
who's users what to enter Unicode characters, what is the "best 
practice" for doing this? Is it always copy and paste from some web site 
or the "Character Map" accessory on Windows or what? If there some bit 
of working code a person can put in their application to set the 
Registry key IF the user checks a preference option or clicks a button 
or something?


For NEXT MONTH's Livecode Global troubleshooting session, how would one 
address this? :-)



on mouseUp pMouseButton
  if platform() = "Win32" then
    put listRegistry("Computer\HKEY_CURRENT_USER\Control Panel\Input 
Method") into tList


    answer "Keys at 'Computer\HKEY_CURRENT_USER\Control Panel\Input 
Method':"&cr&tList&cr&"On my computer I should see 1 key: 'Show Status'" 
-- DEBUG


    if "EnableHexNumpad" is not among the lines of tList then
  -- no registry key exists
  put empty into tData -- flag teh key does not exists
    else
  -- a key exists, now check its value
  put queryRegistry("Computer\HKEY_CURRENT_USER\Control Panel\Input 
Method\EnableHexNumpad\") into tData

    end if
    if tData <> 1 then
  put "Your Windows system is not configured for keyboard 
entry of Unicode characters!" into tPrompt
  put "The value of Registery Key 
'Computer\HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad\' 
is:"&&tData &"." after tPrompt

  put "A reboot will be required." after tPrompt

  answer warning tPrompt with "Confgured" or "Skip"
  if it = "Configure" then
    if not setRegistry("Computer\HKEY_CURRENT_USER\Control 
Panel\Input Method\EnableHexNumpad",1) then

  -- an error occured
  answer error (the result)
    else
  answer warning "Please reboot your computer."
    end if
  end if
    end if
  end if
end mouseUp

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


Re: LibKiosk by André Garzia

2022-05-12 Thread Andre Garzia via use-livecode
https://developer.apple.com/library/archive/technotes/tn2062/_index.html#//apple_ref/doc/uid/DTS10003090-CH1-SECTION3
 


Looks like a good starting point for someone wanting to attempt to create a new 
external.

> On 12 May 2022, at 13:14, Andre Garzia  wrote:
> 
> Hi, I don’t even remember that library. I think the source is probably lost. 
> I made it before I started using version control systems. Anyway, I doubt 
> that this external would work today, too many things have changed. Maybe it 
> is possible to replicate that without an external with some cleverly written 
> LiveCode Builder gizmo. 
> 
>> On 12 May 2022, at 11:43, William de Smet via use-livecode 
>>  wrote:
>> 
>> Hi there,
>> 
>> I found some information about LibKiosk André Garzia released 15 years ago.
>> Is there still a download available somewhere or is it deprecated now?
>> 
>> 
>> groeten,
>> 
>> William
>> ___
>> use-livecode mailing list
>> use-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: LibKiosk by André Garzia

2022-05-12 Thread Andre Garzia via use-livecode
Hi, I don’t even remember that library. I think the source is probably lost. I 
made it before I started using version control systems. Anyway, I doubt that 
this external would work today, too many things have changed. Maybe it is 
possible to replicate that without an external with some cleverly written 
LiveCode Builder gizmo. 

> On 12 May 2022, at 11:43, William de Smet via use-livecode 
>  wrote:
> 
> Hi there,
> 
> I found some information about LibKiosk André Garzia released 15 years ago.
> Is there still a download available somewhere or is it deprecated now?
> 
> 
> groeten,
> 
> William
> ___
> use-livecode mailing list
> use-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: Re Pulldownmenu button bug on Windows

2022-05-12 Thread Ben Rubinstein via use-livecode

Ditto that. There should be a "Lifetime contribution" award for Livecode heroes.

Ben

On 09/05/2022 14:54, Craig Newman via use-livecode wrote:

Richard.

So glad to have you in this world.

Craig


On May 7, 2022, at 5:35 PM, Bob Sneidar via use-livecode 
 wrote:

Well put. I wonder what the real world effect of the order of messages is, and 
whether or not it could be compensated for by send in time?

Sent from my iPhone


On May 7, 2022, at 13:44, Richard Gaskin via use-livecode 
 wrote:

It's definitely an inconsistency, but the bug's status as requiring "EXPERT REVIEW" prompts us to 
consider why these differences exist, and which, if any, should be considered "wrong" or 
"right".  It may not be as simple as it seems at first glance.


Background:
--
MetaCard (the engine we now call LiveCode) was born on Unix, later ported to 
Windows, Linux, and then MacOS.

On all platforms menus are implemented as selector buttons, buttons which 
provide the appearance and behavior of OS-provided menu objects.

And until the port to MacOS, all platforms behaved consistently.

So why the Mac change?

Mac is unique among popular GUI OSes in its use of a global menu bar, attached 
to the top of the display; other OSes place the menu bar attached to the top of 
the window.

Internally, LC menus are implemented as temporary dynamically-instantiated 
nameless stacks, which may seem counterintuitive until you realize that a menu 
is in essence a highly specialized form of window, a viewport independent of 
other windows with its own buffer, contents, and like all windows needs to use 
a common compositor for rendering them all together. (Indeed you can even use 
stacks as menus explicitly when you need a non-standard look, like a graphical 
picker, but that's another topic).

So the engine's method of using a subclass of the stack object for rendering 
menus worked well and consistently for a great many years - until the port to 
MacOS.

The Mac global menubar required a deep rethink on how menus are handled, not 
only in terms of detaching them from the window but also in terms of the 
nuances of display and interaction.

So Dr Raney special-cased menus on MacOS, so the engine uses OS routines to 
render those, fed by the menu button properties for things like the menu name 
as parameters to those OS routines. On every other platform you're interacting 
with a LiveCode object, but on Mac you're interacting with a system object into 
which the engine has inserted some hooks to tie it in with your scripting so 
you can at least know when an item has been selected.

This rewiring of properties and messages is no small feat, and has pervasive effects.  So from time 
to time you'll find Mac-specific things needed to conform to that platform like adding an 
"About" item to a menu that doesn't exist in your stack (the Mac's 
"Application" menu belongs to the OS).

It's not surprising that messages related to menu objects also have some 
inconsistencies along with everything else.

If we consider that on all other platforms the menu object we're interacting 
with is a button, and the menus that appear are a stack, the messaging you see 
with Windows and Linux is consistent with other button object messaging: once 
the mouse leaves the control the mouseLeave message is sent.

On Mac we have an exception to LC's normal button messaging because we're not 
interacting with an LC button at all, but with a system object, into which the 
engine devs have grafted just enough messaging to trigger actions from scripts.

I have no opinion on qualitative labels like "right" or "wrong" on this; that 
seems a matter of personal familiarity and taste. It may even be somewhat philosophical: is a menu 
a single thing that expands, or two things (menu and items) where one triggers the appearance of 
the other?

All I can do is help describe the under-the-hood parts to help makes sense of 
how the difference came about.



The Here-And-Now:

Whether or not we prefer it, the menu architecture is what it is, at least at 
the moment. Changing the behavior on all other platforms to be like Mac, or Mac 
to be like all other platforms, would be a scope of work that I'd guess the 
team would not be in a position to make a priority any time soon, even if they 
felt strongly about this one way or another.

They have a lot on their plates, and for all the questions we see regarding Mac-specific menu differences 
(like the auto-migration of the "About", "Help" and "Preferences" items to 
system menus separate from the menu objects where we're asked to put them), I can't recall seeing a message 
here before about mouseLeave.

I'm not saying it isn't important. It might well be. But observably this 
affects few; AFAIK this is the first such request in the 23 years I've been 
using this engine and participating in its communities. Just the same, let's 
roll up our sleeves and see what can be done:



Looking Forward:
---
E

LibKiosk by André Garzia

2022-05-12 Thread William de Smet via use-livecode
Hi there,

I found some information about LibKiosk André Garzia released 15 years ago.
Is there still a download available somewhere or is it deprecated now?


groeten,

William
___
use-livecode mailing list
use-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 subscription and special characters

2022-05-12 Thread panagiotis m via use-livecode
Hello Paul,

Does Alt+A9 work for you?

Cheers,
Panos
--

On Thu, 12 May 2022 at 10:04, jbv via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Thank you all for your answers.
> I am going to contact tech support to see if there is any solution to be
> expected in the near future.
>
> FYI, so far we are using a workaround :
> https://www.azerty.global/
>
> jbv
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC subscription and special characters

2022-05-12 Thread jbv via use-livecode

Thank you all for your answers.
I am going to contact tech support to see if there is any solution to be 
expected in the near future.


FYI, so far we are using a workaround :
https://www.azerty.global/

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