Re: Core Animation Flickering

2008-04-26 Thread Colin Cornaby
Just an update on this issue... Everything looked fine in the console when I enabled that debug switch. However, I've sidestepped the issue and created an alternate implementation that does not flicker. Drawing manually in a CALayer had other challenges, such as not doing synchronized drawi

Re: A cursor bug in DragItemAround example

2008-04-26 Thread an0
> My guess is that the cursor you set is getting changed back to the > arrow by the cursorUpdate: method of another view. > > IIRC, you have a NSScrollView whose document view (view A) is > something like a canvas, and has some smaller subviews (each a view B) > that are like graphic objects on the

Re: Debugger at odds with reality?

2008-04-26 Thread Colin Cornaby
This might be a stupid question, but the person who is building against your framework is using a debug version as opposed to a release version, correct? On Apr 26, 2008, at 6:20 AM, Graham Cox wrote: I have a funny problem which is proving difficult to fix. I have a framework which I've w

Re: Observer CoreData Objects changes

2008-04-26 Thread Ben Lachman
I'm not completely clear on what you're wanting, but you might try this: •Have your controller observe the managed object context's NSManagedObjectContextObjectsDidChangeNotification, the userinfo of this note contains the key NSInsertedObjectsKey and NSDeletedObjectsKey which should let yo

Re: How to import drawing paths into a Cocoa application?

2008-04-26 Thread Jens Alfke
On 26 Apr '08, at 7:24 PM, John C. Randolph wrote: I've asked several math majors over the years if they could give me an exact function for the length of a bezier curve. They've generally told me it was possible, but none of them actually produced it. A math major's notion of "an exac

Re: Calculating file size

2008-04-26 Thread Jens Alfke
On 26 Apr '08, at 6:50 PM, Cocoa Dev wrote: I was wondering what was the best way to calucate folder size with cocoa? I was able to do this but it does not include resource forks: I think you'll need to drop down to a lower-level API to get the resource fork size; probably one of the "*Ca

Re: How to import drawing paths into a Cocoa application?

2008-04-26 Thread Graham Cox
On 27 Apr 2008, at 12:24 pm, John C. Randolph wrote: On Apr 21, 2008, at 5:35 PM, Graham Cox wrote: - (NSPoint) pointOnPathAtLength:(float) length slope:(float*) slope; I notice that your lengthOfBezier() function does an approximation similar to what we'd get in postscript by executi

Re: Problem with bindings to user defaults

2008-04-26 Thread Jerry Krinock
On 2008 Apr, 26, at 19:32, Bob Smith wrote: Am I doing something wrong when setting up the bindings? Is there some other way to edit a list of values without using a table? Is this just a limitation in bindings to a table? I've been through the docs and examples but never found any clue

Re: NSLog() replacement for debugger output

2008-04-26 Thread Rob Petrovec
On Apr 24, 2008, at 4:54 PM, Ken Thomases wrote: The do-while-false pattern is only necessary if you've got multiple statements or are otherwise surrounding the statements with braces. On Apr 24, 2008, at 5:43 PM, Herb Petschauer wrote: What happens in a release build in this situation? if

Problem with bindings to user defaults

2008-04-26 Thread Bob Smith
I have an array of simple values, i.e. NSStrings or NSDates, and I want to store that array in user defaults. I also want the array to be editable in the preferences UI. I set up a single-column table and bind the table column to an NSArrayController instance that is bound to the desire

Re: How to import drawing paths into a Cocoa application?

2008-04-26 Thread John C. Randolph
On Apr 21, 2008, at 5:35 PM, Graham Cox wrote: - (NSPoint) pointOnPathAtLength:(float) length slope:(float*) slope; I notice that your lengthOfBezier() function does an approximation similar to what we'd get in postscript by executing flattenpath and then adding up the lengths of the

Re: NSBezier Artifacts

