Hi
I have been using the below in my project (under OSX 10.12.6) for quite a while, no issues at all, I have been testing my project in OSX 10.14.5, and it now fails, i’m really uncertain as how to fix it.
the error at build time is:
the code is:
script AppDelegate
property parent : class "NSObject"
property theWindow : missing value
property NZEnvOffSetChoice : missing value
on awakeFromNib()
set listOffsetCodes to {"Templates", "A", "B","C","D","E","F","G"}
try
NZEnvOffSetChoice's removeAllItems()
end try
NZEnvOffSetChoice's addItemsWithTitles:listOffsetCodes
repeat with i from 1 to (count listOffsetCodes)
set menuItemValue to item i of listOffsetCodes
(NZEnvOffSetChoice's addItemWithTitle:menuItemValue)
if menuItemValue is in {"A", "D", "F"} then
set currentMenuItem to NZEnvOffSetChoice's lastItem()
set stringAttributes to current application's NSDictionary's dictionaryWithObjectsAndKeys_(current application's NSColor's redColor(), current application's NSForegroundColorAttributeName, current application's NSFont's systemFontOfSize:12, current application's NSFontAttributeName, missing value)
set attributedString to (current application's NSAttributedString's alloc()'s initWithString:menuItemValue attributes:stringAttributes)
(currentMenuItem's setAttributedTitle:attributedString)
end if
end repeat
end awakeFromNib
end script