• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [IB] - possible bug [was: how to delete action or outlet?]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IB] - possible bug [was: how to delete action or outlet?]


  • Subject: Re: [IB] - possible bug [was: how to delete action or outlet?]
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 21 Jul 2009 02:08:02 -0700

On Jul 21, 2009, at 00:07, Alexander Bokovikov wrote:

I can agree, but the bug is, that I can't correctly change the class name _after_ I've added some actions/outlets. I definitely would like to have such ability. Adding a new object I could name its class by mistake then add a couple of tens actions/outlets, then discover my mistake in class naming (remember, all this we do in IB, so none of code files could yet be created!), and come face to face with the problem.

There may or may not be a bug here, but mostly this is about confusion.

In IB, you added a "onClick:" action to *class* NSObject. Then you added one to *class* NSObjectController. IB is dutifully remembering exactly what you told it.

When you connect the button's action to your NSObjectController object, because it's also a NSObject, you have a choice of the two actions as your destination, one from each class. Maybe that's a bug, maybe that's an oversight, maybe that's just how an edge case happens to work, or maybe that's how it works for a genuine reason. I don't know.

Since the actions belong to classes, you can't see the NSObject one listed in the Identity tab unless you have a NSObject (not a NSObjectController) to select. So drag another blue cube into your document, delete NSObject's onClick action, then delete that temporary blue cube.

Maybe it's a bug that there's no way to see that class's actions without an object of that class in the nib, or maybe it's not, or maybe there's a way to see it by choosing a different view of things. I don't know.

The reason I don't know (and, frankly, don't care) is that -- as of IB 3 -- there's rarely any reason to add actions this way. As Graham pointed out, it's much more common now, and much more convenient IMO, just to put the action in a .h file. IB will see it and make it available automatically. You don't have to do anything special, and if you choose to delete it (by removing it from the .h file, I mean) then IB will notice that too. Other than changing the classes of objects, and giving cosmetic IB-names to things, the Identity panel just doesn't seem terribly useful any more.

Note that -- as of IB 3 -- it's possible to define things like actions *within a XIB file only*, without having any supporting code in your project. Maybe -- like IB 2 -- it can generate the code definitions in your .h files for you, or maybe it can't. I don't know, because I don't care, for the same reason -- it just seems so much easier to start with the .h files.

It wouldn't hurt to submit a bug report about this -- IB certainly isn't doing a very good job of letting you know what's going on in this situation -- but I wouldn't be surprised if the answer was "works as intended".


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: [IB] - possible bug [was: how to delete action or outlet?]
      • From: Kevin Cathey <email@hidden>
References: 
 >[IB] - how to delete action or outlet? (From: Alexander Bokovikov <email@hidden>)
 >Re: [IB] - how to delete action or outlet? (From: Alexander Bokovikov <email@hidden>)
 >Re: [IB] - how to delete action or outlet? (From: Graham Cox <email@hidden>)
 >Re: [IB] - how to delete action or outlet? (From: Graham Cox <email@hidden>)
 >Re: [IB] - how to delete action or outlet? (From: Alexander Bokovikov <email@hidden>)
 >Re: [IB] - possible bug [was: how to delete action or outlet?] (From: Alexander Bokovikov <email@hidden>)
 >Re: [IB] - possible bug [was: how to delete action or outlet?] (From: Graham Cox <email@hidden>)
 >Re: [IB] - possible bug [was: how to delete action or outlet?] (From: Alexander Bokovikov <email@hidden>)

  • Prev by Date: Re: [IB] - possible bug [was: how to delete action or outlet?]
  • Next by Date: Re: Cocoa Graphics Parsing
  • Previous by thread: Re: [IB] - possible bug [was: how to delete action or outlet?]
  • Next by thread: Re: [IB] - possible bug [was: how to delete action or outlet?]
  • Index(es):
    • Date
    • Thread