Re: [Moderator] Re: starting...

2008-04-26 Thread Scott Anguish
On Apr 25, 2008, at 1:17 PM, Roland King wrote: is there a list in apple somewhere which is restricted to people who are registered developers where this SDK can be discussed? Sorry, not currently, no. ___ Cocoa-dev mailing list

[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

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

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];

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.

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

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

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

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

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: 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

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 get

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: 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 to

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

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

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

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

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

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.

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,

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

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 Foundation/Foundation.h int main() { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSString *path = [@/Folder

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 )

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

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

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?

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

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

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

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