Code: Select all
library tk.shaosean.library.mac.test
use com.livecode.foreign
use com.livecode.objc
metadata version is "1.0.0"
metadata author is "shaosean.tk"
metadata title is "test"
---------------------
private foreign handler NSUserNotificationAlloc() returns ObjcRetainedId binds to "objc:NSUserNotification.+alloc"
private foreign handler NSUserNotificationInit(in Obj as ObjcId) returns ObjcId binds to "objc:NSUserNotification.-init"
private foreign handler NSUserNotificationSetTitle(in Obj as ObjcId, in Title as ObjcId) returns nothing binds to "objc:NSUserNotification.-setTitle:"
---------------------
public handler Test() returns nothing
	if the operating system is "mac" then
		unsafe
			variable aNSUserNotification as ObjcObject
			put NSUserNotificationAlloc() into aNSUserNotification
			put NSUserNotificationInit(aNSUserNotification) into aNSUserNotification
			NSUserNotificationSetTitle(aNSUserNotification, StringToNSString("hello"))
		end unsafe
	end if
end handler
end libraryCode: Select all
--executing at 4:09:44 AM
--LCB Error	Unable to bind foreign handler tk.shaosean.library.mac.test.NSUserNotificationSetTitle
--Object	Button
--LCB File	test.lcb
--LCB Line	26Is this a bug? Is this PEBCAK error? Is it something else?
