Re: Documents not opening from Finder

2013-03-02 Thread Quincey Morris
On Mar 2, 2013, at 13:17 , "Mills, Steve" wrote: > But I'm not calling runModalPrintOperation, nor do I want to, because we need > to do something completely different at this point. This is the reason I'm > overriding printDocumentWithSettings in the first place. I just need to know > how to

Re: Documents not opening from Finder

2013-03-01 Thread Quincey Morris
On Mar 1, 2013, at 14:59 , Steve Mills wrote: > Sorry, I still consider myself a newbie in Cocoaland. I can add those open > and print overrides to my NSApplicationDelegate, but I only want to be able > to set breakpoints on them but still let the default behavior happen. Since > NSApplication

Re: Documents not opening from Finder

2013-03-01 Thread Quincey Morris
On Mar 1, 2013, at 13:59 , Steve Mills wrote: > I have tons of experience with AppleEvents under Carbon, but none under > Cocoa. Where does that event come in? I think the diversion into Apple Events is something of a red herring, at least at this stage of your debugging. Requests to open and

Re: Convention for init with error

2013-02-27 Thread Quincey Morris
On Feb 27, 2013, at 13:12 , Brad O'Hearne wrote: > - (id)init:(NSError **)error; > { >self = [super init]; > >if (self) >{ >if ([self operationThatMightFail:error]) >{ >*error = nil; >} >else >{ >return nil; >} >

Re: NSSavePanel problem

2013-02-24 Thread Quincey Morris
On Feb 24, 2013, at 09:10 , Kyle Sluder wrote: > If that doesn't clear the problem, try launching your app with the Shift key > held down (or turn on "Don't restore windows" in your Debug scheme's editor, > or set the ApplePersistenceIgnoreState default to YES). Good idea. I'd also try using

Re: NSSavePanel problem

2013-02-23 Thread Quincey Morris
On Feb 23, 2013, at 20:46 , Jon Gary wrote: > Just because a crash happens in an apple framework doesn't mean it's note our > bug. If you can't take the time to run the code with zombies on, it's a > waste of everyone else's time guessing what's going on. Sure, I wasn't intending to suggest

Re: NSSavePanel problem

2013-02-23 Thread Quincey Morris
On Feb 23, 2013, at 18:12 , Andy Lee wrote: > Also, to repeat part of Graham's question: is the window you're attaching the > sheet to a floating window or a regular window? Maybe the sandboxing is > irrelevant. > >> How do you run it as a panel standalone - as opposed to as a sheet ? > > I d

Re: NSFileManager createDirectory… confusing docs.

2013-02-23 Thread Quincey Morris
On Feb 23, 2013, at 07:57 , John Joyce wrote: > The docs do not seem clear on this. (not to me anyway). Yes, they're not clear on this. > If the directory you are creating is also considered an "intermediate parent" > directory, that is just confusing. Presumably, it seemed like a good idea

Re: [OT] Sync vs ASync Server Comms

2013-02-22 Thread Quincey Morris
On Feb 22, 2013, at 08:32 , Dave wrote: > As long as you are not running on the main thread there is no real difference > between a Sync or ASync operation as far as any of the issues you mention > above are concerned. You're correct that, at some level, using synchronous methods on a backgrou

Re: NSOutlineView cell editing behavior

2013-02-08 Thread Quincey Morris
On Feb 7, 2013, at 23:15 , Kyle Sluder wrote: > Subclass NSOutlineView and override -textDidEndEditing: to do the right > thing? (Or whatever the delegate method is that gives you the "movement > reason.") Weirdly, it doesn't get to this delegate method -- nor does *my* delegate ever get mess

Re: NSOutlineView cell editing behavior

2013-02-07 Thread Quincey Morris
On Feb 7, 2013, at 16:00 , Quincey Morris wrote: > Everything works, except for one thing. If I click on a text field to begin > editing, type a few characters, then press Esc, then editing ends, but the > text doesn't revert to what it was before editing began. Well, i

NSOutlineView cell editing behavior

2013-02-07 Thread Quincey Morris
I'm stuck trying to understand a piece of NSOutlineView behavior. Perhaps I'm just missing the obvious solution, but I can't see it. I have an view-based outline view configured as a source list. The list itself uses a data source, not bindings. The table cell view is a subclass of NSTableCellV

Re: KVC and Core Foundation types

2013-02-01 Thread Quincey Morris
On Feb 1, 2013, at 02:21 , Graham Cox wrote: > Well, I might pursue this line of thought if I had a clear understanding of > how to reliably check the type of an arbitrary property. Here are some fragments of the code I use to analyze properties. Note that this is accessing @property informat

Re: KVC and Core Foundation types

