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"]];
>
>
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
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
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
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
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