Re: Invalid exception being thrown: CIUnsharpMask is not kvc for the key inputIntensity - except that it is

2010-06-09 Thread Stephen J. Butler
On Wed, Jun 9, 2010 at 12:35 AM, Mark Aufflick mark-co...@aufflick.com wrote:        *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[CIUnsharpMask 0x2000648c0 valueForUndefinedKey:]: this class is not key value coding-compliant for the key inputIntensity.'

FSCopyObjectAsync hogging the thread?

2010-06-09 Thread Kevin Boyce
I'm using FSCopyObjectAsync to copy files while displaying a progress bar, and it seems less asynchronous than I would have thought. I'm scheduling it in the main run loop, from the main thread. The copy works correctly, and both the callbacks and the status calls work to get the current

Re: FSCopyObjectAsync hogging the thread?

2010-06-09 Thread Graham Cox
I'm not familiar with these ops, but having browsed the docs just now, it seems to me what's happening is that because you've scheduled the operation with your main run loop, it's not really asynchronous as much as time-sharing with your main loop, which is why your UI is jumpy. You could try

Re: FSCopyObjectAsync hogging the thread?

2010-06-09 Thread Graham Cox
On 09/06/2010, at 4:43 PM, Graham Cox wrote: You could try setting up a runloop on another thread to get truly asynchronous copying, and then ensure that the progress update is performed on the main thread as needed. Or maybe use NSFileManager to perform the copy which is higher-level and

Re: Erasing drawn content

2010-06-09 Thread Matej Bukovinski
Thanks everyone for all the great suggestions. I'll try it out and report back how it went. The clipping path method seems promising. Except that would still rely on inserting a custom view in the WebView's private scrollview hierarchy. It doesn't really. Inserting a NSBee as a subview of

Re: Invalid exception being thrown: CIUnsharpMask is not kvc for the key inputIntensity - except that it is

2010-06-09 Thread Mark Aufflick
Thanks Stephen, I'm using garbage collection, but if the problem was that the object wasn't retained, then the exception wouldn't be thrown by a CIUnsharpMask object surely? Thanks for your sample project - works exactly as you would expect! I noticed that your Foo object instance was frozen in

Re: Erasing drawn content

2010-06-09 Thread vincent habchi
Oops, wrong email address, I try again: Pity, I like the idea of more bee-based metaphors in APIs (or Apis). It could be known as Bee-OS. That was a pun in latin? Vincent___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Erasing drawn content

2010-06-09 Thread Alastair Houghton
On 9 Jun 2010, at 10:02, vincent habchi wrote: Oops, wrong email address, I try again: Pity, I like the idea of more bee-based metaphors in APIs (or Apis). It could be known as Bee-OS. That was a pun in latin? http://en.wikipedia.org/wiki/BeOS (which was once a candidate for the base

Re: Erasing drawn content

2010-06-09 Thread vincent habchi
Le 9 juin 2010 à 13:33, Alastair Houghton a écrit : On 9 Jun 2010, at 10:02, vincent habchi wrote: Pity, I like the idea of more bee-based metaphors in APIs (or Apis). It could be known as Bee-OS. That was a pun in latin? http://en.wikipedia.org/wiki/BeOS (which was once a candidate

Re: Erasing drawn content

2010-06-09 Thread Graham Cox
On 09/06/2010, at 9:38 PM, vincent habchi wrote: But the point was that apis, in latin, means bee. I think we ought to buzz off and hive this off-list, or else we're likely to get smoked out by the moderator. (Beesides, any joke that needs explaining loses any small element of humour it

Re: Erasing drawn content

2010-06-09 Thread Alastair Houghton
On 9 Jun 2010, at 12:38, vincent habchi wrote: Le 9 juin 2010 à 13:33, Alastair Houghton a écrit : On 9 Jun 2010, at 10:02, vincent habchi wrote: Pity, I like the idea of more bee-based metaphors in APIs (or Apis). It could be known as Bee-OS. That was a pun in latin?

Re: Erasing drawn content

2010-06-09 Thread vincent habchi
Le 9 juin 2010 à 13:44, Graham Cox a écrit : On 09/06/2010, at 9:38 PM, vincent habchi wrote: But the point was that apis, in latin, means bee. I think we ought to buzz off and hive this off-list, or else we're likely to get smoked out by the moderator. (Beesides, any joke that needs

Re: FSCopyObjectAsync hogging the thread?

