Re: Creating a Big and Resizable Question Mark in the Middle of a View

2010-08-15 Thread Peter Zegelin
Ken, That's brilliant and works like a charm. On 16/08/2010, at 12:36 PM, Ken Ferry wrote: > Hi Peter, > > That code is fine, but FYI, it can be written more simply and with perhaps > slightly improved semantics: > > [imageView setImage:[NSImage imageNamed:@"Question Mark"]]; > >

Re: Creating a Big and Resizable Question Mark in the Middle of a View

2010-08-15 Thread Ken Ferry
Hi Peter, That code is fine, but FYI, it can be written more simply and with perhaps slightly improved semantics: [imageView setImage:[NSImage imageNamed:@"Question Mark"]]; Semantically, it's very similar, but the above will not actually read the file from disk until the image data is neede

Re: Creating a Big and Resizable Question Mark in the Middle of a View

2010-08-15 Thread Georg Seifert
Or draw an attributed string in drawRect: calculate the font size from to the view size... Georg Am 15.08.2010 um 06:55 schrieb Peter Zegelin: > Yep that worked: > > NSString *file = [[NSBundle mainBundle]pathForResource:@"Question Mark" > ofType:@"pdf"]; > NSData *data = [NSData

Re: Creating a Big and Resizable Question Mark in the Middle of a View

2010-08-14 Thread Peter Zegelin
Yep that worked: NSString *file = [[NSBundle mainBundle]pathForResource:@"Question Mark" ofType:@"pdf"]; NSData *data = [NSData dataWithContentsOfFile:file]; NSImage *image = [[NSImage alloc] initWithData:(NSData *)data]; [imageView setImage:image]; (I'm using GC

Re: Creating a Big and Resizable Question Mark in the Middle of a View

2010-08-14 Thread Quincey Morris
On Aug 14, 2010, at 20:28, Peter Zegelin wrote: > I would like the view to just have a large and resizable question mark in the > middle but am not sure how to create one. None of the IB controls seem to fit > the bill and before I get into using an NSTextView - which I haven't used > before an

Creating a Big and Resizable Question Mark in the Middle of a View

2010-08-14 Thread Peter Zegelin
My app loads views into the main window depending on the contents of an xml file. In the case where a user runs an old version of my app with a newer xml file that has a new and unknown view type, I would like to show a "Missing View" view so they can select another. I would like the view to ju