2013-01-31 Thread Quincey Morris
On Jan 31, 2013, at 22:54 , Graham Cox wrote: > For the errant CFTypes, I hit -valueForUndefinedKey: and > -setValue:forUndefinedKey:, overridden in this base class. This then checks > whether in fact the selector really is undefined, and if not, it forces the > value to be returned using -per

Re: KVC and Core Foundation types

2013-01-31 Thread Quincey Morris
On Jan 31, 2013, at 21:51 , Kyle Sluder wrote: > All CFTypes are toll-free bridges to NSObject. (I was surprised when I > learned this, and I don't know how far back this holds true.) > GCD objects and XPC objects are NSObjects as of 10.8. Ah, yes, I see now this is so, now that I look. I pre

Re: KVC and Core Foundation types

2013-01-31 Thread Quincey Morris
On Jan 31, 2013, at 21:08 , Kyle Sluder wrote: > But CFTypes *are* NSObjects. Only if they're toll-free bridged, and even then they'll need to conform to NSCoding if they're going to encode/decode automatically. The non-toll-free-bridged ones are memory-managed objects, but not necessarily Obj

Re: Getting file type from Save dlog

2013-01-31 Thread Quincey Morris
On Jan 31, 2013, at 14:30 , Steve Mills wrote: > Now that I'm using this the right way, I'm having a hard time getting the > popup to use the correct names from the Info.plist. I've edited them > recently, and nothing I do helps (ran "lsregister -v -f /path/to/app.app", > ran "touch /path/to/a

Re: Getting file type from Save dlog

2013-01-31 Thread Quincey Morris
On Jan 31, 2013, at 14:30 , Steve Mills wrote: > I'm also confused about which things need to be in the Info.plist these days I'd suggest a return visit to the documentation: https://developer.apple.com/library/mac/#documentation/DataManagement/Conceptual/DocBasedAppProgrammingGuideFor

Re: Binding problem with core data

2013-01-30 Thread Quincey Morris
On Jan 30, 2013, at 22:41 , Velocityboy wrote: > I see two bizarre behaviors: when I change the Category value with the popup > button cell in one row, Category values in other rows change. When I change > the subcategory, I get an exception: > > 2013-01-30 22:32:23.192 Testapp[10506:f03] -[_N

Re: Symbol not found: _OBJC_CLASS_$_NSObject

2013-01-30 Thread Quincey Morris
On Jan 30, 2013, at 17:10 , Kyle Sluder wrote: > But I can indeed offer some helpful information: when you add a target > to Xcode, it creates a proxy icon for that target's product in the > Products group of the sidebar. This proxy icon is special! Whenever you > want to refer to this build prod

Re: Symbol not found: _OBJC_CLASS_$_NSObject

2013-01-30 Thread Quincey Morris
On Jan 30, 2013, at 16:32 , Kyle Sluder wrote: > Unless there's some aspect of our build system that I'm just not seeing, > our frameworks don't belong to a Copy Files phase, yet they wind up > inside the app. Where are your private frameworks coming from? In Todd's case, the frameworks were bu

Re: Symbol not found: _OBJC_CLASS_$_NSObject

2013-01-30 Thread Quincey Morris
On Jan 30, 2013, at 15:29 , Kyle Sluder wrote: > You should never need to manually add a framework to a Copy Files phase. > Adding the framework to your app target's Link with Libraries phase via > the "plus" button either the Summary or Build Phases tab of the Project > editor should cause the f

Re: verify input parameter of init method and return nil before invoke [super init]

2013-01-30 Thread Quincey Morris
On Jan 30, 2013, at 00:42 , Charles Srstka wrote: > I *think* Xcode 4.2 was the one that introduced it, but my memory's not 100% > on that. Weirdly, though, in Xcode 4.6 'instancetype' is not auto completing for me. Is that a problem others are experiencing? _

Re: verify input parameter of init method and return nil before invoke [super init]

2013-01-29 Thread Quincey Morris
On Jan 29, 2013, at 23:25 , Greg Parker wrote: > Name the method `new...` instead of `create...`. Otherwise you do suffer an > autorelease penalty with ARC. (`create...` is not one of the names that ARC > assumes will return a retained result.) Oops, I'm always getting that backwards. Need to

Re: verify input parameter of init method and return nil before invoke [super init]

2013-01-29 Thread Quincey Morris
On Jan 29, 2013, at 20:51 , Ken Thomases wrote: > Bob's construction is just as valid as the above because it's essentially > doing the same thing. The same thing, so it doesn't really adduce any further evidence (unless you know of a documented API contract that covers this situation). Howev

Re: NSDocument's Open File Panel unresponsive when opening large file from disc

2013-01-29 Thread Quincey Morris
On Jan 29, 2013, at 12:00 , Gilles Celli wrote: > Ok, sounds good...but what bothers me is that I'm using an NSDocument based > app: > so can I use without problems NSOpenPanel's > beginSheetModalForWindow:completionHandler: method instead of using > NSDocument's readFomURL:ofType:error ? If

Re: verify input parameter of init method and return nil before invoke [super init]

2013-01-29 Thread Quincey Morris
On Jan 29, 2013, at 09:07 , Jens Alfke wrote: > Actually this is fine, because free(NULL) is legal. A better example would be > a dealloc that calls CFRelease, because [for some reason] CFRelease does > crash if passed NULL. Yes, no one is ever going to hire me for my deep Unix knowledge. > I

Re: NSDocument's Open File Panel unresponsive when opening large file from disc

2013-01-29 Thread Quincey Morris
On Jan 29, 2013, at 08:18 , Gilles Celli wrote: > Simply put, the Open Panel should be closed, but it stays open until the data > file has been processed and the data displayed as a graph. If you're using one of the 'begin…completionHandler:' methods to show the panel, you can invoke '[openPan

Re: verify input parameter of init method and return nil before invoke [super init]

2013-01-29 Thread Quincey Morris
On Jan 29, 2013, at 00:51 , Bob Cromwell wrote: > if below code valid ? All sample codes I could find invoke "self = [super > init]" first and then check the input parameter inside "if (self)" block. > > @implementaion Bla > > - (id)initWithFoo:(NSString *)foo > { >if (foo == nil) { >

Re: Zombie object being messaged - why?

2013-01-25 Thread Quincey Morris
On Jan 25, 2013, at 22:39 , Martin Hewitson wrote: > This was held for moderation for being too large (for some reason), so I've > trimmed it and resent it. Yes, this happens sometimes when you paste something with formatting into an email as unformatted text. I don't think my post (that you'r

Re: Zombie object being messaged - why?

2013-01-25 Thread Quincey Morris
(resent) On Jan 25, 2013, at 07:52 , Martin Hewitson wrote: > 2111 0x10a395410 MHControlsTabBarController Retain 2 > 03:29.823.791 0 TeXnicle-[TeXProjectDocument > controlsTabBarController] > 2112 0x10a395410 MHControlsTabBarController Autorelease

Re: Zombie object being messaged - why?

2013-01-25 Thread Quincey Morris
On Jan 25, 2013, at 10:33 , Quincey Morris wrote: > Since the retain count goes from 1 to 0 here Aargh, did it again! The count is actually going from 2 to 1 in your history. I meant of course, discounting the balanced retain/release pairs, it's the last remaining retain cou

Re: NSTableView: bindings with drag and drop

2013-01-24 Thread Quincey Morris
On Jan 24, 2013, at 18:11 , Chuck Soper wrote: > If I do not implement numberOfRowsInTableView: and > tableView:objectValueForTableColumn:row: then this error is written to the > console: > > *** Illegal NSTableView data source (< MyCustomView: 0x1019ab7b0>). Must > implement numberOfRowsInTabl

Re: NSTableView: bindings with drag and drop

2013-01-24 Thread Quincey Morris
On Jan 24, 2013, at 17:48 , Quincey Morris wrote: > NSTableViewDelegate Ugh, I meant NSTableViewDataSource. I'm at a 100% hit rate for non-misspelled typos in the last couple of days. Ditto "well-reasonable". ___ Cocoa-dev maili

Re: NSTableView: bindings with drag and drop

2013-01-24 Thread Quincey Morris
On Jan 24, 2013, at 17:37 , Graham Cox wrote: > If the table view has a dataSource assigned, it has to be "legal", which > means it must implement those two methods. The fact that, with bindings, they > may not ever be called is irrelevant. The dataSource must conform to the > compulsory proto

Re: Getting mouse loc in flagsChanges method

2013-01-24 Thread Quincey Morris
On Jan 24, 2013, at 14:44 , Sean McBride wrote: > Consider "mouseLocationOutsideOfEventStream". This is not a completely correct solution. As its name indicates, this mouse location isn't synchronized with the event stream. That is, at the time the app is handling 'flagsChanged:', the location

Re: Hover button and tracking area questions

2013-01-24 Thread Quincey Morris
On Jan 23, 2013, at 23:49 , Kyle Sluder wrote: > There's no need to release and > reinstall your tracking areas every time you get -updateTrackingAreas I agree with this part. > Regardless, you've failed to implement the pattern properly. You're > never removing the tracking areas before instal

Re: Multithreading crash in -[NSConditionLock unlockWithCondition:]

2013-01-23 Thread Quincey Morris
On Jan 23, 2013, at 22:38 , Jerry Krinock wrote: > My theory is that, on these rare occasions, the thread running > -unlockWithCondition: would run enough to unblock the other thread, and, > oddly but legally, the system would then pause this thread before this method > had returned, and run t

Re: Coordinate conversions in CALayer

2013-01-23 Thread Quincey Morris
On Jan 23, 2013, at 17:01 , Graham Cox wrote: > The above works correctly, but below, which I thought should do the same, > does not, if the layer.transform property is not the identity matrix: > > > CGPoint anch = layer.anchorPoint; > CGRect br = layer.bounds; > CGPoint pos

Re: NSComboBox, binding, multiple selection, multiple values == trouble

2013-01-23 Thread Quincey Morris
On Jan 23, 2013, at 09:28 , Markus Spoettl wrote: > in my app, I can edit a selection of model objects in a window which that > consists of NSTextFields and NSComboBoxes to edit model properties, all via > binding to an NSArrayController's selection proxy. > > When I'm editing a multi-selecti

Re: Excluding a XIB from project depending on configuration

2013-01-21 Thread Quincey Morris
On Jan 21, 2013, at 22:15 , Oleg Krupnov wrote: > I have a XIB file with some debugging & tweaking window which is only > needed in the Debug configuration of my project. I can exclude the > debug code with some #ifdefs, but I would like also to exclude the XIB > from the release build. Is there

Re: How to avoid warning?

2013-01-21 Thread Quincey Morris
On Jan 21, 2013, at 10:14 , Dave wrote: > myObj = [[myClass alloc] initWithManager:sel]]; > > > I get a warning on the initWithManager: statement (Obviously), how to avoid > the warning or otherwise fix it? You need to #import a header file with an @interface declaration for the 'initW

Re: UITapGestureRecognizer timeout

2013-01-18 Thread Quincey Morris
On Jan 18, 2013, at 09:48 , "Eric E. Dolecki" wrote: > I have a UITapGestureRecognizer - when you touch, don't move for a bit & > release, the tap still fires. Too long a time. I think it's around 0.35 > seconds. I'd love for that tap recognizer to be invalidated much quicker. > Like half of that

Re: Using NSSavePanel to export to UTTypeFolder without a file extension.

2013-01-17 Thread Quincey Morris
On Jan 17, 2013, at 16:20 , Thomas Bunch wrote: > Yes, in fact, I do exactly this. It's kind of suboptimal, in that NSSavePanel > will first give you a warning: > > > “Foo.oplx” already exists. Do you want to replace it?” and so on… the user > will probably reflexively accept that one. > > T

Re: Using NSSavePanel to export to UTTypeFolder without a file extension.

2013-01-17 Thread Quincey Morris
On Jan 17, 2013, at 14:12 , Thomas Bunch wrote: > Launch, take your "document" (very much a stub), File -> Export…, "My Flat > Format". Now File -> Export… again but this time pick "My HTML Folder > Export". If you have your file extensions visible you'll see at this point > that the extension

Re: Override runModalSavePanelForSaveOperation

2013-01-16 Thread Quincey Morris
On Jan 16, 2013, at 14:05 , Quincey Morris wrote: > On Jan 16, 2013, at 13:36 , Eric Gorr wrote: > >> (I am also wondering how to properly handle the process to "make sure that >> any editor registered using the Cocoa Bindings NSEditorRegistration informal >&g

Re: Override runModalSavePanelForSaveOperation

2013-01-16 Thread Quincey Morris
On Jan 16, 2013, at 13:36 , Eric Gorr wrote: > I need to override runModalSavePanelForSaveOperation in NSDocument to provide > some custom behavior. I'd suggest you keep trying to find a way to avoid doing this. Even inconveniences like having to work through an extra dialog before or after th

Re: NSString and file system Re: AppleScript in Sandboxed App

2013-01-16 Thread Quincey Morris
On Jan 16, 2013, at 09:12 , "jonat...@mugginsoft.com" wrote: > To be honest I rarely remember to call -fileSystemRepresentation. > The docs seem to indicate that its only purpose is to replace abstract / and > . characters with OS equivalents. > On OS X this would have seem to have no net resul

Re: Could somebody please fix NSTimer?

2013-01-14 Thread Quincey Morris
On Jan 14, 2013, at 12:38 , Kyle Sluder wrote: > Given that Gordon's explicit use case involves one part of his app > setting up timers that point at objects in other parts of his app that > know nothing of the timers' existence, this sounds like a fragility > nightmare. > > The NSTimer ship has

Re: delegate method both "required" and "deprecated"?

2013-01-13 Thread Quincey Morris
On Jan 13, 2013, at 12:07 , Todd Heberlein wrote: > I'm looking at the documentation for NSURLConnectionDelegate (OS X 10.8) and > it lists > > – > connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite: > > as "required method" (available in 10.6 & 10.7) It says it's

Re: NSData, NSImageView value binding, and NSUnarchiveFromData - nothing appears

2013-01-07 Thread Quincey Morris
On Jan 5, 2013, at 18:39, Matt DeLuco wrote: > When I started building my app I had been using NSImageView's Data binding to > display image data in an NSData object, which is apparently deprecated. > > I read that a data transformer has to be used when using the NSImageView's > Value binding.

Re: NSViewController in the responder chain

2013-01-06 Thread Quincey Morris
On Jan 6, 2013, at 16:53, Arved von Brasch wrote: > I first noticed a problem when I couldn't get a NSMenuItem to validate, but > it seems to also be a problem with buttons. Don't get side-tracked by looking at button actions. Validation works differently, and since buttons are not normally fi

Re: Bound NSTextField displays Selection Placeholder instead of Null Placeholder

2012-12-30 Thread Quincey Morris
On Dec 30, 2012, at 07:59 , Keary Suska wrote: > I am not sure I am experiencing this bug, if I understand you correctly. I > can change the binding placeholder string and the bug will show the new > changed placeholder string. Changing the text field placeholder string, > however, does not ap

Re: Bound NSTextField displays Selection Placeholder instead of Null Placeholder

2012-12-29 Thread Quincey Morris
On Dec 29, 2012, at 7:22, Keary Suska wrote: > Anything else you can think of? Well, I have part of the answer. I think there are 2 bugs, though it's not entirely clear. AFAICT, the reason it's showing the No Selection placeholder is roundabout. It *isn't* displaying the No Selection placehol

Re: Bound NSTextField displays Selection Placeholder instead of Null Placeholder

2012-12-28 Thread Quincey Morris
On Dec 28, 2012, at 20:53, Keary Suska wrote: > in my case it only happens when the there is a value before the window is > shown, but then cleared, but not exited. Just to clarify, are you saying that when you delete the field's contents it displays the No Selection marker, and then if you pr

Re: Dumb ARC question

2012-12-28 Thread Quincey Morris
On Dec 27, 2012, at 22:37, Rick Mann wrote: > So, the usual bit about references being weak by default in C structs (and > C++ classes) doesn't hold here. Huh? References aren't weak by default anywhere. Are you thinking of __usafe_unretained? That's not weak, just unmanaged by ARC, and it's

Re: Window resizing autolayout?

2012-12-23 Thread Quincey Morris
On Dec 23, 2012, at 22:44 , Antonio Nunes wrote: > Currently, in awakeFromNib, I adjust all user facing interface elements to > the target language, and I had hoped that with wider, and sometimes higher > controls, the containing sheet/popover would automatically resize to > compensate for the

Re: Low-level text, why so hard?

2012-12-23 Thread Quincey Morris
On Dec 23, 2012, at 21:32 , Graham Cox wrote: > C'mon, this has got to be easy, hasn't it? Before iOS 6, the go-to cross-platform string drawing would be CoreText. For something like what you described, I'd suggest you look here: https://developer.apple.com/library/mac/#documentation/

Re: Modern-day color spaces

2012-12-20 Thread Quincey Morris
(resent because it didn't arrive on the list the first time) On Dec 18, 2012, at 22:59 , Kyle Sluder wrote: > My current understanding is this: I don't know, but (especially since no one else seems to have jumped in) this has been percolating at the back of my mind. I'm very likely wrong, but

Re: NSURL bookmark error return

2012-12-18 Thread Quincey Morris
On Dec 18, 2012, at 16:11 , Mike Abdullah wrote: > That sample code scares me. I wrote this recently, if it helps: > http://www.mikeabdullah.net/nsurl-bookmark-error-handling.html Thanks, Mike, I believe that's what I remembered having read. It appears there's no question of the return value it

Re: NSView mouseMoved problem

2012-12-18 Thread Quincey Morris
On Dec 18, 2012, at 00:26 , Sanjay Arora wrote: > I want to receive mouseMoved on NSView of my window. > > I have set > [self setAcceptsMouseMovedEvents:YES]; on my window and > > -(BOOL)acceptsFirstResponder returns yes. > > > I do get mouseMoved event on my nsv

NSURL bookmark error return

2012-12-18 Thread Quincey Morris
Was there a thread recently that listed a couple of Cocoa frameworks methods that mis-handle the NSError** parameter? What were those methods? The reason I ask is that the general file system documentation for dealing with bookmarks: > https://developer.apple.com/library/mac/#documentation/FileM

Re: Correct way to make mutable and immutable objects?

2012-12-14 Thread Quincey Morris
On Dec 14, 2012, at 15:25 , Graham Cox wrote: > I have an abstract base class A and a mutable subclass AM. The class A owns a > list of subsidiary objects but only the class AM has the methods for adding > and removing these , which is what 'mutable' means for this class. > > There are a serie

Re: How to capture a video stream

2012-12-05 Thread Quincey Morris
On Dec 5, 2012, at 19:53 , gary.gard...@brokensoftware.com wrote: > Do I need to use CoreMedia to actually get an image from the sampleBuffer? > Using Xcode, it appears that UIImage is for iOS (this is just a > supposition). So XCode changes the code to CIImage. > > If this is the wrong directio

Re: NSOperation Efficiency

2012-12-05 Thread Quincey Morris
On Dec 5, 2012, at 01:09 , "Gerriet M. Denkmann" wrote: > When I press a button "Start" this gets done: > > self.start = [ NSDate date ]; > for( NSUInteger i = 0; i < self.nbrWork; i++ ) > { > GmdOperationBasis *m2 = [ [ GmdOperationBasis alloc ] init ]; >

Re: NSOperation Efficiency

2012-12-05 Thread Quincey Morris
On Dec 4, 2012, at 23:02 , "Gerriet M. Denkmann" wrote: > And got almost the same overhead (tested three times with 99 operations); > clock time per operationexpected time overhead factor > //8 ops 29.9, 30.1, 29.712.52.4 > //7 ops 2

Re: How to capture a video stream

2012-12-04 Thread Quincey Morris
On Dec 4, 2012, at 16:50 , gary.gard...@brokensoftware.com wrote: > The setSampleBufferDelegate:self queue:queue gives a warning in XCode that > says Sending '' to parameter of incompatible type > 'id'' You need to declare the class of 'self' as conforming to the AVCaptureVideoDataOutputSampleBu

Re: How to capture a video stream

2012-12-04 Thread Quincey Morris
On Dec 2, 2012, at 22:02 , gary.gard...@brokensoftware.com wrote: > Can anyone tell me what the next steps are? Any snippets of code that I > can look at? I'm sure I'm not the first to try to do this. Have you looked here? https://developer.apple.com/library/mac/#documentation/AudioVi

Re: NSUserUnixTask and com.apple.foundation.UserScriptService crash [SOLVED]

2012-12-02 Thread Quincey Morris
On Dec 2, 2012, at 02:18 , jonat...@mugginsoft.com wrote: > Thanks to Fritz for pointing out that the error detection was not up to > scratch. > if (!userScriptsFolderURL || *error) { > [NSException raise:MGSTaskStartException format:@"Bad user scripts > folder URL"]; > } > if (!_u

Re: Reordering a table insanity

2012-11-28 Thread Quincey Morris
On Nov 28, 2012, at 18:53 , Graham Cox wrote: > But suppose the two index sets are "absolute" in that there is not yet any > adjustment to either of them. Then the indexes they refer to are absolutely > referring to the table rows - there is a 1:1 correspondence between the order > of indexes

Re: Reordering a table insanity

2012-11-28 Thread Quincey Morris
On Nov 28, 2012, at 17:24 , Graham Cox wrote: > Ideally I'd like the following method signature: > > - (void) moveStuffFrom:(NSIndexSet*) source to:(NSIndexSet*) destination; > > which internally calls [ [undoManager prepare...] moveStuffFrom:destination > to:source]; to set up undo. > > this

Re: Reordering a table insanity

2012-11-28 Thread Quincey Morris
On Nov 28, 2012, at 16:35 , Graham Cox wrote: > So the question now is, can the table reordering with animation be made to > work in the undo case? I think it's doable. Note that the existing code is simple because there's no need to adjust the indexes in the selectionIndexes set at each step

Re: Does anyone find Restore Snapshot kind of weak?

2012-11-28 Thread Quincey Morris
On Nov 28, 2012, at 15:55 , Marco S Hyman wrote: > Written by someone who doe not appreciate the benefits of git staging and the > index. I will stage changes in a tree (git add) that may not be quite ready > for a commit before doing something that I may not like and want to undo. If > I li

Re: Does anyone find Restore Snapshot kind of weak?

2012-11-28 Thread Quincey Morris
On Nov 28, 2012, at 15:21 , Charles Srstka wrote: > ... yes? That's pretty impressive, though perhaps it's more indicative of mental mastery over self than technical mastery over git? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please d

Re: Does anyone find Restore Snapshot kind of weak?

2012-11-28 Thread Quincey Morris
On Nov 28, 2012, at 14:58 , Roland King wrote: > On 29 Nov, 2012, at 6:45 AM, Charles Srstka wrote: > >> I must confess that I've never really understood the purpose of Snapshot. >> What does it provide that git and svn don't already? > > Mostly an easy automated crutch for people who find gi

Re: Reordering a table insanity

2012-11-28 Thread Quincey Morris
On Nov 28, 2012, at 13:02 , Quincey Morris wrote: > I think the loop algorithm needs to look like this: > > C1. Loop over the "less than" set starting from its highest index and working > down. At each iteration, move the row at the current index to 'targetIndex -

Re: Reordering a table insanity

2012-11-28 Thread Quincey Morris
On Nov 28, 2012, at 02:17 , Graham Cox wrote: > That's my mental picture of the first part, but the outcome is incorrect, so > either the algorithm or the implementation is wrong. I got to wondering further about this, so I downloaded the TableViewPlayground sample project. Lo and behold, its

Re: Reordering a table insanity

2012-11-28 Thread Quincey Morris
On Nov 28, 2012, at 02:17 , Graham Cox wrote: > But the target index is then off by one, so it needs to be adjusted by > decrementing or the moved items will end up reversed. Yes, you and Seth are quite right, the first set will get reordered without an adjustment. So, the correct version of t

Re: Reordering a table insanity

2012-11-27 Thread Quincey Morris
On Nov 27, 2012, at 20:11 , Graham Cox wrote: > Maintaining the selection is not really an issue, as I can easily restore it, > but I would like this to animate as intended. Any ideas? I think you can do it like this: A. Ensure that targetIndex isn't one of the selected row indexes. If it is,

Re: Reordering a table insanity

2012-11-27 Thread Quincey Morris
On Nov 27, 2012, at 16:24 , Graham Cox wrote: > The problem is that as I iterate over the items being moved, this changes the > order, so the indexes get messed up, and the items end up in the wrong > places. I'm trying to work out how to compensate for the move but I must be > having a brainf

Re: Checking document structure in NSDocument based app

2012-11-27 Thread Quincey Morris
On Nov 27, 2012, at 10:08 , Luc Van Bogaert wrote: > I have a document based app with one NSDocument subclass, and one > NSWindowController subclass. NSDocumentController is not subclassed at the > moment. The functionality of my application has expanded over time, and so > has the internal st

Re: Problems with KVC

2012-11-23 Thread Quincey Morris
On Nov 23, 2012, at 20:18 , "C.W. Betts" wrote: > I'm trying to get my program PlayerPRO Cocoa to display the contents of the > music list. I was able to put things into the list, but they do not show up > in the table view. > (Full code is available at sourceforge.net/projects/playerpro, on th

Re: enhancing NSTextView for optionally-hidden text

2012-11-20 Thread Quincey Morris
On Nov 20, 2012, at 21:03 , Kurt Bigler wrote: > Given how this view is used, for appending only in the style of an uneditable > text log permitting user selections and Copy, the easiest way I can think to > implement it is to maintain two text views, one with hidden text included, > and one w

Re: NSMapTable thread safety (with with ARC and weak objects)

2012-11-16 Thread Quincey Morris
On Nov 16, 2012, at 09:53 , James Montgomerie wrote: > How thread safe is NSMapTable? > > I know that's a pretty nebulous question, so more concretely: > > Let's assume I'm using ARC. If I create an NSMapTable with "[NSMapTable > strongToWeakObjectsMapTable]", is it safe to put objects into i

Re: Safe to install NSTrackingArea on a subview?

2012-11-15 Thread Quincey Morris
On Nov 15, 2012, at 17:55 , Kyle Sluder wrote: > In particular, I'm concerned about -updateTrackingAreas. This message is > sent to the view, not the tracking area's owner, but the view itself > doesn't know about the tracking area. If the owner doesn't happen to be > a view in the same hierarchy

Re: Is ARC any smarter than Xcode's 'Analyze'?

2012-11-12 Thread Quincey Morris
On Nov 12, 2012, at 09:19 , Jerry Krinock wrote: > I'm debugging a crash in a large project which evidence indicates is caused > by a retain/release imbalance. The project is written with manual > retain/release, not ARC. > > The project is built in Xcode 4.5.2, and when I 'Analyze', I get no

Re: alertImageDragInDesignWithURL:?

2012-11-12 Thread Quincey Morris
On Nov 12, 2012, at 07:17 , Fritz Anderson wrote: > In an earlier message, Quincey Morris recommended the use of a (presumably > AppKit) method named alertImageDragInDesignWithURL:. For the life of me, I > can't find that symbol in any documentation, nor in Xcode's Open Qu

Re: Searching array with block

2012-11-11 Thread Quincey Morris
On Nov 11, 2012, at 14:30 , Erik Stainsby wrote: > - (IBAction) updateIncrementalSearch:(id)sender { > >NSString * term = [sender stringValue]; >if(term) { >NSMutableArray * matchResults = [NSMutableArray new]; > >NSUInteger index = [[self content] indexOfObjectPassingTe

Re: Display alert sheet when application is not active

2012-11-11 Thread Quincey Morris
On Nov 11, 2012, at 04:09 , Luc Van Bogaert wrote: > However, when my application is not active when the file is dropped, the > message to the windowcontroller is never sent. > > Here's the relevant line of code in performDragOperation: > > [NSDocumentController sharedDocumentController] c

Re: NSAttributedString mysteriously truncated too soon

2012-11-08 Thread Quincey Morris
On Nov 8, 2012, at 13:23 , Matt Neuburg wrote: > The result (and this is the problem) is that the label truncates after the > **first line** of the second paragraph ("Four score and seven years ago, our > fa…"). Why? There's plenty of room in my label for more lines! I believe it's just a quir

Re: Sorting NSTableView using Bindings

2012-11-05 Thread Quincey Morris
On Nov 5, 2012, at 10:03 , Paul Johnson wrote: > I've selected the Table View and clicked on tab to select the Bindings > inspector. Under the Table Content heading I found Sort Descriptors, > and it is there that I'm focusing. (For example, I've checked the > "Bind to" box and selected the Array

Re: OS_OBJECT_USE_OBJC_RETAIN_RELEASE and xpc_release()

2012-11-05 Thread Quincey Morris
On Nov 3, 2012, at 12:55 , Jerry Krinock wrote: > I want to absorb it into a big old project that contains a couple dozen > targets. So I added a target for it, with ARC. But building the big project > fails because the macro OS_OBJECT_USE_OBJC_RETAIN_RELEASE is defined, and in > xpc.h this

Re: printing arrays

2012-11-02 Thread Quincey Morris
On Nov 2, 2012, at 22:18 , "Gerriet M. Denkmann" wrote: > Is there a way to make the first NSLog work? > I seem to remember that it calls something like debuggingDescription, which, > if not overridden calls description. > > I have no experience with swizzling. Aren't you making things rather

Re: Changes to -makeDocumentWithContentsOfURL:ofType:error: in the last couple of OS releases?

2012-11-01 Thread Quincey Morris
On Nov 1, 2012, at 00:53 , Rick Mann wrote: > I have some old code that would try to open a file using > -openDocumentWithContentsOfURL:display:error:, if it existed and if it does > not exist, would call -makeDocumentWithContentsOfURL:ofType:error: on that > same URL, in an effort to create t

Re: createDirectoryAtPath:withIntermediateDirectories:attributes:error: Returns NO when it exists

2012-10-30 Thread Quincey Morris
On Oct 30, 2012, at 10:39 , Sean McBride wrote: > Note that in my experience YES is returned if the directory exists. It's also worth consulting the header file comments: > "createDirectoryAtPath:withIntermediateDirectories:attributes:error: creates > a directory at the specified path. If you

Re: ARC conversion help - CFErrorRef* and NSError**

2012-10-29 Thread Quincey Morris
On Oct 29, 2012, at 22:24 , Rick Mann wrote: > Any way to introduce (into clang) an __attribute__ or something similar on > the declaration of NSError to say it's equivalent to CFErrorRef? Except that they're not equivalent, in memory management terms. CF and NS objects have different rules.

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-28 Thread Quincey Morris
On Oct 28, 2012, at 10:37 , Kyle Sluder wrote: > No matter what you do, file a bug with the 3rd-party framework. Their macros > should not leak. The thing that bothers me is why macros should be substituting into method parameter names at all. It potentially brings *pieces* of method names int

Re: App rejection due to app-sandboxing invalid entitlement

2012-10-26 Thread Quincey Morris
On Oct 26, 2012, at 22:58 , Martin Hewitson wrote: > Am I doing something wrong here in principle? I confess I can't find mention > of these entitlements anywhere on google, nor in the apple documentation. So > I can't reconstruct where I got this from. Have you being following the 'Code signi

Re: Object not being drawn in Cmd + N window. Why?

2012-10-25 Thread Quincey Morris
On Oct 25, 2012, at 18:09 , Peter Teeson wrote: > Where do I go from here? You're trying to solve too much at one time. The issue is the apparent non-appearance of one of the views, so the issue of where the setMyColor action goes is merely a distraction. 'initWithFrame', 'awakeFromNib' and 'd

Re: NSTextFieldCell assertion failure messages?

2012-10-07 Thread Quincey Morris
On Oct 7, 2012, at 14:18 , Erik Stainsby wrote: >cellView.textField.stringValue = @" "; >[cellView.textField bind:@"stringValue" toObject:person > withKeyPath:[tableColumn identifier] options:nil]; There are several wrong or code-smelly things here: -- Why on earth set the string to a

<    10   11   12   13   14   15   16   17   18   19   >