• 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
Custom field editor to emulate LocationTextField (as in Safari) ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom field editor to emulate LocationTextField (as in Safari) ?


  • Subject: Custom field editor to emulate LocationTextField (as in Safari) ?
  • From: ruffnex <email@hidden>
  • Date: Thu, 18 Mar 2004 15:34:19 +0800

Hi,

I'm trying to subclass NSTextField so that it can take a value to show progress. This is like the location text field in Safari, where on loading a web page, the location text field becomes a progress bar. Safari has its own class called LocationTextField.

What's the best approach? Currently I am trying to:
1. subclass NSTextField
2. subclass NSTextFieldCell
3. subclass NSTextView (use this as my field editor, and add an instance variable to hold the progress value, and override drawing methods to draw a suitably sized rectangle)

However, I am failing even to add my subclassed NSTextView, as a text field editor of my text field cell. On running, my text field appears, but it has no editor.

Any tips on correct usage of...

NSTextFieldCell:
- (NSText *)setUpFieldEditorAttributes:(NSText *)textObj

NSWindow:
- (NSText *)fieldEditor:(BOOL)createFlag forObject:(id)anObject
- (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)anObject

Thanks,
Simon
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: substring return a new string?
  • Next by Date: Re: substring return a new string?
  • Previous by thread: Re: substring return a new string?
  • Next by thread: A question about encoding
  • Index(es):
    • Date
    • Thread