2010-06-09 Thread Graham Cox
On 09/06/2010, at 10:31 PM, Kevin Boyce wrote: I don't want to use NSFileManager because (AFAICT) you can't ask it how far along it's gotten. Also I don't see a way to cancel a copy in the middle. It depends how finely you want the progress to be updated. If you can accept a call once per

KVO oddity (or am I *really* idiot ?)

2010-06-09 Thread vincent habchi
Hi there, no latin this time, I swear! :) Well, please tell me I am a fool: when I execute those two lines: NSLog(@%@, [[NSApp delegate] appController]); NSLog(@%@, [NSApp valueForKey:@delegate.appController]); I get this result: 2010-06-09 15:52:57.525 PostSIG[5503:a0b]

Re: KVO oddity (or am I *really* idiot ?)

2010-06-09 Thread Kyle Sluder
On Jun 9, 2010, at 7:05 AM, vincent habchi vi...@macports.org wrote: Hi there, no latin this time, I swear! :) Well, please tell me I am a fool: when I execute those two lines: NSLog(@%@, [[NSApp delegate] appController]); NSLog(@%@, [NSApp valueForKey:@delegate.appController]);

Re: KVO oddity (or am I *really* idiot ?)

2010-06-09 Thread Graham Cox
On 10/06/2010, at 12:05 AM, vincent habchi wrote: 2010-06-09 15:52:57.526 PostSIG[5503:a0b] [NSApplication 0x1003264d0 valueForUndefinedKey:]: this class is not key value coding-compliant for the key delegate.appController. [NSApp valueForKey:@delegate] works all right. appController is

Re: KVO oddity (or am I *really* idiot ?)

2010-06-09 Thread vincent habchi
Le 9 juin 2010 à 16:10, Graham Cox a écrit : On 10/06/2010, at 12:05 AM, vincent habchi wrote: 2010-06-09 15:52:57.526 PostSIG[5503:a0b] [NSApplication 0x1003264d0 valueForUndefinedKey:]: this class is not key value coding-compliant for the key delegate.appController. [NSApp

Re: KVO oddity (or am I *really* idiot ?)

2010-06-09 Thread vincent habchi
Le 9 juin 2010 à 16:10, Kyle Sluder a écrit : @delegate.appController is a keypath, not a key. Thanks Kyle. As I said (privately) to Graham, I am even better than a moron: an oxymoron. Cheers and forgive my stupidity. Enjoy WWDC! Vincent___

Re: My Custom Framework Is Not Exporting One of My Header Files

2010-06-09 Thread Chris Tracewell
On Jun 8, 2010, at 6:26 PM, Graham Cox wrote: On 09/06/2010, at 11:20 AM, Chris Tracewell wrote: Why would it not be exporting the file? Yes, I added it to the target when I created the file. Right-click the file in Xcode and set its role to Public. This necessary step is very

Re: get the selection in an NSOutlineView

2010-06-09 Thread Jens Alfke
On Jun 8, 2010, at 9:40 PM, Graham Cox wrote: At the time you call -selectedRowIndexes, you should then extract the items corresponding to those indexes from your data model (e.g. using [NSArray objectsAtIndexes:]) before the user has a chance to change the arrangement. Actually I just

Re: Erasing drawn content

2010-06-09 Thread Paul Sanders
Except that would still rely on inserting a custom view in the WebView's private scrollview hierarchy. If the clipping path method works, and if you can subclass your webview, then you shouldn't need a separate view at all. Just override drawRect: and draw your rectangles after calling

Re: Erasing drawn content

2010-06-09 Thread Jens Alfke
On Jun 9, 2010, at 10:07 AM, Paul Sanders wrote: If the clipping path method works, and if you can subclass your webview, then you shouldn't need a separate view at all. Just override drawRect: and draw your rectangles after calling super. It sounds almost too easy. Actually there are

Re: Invalid exception being thrown: CIUnsharpMask is not kvc for the key inputIntensity - except that it is

2010-06-09 Thread Stephen J. Butler
On Wed, Jun 9, 2010 at 3:50 AM, Mark Aufflick mark-co...@aufflick.com wrote: So I did an experiment with your simple sample project making the bindings be with file owner instead of a frozen object, but they still worked as expected. Next test is a custom loaded view xib, but that will have

Re: Erasing drawn content

2010-06-09 Thread Matej Bukovinski
The clipping path approach doesn't really help. It turns out that you can only intersect the current clipping path (initially the view's bounds) with a new path and the intersected region is the region where drawing is visible. This means that when you're drawing a larger rectangle over a

Re: Erasing drawn content

