Re: issues using encodeWithCoder: with NSAttributedString for iOS

2012-02-27 Thread Evadne Wu
A very naïve suggestion is that if you are targeting OS X you might be able to use HTML or RTF. Save that and convert the stored into to an attributed string at run time. One idea of font descriptors is that a particular font may not exist on a particular computer, but similar ones might be

Bug in 10.6 NSPasteboard API? (was: 10.6 NSPasteboard API mixes up types?)

2012-02-27 Thread Peter
I am still very much puzzled by the issue I described below, so I still hope to find a taker for it. While the OS 10.5 API cleanly separated pasteboard types, the 10.6 API converts NSURL data to strings and adds it to any existing string data - i.e. when pasting the data into e.g. a text view

Re: [Obj-C] if (self) vs. if (self != nil)

2012-02-27 Thread Jean-Daniel Dupas
Le 27 févr. 2012 à 02:40, Graham Cox a écrit : On 27/02/2012, at 12:13 PM, William Squires wrote: I prefer the if (self = [super init]) combined form, myself. One potentially annoying thing about this form is that, if you compile with plenty of warnings on, such as the possible

Re: [Obj-C] if (self) vs. if (self != nil)

2012-02-27 Thread Citizen
On 27 Feb 2012, at 03:51, Preston Sumner wrote: On Feb 26, 2012, at 7:38 PM, Graham Cox wrote: On 27/02/2012, at 1:27 PM, Karl Goiser wrote: use double parentheses Yes, but that's not what the poster was suggesting. I pointed out why that form is bad. This is a solution, but so

Re: Application Suite Preferences

2012-02-27 Thread Bill Cheeseman
On Feb 27, 2012, at 2:06 AM, Seth Willits wrote: At any rate, I'm interested in hearing the thoughts of anyone who really knows how these suite preferences should be used. My UI Actions product http://pfiddlesoft.com/uiactions does it exactly the way you describe, in every particular. I

Was: issues using encodeWithCoder: with NSAttributedString for iOS

2012-02-27 Thread Gregory Weston
Jens Alfke wrote: I don’t know of an easy workaround. Back in the day I would have suggested creating a category on CGColor that adds the required archiving methods, but doing this will get you rejected from the App Store. Wait, what? Where's that documented? I haven't tried submitting

Re: Was: issues using encodeWithCoder: with NSAttributedString for iOS

2012-02-27 Thread Uli Kusterer
On 27.02.2012, at 12:11, Gregory Weston wrote: Jens Alfke wrote: I don’t know of an easy workaround. Back in the day I would have suggested creating a category on CGColor that adds the required archiving methods, but doing this will get you rejected from the App Store. Wait, what?

advice for new project with resizing views

2012-02-27 Thread Rick C.
Hi, I need to work on a project where the main window is a view that accepts drops, and after the drop is complete the window will expand/resize to reveal a table view where I will show the needed data. An example would be this old appzapper app that's the first that comes to mind. I have

Re: Recommended way to present a font preference

2012-02-27 Thread Ross Carter
On Feb 26, 2012, at 8:13 PM, John Brownie wrote: I'm rewriting an existing Carbon application with Cocoa, and am working on the preferences. One preference that the user should be able to set is a default font and size for text display. In the Carbon app, there is a pop-up button with a

Re: Was: issues using encodeWithCoder: with NSAttributedString for iOS

2012-02-27 Thread Jens Alfke
On Feb 27, 2012, at 3:11 AM, Gregory Weston wrote: I don’t know of an easy workaround. Back in the day I would have suggested creating a category on CGColor that adds the required archiving methods, but doing this will get you rejected from the App Store. Wait, what? Where's that

sudden errors

2012-02-27 Thread H. Miersch
hi. my project used to build OK, until today. now xcode keeps throwing errors like this at me: Unknown type name 'ViewManager' yes, i import ViewManager.h, and no, i didn't change any declarations. is this a bug in Xcode? like i said, until sometime today this used to build ok. what

Re: sudden errors

2012-02-27 Thread H. Miersch
On 27. Feb 2012, at 23:01, H. Miersch wrote: hi. my project used to build OK, until today. now xcode keeps throwing errors like this at me: Unknown type name 'ViewManager' yes, i import ViewManager.h, and no, i didn't change any declarations. is this a bug in Xcode? like i

Re: sudden errors

2012-02-27 Thread Keary Suska
On Feb 27, 2012, at 4:53 PM, H. Miersch wrote: On 27. Feb 2012, at 23:01, H. Miersch wrote: hi. my project used to build OK, until today. now xcode keeps throwing errors like this at me: Unknown type name 'ViewManager' yes, i import ViewManager.h, and no, i didn't change any

Accelerate/vDSP.h question

2012-02-27 Thread dct
Have the vDSP functions vDSP_vabs and vDSP_vabsD recently changed? They seem to be no longer working other than to simply return an unchanged version of an input. Here is a simple, Cocoa test routine I used to prove the point: unsigned intii; double aa[10],

Re: Application Suite Preferences

2012-02-27 Thread Seth Willits
On Feb 27, 2012, at 2:24 AM, Bill Cheeseman wrote: At any rate, I'm interested in hearing the thoughts of anyone who really knows how these suite preferences should be used. My UI Actions product http://pfiddlesoft.com/uiactions does it exactly the way you describe, in every particular. I

Round corners of borderless NSWindow without set it transparent

2012-02-27 Thread Andrea3000
I'm trying to round edges of a borderless NSWindow without having to mark it as transparent with setOpaque:NO. My testbed is made only of a borderless NSWindow, its Content View and a regular NSView. The NSView is subclassed to override drawRect method in order to round corners of the view.

How to support larger NSView hierarchy?

2012-02-27 Thread Keith Knauber
In my implementation, I know enough about my very large NSView hierarchy that allows me to clip and draw the visible hierarchy very quickly. If there was a faster way to getRectsBeingDrawn for an entire view hierarchy in an offscreen window, and then reset NSWindow dirty rects needing display

Re: How to support larger NSView hierarchy?

2012-02-27 Thread Graham Cox
Jeez. Perhaps it would be better to explain your goals, rather than fragments of an implementation that appears to be, on the face of it, pointless. In a scroll view, views that are fully clipped out by the clip view, and those which do not intersect the dirty rects, are simply not drawn. At

Re: Round corners of borderless NSWindow without set it transparent

2012-02-27 Thread Seth Willits
On Feb 27, 2012, at 5:45 AM, Andrea3000 wrote: Then, if I set my NSWindow non-opaque I correctly get rounded corners but the window becomes very slow expecially during resize. Mmm…. that doesn't sound right. You shouldn't notice anything being slow. Therefore I'm looking for a way to

Re: How to support larger NSView hierarchy?

2012-02-27 Thread Quincey Morris
On Feb 27, 2012, at 20:46 , Graham Cox wrote: Jeez. Indeed. Especially as it's usually taken as a given that large numbers of NSViews aren't going to perform well. Trying to make the scenario work might be quixotic at best. However, two thoughts did spring to mind: 1. It might be easier