Re: e: setAllowedFileTypes: (or similar) for NSPasteboard

2012-03-05 Thread Rick C.
Thanks all. Yeah I had the validateDrop part, but I guess what I was looking for was UTTypeConformsTo. I think it's under control now thanks for the help! On Mar 5, 2012, at 5:41 AM, David Riggle wrote: > I think you also need to register for the drag types via > -registerForDraggedTypes. I

[ANN] CoreParse (Version n+1)

2012-03-05 Thread Thomas Davie
Hi All, A while ago I showed you all my parsing library 'CoreParse', and got some really useful feedback. Today, I'd like to show you what's changed since then! • Easier processing of syntax trees into your data structures. In earlier versions of CoreParse you had to use a parser delegate t

Re: [ANN] CoreParse (Version n+1)

2012-03-05 Thread Thomas Davie
I'm pretty sure I did this the first time I announced CoreParse too >.< Thanks for the suggestion Uli: https://github.com/beelsebob/CoreParse Tom Davie if (*ra4 != 0xffc78948) { return false; } On 5 Mar 2012, at 13:45, Uli Kusterer wrote: > On 05.03.2012, at 12:09, Thomas Davie wrote: >> A whil

notAKeyMarker crash

2012-03-05 Thread Gideon King
Hi, I am getting occasional reports of an exception from users of my software, but they are not able to reproduce it, and nor am I. I have a sheet which has an NSCollectionView on it and a couple of buttons and a slider. The NIB also instantiates an array controller which is used as the content

[MEET] Toronto Cocoaheads / tacow - March 13

2012-03-05 Thread Karl Moskowski
tacow's next meeting is scheduled for 6:30 PM on Tuesday, March 13, 2012 in room 310 of Metro Hall. This is the first meeting on our new every-other-month schedule. Details, directions, etc. at . All are welcome, and we look forward to seeing you there. Karl Moskowski

Releasing WSMethodInvocationInvoke()

2012-03-05 Thread Ian was here
I'm having an issue with the following line of code: NSDictionary*serviceResult = (NSDictionary *)WSMethodInvocationInvoke( serviceCall ); [serviceResult release]; According to the documentation and the WSMethodInvocation.h header file, it is the caller's responsibility to release the returne

Re: How are views supposed to reload after being nillified by memory warnings?

2012-03-05 Thread David Duncan
On Mar 3, 2012, at 8:57 AM, Matt Neuburg wrote: > On Fri, 02 Mar 2012 10:17:43 -0800, David Duncan > said: >> On Mar 2, 2012, at 1:28 AM, G S wrote: >> >> In the vast majority of cases where I've seen this behavior, it is because >> in your delegate handler for the UIImagePickerController, you

NSURLRequests and Firewalls

2012-03-05 Thread Alex Zavatone
I just found out why some JSON parsing was failing, the data returned from the NSURLRequest was the HTML for our firewall authentication page. Is there an established practice or set of documents on the iOS Dev Lib that shows how to handle this? I scanned the sample code and found nothing. Se

Re: NSURLRequests and Firewalls

2012-03-05 Thread Mike Abdullah
On 5 Mar 2012, at 19:21, Alex Zavatone wrote: > I just found out why some JSON parsing was failing, the data returned from > the NSURLRequest was the HTML for our firewall authentication page. You mean NSURLConnection right? URL requests themselves are purely data objects, they don't do any ne

Convert PDF CGContextRef to NSView for hi-res printing

