• 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
Prototype for NSMatrix steeling text?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Prototype for NSMatrix steeling text?


  • Subject: Prototype for NSMatrix steeling text?
  • From: Lars Hoss <email@hidden>
  • Date: Fri, 23 Apr 2004 23:14:13 +0200

Hi all!

Today I ran into a very strange problem and couldn't find a solution so far. Perhaps some of you guys can give me a hint what I am doing wrong.
I have a window with two views: a NSTextField and a custom matrix:

@implementation MyMatrix

- (id)initWithFrame:(NSRect)frameRect
{
NSTextFieldCell *cell = [[NSTextFieldCell alloc] init];
[cell setBezeled:YES];
[cell setEditable:YES];

self = [super initWithFrame:frameRect
mode:NSTrackModeMatrix
prototype:cell // <- prototype:nil works (see below)
numberOfRows:1
numberOfColumns:1];
[self setCellSize:NSMakeSize(265.0, 22.0)];
[self setIntercellSpacing:NSMakeSize(5.0, 5.0)];

return self;
}

The strange thing is that if I enter some text into the NSTextField and press the tab key the focus switches to the matrix but the text in the text field suddenly disappears?! When I change the code above to ... prototype:nil ... everything works fine except my matrix of course. But the text no longer disappears. I have absolutely no glue what's going on here?

Thanks for your help in advance,
Lars
_______________________________________________
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: new to frameworks question... no headers inside
  • Next by Date: Re: NSArrayController manage array in MyObject
  • Previous by thread: Re: new to frameworks question... no headers inside
  • Next by thread: NSOpenPanel & Panther: A symlink is now an alias?
  • Index(es):
    • Date
    • Thread