Re: Missing font?
Re: Missing font?
- Subject: Re: Missing font?
- From: Fritz Anderson <email@hidden>
- Date: Fri, 9 Sep 2005 20:35:38 -0500
On 9 Sep 2005, at 12:17 AM, Matt Baker wrote:
[textView setFont:[NSFont fontWithName:[plist
valueForKeyPath:@"defaultFont"] size:[[plist
valueForKeyPath:@"defaultSize"] doubleValue]]];
Will crash if the defaultFont described in the plist file doesn't
exist.
How do I check if the font exists first?
By checking whether +[NSFont fontWithName:size:] returns nil before
you pass it to the system?
-- F
_______________________________________________
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