I want to set the selection of a PopUpButton at start to my Defaults,
but the first is to control al the aspects of the PopUpButton.
Controlling the changes of the user is easy setting the selection of one item of the PopUpButton to a function,
the complex is to control the PopUpButton from code/UI.
I have this test_project to test the SelectObject from code or UI.
Once property B_years_selected (Selected Object) is set, it can’t be edited?!?!?!?!
script test_PopUpButtonAppDelegate
property parent : class "NSObject"
property mainWindow : missing value
--Binded to Content of the PopUpButton of the UI
property B_years : {2012, 2013, 2014, 2015} --> works great
--Binded to Selected Object of the PopUpButton of the UI
property B_years_selected : 2012 --> works great
on applicationWillFinishLaunching_(aNotification)
set B_years_selected to 2014 --> does not work
end applicationWillFinishLaunching_
on applicationShouldTerminate_(sender)
return current application's NSTerminateNow
end applicationShouldTerminate_
end script
I have tried everything i found to pre select an item of the PopUpButton, but nothing works.
Thanks for advance.
Browser: Safari 534.57.2
Operating System: Mac OS X (10.8)
The bindings can’t be the same. Your app delegate will not even show up in the “Bind to” popup of the second .xib because the instance belongs to a different .xib. You just can’t bind across .xibs like that.