• 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
Subclassing NSTextField and IB Custom Class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Subclassing NSTextField and IB Custom Class


  • Subject: Subclassing NSTextField and IB Custom Class
  • From: AurĂ©lien HugelĂ© <email@hidden>
  • Date: Tue, 16 Nov 2004 09:54:20 +0100

hi !

i often sublcass NSTableView (call this subclass GTKTableView), and use Interface builder to design my interface.
Using "Read Files" Menu in IB, i make IB parse GTKTableView.h.
then i drag a NSTableView from IB palette to my window, i customize the class of the dragged widget (NSTableView) to be a GTKTableView


what's nice with this, is that i can use IB to parameter my GTKTableView with settings that are common with NSTableviews (number of columns, type of cell, multiselection etc...)
at run time, my interface of course use my subclass, and everything is parametered!


Today i subclassed NSTextField and did exactly the same thing than above, but with GTKTextField.
But it does not work at run time : the NSTextField i dropped to my window, then customized to be a GTKTextField does not appear like a GTKTextField (GTKTextField add a sensitive zone at the right of the textfield, a la iChat smiley's menu) but as a normal NSTextField


i know my GTKTextField code works, because if i drag a NSView instead of a NSTextField in IB, then customize it to GTKTextField, i works beautifuly!! (interface when loaded at runtime appears like a GTKTextField).
But i can not enjoy IB NStextField ease of use to parameter alignement, editable state etc...


is it a bug is IB ?
you can use NSTableView/NSOutlineView in IB, then customize the class but you can not do this with a simple NSTextField ??


don't say me i need a palette just for this please ;)

thanks!

_______________________________________________
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: Subclassing NSTextField and IB Custom Class
      • From: Robbie Haertel <email@hidden>
  • Prev by Date: Re: [Proposal] On-the-fly NIB localization
  • Next by Date: Re: NSButtonCell darkened when state is NSOnState [SOLVED]
  • Previous by thread: Re: Printscreen on Mac OSX --
  • Next by thread: Re: Subclassing NSTextField and IB Custom Class
  • Index(es):
    • Date
    • Thread