2010-06-09 Thread Quincey Morris
On Jun 9, 2010, at 11:06, Matej Bukovinski wrote: The clipping path approach doesn't really help. It turns out that you can only intersect the current clipping path (initially the view's bounds) with a new path and the intersected region is the region where drawing is visible. This means

Re: Erasing drawn content

2010-06-09 Thread Alastair Houghton
On 9 Jun 2010, at 19:06, Matej Bukovinski wrote: The layer approach din't work out as well. I get the same black color problem as with the view. Overriding drawRect: is problematic for WebViews, as Jens pointed out WebViews do all sorts of drawing voodoo. Believe me, I've tried. It

Re: Erasing drawn content

2010-06-09 Thread Paul Kim
I might as well take a stab at this: - Draw into an NSImage, filling the shapes as fully opaque. - Composite/draw the image into your view with whatever alpha you need via the fraction argument. - Draw the outlines, which I assume you want to be fully opaque, directly into the view. Haven't

NSDictionaryController code example

2010-06-09 Thread vincent habchi
Hi again, like some other before (pfiuh, I'm not alone this time!), I have some difficulties to fully grasp the way NSDictionaryController works (especially how to subclass -newObject to fit my needs). Does anybody, by chance, have a sample code that would demonstrate some basic use? I

Re: Erasing drawn content

2010-06-09 Thread Alastair Houghton
On 9 Jun 2010, at 20:15, Paul Kim wrote: I might as well take a stab at this: - Draw into an NSImage, filling the shapes as fully opaque. A transparency layer would be better. However, this doesn't really deal with the underlying problem that WebKit rendering is hairy and so you're taking

Problem opening large files into NSDocument

2010-06-09 Thread Pascal Harris
Weird one this - especially since I can't find any documentation which covers it. I'm trying open a (very) large file (4GB) into an NSDocument. Small files open file. The monster fails with the error: The document test.pst could not be opened. The file is too large. What gives - and how

Re: Erasing drawn content

2010-06-09 Thread Matej Bukovinski
Yep that didi it. Thanks for proving me wrong Quincey. Here's a working solution: // Overlay View - (void)drawRect:(NSRect)drawRect { [NSGraphicsContext saveGraphicsState]; // Draw all anotations, make sure _annotations is sorted front-to-back for (Annotation *a in

Question about scaling text within a subView

2010-06-09 Thread Eric E. Dolecki
I have a view that contains text in it. I am scaling it up and down... When at 100% the text is nice and crisp. When scaled, it's blurry (the default state for the view). How can I fix that? Would I need to set the text again at a specific size each time the animation is complete?

Re: Problem opening large files into NSDocument

2010-06-09 Thread David Duncan
Is your application 32-bit? Are you trying to load the entire file into memory if you are? If so that would be why you are getting that error. -- David Duncan On Jun 9, 2010, at 12:56 PM, Pascal Harris 45rpmli...@googlemail.com wrote: Weird one this - especially since I can't find any

Adding objects from one array to another and and Key Value Observing

2010-06-09 Thread Mazen M. Abdel-Rahman
Hi All, I have a view class that observes changes in a model class's array via KVO. Unfortunately - when ever the array is updated - the updates are sent to the view one at at a time. In my model class I have the following line: NSMutableArray * eventsArrayProxy = [self

Re: Problem opening large files into NSDocument

2010-06-09 Thread Jens Alfke
On Jun 9, 2010, at 12:56 PM, Pascal Harris wrote: I'm trying open a (very) large file (4GB) into an NSDocument. Small files open file. The monster fails with the error: The document test.pst could not be opened. The file is too large. What gives - and how do I overcome it? What is

Re: KVO oddity (or am I *really* idiot ?)

2010-06-09 Thread Joanna Carter
Hi Vincent Thanks Kyle. As I said (privately) to Graham... No you didn't. I got that message with the list in the CC field. :-) Joanna -- Joanna Carter Carter Consulting ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Question about scaling text within a subView

2010-06-09 Thread Matej Bukovinski
By applying a CGAffineTransform you're basically doing a pixel operation. The pixels from your normally (100%) scaled view are taken and modified by the transformation matrix. Scaling up this way produces blurry results, that's an universal truth. If you need sharp results on both scales

Re: Erasing drawn content

2010-06-09 Thread Quincey Morris
On Jun 9, 2010, at 13:00, Matej Bukovinski wrote: // Overlay View - (void)drawRect:(NSRect)drawRect { [NSGraphicsContext saveGraphicsState]; // Draw all anotations, make sure _annotations is sorted front-to-back for (Annotation *a in _annotations) { [a

Re: Erasing drawn content

2010-06-09 Thread Matej Bukovinski
I see a couple of minor issues with this: 1. I don't think it's necessary or desirable to save/restore the graphics state around the drawRect: behavior, because I believe that's done for you around the drawRect: invocation itself. You'd only need it if you had other non-clipped drawing

Re: Question about scaling text within a subView

2010-06-09 Thread Jens Alfke
On Jun 9, 2010, at 1:45 PM, Matej Bukovinski wrote: If you need sharp results on both scales don't apply a CGAffineTransform but rather increase your views frame and redraw everything as needed. You actually need to mess with the view’s bounds after changing the frame, otherwise you get

Re: get the selection in an NSOutlineView

2010-06-09 Thread Rua Haszard Morris
Thanks all, itemForRow was the missing piece of the puzzle. Now this thing makes sense.. At the time you call -selectedRowIndexes, you should then extract the items corresponding to those indexes from your data model (e.g. using [NSArray objectsAtIndexes:]) before the user has a chance to

Re: Adding objects from one array to another and and Key Value Observing

2010-06-09 Thread Quincey Morris
On Jun 9, 2010, at 13:19, Mazen M. Abdel-Rahman wrote: I have a view class that observes changes in a model class's array via KVO. Unfortunately - when ever the array is updated - the updates are sent to the view one at at a time. In my model class I have the following line:

Re: Adding objects from one array to another and and Key Value Observing

2010-06-09 Thread Ken Thomases
On Jun 9, 2010, at 3:19 PM, Mazen M. Abdel-Rahman wrote: I have a view class that observes changes in a model class's array via KVO. Unfortunately - when ever the array is updated - the updates are sent to the view one at at a time. In my model class I have the following line:

Re: Adding objects from one array to another and and Key Value Observing [SOLVED]

2010-06-09 Thread Mazen M. Abdel-Rahman
Thanks Ken, I was able to solve the problem by not using NSMutableArray's addObjectsFromArray method. Instead I replaced it with: NSMutableArray * eventsArrayProxy = [self mutableArrayValueForKey:@events]; NSRange range = NSMakeRange([events count], [appointments count]);

Snow Leopard help bundle

2010-06-09 Thread Shane
I'm trying to create a Snow Leopard help bundle, but can't figure out what I've got wrong. I'm trying to follow the example in the second ed. of Vermont Recipes. Just wanting to get the title page working first. 1) I've created a folder in Finder for my help book w/ the following sub-folders.

