Re: Async NSURLConnection - Crashes - Call Stacks

2010-04-19 Thread Jeff Johnson
Hi Jerry. I don't know about the FTP crash, but I believe that the other two crashes are due to a 10.6.3 regression. I've filed "10.6.3 Regression? Reproducible NSURLConnection crash with 301 redirects". For more information and a sample Xcode project demonstrating the crash, see this ClickTo

Async NSURLConnection - Crashes - Call Stacks

2010-04-19 Thread Jerry Krinock
I can find in the list archives for 2005-2007 quite a few mentions of crashes when using asynchronous NSURLConnection, and in 2005 I myself reported Problem ID 4347324. The crashes seemed to stop without a definitive resolution, possibly with Mac OS 10.5, but have reappeared in my apps recently

An iTunes-like music playing view?

2010-04-19 Thread Chase Meadors
Hi All, I just wanted to hit up the list with this one before sitting down and coding. Has anyone made or know of a Cocoa music player view, with movable slider & All, text, somewhat similar in functionality to the iTunes view at the top of the window? QTMovieView is a bit too bland for my

Re: where is the basic NSString literal escape documentation?

2010-04-19 Thread Aki Inoue
\u and \U formats (or universal character names ) are part of C99 standard. Aki On Apr 19, 2010, at 6:11 PM, Matt Neuburg wrote: > > On Apr 19, 2010, at 6:02 PM, Kyle Sluder wrote: > >> On Mon, Apr 19, 2010 at 5:44 PM, Matt Neuburg wrote: >>> Supposing you were a complete C / Obj

Re: where is the basic NSString literal escape documentation?

2010-04-19 Thread Matt Neuburg
On Apr 19, 2010, at 6:02 PM, Kyle Sluder wrote: > On Mon, Apr 19, 2010 at 5:44 PM, Matt Neuburg wrote: >> Supposing you were a complete C / Objective-C beginner. How would you find >> out what escape sequences are permitted in an NSString literal (that is, >> with @"...")? For example, K&R doesn

Re: where is the basic NSString literal escape documentation?

2010-04-19 Thread Kyle Sluder
On Mon, Apr 19, 2010 at 5:44 PM, Matt Neuburg wrote: > Supposing you were a complete C / Objective-C beginner. How would you find > out what escape sequences are permitted in an NSString literal (that is, > with @"...")? For example, K&R doesn't know about \u (backslash-u > followed by four he

where is the basic NSString literal escape documentation?

2010-04-19 Thread Matt Neuburg
Supposing you were a complete C / Objective-C beginner. How would you find out what escape sequences are permitted in an NSString literal (that is, with @"...")? For example, K&R doesn't know about \u (backslash-u followed by four hex digits), but of course that is now legal (though it was not

Re: using coregraphics with vector art from illustrator

2010-04-19 Thread Ken Ferry
On Mon, Apr 19, 2010 at 4:31 PM, Jens Alfke wrote: > > On Apr 19, 2010, at 3:54 PM, Philip Mobley wrote: > > Would that make a opaque white box around the shape? What about >> transparency... would that be retained or would it be flattened? >> > > No, there's no frame. It gets drawn as a PDF, s

Re: using coregraphics with vector art from illustrator

2010-04-19 Thread Jens Alfke
On Apr 19, 2010, at 3:54 PM, Philip Mobley wrote: Would that make a opaque white box around the shape? What about transparency... would that be retained or would it be flattened? No, there's no frame. It gets drawn as a PDF, so it uses whatever compositing is specified in the source. Lo

Re: using coregraphics with vector art from illustrator

2010-04-19 Thread Philip Mobley
On Apr 19, 2010, at 2:49 PM, Jens Alfke wrote: >> Is there perhaps a way to create vector art paths in illustrator, and import >> the data into xcode and use those paths in CG and stroke/fill them there? > > Save the path as a PDF file, and then load and draw it as an image. Would that make a o

Re: using coregraphics with vector art from illustrator

