Content of drawers limited?

It took me three days, but I finally figured out how to make a drawer open and close. Yay.

I then tried to put an Address Book framework into the drawer (the whole point of this exercise), and my app crashed.

So, I tried to put the Address Book framework into the parent window. The app crashed again.

Of course, putting the framework into a normal window is a breeze, and no problems.

So, my question is, “Is the content of drawers limited?” If not, is there some kind of thing/step that I’m missing?

I tried to add the Address Book framework to the AS Studio example app called “Drawer” in both places (main window and panel). It also crashed both times.

Would you post your code to show a drawer? You’d save me three days! :slight_smile:

You can use code to open and close a drawer, or you can simply use a connection from a button in IB to the “toggle:” action of the drawer. As to the original question, you’re confusing some things here. The object in IB is an NSPeoplePickerView, not a framework. To actually use this object in your project, you need to manually add the AddressBook.framework (frameworks include the definitions & code, images, interface, etc. for using an object) to your project. To do this, Control-Click on the “Linked Frameworks” group in Xcode and select “Existing Frameworks…”, then navigate to “System/Library/Frameworks/AddressBook.framework” and add this to your project. Then you can use the people picker (though, you have to get a little creative to use this with AppleScript; hint: use Obj-C). To see all of this, take a look at at my demo project:

http://homepage.mac.com/jonn8/as/dist/TogglePeoplePickerDrawer.zip (Note: requires Xcode 2.1+)

Jon