application's menu item name always appears lowercase

2010-06-09 Thread Shane
Hi all, Is there any reason why … in my MainMenu.xib I change the way my projects main menu appears by using Uppercase characters for the application name menu item (very first item). Yet when I save the *.xib and rebuild and run my application, the applications name *always* appears in lower

Re: application's menu item name always appears lowercase

2010-06-09 Thread Kyle Sluder
On Jun 9, 2010, at 5:58 PM, Shane software.research.developm...@gmail.com wrote: Hi all, Is there any reason why … in my MainMenu.xib I change the way my projects main menu appears by using Uppercase characters for the application name menu item (very first item). Yet when I save the

Re: Snow Leopard help bundle

2010-06-09 Thread Kyle Sluder
On Jun 9, 2010, at 5:46 PM, Shane software.research.developm...@gmail.com wrote: I'm trying to create a Snow Leopard help bundle, but can't figure out what I've got wrong. I'm trying to follow the example in the second ed. of Vermont Recipes. Just wanting to get the title page working first.

Re: application's menu item name always appears lowercase

2010-06-09 Thread Ken Thomases
On Jun 9, 2010, at 8:04 PM, Kyle Sluder wrote: For Cocoa apps, the title of the application menu always matches the localized name of the app. Which is obtained from the Info.plist and InfoPlist.strings files. The CFBundleName key. Technical QA QA1544 Obtaining the localized application

home-rolled notification center... I think?

2010-06-09 Thread Andy Lee
Sorry for a vague question, but... a while back there was a discussion of (I *think*) NSNotificationCenter. Whatever it was, someone wrote their own version and was happy with the results. Can anyone (like, say the author) refresh my memory on what that was, and the motivation for writing the

Re: home-rolled notification center... I think?

2010-06-09 Thread Jerry Krinock
On 2010 Jun 09, at 19:02, Andy Lee wrote: Sorry for a vague question, but... a while back there was a discussion of (I *think*) NSNotificationCenter. You may be thinking of Mike Ash's MAKVONotificationCenter. However, this is a replacement for KVO, providing kind of a KVO Notification