2010-04-19 Thread Jens Alfke
On Apr 19, 2010, at 1:59 PM, Patrick J. Collins wrote: Is there perhaps a way to create vector art paths in illustrator, and import the data into xcode and use those paths in CG and stroke/fill them there? Save the path as a PDF file, and then load and draw it as an image. —Jens__

Re: using coregraphics with vector art from illustrator

2010-04-19 Thread Nick Zitzmann
On Apr 19, 2010, at 2:59 PM, Patrick J. Collins wrote: > I have an app that I am using CoreGraphics to draw music notation symbols, and > I want to keep things perfectly scalable (for zooming), and am just wondering > what the best way to go about this is... Either do your drawing using Bezier p

using coregraphics with vector art from illustrator

2010-04-19 Thread Patrick J. Collins
Hi everyone, I have an app that I am using CoreGraphics to draw music notation symbols, and I want to keep things perfectly scalable (for zooming), and am just wondering what the best way to go about this is... Is there perhaps a way to create vector art paths in illustrator, and import the data

Re: Text file

2010-04-19 Thread Henrietta Read
That's a good idea, thank you! :) On Sun, Apr 18, 2010 at 12:41 PM, Jens Alfke wrote: > > On Apr 18, 2010, at 12:40 AM, Henrietta Read wrote: > > > exactly the point germane, but in perusing NSString.h one is given to > understand this method might not be as 'smart' as one could wish: > > I w

Re: Questions about 2D drawing in Cocoa

2010-04-19 Thread Rob Ross
Books: This is pretty definitive: http://www.amazon.com/Programming-Quartz-Graphics-Kaufmann-Computer/dp/0123694736/ref=sr_1_1?ie=UTF8&s=books&qid=1231668829&sr=1-1 This is much shorter, but a good quick start: http://www.amazon.com/Quartz-2D-Graphics-Mac-Developers/dp/0321336631/ref=sr_1_2?ie

Questions about 2D drawing in Cocoa

2010-04-19 Thread Philip Mobley
I am fairly new to Cocoa, and so I have 2 questions I would appreciate some feedback. For a beginner, Cocoa suffers from the "too much info" problem and its often difficult to find the answers to seemly simple questions. I have had better luck learning from books, and have purchased the follow

NSXMLDocument objectByApplyingXSLT with XSL Include

2010-04-19 Thread Kristof Van Landschoot
Hi all, I'm having some trouble with XSL-processing when there are stylesheets that include other stylesheets relatively. (the XML-files may be irrelevant but are included for completeness - code is at the bottom). Given the XML-file: Edward Jenner Gertrude

Re: Baffling Button Behavior

2010-04-19 Thread Keary Suska
On Apr 19, 2010, at 10:02 AM, k...@highrolls.net wrote: > Per Fritz suggestion / request: > > (gdb) po sender > <<= Save Button > (gdb) call (id) [sender superview] > $3 = (id) 0x1183540 > (gdb) po $3 > > (gdb) call (int) [sender autoresizingMask] > $4 = 36 <<= NSViewMaxXMargin = 4 & NSViewMaxY

Re: Introspecting the current method

2010-04-19 Thread Jean-Daniel Dupas
Le 19 avr. 2010 à 20:54, Greg Parker a écrit : > On Apr 18, 2010, at 7:01 PM, Ken Thomases wrote: >> On Apr 18, 2010, at 7:14 PM, Dave DeLong wrote: >>> If I'm inside a method, is there a way to know at runtime whether that >>> method is a class or an instance method? >> >> Keep in mind that cl

Re: Introspecting the current method

2010-04-19 Thread Greg Parker
On Apr 18, 2010, at 7:01 PM, Ken Thomases wrote: > On Apr 18, 2010, at 7:14 PM, Dave DeLong wrote: >> If I'm inside a method, is there a way to know at runtime whether that >> method is a class or an instance method? > > Keep in mind that class methods are just instance methods, where the instanc

Re: Introspecting the current method

