I am writing something as a learning project in Applescript Studio. I am using Interface Builder, which is cool, but I have run into an issue. I have a lot of dialog boxes, 20 or so. And now, when I go to save a change to a dialog box the save can take over 5 minutes.
What is that all about? Any solutions?
Thanks in advance.
Create 20 nibs from you 20 windows. Use the “Decompose Interface” menu item to do this. You can load individual nibs with
load nib "nibName"
Thank you very much! That one little tip saved me a world of headache.
I notice that when I create the files (actually, they are now XIB files) the XIB files include the “File’s Owner”, “First Responder,” and “Application” objects. Can I toss those out since they are in “MainMenu.nib,” or does every NIB file need this?
Thanks, again!
You should use XIB files. The only downpart is that you can’t compile your project on 10.4 or lower but the interface should work in 10.4 once compiled in 10.5 or higher.
I don’t know for sure but I think you still need the File’s Owner etc. Apple actually wants us to split up every window in its own nib and load them only when needed. My app doesn’t do this at the moment but what it does and what yours should do too is to make sure that the NIB/XIB doesn’t get loaded twice so do like :
property libIsNotLoaded : true
if libIsNotLoaded
set libIsNotLoaded to false
load nib "myNib"
end if
show window "myWindow"