Quantcast
Channel: LiveCode Forums
Viewing all articles
Browse latest Browse all 794

Mac OS • Re: LiveCode 10.0.1 rc-1

$
0
0
Hi AI,

I tried to recreate the problem you describe.
What I found is when I put an "systemAppearanceChanged" handler into the stack script to the example code from the dictionary:

CODE:

on systemAppearanceChanged   local tName   put the short name of the owner of the owner of me into tName ## this is a button script   if the systemAppearance is "dark" then      set the backColor of stack tName to "black"      set the foreColor of stack tName to "white"   else      set the backColor of stack tName to "white"      set the foreColor of stack tName to "black"   end if   pass systemAppearanceChangedend systemAppearanceChanged
It works when I start up the stack. This seems to hold if the sample stack is opened as the last/only stack.
As soon as I create a new stack the stack script does not work anymore.
"systemAppearance" always reported the correct setting. (I made a script that queries "systemAppearance" every second and it always returned the correct setting.)

I came up with the idea to trap the "systemAppearanceChanged" message in a front script and that worked regardless of newer open stacks or not.

On mobile you probably have only one stack and there is nothing to interfere. (just a guess)

For the specifics of your stack one probably would have to adjust this.

Kind regards
Bernd
SystemAppearanceButtonIntoFront.livecode.zip

Statistics: Posted by bn — Sat Oct 19, 2024 11:24 pm



Viewing all articles
Browse latest Browse all 794

Trending Articles