2010-04-19 Thread Greg Parker
On Apr 19, 2010, at 7:09 AM, Michael Ash wrote: > On Mon, Apr 19, 2010 at 3:27 AM, Jean-Daniel Dupas > wrote: >> >> Le 19 avr. 2010 à 04:21, Michael Ash a écrit : >>> On Sun, Apr 18, 2010 at 10:15 PM, Dave DeLong wrote: Yes, code should obviously be written with this knowledge in mind. The

Re: Baffling Button Behavior

2010-04-19 Thread koko
Per Fritz suggestion / request: (gdb) po sender <<= Save Button (gdb) call (id) [sender superview] $3 = (id) 0x1183540 (gdb) po $3 (gdb) call (int) [sender autoresizingMask] $4 = 36 <<= NSViewMaxXMargin = 4 & NSViewMaxYMargin = 32 (gdb) c Continuing. (gdb) po sender <<= Save As Button (gdb) ca

CalendarStore Question

2010-04-19 Thread Mazen M. Abdel-Rahman
Hi All, I am having difficulty with modifying recurring events in iCal using the Calendar Store framework. I can take a single event (non recurring) event and make it repeating - including specifying an end date or number of repeats. To do that I use the following line: [[CalCalendarStore d

Re: "iPhone Programming For OS X Coders"?

2010-04-19 Thread Michael A. Crawford
Sorry for chiming in late, Jens. Been busy. I like "Cocoa Touch for iPhone OS 3" by Jiva Devoe and The iPhone Developer's Cookbook by Erica Sadun. Both focus specifically on UIKit elements with very little overlap to the desktop. Exceptions are CoreData and NSURLConnect/NSURLRequest. Still

Re: Converting an afp:NSURL to a filesystem path - or - Ya can't get there from here...

2010-04-19 Thread James Bucanek
Kevin Wojniak wrote (Sunday, April 18, 2010 1:29 AM -0700): If that doesn't work, you could try looping through the mounted volumes and check each one for a matching URL with FSCopyURLForVolume(). I might try that too, just to see if the URL returned by FSCopyUR

Re: Converting an afp:NSURL to a filesystem path - or - Ya can't get there from here...

2010-04-19 Thread James Bucanek
Ken Thomases wrote (Saturday, April 17, 2010 5:29 PM -0500): On Apr 17, 2010, at 6:46 PM, James Bucanek wrote: For backwards compatibility, the notification still includes an NSDevicePath value, but that value is wrong for AFP volumes. For example, in 10.5 mount

Re: Converting an afp:NSURL to a filesystem path - or - Ya can't get there from here...

2010-04-19 Thread James Bucanek
Kyle Sluder wrote (Saturday, April 17, 2010 4:55 PM -0700): > On Sat, Apr 17, 2010 at 4:46 PM, James Bucanek > wrote: > > The path "/Dinah" is (obviously) invalid. > > Actually, it's annoyingly not invalid. Finder > Go To URL > "/Dinah" > will actually work. It r

Re: Introspecting the current method

2010-04-19 Thread Roy Lovejoy
Take a look at __PRETTY_FUNCTION__ - it includes the C++ class or the Obj-C class depending.. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-d

Re: Introspecting the current method

2010-04-19 Thread Michael Ash
On Mon, Apr 19, 2010 at 3:27 AM, Jean-Daniel Dupas wrote: > > Le 19 avr. 2010 à 04:21, Michael Ash a écrit : > >> On Sun, Apr 18, 2010 at 10:15 PM, Dave DeLong wrote: >>> Yes, code should obviously be written with this knowledge in mind.  The use >>> case I have for it is for macros.  I like to

Re: blocks and autorelease weirdness

2010-04-19 Thread Ken Ferry
On Mon, Apr 19, 2010 at 3:09 AM, Henk Kampman wrote: > > On 19 apr 2010, at 11:41, Jean-Daniel Dupas wrote: > > > > > > > Le 19 avr. 2010 à 11:35, Henk Kampman a écrit : > > > >> Have a look at the following code > >> > >> -(void) test > >> { > >> testString = NULL; > >> > >> dispatch_as

Re: blocks and autorelease weirdness

2010-04-19 Thread Julien Jalon
And of course, I need some rest: On Mon, Apr 19, 2010 at 12:38 PM, Julien Jalon wrote: > I have to add that *you can't assume* using dispatch_async on main queue > within an NSApp will automatically drain the autorelease pool. > > AppKit drains the autorelease pool upon NSEvents dispatch. > > >

Re: blocks and autorelease weirdness

2010-04-19 Thread Julien Jalon
I have to add that using dispatch_async on main queue within an NSApp will automatically drain the autorelease pool. AppKit drains the autorelease pool upon NSEvents dispatch. On Mon, Apr 19, 2010 at 12:36 PM, Julien Jalon wrote: > I don't see anything wrong with the output being 1/2: > > -(voi

Re: blocks and autorelease weirdness

2010-04-19 Thread Julien Jalon
I don't see anything wrong with the output being 1/2: -(void) test { testString = NULL; dispatch_async(dispatch_get_global_queue(0, 0), ^{ dispatch_async(dispatch_get_main_queue(), ^{ NSString* aString = [[NSMutableString alloc] init];* // reta

Re: blocks and autorelease weirdness

2010-04-19 Thread Henk Kampman
On 19 apr 2010, at 11:41, Jean-Daniel Dupas wrote: > > > Le 19 avr. 2010 à 11:35, Henk Kampman a écrit : > >> Have a look at the following code >> >> -(void) test >> { >> testString = NULL; >> >> dispatch_async(dispatch_get_global_queue(0, 0), ^{ >> dispatch_async

Re: blocks and autorelease weirdness

2010-04-19 Thread Jean-Daniel Dupas
Le 19 avr. 2010 à 11:35, Henk Kampman a écrit : > Have a look at the following code > > -(void) test > { > testString = NULL; > > dispatch_async(dispatch_get_global_queue(0, 0), ^{ > dispatch_async(dispatch_get_main_queue(), ^{ > >

blocks and autorelease weirdness

2010-04-19 Thread Henk Kampman
Have a look at the following code -(void) test { testString = NULL; dispatch_async(dispatch_get_global_queue(0, 0), ^{ dispatch_async(dispatch_get_main_queue(), ^{ NSString* aString = [[NSMutableString alloc]

Re: Introspecting the current method

2010-04-19 Thread Jack Nutting
On Mon, Apr 19, 2010 at 9:27 AM, Jean-Daniel Dupas wrote: > It is fine for most cases, but __func__ is defined at compile time, and so, > does not log the real type of the instance (if this is a subclass). > Hmmm, that's too bad. Seems to be the case for __FUNCTION__ and __PRETTY_FUNCTION__ as

Re: Introspecting the current method

2010-04-19 Thread Jean-Daniel Dupas
Le 19 avr. 2010 à 04:21, Michael Ash a écrit : > On Sun, Apr 18, 2010 at 10:15 PM, Dave DeLong wrote: >> Yes, code should obviously be written with this knowledge in mind. The use >> case I have for it is for macros. I like to use a debugging macro like the >> following to ensure that method

Re: Carbon is C++?

2010-04-19 Thread Ken Ferry
On Mon, Mar 1, 2010 at 4:03 AM, Greg Parker wrote: > On Feb 28, 2010, at 7:24 PM, Erik Buck wrote: > > I disagree. I have written very low latency device drivers in > Objective-C. Why do you think Objective-C has too much "latency" for audio? > When properly used, Objective-C programs are no m

Re: Warning with an initializer method of AMWorkflow

2010-04-19 Thread Mark Munz
I haven't run into this in such a long time that I completely forgot this could still occur. While I do wish it wasn't necessary to do the cast, it does solve the problem. So this works as expected: AMWorkflow* workflow = [ (AMWorkflow*)[AMWorkflow alloc] initWithContentsOfURL:fileURL error:&crea