2008-04-26 Thread John C. Randolph
On Apr 25, 2008, at 10:18 PM, Aaron Wallis wrote: I've been having a fair few issues with NSBezier boxes lately (a.k.a boxes with rounded corners) I've created a NSView subclass that contains the following code, then threw a few on a window with some controls over the top: - ( void ) draw

Calculating file size

2008-04-26 Thread Cocoa Dev
Hello, I was wondering what was the best way to calucate folder size with cocoa? I was able to do this but it does not include resource forks: #import int main() { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSString *path = [@"/Folder" stringByExpandingTildeInPath]; NSDir

Re: How to import drawing paths into a Cocoa application?

2008-04-26 Thread Steve Weller
On Apr 21, 2008, at 5:23 PM, Steve Weller wrote: I my app I want to be able to use drawing paths for two purposes: 1. Clip images to the path 2. Generate points that lie on the path as a function of the distance along the path I want to be able to create paths with Omnigraffle or some ot

Re: Problem with Memory Leaks

2008-04-26 Thread Jere Gmail
Well, It seems to be a known bug. To solve it just replaced the call to CIContext *context = [[NSGraphicsContext currentContext] CIContext]; with CIContext *context=[CIContext contextWithCGContext: [[NSGraphicsContext currentContext] graphicsPort] options: nil]; On Sun, Apr 27, 2008 at 12:07 AM, J

Re: Problem with Memory Leaks

2008-04-26 Thread Jere Gmail
The call is done with click on a toolbar item, so it's not in a thread. With the copying and releasing m_image thing you are right. Your way is better. Thanks Btw. I found someone with the same problem here, but there must be another answer. http://lists.apple.com/archives/Quartz-dev/2006/Dec/msg

Re: Caching a local file using NSURLCache

2008-04-26 Thread Michael Vannorsdel
I believe it would be more difficult to implement true support for a file protocol in an NSURLCache subclass than to maintain your own dictionary that's saved and read from your own cache file. I don't know of any documentation on the cache file format that NSURLCache uses, I just know it'

Observer CoreData Objects changes

2008-04-26 Thread Dex Morgan
Hello, I need to observe from a controller class when a particular attribute of a NSManagedObject in my persistent store is changed. I've tried with: - (BOOL)validateValue:(id *)value forKey:(NSString *)key error: (NSError **)error in my class. Unfortunatly I need to keep the old value in o

Re: Sheet window as firstResponder

2008-04-26 Thread Sean Murphy
On Apr 25, 2008, at 12:53 PM, Lorenzo Bevilacqua wrote: I'm trying to get keyDown events from the contentView of a sheet window. I overrided the acceptsFirstResponder method to return YES, and added a - (void) keyDown: (NSEvent *) event. The problem is that when the sheet becomes visible a

Re: Problem with Memory Leaks

2008-04-26 Thread Michael Vannorsdel
How do you know there's a leak and do you know what type of object is being leaked? I don't see any obvious leaks in your code snippet. If flip_v is done in a secondary thread and you're not creating an autorelease pool and draining it, then you could have a leak. That's my best guess wi

Problem with Memory Leaks

2008-04-26 Thread Jere Gmail
I've an image loaded into memory and I want to flip it. The problem is that when I do it some memory is leaked. I've searched and sliced the code but can't find where it is. Maybe someone can help. The function I call is flip. If I call flip_v or needsDisplay only no leak happens, but when both a

Re: Not showing window at Document-Based application

2008-04-26 Thread Jere Gmail
Thanks. It worked. On Sat, Apr 26, 2008 at 1:34 PM, Jean-Daniel Dupas <[EMAIL PROTECTED]> wrote: > > > Le 26 avr. 08 à 11:57, Jere Gmail a écrit : > > I have created Document-Based application. The problem is that every > time I run the application an empty document is created. > I don't want this

Re: A cursor bug in DragItemAround example

