Re: When does NSInputStream's -getBuffer:length: actually work?

2012-07-27 Thread Andreas Grosam
On 25.07.2012, at 19:08, Jens Alfke wrote: > NSInputStream has a -getBuffer:length: method that lets you get the available > data from the stream without copying. This is great for performance, and I've > written my client code to take advantage of it if it's supported, but every > time I've t

Re: Debugging -setNeedsDisplayInRect:

2012-07-27 Thread Markus Spoettl
On 7/27/12 5:10 AM, Nick Zitzmann wrote: I've got a view that, according to Quartz Debug, is invalidating a large and unnecessary portion of the view when certain user events happen. The problem is, I have no idea what is causing this to happen. What strategies are best for debugging the -setNee

Re: FSEvents eventid (or perhaps event)'s life

2012-07-27 Thread Robert Martin
The IDs relate to the drive, not the system. If you switch to a back up drive of your data, or re-partition your drive, the last event ID will not match the one you stored in user defaults from another drive. It's also possible to corrupt the FSEvent database that's stored on each drive in the

Trying to capture raw touch events on the trackpad

2012-07-27 Thread Akhil Jindal
Hi all, I'm trying to capture raw touch events on the trackpad to define my own gesture events. I've gone through the documentation here: http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/EventOverview/HandlingTouchEvents/HandlingTouchEvents.html I've set [mView setAcceptsTou

Images with direct memory access

2012-07-27 Thread Vojtěch Meluzín
Hi, I need to create and manipulate an image, which I could access directly from memory and at the same time be able to use system drawing functions for optimization. On Windows I can create a memory bitmap, but it seems it is on possible on Mac, or is it? Note that I don't want to do any conversi

Re: Images with direct memory access

2012-07-27 Thread Graham Cox
On 27/07/2012, at 10:36 PM, Vojtěch Meluzín wrote: > I need to create and manipulate an image, which I could access directly > from memory and at the same time be able to use system drawing functions > for optimization. On Windows I can create a memory bitmap, but it seems it > is on possible on

Re: Debugging -setNeedsDisplayInRect:

2012-07-27 Thread Nick Zitzmann
On Jul 27, 2012, at 2:35 AM, Markus Spoettl wrote: > On 7/27/12 5:10 AM, Nick Zitzmann wrote: >> I've got a view that, according to Quartz Debug, is invalidating a large and >> unnecessary portion of the view when certain user events happen. >> >> The problem is, I have no idea what is causing

Re: Debugging -setNeedsDisplayInRect:

2012-07-27 Thread Curt Clifton
On Jul 27, 2012, at 8:55 AM, Nick Zitzmann wrote: > But I need to be able to see **all** invocations of the method from **all** > NSViews to catch the culprit, because I have a rather complicated view > hierarchy, including some views for which I don't have the source, and I > don't know exact

Problem enumerating a directory

2012-07-27 Thread Mark Allan
Hi all, Apologies for asking a question which has been asked many times before, but I can't seem to find an answer to this particular one. I'm trying to list a directory recursively to build up a snapshot of the contents and store them in a core data DB, but keep running into issues with the d

Re: Problem enumerating a directory

2012-07-27 Thread Kevin Perry
You should probably try -[NSFileManager enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:]. The errorHandler block will give you more detail about any errors that occur in the middle of the enumeration (and give you the ability to ignore them). -KP On Jul 27, 2012, at 9:44 AM, M

Re: Debugging -setNeedsDisplayInRect:

2012-07-27 Thread Kyle Sluder
On Fri, Jul 27, 2012, at 08:55 AM, Nick Zitzmann wrote: > But I need to be able to see **all** invocations of the method from > **all** NSViews to catch the culprit, because I have a rather complicated > view hierarchy, including some views for which I don't have the source, > and I don't know exac

Re: Images with direct memory access

2012-07-27 Thread Ken Thomases
On Jul 27, 2012, at 7:45 AM, Graham Cox wrote: > On 27/07/2012, at 10:36 PM, Vojtěch Meluzín wrote: > >> I need to create and manipulate an image, which I could access directly >> from memory and at the same time be able to use system drawing functions >> for optimization. On Windows I can create

Re: Images with direct memory access

2012-07-27 Thread Jens Alfke
Keep in mind that accessing the image pixels directly can hurt drawing performance. Your code can only access the pixmap if it's in system RAM, while GPU acceleration requires that the pixmap be in VRAM. So messing with the pixels may either cause the pixmap to be copied back and forth, or force

Re: Images with direct memory access

2012-07-27 Thread Eric Wing
On 7/27/12, Jens Alfke wrote: > Keep in mind that accessing the image pixels directly can hurt drawing > performance. Your code can only access the pixmap if it's in system RAM, > while GPU acceleration requires that the pixmap be in VRAM. So messing with > the pixels may either cause the pixmap t