On 21.07.2009, at 4:07, Kelly Keenan wrote:

Have you figured out what is going on here? If not, can you please file a bug and send me the bug number? If possible, it would be really handy to have a very simple project with this same problem.

OK, I've found a time to recall what and how I did it. Finally I've discovered the reason. Here is the actions sequence, leading to the bug.

- create a new project; I used Cocoa-FPC template, recently created by Jonas Maebe (see the list for the link) though I don't think the template itself does a matter.

- click "Build&Go" to compile, though I don't think it does a matter too. I'm just too lazy to repeat it all again without that step. I just remember that I did it earlier.

- open Interface Builder;

- select Object Controller in the Library and drag it into "Main Menu.XIB" window;

- PRINCIPAL STEPS ARE HERE:

- rename the Object Controller instance, i.e. click on the "Object" name label below the blue cube, causing its inline editor appearance, and type something. I used "AppController" name.

- DO NOT change "NSObject" class name at the top of Info page of the Inspector.

- add a new action in the Actions panel of the Info page, and call it "onClick:".

- drag a push button from Library to the Window

- connect (Ctrl+Mouse Down) the push button instance with AppController object in the XIB window; a popup list appears, where we choose "onClick:" action.

- CHANGE the AppController object instance CLASS NAME to "AppController" (was NSObject) in the Object Inspector; the action, we just created DISAPPEARS, so "Actions panel is EMPTY.

- right-click on the AppController object instance in the XIB window and look at the actions list - we can see, that onClick: action still exists and it's still connected to the push button; screenshot is here:

http://home.bokovikov.com/etc/mac/xcode/IB-bug_01.png

- click on the cross and disconnect this action from button; now it's empty

- add new "onClick:" action in the "Actions" panel of Object Info page.

- we can see, that AppController popup window has two actions, but Info page now contains only one action.

http://home.bokovikov.com/etc/mac/xcode/IB-bug_02.png

That's all, what I did now. Earlier I yet created appropriate code in the AppController.m file. Finally I came to the situation, when "Actions" page in the Inspector contained one "onClick:" action (though AppController's popup shew two actions) and "Minus" button was grayed. Now I did not reproduce it, but I believe the problem reason is revealed pretty enough. I demonstrated it all for object actions, though the same situation is with object outlets.

Fixing this bug I'd suggest to save all existing actions and outlets, rather than remove them completely, because initial class is NSObject, which is the base one, so any actions, added to NSObject definitely can be added to any of its descendants. Indeed, it would be more advanced solution, when a warning will be generated, when object class is downgraded. Though I can't provide an exact sample, as I'm not so skilled yet in XCode/Cocoa.

Thanks.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to