• 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: Problem setting up custom toolbar item in IB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem setting up custom toolbar item in IB


  • Subject: Re: Problem setting up custom toolbar item in IB
  • From: Joey Hagedorn <email@hidden>
  • Date: Mon, 19 Jan 2009 22:29:16 -0800

Graham,

Hm, maybe this is an issue with the custom view in your nib. Perhaps try putting your text fields inside, say, a borderless NSBox instead?

-Joey


On Jan 19, 2009, at 8:55 PM, Graham Cox wrote:

I'm having trouble setting up a custom toolbar item. It looks like it should work and appears in IB OK but doesn't come up correctly at runtime. I must be doing something wrong:

The toolbar item consists of a pair of NSTextFields and some labels. They must be grouped together as a single toolbar item so I have created a custom view that holds the items. I can drag the custom view into the toolbar items panel in IB and they appear there OK. I can hook up the fields to my controller.

At runtime I only see the toolbar item label and not the text fields or other labels. I can drag the item to the toolbar but it still just shows the label.

When my controller tries to set one of the field's values I get either a EXC_BAD_ACCESS, or an exception that NSData doesn't implement -setFloatValue:, but at awakeFromNib time I can see the text field outlets are set and are indeed NSTextFields. By the time the method is called to update the fields (a notification callback), the outlets have the same addresses but they point to garbage.

The controller isn't referenced from any other object in the nib, but that should be OK, right? Not using garbage collection.

Any ideas?

--Graham
_______________________________________________

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: Problem setting up custom toolbar item in IB
      • From: Graham Cox <email@hidden>
References: 
 >Problem setting up custom toolbar item in IB (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: draw two strokes(lines) simultaneousy on NSView
  • Next by Date: Re: Problem setting up custom toolbar item in IB
  • Previous by thread: Problem setting up custom toolbar item in IB
  • Next by thread: Re: Problem setting up custom toolbar item in IB
  • Index(es):
    • Date
    • Thread