M1 Monterray: MergNotify unknown command

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
trevix
Posts: 962
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

M1 Monterray: MergNotify unknown command

Post by trevix » Fri Jul 29, 2022 2:47 pm

I just passed to a M1 Mac with OSX 12.5 and LC 9.6.8

I have a library stack on my application that uses the MergNotify extension (with is correctly chcked in the standalone settings).
Having found the LC IDE apparently slower, I wend to the LC GetInfo to be sure that LC wasn't loading under Rosetta (not ever checked before, since passing from the iMac to the Macstudio).
It was not checked but, to be sure, I checked Rosetta and then unchecked it.

On the following relaunch of LC, the ID got un error on the command mergNotify "UIApplicationWillResignActiveNotification" under MacOS.
See the script below:

Code: Select all

on libraryStack
     if the short name of this stack = "lib_Analytics" then --AND "lib_AnalyticsFMS_API" is not among the lines of the stacksinuse then
         ...
          switch the Platform
               case "MacOS"
                    mergNotify "UIApplicationWillResignActiveNotification" --THIS LINE TROWS AN ERROR
                    mergNotify "UIApplicationDidBecomeActiveNotification"
                    break
               case "Win32"
                    break
               case "iphone"
                    mergNotify "UIApplicationWillResignActiveNotification"
                    mergNotify "UIApplicationDidBecomeActiveNotification"
                    break
               case "android"
                    StartListener --enable "StackPause" and "StackResumed" on android only (ios use a different system)
                    break
          end switch
                   ...
                   
THE ERROR IS "stack "lib_analytics": execution error at line 32 (Handler: can't find handler) near "mergNotify", char 1

Putting a check on "run under Rosetta", does not trow the error anymore.
Does the Merge extension needs an update?
Thanks
Trevix
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: M1 Monterray: MergNotify unknown command

Post by Klaus » Fri Jul 29, 2022 3:03 pm

Hi Trevix,
trevix wrote:
Fri Jul 29, 2022 2:47 pm
...
Putting a check on "run under Rosetta", does not trow the error anymore.
Does the Merge extension needs an update?
yep, sounds like that, please report it here: https://quality.livecode.com
Thank you!


Best

Klaus

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1209
Joined: Thu Apr 11, 2013 11:27 am

Re: M1 Monterray: MergNotify unknown command

Post by LCMark » Fri Jul 29, 2022 4:46 pm

Yes - we need to make sure we compile mergNotify for arm64 on macOS as well it seems :D

However, that being said, I don't think those two lines in 'macos' case actually do anything useful - macOS doesn't have notifications UIApplicationWillResignActiveNotification and UIApplicationDidBecomeActiveNotification - they are specific to iOS.

On desktop the equivalent is the 'suspend' and 'resume' messages (which you can hook into in a frontscript).

trevix
Posts: 962
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Re: M1 Monterray: MergNotify unknown command

Post by trevix » Fri Jul 29, 2022 5:06 pm

Correct, even if in the dictionary is not that clear on MacOS and MergeNotify.

So I will have to use "UIApplicationWillResignActiveNotification" and "UIApplicationDidBecomeActiveNotification" on iOS
"StackPaused" and "StackResumed" on Android (using the Android Event Listener library).
"Suspend" and "Resume" on OSX.

Hopefully one day they will be re-united
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”