2008-04-26 Thread Quincey Morris
On Apr 26, 2008, at 08:47, an0 wrote: Thanks. I've tried NSTrackingArea, and it seems a clearer concept and easier to use. However, there are still two problems I can't fix: 1. Setting cursor in initWithFrame: and awakeFromNib does not have effect. So I can't set the initial cursor. 2. Setting

Re: A cursor bug in DragItemAround example

2008-04-26 Thread an0
> Does this sample application still use cursorRects/NSTrackingRects? > Leopard introduced a new mechanism -- NSTrackingArea and cursorUpdate > events -- which doesn't have some of the problems that the old > mechanism supposedly had. > > With NSTrackingArea and cursorUpdate you should be able to g

Re: Debugger at odds with reality?

2008-04-26 Thread Keary Suska
on 4/26/08 7:20 AM, [EMAIL PROTECTED] purportedly said: > I have a funny problem which is proving difficult to fix. > > I have a framework which I've written, and an app which I've written > that uses it. I can debug to my heart's content in both - make a > change in the framework, the change is

Debugger at odds with reality?

2008-04-26 Thread Graham Cox
I have a funny problem which is proving difficult to fix. I have a framework which I've written, and an app which I've written that uses it. I can debug to my heart's content in both - make a change in the framework, the change is reflected in the app, all is well. Now I'm trying to help

Re: radio Button newbie question

2008-04-26 Thread Steven Huey
Alli, Off hand I'm not sure of any sample code, but if you're using the Radio Group from Interface Builder, you'll want to look at the documentation for the NSMatrix class. http://developer.apple.com/documentation/Cocoa/Conceptual/Matrix/Matrix.html In my code I typically set the "tag" val

Re: Not showing window at Document-Based application

2008-04-26 Thread Jean-Daniel Dupas
Le 26 avr. 08 à 11:57, Jere Gmail a écrit : I have created Document-Based application. The problem is that every time I run the application an empty document is created. I don't want this to happen. I want the user to have to open a new one. How can I disable this behaviour? Implements th

Re: Not showing window at Document-Based application

2008-04-26 Thread Quincey Morris
On Apr 26, 2008, at 02:57, Jere Gmail wrote: I have created Document-Based application. The problem is that every time I run the application an empty document is created. I don't want this to happen. I want the user to have to open a new one. How can I disable this behaviour? Take a look a

radio Button newbie question

2008-04-26 Thread Allison Newman
Could somebody please put me out of my misery and tell me where I can find an example of using radio buttons in a Cocoa app please? Or better yet, a tutorial? I have just wasted several hours of my life trying to find one, because I can not make the sodding things to work!! thanks, Alli

Not showing window at Document-Based application

2008-04-26 Thread Jere Gmail
I have created Document-Based application. The problem is that every time I run the application an empty document is created. I don't want this to happen. I want the user to have to open a new one. How can I disable this behaviour? -- http://zon7blog.wordpress.com/ And again we fall.

Re: NSBezier Artifacts

2008-04-26 Thread Aaron Wallis
Oh!! LEGEND!!! That totally fixed the bug! for the record, the following code fixes the artefacts: - ( void ) drawRect: ( NSRect ) rect { NSBezierPath* thePath = [NSBezierPath bezierPath]; [thePath appendBezierPathWithRoundedRect:[self bounds] xRadius:10.0 yRadius:10.0]; [th

Re: NSBezier Artifacts

2008-04-26 Thread Jean-Daniel Dupas
The "rect" arguments is not you whole frame. This is only the rect that need to be redraw. It may be smaller than your view. If you want to fill you view using a rounded rect, so you have to use [self bounds] instead of rect. Le 26 avr. 08 à 07:18, Aaron Wallis a écrit : I've been having a

[Moderator] Re: iphone document syncing

2008-04-26 Thread Scott Anguish
This was just mentioned today discussion of the iPhone SDK is not permitted on this list. In fact, any technology covered by an NDA is not to be discussed here. sorry folks. scott [moderator] On Apr 25, 2008, at 5:24 PM, Mark Manes wrote: Greetings, I do not know if others have come up