• 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: hosed IBOutlets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hosed IBOutlets


  • Subject: Re: hosed IBOutlets
  • From: Paul Forgey <email@hidden>
  • Date: Sat, 19 Feb 2005 17:10:04 -0800

Well apparently I was inadvertently overriding a method. I had a method in my class called setProgress: which would update the controls appropriately. Upon more careful inspection in the debugger, I saw it was being called by the App Kit internals while unpacking the nib. Couldn't find any documentation about that method anywhere throughout the entire class hierarchy or protocols. Renamed it to something else and everything suddenly began working again.

Objective-C is simple, but sometimes it is too simple.

On Feb 19, 2005, at 4:46 PM, Paul Forgey wrote:

I don't think the nib is corrupted. After making a copy of my questionable nib file, I reverted back to before the trouble started, and re-added those two items. After introducing those items, things start screwing up. I even regenerated the header file. While merging it, nothing unexpected showed up, so IB and my application are seeing the same class.

If I temporarily hack my code to just ignore those items, I get periodic messages about "copyWithZone:" and "length:" being sent to NSProgressIndicator. This must be goings on in the App Kit's internals? At any rate, it seems to indicate my class isn't being created properly.

I'm not doing anything fancy, and there's minimal code in my NSWindow subclass. How do I even begin to troubleshoot this?

On Feb 19, 2005, at 4:15 PM, Paul Forgey wrote:

I've got an NSWindow derived instance in my nib file which has, among many other things:

    IBOutlet NSTextField *progressText;
    IBOutlet NSProgressIndicator *progress;

My code and Interface Builder both agree (or seem to) about my outlets. In the Interface Builder UI, I can clearly see these correctly assigned to an NSTextField and NSProgressIndicator.

When the bundle loads (in this case, it's the application's main bundle), I get this out the log:

2005-02-19 16:06:56.945 My App[2200] *** -[NSProgressIndicator copyWithZone:]: selector not recognized
2005-02-19 16:06:56.947 My App[2200] An uncaught exception was raised
2005-02-19 16:06:56.947 My App[2200] *** -[NSProgressIndicator copyWithZone:]: selector not recognized
2005-02-19 16:06:56.947 My App[2200] *** Uncaught exception: <NSInvalidArgumentException> *** -[NSProgressIndicator copyWithZone:]: selector not recognized


At this point, progress is nil and progressText purports to be an NSTextField. However, if I attempt to call setStringValue: on it, I get a SIGTRAP without any further messages.

It almost seems to me Interface Builder maybe corrupted my nib? Is there any way to recover from this without loosing my day's work?

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: hosed IBOutlets
      • From: Vince DeMarco <email@hidden>
References: 
 >hosed IBOutlets (From: Paul Forgey <email@hidden>)
 >Re: hosed IBOutlets (From: Paul Forgey <email@hidden>)

  • Prev by Date: Re: hosed IBOutlets
  • Next by Date: Re: NSWindow delegate handling keyboard events
  • Previous by thread: Re: hosed IBOutlets
  • Next by thread: Re: hosed IBOutlets
  • Index(es):
    • Date
    • Thread