I have one customer reporting this shows up in our debug logging, from the call stack.
[quote]Wednesday, July 17, 2019 XojoFramework$4452
Wednesday, July 17, 2019 Unhandled exception: FunctionNotFoundException
Wednesday, July 17, 2019 RuntimeRaiseException
Wednesday, July 17, 2019 RuntimeRaiseFunctionNotFoundException
Wednesday, July 17, 2019 MacStitch.Event_Open%%o
Wednesday, July 17, 2019 _Z29CocoaFinishApplicationStartupv
Wednesday, July 17, 2019 XojoFramework$4452[/quote]
Any idea what would cause that on this ONE machine only?
(I have several macs on several OSX versions, and have never seen this before)
FunctionNotFoundExceptions are exclusively returned on Soft Declares. I would start by using System.IsFunctionAvailable to ensure that the libraries and functions I’m calling in to exist, and logging that. From there it should be trivial to track down exactly what library is missing or out of date on the user’s machine.
That would suggest this one, although its already trapped in a try…catch
All the other soft declares I have are wrapped inside
#if targetwindows , and this is a Mac build
if theOS >= “10.12” then
declare function objc_getClass lib “Cocoa.Framework” ( name as CString ) as ptr
dim nsWindowClass as ptr = objc_getClass( “NSWindow” )
declare sub AllowTabGrouping lib "AppKit"selector "setAllowsAutomaticWindowTabbing:" ( classPtr as Ptr , enableDisable as Boolean )
AllowTabGrouping( nsWindowClass, false )
Maybe its INSIDE
That’s possible. You could check by adding some debug logging to your application around that call and sending a build to that user. You could also try replacing that call with one of the solutions presented on this thread.
Which version of the macOS is your customer running?
allowsAutomaticWindowTabbing is available from macOS 10.12 onwards.
Ideally you should be using respondsToSelector before calling a function that is dependent on OS version.
Lastly, I think your Try/Catch block should look like.
Catch err as FunctionNotFoundException