2012-03-05 Thread Gilles Celli
Hi, I'm stuck on a problem on how to print high resolution graphs on Mac OS X, by using the wonderful CorePlot (1) framework. I've asked on the Coreplot mailing list but no answer...maybe it's too obvious that I don't see the tree in the forest: My method produces a CGContextRef (with CGPDFCont

Re: NSURLRequests and Firewalls

2012-03-05 Thread Erik Stainsby
I think generally a firewall ought to return an http status code of 302 redirected which you could probably key off for a login handler. Time Dwarf, Roaring Guy On 2012-03-05, at 11:21 AM, Alex Zavatone wrote: > I just found out why some JSON parsing was failing, the data returned from > the

Re: NSURLRequests and Firewalls

2012-03-05 Thread Alex Zavatone
Yeah, at this facility, I get a web page asking to log in with auth parameters, so it's going to be interesting. Using the simulator, even if I enter the auth parameters in Safari, I'll run the app again from Xcode and get the same HTML telling me that permission was denied and asking for auth

Re: NSURLRequests and Firewalls

2012-03-05 Thread Jens Alfke
On Mar 5, 2012, at 11:21 AM, Alex Zavatone wrote: > I just found out why some JSON parsing was failing, the data returned from > the NSURLRequest was the HTML for our firewall authentication page. Well that sucks. I believe a more correct response would have been 407Proxy Authentication Requir

Re: Releasing WSMethodInvocationInvoke()

2012-03-05 Thread Gus Mueller
On Mar 5, 2012, at 9:43 AM, Ian was here wrote: > I'm having an issue with the following line of code: > > NSDictionary*serviceResult = (NSDictionary *)WSMethodInvocationInvoke( > serviceCall ); > > [serviceResult release]; > > > According to the documentation and the WSMethodInvocation.h hea

Re: Convert PDF CGContextRef to NSView for hi-res printing

2012-03-05 Thread Graham Cox
On 06/03/2012, at 7:13 AM, Gilles Celli wrote: > Hi, > > I'm stuck on a problem on how to print high resolution graphs on Mac OS X, by > using the wonderful CorePlot (1) framework. > I've asked on the Coreplot mailing list but no answer...maybe it's too > obvious that I don't see the tree in t

Re: NSURLRequests and Firewalls

2012-03-05 Thread Alex Zavatone
On Mar 5, 2012, at 3:13 PM, Mike Abdullah wrote: > > On 5 Mar 2012, at 19:21, Alex Zavatone wrote: > >> I just found out why some JSON parsing was failing, the data returned from >> the NSURLRequest was the HTML for our firewall authentication page. > > You mean NSURLConnection right? URL req

Re: Convert PDF CGContextRef to NSView for hi-res printing

2012-03-05 Thread Wim Lewis
On 5 Mar 2012, at 12:13 PM, Gilles Celli wrote: > I'm stuck on a problem on how to print high resolution graphs on Mac OS X, by > using the wonderful CorePlot (1) framework. > I've asked on the Coreplot mailing list but no answer...maybe it's too > obvious that I don't see the tree in the forest

Re: How are views supposed to reload after being nillified by memory warnings?

2012-03-05 Thread G S
> > No. But if you've presented a modal view controller, your entire view > hierarchy (self.view) has been ripped out of the window, and if a memory > warning arrives, then self.view will be set to nil. What happens next > depends on if you implemented -viewDidUnload properly or if your view > refe

Re: How are views supposed to reload after being nillified by memory warnings?

2012-03-05 Thread David Duncan
On Mar 5, 2012, at 3:40 PM, G S wrote: > No. But if you've presented a modal view controller, your entire view > hierarchy (self.view) has been ripped out of the window, and if a memory > warning arrives, then self.view will be set to nil. What happens next depends > on if you implemented -view

Re: Unclear on -initWithBytesNoCopy:

2012-03-05 Thread Wade Tregaskis
Perhaps the only 'correct' solution to this problem is to fall back to the CFString level, where you can pass a custom CFAllocator to e.g. CFStringCreateWithBytesNoCopy(). That way the lifetime is effectively managed by the CFString, so it should behave correctly in all cases. 'course, the imp

Re: notAKeyMarker crash

2012-03-05 Thread Mike Abdullah
-[OAApplication beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:] That's definitely not part of Cocoa! You have the source. Dig in to find the problem. On 5 Mar 2012, at 15:15, Gideon King wrote: > Hi, I am getting occasional reports of an exception from users of my > softw

Re: How are views supposed to reload after being nillified by memory warnings?

2012-03-05 Thread G S
Well, at any rate, I have no such subview property. I've also found that among my series of modal presentations, there's a view that's displayed modally, whose user interaction works just fine, but whose viewWillAppear and viewWillDisappear methods are never called. As far as I know, it could be

Re: Releasing WSMethodInvocationInvoke()

2012-03-05 Thread Ian was here
Interesting. If that's the case, then the documentation for that method is correct, the caller is responsible for freeing the returned object. I will file a bug report. Thanks. - Original Message - From: Gus Mueller To: Cocoa mailing list Cc: Sent: Monday, March 5, 2012 1:44 PM Sub

Re: Unclear on -initWithBytesNoCopy:

2012-03-05 Thread Wim Lewis
On 3 Mar 2012, at 12:24 PM, Jens Alfke wrote: > On Mar 3, 2012, at 11:28 AM, Dave Keck wrote: > >> The buffer needs to remain intact until the NSString/NSData object is >> deallocated. > > True; but a strict interpretation of this is that the buffer can _never_ be > destroyed, because you can

Re: Unclear on -initWithBytesNoCopy:

2012-03-05 Thread Charles Srstka
On Mar 3, 2012, at 3:03 PM, Eli Bach2 wrote: > > On Mar 3, 2012, at 12:15 PM, Jens Alfke wrote: > >> I filed a bug report* saying that this substring optimization shouldn’t be >> used if the source string uses an external buffer, just as it shouldn’t if >> the source string is mutable. They fi

Re: Unclear on -initWithBytesNoCopy:

2012-03-05 Thread Charles Srstka
On Mar 5, 2012, at 6:40 PM, Wade Tregaskis wrote: > Perhaps the only 'correct' solution to this problem is to fall back to the > CFString level, where you can pass a custom CFAllocator to e.g. > CFStringCreateWithBytesNoCopy(). That way the lifetime is effectively > managed by the CFString, so

Re: Unclear on -initWithBytesNoCopy:

2012-03-05 Thread Wade Tregaskis
> I’m not sure I’d want that either, though. If the original string was a > 200-page dissertation and you took a one-word substring from it, it doesn’t > seem reasonable to keep the whole 200-page dissertation all in RAM just to > keep the one-word substring around. But that's a very old probl

Re: notAKeyMarker crash

2012-03-05 Thread Gideon King
Ah, of course - silly me. Working on assumptions instead of using my eyes. So the relevant code is this: NSMapInsertKnownAbsent(windowsForSheets, sheet, docWindow); and seeing as windowForSheets is created with: windowsForSheets = NSCreateMapTable(NSObjectMapKeyCallBacks, NSOb

Efficiency Question...

2012-03-05 Thread R
I want to blend two colors as a background. I'm adding a layer using CAGradient layer, starting on the left with blue alpha=1. and ending on the right with blue alpha=0. I then add another layer using red on the left with alpha=0. and ending on the right with alpha=1. I wonder if it is best to d

How do we know if iCloud actually contains a key/value pair?

2012-03-05 Thread G S
When our iPhone app is launched for the first time, it checks the user's iCloud account to see if he has installed our app on another device. If so, he'll have a unique ID that we've stored in his iCloud account, which is a database key that we use to manage his online content. We grab it and sto

Re: notAKeyMarker crash

2012-03-05 Thread Kyle Sluder
On Mar 5, 2012, at 10:01 PM, Gideon King wrote: > Ah, of course - silly me. Working on assumptions instead of using my eyes. > > So the relevant code is this: >NSMapInsertKnownAbsent(windowsForSheets, sheet, docWindow); > and seeing as windowForSheets is created with: >windowsFor