macOS 10.14 Mojave compatibility.

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7214
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: macOS 10.14 Mojave compatibility.

Post by jacque » Tue Jul 02, 2019 5:27 pm

As one with poor vision, I also find dark mode unreadable. It's great that almost every app I've seen allows it to be a choice that I can turn off.

But I believe it's up to the developer to offer that choice, and to code their app to respect it. Since the window color is only one of the many things that will have to be colorized in an app, the developer will have to loop through all the controls and change their colors via script. Adding the window color to that process doesn't seem like much of an imposition. Basically, LiveCode allows you to implement dark mode already.

LiveCode also has "profiles" which would make the job even easier. You can assign both a dark and light profile to every control you want to color, and they will all change automatically when your script switches profiles.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

SparkOut
Posts: 2839
Joined: Sun Sep 23, 2007 4:58 pm

Re: macOS 10.14 Mojave compatibility.

Post by SparkOut » Tue Jul 02, 2019 6:12 pm

Hmmm, how do you access profiles these days? Nothing in the property inspector I can see.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7214
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: macOS 10.14 Mojave compatibility.

Post by jacque » Tue Jul 02, 2019 6:58 pm

There are controls in standalone settings for which profiles, if any, to include in a standalone. The property inspector allows you to define profile property sets which you name as you wish. Basically, profiles are just property sets and LC provides commands to switch them.

There is more information in the User Guide, starting at page 166.

Edit: the user guide also explains how to set profiles automatically during development. Turn on the abilitiy in Preferences and then any time you set a profile in script (or message box) the object's profile is created if it doesn't already exist.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

SparkOut
Posts: 2839
Joined: Sun Sep 23, 2007 4:58 pm

Re: macOS 10.14 Mojave compatibility.

Post by SparkOut » Tue Jul 02, 2019 8:07 pm

Where in the property inspector do you find the references to the current profile assignments? In 9.5.0 dp-1 on Windows I can see nothing in the PI.
Also, the profile assignment should ignore objects that do not have a matching profile name when switching via revSetStackProfile. It is behaving more like a "restore snapshot of the current state when the profile was created" here. It will hide and show different groups which were visible at the time the profile was created (at stack level), and will change the content of fields, even when the field does not have a profile name assigned.
This can be set and interogated by script.
But nowhere in the PI is there any reference to profiles to be found.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7214
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: macOS 10.14 Mojave compatibility.

Post by jacque » Tue Jul 02, 2019 10:01 pm

I haven't used them much so I'm mostly using the info in the user guide, which appears to be missing the section on actually creating profiles. That may be a side-effect of rewriting the PI. As I understand it, you just create a property set with the name of the profile (whatever you choose.) If prefs are set to create profiles automatically, then it will do that for you when you change an object's property and then switch profiles.

If an object does not contain that property set, then nothing will happen. if the profile is attached at the stack level then (I assume) it will affect all objects eveywhere. The same for a profile attached to a card, which would affect all objects on the card.

I haven't used profiles much because I didn't want to set up objects individually, but my current project is well suited to those so I probably will be working with them soon. I don't need stack or card level profiles, but I do need object profiles. I'll know more after I set that up.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

SparkOut
Posts: 2839
Joined: Sun Sep 23, 2007 4:58 pm

Re: macOS 10.14 Mojave compatibility.

Post by SparkOut » Tue Jul 02, 2019 10:33 pm

Yes, I think the rewrite has done something, so that there is no inspector for profiles. I haven't dabbled with profiles since probably v 2.8 so can't remember anything about how it was in the inspector then. Like you though, I have a current project (well mine is a personal "atmospheric" fake app for charity, with different "themes" - red, blue, green, yellow) which would lend itself to preset profiles.
It's ok if the scripting of profiles works with no PI, but I am seriously thinking there could be a problem with the way profiles are implemented in current versions- although I am hoping it's just me not remembering. But current tests are *very* disconcerting.

bwmilby
Posts: 438
Joined: Wed Jun 07, 2017 5:37 am
Location: Henrico, VA
Contact:

Re: macOS 10.14 Mojave compatibility.

Post by bwmilby » Wed Jul 03, 2019 11:06 pm

I don’t think the back end code for profiles changed but rather when the IDE was rewritten, the profile feature was not built. I have built a mobile stack that used profiles to have different layouts for portrait and landscape.

Here is the issue that I ran into... profiles are extremely sticky. If you save a profile on an object, then it is set. When you change to another profile, then all changes are saved as deltas. When you return to the original profile, all changes are reversed. This makes things like changing a label difficult. When you add a third it gets more complicated.

The easiest way is to get everything set for your base profile before adding any more. Be sure to save often and have multiple backups. This also applies to using the geometry manager (and the two somewhat related).
Brian Milby

Script Tracker https://github.com/bwmilby/scriptTracker

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7214
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: macOS 10.14 Mojave compatibility.

Post by jacque » Thu Jul 04, 2019 1:46 am

I almost dropped your name when profiles came up, Brian. :-) From the sound of it, maybe I'll just write my own method. I was going to do that before I thought of profiles, and that might be a better way forward.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Mac OS”