Re: Embedding resources in Static Cocoa Library

2012-10-05 Thread Quincey Morris
On Oct 5, 2012, at 22:18 , Jerry Krinock wrote: > I know you can embed an Info.plist in a command-line tool, by specifying it > in the Info.plist Build Setting. But the only non-executable thing I've ever > seen embedded in a static library is a code signature. A static library does not survi

Re: Suggestions for handling old document files with file paths in a sandbox environment

2012-10-03 Thread Quincey Morris
On Oct 3, 2012, at 14:02 , Marshall Houskeeper wrote: > I have no problem with the use of the open panel ( security-scoped bookmark > )for creating new documents. OK, understood. > The problem is for pre sandboxed documents or documents that come from > Windows. Having the user re-authoriz

Re: Suggestions for handling old document files with file paths in a sandbox environment

2012-10-03 Thread Quincey Morris
On Oct 3, 2012, at 12:44 , Marshall Houskeeper wrote: > Our plan is to use Security-Scoped Bookmarks for all new documents to store > external file references when we go to the sandbox environment. In our use > case, I would guess that none of the external referenced files would be > stored

Re: Suggestions for handling old document files with file paths in a sandbox environment

2012-10-03 Thread Quincey Morris
On Oct 3, 2012, at 11:06 , Charles Srstka wrote: > is there a way to just ask for permission to open a specific file and have a > "Cancel or allow" box come up You can use the 'NSOpenSavePanelDelegate' protocol to validate whatever the user chooses, or you can just validate the returned URL w

Re: Blocks with return type

2012-09-29 Thread Quincey Morris
On Sep 29, 2012, at 20:55 , Kyle Sluder wrote: > I wasn't aware this was accepted syntax. I was under the impression that you > either had to explicitly case the return value or explicitly cast the block > literal. I believe it's official syntax. It's not (quite) documented in the developer d

Re: Blocks with return type

2012-09-29 Thread Quincey Morris
On Sep 29, 2012, at 19:41 , "Gerriet M. Denkmann" wrote: > LongBlock_t aBlock = <...some magic here...> { (void)a; unsigned long x = > 5; return x;}; > > What should <...some magic here...> look like? LongBlock_t aBlock =^ unsigned long (id a) {...}; If the return type is 'void' it can

Re: NSWindowController and nib in framework

2012-09-26 Thread Quincey Morris
On Sep 26, 2012, at 18:10 , Jeff Johnson wrote: > Is your app distributed as a zip file? > > I had a similar bizarre issue with NSBundle a number of months ago, and it > turned out that the problem occurred when the app was unzipped using The > Unarchiver. Unzipping with the built-in Archive

Re: NSWindowController and nib in framework

2012-09-26 Thread Quincey Morris
On Sep 26, 2012, at 10:08 , Kyle Sluder wrote: > Can you log +[NSBundle allBundles] and/or use Instruments to see what file > access Foundation is performing and what responses it's getting back? The difficulty is that this exception has never happened to me during development. By chance (mayb

Re: NSWindowController and nib in framework

2012-09-26 Thread Quincey Morris
On Sep 25, 2012, at 22:37 , Graham Cox wrote: > Is the app sandboxed? > > I ask because I've had reports of this same error from the odd user but have > been unable to reproduce it so far. It's ONLY happening since we sandboxed > though. No, the app has been around for a while and isn't sandb

NSWindowController and nib in framework

2012-09-25 Thread Quincey Morris
Here's an except of some code in a window controller: > - (id) init { > self = [super initWithWindowNibName: @"MyWindow"]; > … > return self; > } > > + (MyWinController*) myWinController { > return [[MyWinController alloc] init]; > } The key point here is that the MyWinCo

Re: Mac cursor hotspot is not at the tip of the cursor

2012-09-13 Thread Quincey Morris
On Sep 5, 2012, at 05:16 , Ernesto Monde wrote: > Is there any way to make using default cursor as customer expects and make > it's hotspot at the tip of the white border, not inside it, of the default > cursor arrow? Ever since the beginning of [Mac] time, the hotspot is at the tip of the black

Re: Targeting actions/methods on selected object in NSObjectController

2012-09-13 Thread Quincey Morris
On Sep 9, 2012, at 00:18 , Luke Evans wrote: > I have some list of objects (like a master list), out of which selection > allows a single object to show details in UI below. So, this is a pretty > standard Master-Detail set up. I have an NSObjectController managing the > selected object and

Re: NSComboBox with NSNumberFormatter DataSource works but not Content binding

2012-09-13 Thread Quincey Morris
On Sep 4, 2012, at 23:12 , Luke Evans wrote: > I understand that I must present NSDecimalNumber objects for list content and > I'd prefer to use bindings for this, Why must you use NSDecimalNumber instead of NSNumber? > so I create a simple NSArray of NSDecimalNumber values and provide this as

Re: associating a custom view for each object in a core data entity

2012-09-11 Thread Quincey Morris
On Sep 11, 2012, at 15:54 , Chuck Soper wrote: > I want every color object to be associated with a custom view. All the > color views for a given house need to be presented as a horizontally > scrolling list. I also need drag and drop functionality to change the > order of the colors in the list.

Re: binding an array controller to columns in an NSTableView

2012-09-11 Thread Quincey Morris
On Sep 11, 2012, at 10:13 , Chuck Soper wrote: > When adding additional colors, I understand that the following code can > create a color object, but I'm not sure where to put this code or if I can > use bindings instead. > NSManagedObject *color = [NSEntityDescription > insertNewObjectForEntityF

Re: Arghh bindings

2012-09-10 Thread Quincey Morris
On Sep 10, 2012, at 19:29 , Rick Mann wrote: > The docs say this is all for KVC compliance. But because the calls are almost > one-to-one when backed by a simple collection, I'm surprised they don't do it > for me. > > In other words, I could write code to dynamically implement > -insert:atIn

Re: Arghh bindings

2012-09-10 Thread Quincey Morris
On Sep 10, 2012, at 18:48 , Rick Mann wrote: > The docs say you can implement either insertObject: or insert. I figured > it was smart enough to handle the plural-vs-singular change, otherwise it's > grammatically awkward. Well, you were wrong about that. :) The intention is that to-many prop

Re: binding an array controller to columns in an NSTableView

2012-09-10 Thread Quincey Morris
On Sep 10, 2012, at 18:40 , Chuck Soper wrote: > I understand how to bind an array controller (for an entity) to rows in a > table, and how to bind a Text Field in the Table Cell View to an entity > property. I'm not sure how to go about this for columns in a table. I > assume that I may need to

Re: KVO Question: How to programmatically determine if one object is observing another on a keyPath and context?

2012-09-09 Thread Quincey Morris
On Sep 9, 2012, at 13:50 , Motti Shneor wrote: > On 9 בספט 2012, at 22:04, Ken Thomases wrote: > >> Why is that a "however"? What's the problem? Since the representedObject >> is KVO-compliant, all observations _through_ that property will >> automatically follow it as it changes. > > Nope.

Re: Modal Dialog from sheet

2012-08-21 Thread Quincey Morris
On Aug 21, 2012, at 04:28 , Graham Cox wrote: > I have a need to display a modal dialog from a document-modal sheet. > > I display the dialog OK but I can't dismiss it. I use [NSApp > stopModalWithCode:] and I show the dialog using [NSApp > runModalForWindow:]; > > I tried using a modal sessi

Re: Switching between window controllers in code ?

2012-08-20 Thread Quincey Morris
On Aug 20, 2012, at 21:32 , Erik Stainsby wrote: > Okay so that is working fine, but isn't that a venal sin in Cocoa programming? -- You can connect an action directly to any object that implements the action. It doesn't have to be a responder. -- You could have connected the action to First R

Re: Where do these come from...

2012-08-16 Thread Quincey Morris
On Aug 15, 2012, at 20:39 , Charlie Dickman <3tothe...@comcast.net> wrote: > I DO NOT call drawRect directly. I DO call [self setNeedsDisplay: YES] to > keep things going. All drawing is done from inside drawRect which has been > invoked through the use of [self setNeedsDisplay: YES], That's g

Re: NSSpeechSynthesizer / DarkWake interaction

2012-08-16 Thread Quincey Morris
On Aug 15, 2012, at 20:31 , Jens Alfke wrote: > I have never heard the term "DarkWake" before, and I can't find anything > about it in Apple's docs apart from its name appearing in some low-level > constants. Is this the internal term for 10.8's "Power Nap"? My understanding > was that only ce

Re: #warning 64BIT: Inspect use of sizeof

2012-08-15 Thread Quincey Morris
On Aug 15, 2012, at 18:49 , David Duncan wrote: > The only thing I can imagine is if you have code that expects sizeof(int) == > sizeof(long) == sizeof(void*) or something along those lines. >From the "64-Bit Transition Guide for Cocoa": > sizeof Operator and @encode Directive > > Script acti

Re: __weak pointer collection firing prematurely???

2012-08-13 Thread Quincey Morris
On Aug 13, 2012, at 09:01 , Kyle Sluder wrote: > As was discussed on the objc-language list recently, the ARC spec > specifically guarantees that an object's lifetime includes the entire > duration of a method invocation. An object *cannot* be deallocated while one > of its methods is executin

Re: __weak pointer collection firing prematurely???

2012-08-13 Thread Quincey Morris
On Aug 13, 2012, at 00:04 , Britt Durbrow wrote: > This is the exact line of code in question: > > TrDocument *document=(TrDocument *)__RPCPersistentInfo__pool->document; > > The document object in question is, when this happens, still in the middle of > it's init method when that __weak __RP

Re: NSOutlineView group item - suppress ugly show/hide "button" ?

2012-08-10 Thread Quincey Morris
On Aug 10, 2012, at 22:18 , Graham Cox wrote: > In my outline view I return NO for a certain row from the delegate method > [outlineView:shouldCollapseItem:], which is also set to be a 'group' item. > This does prevent the group item being collapsed correctly, but it still > shows that horribl

Re: NSUserDefaults locks up on 10.8

2012-08-09 Thread Quincey Morris
On Aug 9, 2012, at 22:49 , Martin Hewitson wrote: > I have a table view bound to shared user defaults with a key which returns an > array of strings. > I have a button for creating a new entry. This calls a piece of code like > this: > > > NSUserDefaults *defaults = [NSUserDefaults standard

Re: Simple date format problem? iOS 5

2012-08-09 Thread Quincey Morris
On Aug 9, 2012, at 18:26 , Dave DeLong wrote: > Since you want an unlocalized date, you should just use [NSString > stringWithFormat:] to build the name yourself, after breaking the NSDate up > into its NSDateComponents using the Gregorian calendar. I'd vote for this solution, too. Keep in mi

Re: How to...

2012-08-09 Thread Quincey Morris
On Aug 9, 2012, at 15:05 , Charlie Dickman <3tothe...@comcast.net> wrote: > I tried the Speech Synthesizer Manager too. It suffers from the same > deficiency that NSSpeechSynthesizer does. I suspect that NSSpeechSynthesizer > uses the Speech Synthesis Manager internally. One alternative, if you

Re: NSTableView not setting -clickedRow, -clickedColumn as it should

2012-08-09 Thread Quincey Morris
On Aug 9, 2012, at 00:04 , Graham Cox wrote: > So call super, but you need to know whether it's going to call through your > -init method or not (for cells, it does not). Except that you do sort-of know (I think). If it does, all your instance variables are 0. If you have object-pointer instan

Re: NSCopyObject is a disaster (was Re: Another NSOutlineView issue)

2012-08-08 Thread Quincey Morris
On Aug 8, 2012, at 16:21 , Graham Cox wrote: > This opens up a whole big can of worms about implementing copy. > > If a superclass implements copies using NSCopyObject, then any pointer ivars > we add in a subclass need to be additionally -retained. But if the superclass > implements copy by a

Re: UITableView with multiple UIScrollView each having its own zoom scale?

2012-08-08 Thread Quincey Morris
On Aug 8, 2012, at 00:27 , Laurent Daudelin wrote: > minimumScale = [self.imageScrollView frame].size.width > / [self.postPictureView frame].size.width; IDK, but this looks like the problem to me. The calculation is using rect widths that are in 2 different coordinate sy

Re: UITableView with multiple UIScrollView each having its own zoom scale?

2012-08-07 Thread Quincey Morris
On Aug 7, 2012, at 22:10 , Laurent Daudelin wrote: > Here are some screen shots. The first one is when the table view appears. The > second one is almost one screen scrolled down. All the pictures are larger > than the image view displaying them but setting the scrollview zoom scale > properly

Re: Problem using UIGestureRecognizer

2012-08-06 Thread Quincey Morris
On Aug 6, 2012, at 16:11 , Laurent Daudelin wrote: > I found the problem after poking some more in Google. It is apparently a bug > in UIKit. To fix it, I created a strong property in my controller connected > to the UIGestureRecognizer and now, no more crash! So, the gesture > recognizer, if

Re: gesture

2012-08-06 Thread Quincey Morris
On Aug 6, 2012, at 15:36 , Flavio Donadio wrote: > Luca, > > The direction is where the swipe ends. UISwipeGestureRecognizerDirectionRight > is for left-to-right. > > Cheers, > Flavio > > On 06/08/2012, at 16:00, cocoa-dev-requ...@lists.apple.com wrote: > >> Hi All. >> Probably my problem is

Re: Problem using UIGestureRecognizer

2012-08-06 Thread Quincey Morris
On Aug 6, 2012, at 14:54 , Laurent Daudelin wrote: > Forgot to mention that I also tried to connect the gestureRecognizers outlet > of the UIImageView to the gesture recognizer, making sure the one from the > scrollview had been removed with same result…. a. The backtrace you posted doesn't pr

Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling

2012-08-04 Thread Quincey Morris
On Aug 4, 2012, at 14:35 , Dave Keck wrote: > I'm working on a scrollable grid view and noticed that its appearance > during scrolling has regressed since installing 10.8. > > This grid view loads content in the background and calls > -setNeedsDisplayInRect: (thread-safely) as content becomes av

Re: Invalidate non-repeating NSTimer after fired?

2012-08-03 Thread Quincey Morris
On Aug 3, 2012, at 14:37 , Trygve Inda wrote: > I think B is the concern since if I > change the code to: > > if ([updateTimer isValid]) > [updateTimer invalidate]; > > Then it will be invalidated in case B (because the code has not fallen back > to the run loop to invalidate it on its own). No

Re: Very basic table binding blind spot

2012-08-03 Thread Quincey Morris
On Aug 3, 2012, at 00:16 , Kyle Sluder wrote: > Hmm, now that Quincy's pointed it out, it looks like you are indeed using a > view-based table view. No bonus points to me though. Having cleverly focused on the forest instead of the trees, I didn't register the fact that using the data source w

Re: Very basic table binding blind spot

2012-08-02 Thread Quincey Morris
(reposted because of an apparent bounce) On Aug 2, 2012, at 22:16 , Erik Stainsby wrote: > I do so wish there was a Complete Idiot's Guide to Cocoa Table Bindings … The > very flexibility which I know must be their great virtue tends to obscure the > clear path from my sight more often than no

Re: UIScrollView insertSubview:atIndex: problem

2012-07-31 Thread Quincey Morris
On Jul 31, 2012, at 03:52 , Dave wrote: > Basically I have process that generates UIImage's and each of these images > needs to be presented in a Scroll View. However there can be a large number > of images generated and each image is pretty big too, so obviously, it can't > hold them all in R

Re: NSDocument window opens - even if the document didn't read properly.

2012-07-29 Thread Quincey Morris
On Jul 29, 2012, at 10:53 , Pascal Harris <45rpmli...@googlemail.com> wrote: > 2. If the document fails to open then I want to copy it to a new location, > with a new extension (see above). This fails. I can't think why! On Jul 29, 2012, at 11:47 , Pascal Harris <45rpmli...@googlemail.com> wr

Re: bindings keypaths and collections

2012-07-29 Thread Quincey Morris
On Jul 29, 2012, at 11:15 , William Squires wrote: > Ex: my GameEngine class has an @property (nonatomic, strong) Player *player; > > The Player class, in turn, has an @property (nonatomic, strong) > NSMutableArray *inventory; > > and the following method > > -(void)addThing:(Thing *)theThing

Re: -mouseDragged: sent to view when dragging window

2012-07-24 Thread Quincey Morris
On Jul 24, 2012, at 13:36 , Markus Spoettl wrote: > My view reacts to -mouseDragged: but doesn't check if there's been a > -mouseDown: first because that's implicit. Did that change? The Cocoa Event Handling Guide says "Mouse events are dispatched by an NSWindow object to the NSView object over

Re: Forcing Core Data to save attribute changed behind its back?

2012-07-24 Thread Quincey Morris
On Jul 23, 2012, at 15:03 , Sean McBride wrote: > I have a managed object where one of the attributes is quite large and so > when I change it, instead of the usual setAttribute:newValue I mutate the > object directly. Of course, Core Data does not know that I've done this. > I'm looking for

Re: 10.7 Full-Screen transition animation corrupts my UI - how to avoid?

2012-07-22 Thread Quincey Morris
(BTW, your reply from which I'm quoting below wasn't CC'ed to the list, but it looks like it was intended for the list. I'll let you go ahead and repost if that was your intention.) On Jul 22, 2012, at 11:56 , Motti Shneor wrote: > One thing you say raises a question, though. How can minContent

Re: 10.7 Full-Screen transition animation corrupts my UI - how to avoid?

2012-07-22 Thread Quincey Morris
On Jul 22, 2012, at 02:00 , Motti Shneor wrote: > - (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize { >NSSize min = [sender minSize]; >NSSize max = [sender maxSize]; >if (frameSize.width > max.width || >frameSize.height > max.height || >frameSize.wi

Re: Cell in Selected NSTableView Not Redrawn

2012-07-20 Thread Quincey Morris
On Jul 20, 2012, at 19:03 , Keary Suska wrote: > In an NSTableView I am providing custom cells via > tableView:dataCellForTableColumn:row:, based on values represented in other > columns. The cell is usually determined when a value is specified via > NSPopupButtonCells in two other columns. Whe

Re: NSArrayController not rearranging correctly

2012-07-19 Thread Quincey Morris
On Jul 18, 2012, at 23:22 , Markus Spoettl wrote: > The array controller is used by views directly, they bind to arrangedObjects > (like in the example). Since when is it recommended to insert an intermediate > object between table view and NSArrayController? Ugh, I didn't pay enough attention

Re: NSArrayController not rearranging correctly

2012-07-18 Thread Quincey Morris
On Jul 18, 2012, at 23:22 , Markus Spoettl wrote: > That doesn't sound right. The array controller is used by views directly, > they bind to arrangedObjects (like in the example). Since when is it > recommended to insert an intermediate object between table view and > NSArrayController? Makes t

Re: KVG generic enough?

2012-07-18 Thread Quincey Morris
On Jul 18, 2012, at 20:31 , Graham Cox wrote: > However, I'm not sure whether, if you pass a string to -setValue:forKey: and > the property is numeric, whether a conversion to an NSNumber is done there, > or whether the object would just store the string. That might cause problems. If the prope

Re: NSArrayController not rearranging correctly

2012-07-18 Thread Quincey Morris
On Jul 18, 2012, at 08:52 , Markus Spoettl wrote: > I also looked at the predicate operator type as a potential source of the > issue but I can't see a problem there. I'm using > NSEqualToPredicateOperatorType is fine, as I do want a comparison using > -equalTo: . NSMatchesPredicateOperatorType

Re: Looking for better solution than this old hack

2012-07-18 Thread Quincey Morris
On Jul 17, 2012, at 21:44 , Graham Cox wrote: > The particular thing that's bothering me the most is that I have a > source-list outline view in my floating palette, and it responds to the > window activation state even though for the floating panel it's meaningless. > I'd rather it didn't and

Re: Sensible NSMultipleValuesMarker placeholder alternatives?

2012-07-17 Thread Quincey Morris
On Jul 17, 2012, at 02:43 , Markus Spoettl wrote: > I'm not sure I follow. I do want multiple selection editing, just in a more > user-friendly fashion. Those options prevent multi-selection multi-value > editing, right? What am I not getting? Ah, I see. I don't think you aren't getting anythin

Re: Sensible NSMultipleValuesMarker placeholder alternatives?

2012-07-17 Thread Quincey Morris
On Jul 16, 2012, at 23:34 , Markus Spoettl wrote: > What is more problematic is that if an edit field which displays the > placeholder looses first responder, the model values are set to nil. There are 2 bindings options that should let you control this behavior: "allows editing multiple values

Re: NSTableView Sends Null Column to Delegate/DataSource

2012-07-14 Thread Quincey Morris
On Jul 14, 2012, at 10:08 , Keary Suska wrote: > For the archives, it is not safe to assume that tableView:isGroupRow: will > determine which rows are actually group rows, at least if you implement > tableView:dataCellForTableColumn:row:. It seems that regardless of whether > you implement tabl

Re: How to implement an object whose properties are really dictionary entries.

2012-07-12 Thread Quincey Morris
On Jul 12, 2012, at 00:14 , Motti Shneor wrote: > On 12 ביול 2012, at 02:54, Keary Suska wrote: > >> On Jul 11, 2012, at 2:45 PM, Motti Shneor wrote: >>> Of what I read from everyone, and after examining the suggested code from >>> Jens Alfke, I think I'm inclined to something simpler, hinted by

Re: View-based NSTableView question

2012-07-11 Thread Quincey Morris
On Jul 11, 2012, at 15:06 , TJ wrote: > The problem here is that I don't have any idea where and how to get and set > the frame of the cell. As you can see during the creation of NSTableCellView > I'm basically using an NSZeroRect because [cellView frame] is nil. I > subclassed NSTableCellView

Re: Limited-access, KVO-compliant mutable array?

2012-07-11 Thread Quincey Morris
On Jul 11, 2012, at 07:28 , Ken Thomases wrote: > (By the way, you're using the term "proxy" in a manner which I find > confusing.) The term "collection proxy object" is used in NSKeyValueCoding.h -- there's an immutable one from 'valueForKey:' and a mutable one from 'mutableValueForKey:'. By

Re: Limited-access, KVO-compliant mutable array?

2012-07-11 Thread Quincey Morris
On Jul 11, 2012, at 00:24 , Quincey Morris wrote: > On Jul 10, 2012, at 23:51 , Rick Mann wrote: > >> … But it just smells a little funny. > > No, your thinking is incorrect, in the sense that … Perhaps my way of saying this unintentionally sounded rude. I meant, "your

Re: Limited-access, KVO-compliant mutable array?

2012-07-11 Thread Quincey Morris
On Jul 10, 2012, at 23:51 , Rick Mann wrote: > It still bugs me, in the sense that publishing an NSArray* property seems to > create a (conceptual) contract that while the property may change, that is, a > different NSArray may get assigned to it, the contents of a given NSArray > won't change.

Re: Limited-access, KVO-compliant mutable array?

2012-07-10 Thread Quincey Morris
On Jul 10, 2012, at 23:45 , Quincey Morris wrote: > You can then have 's getter return '[self valueForKey: > @"privateKey"]'. That solves the infinitely-recursing-getter problem, but > still returns an immutable observable proxy. Ugh, that's n

Re: Instance not responding to selector

2012-07-10 Thread Quincey Morris
On Jul 10, 2012, at 23:11 , Erik Stainsby wrote: > @interface RSReactionPlugin : RSTrixiePlugin > > // various properties > > - (void) loadFromRule: (RSReactionRule*) rule; > > @end Are you sure that's what you mean? According to this you implemented 'loadFromRule:' but according to your log

Re: Limited-access, KVO-compliant mutable array?

2012-07-10 Thread Quincey Morris
On Jul 10, 2012, at 23:17 , Rick Mann wrote: > Is this possible? My first thought is to make a read-only NSArray* property, > but then it seems that addition or removal of elements to/from that property > wouldn't get observed; i.e., an NSArray should never change its contents. No, your first t

Re: Stupid block syntax!

2012-07-03 Thread Quincey Morris
On Jul 3, 2012, at 22:40 , Graham Cox wrote: > NSComparisonResult (^comp)( id, id > ) = ^( id a, id b ) Actually, for a block literal, it's: … = ^NSComparisonResult ( id a, id b ) { … } The literal syntax puts the return type after the [unparenthesized] "^", unlike the pointer

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-02 Thread Quincey Morris
On Jul 2, 2012, at 21:46 , Motti Shneor wrote: > for god sake, why isn't there a [mySplitView setSubview:panelSubview > collapsedStateTo:YES/NO] Well, one possible answer is to ask yourself if you're asking the right questions. I think there's perhaps a small difference between the user c

Re: Binding NSTextField to a number through NSArrayController

2012-06-30 Thread Quincey Morris
On Jun 30, 2012, at 12:00 , Todd Heberlein wrote: > I have an NSTextField that I am binding to an NSArrayController's selection > (a number value in that selection). In the "Model Key Path" field I get an > exclamation mark inside a red stop sign icon. > > Even more confusingly, the code still

Re: Handling "Smart Zoom" gesture?

2012-06-28 Thread Quincey Morris
On Jun 28, 2012, at 19:57 , Graham Cox wrote: > - (void) touchesBeganWithEvent:(NSEvent*) event > { > NSSet* touches = [event touchesMatchingPhase:NSTouchPhaseBegan > inView:self.view]; > > if([touches count] == 2 ) Well, this looks wrong to me. In general, each of the 2

Re: Bidirectional, Manual Binding in custom control

2012-06-28 Thread Quincey Morris
On Jun 28, 2012, at 10:49 , Jerry Krinock wrote: > OK, but effectively this means that I simply factor this -changeRating: > action method out of my -mouseDown: method. Only -mouseDown: will invoke > -changeRating: at this time. > > I don't think I've ever seen a control class implementing an

Re: Handling "Smart Zoom" gesture?

2012-06-28 Thread Quincey Morris
On Jun 28, 2012, at 00:14 , Graham Cox wrote: > Specifically, the problem is that the -clickCount property of an NSEvent is > only applicable to mouse events, not touch events. So what's the right way to > trap this specific gesture? I have read the various touch-input documentation > but nothi

Re: Bidirectional, Manual Binding in custom control

2012-06-27 Thread Quincey Morris
On Jun 27, 2012, at 22:12 , Jerry Krinock wrote: >> On May 21, 2012, at 20:44 , Jerry Krinock wrote: > >>> -(void)setRating:(float)rating >>> { >>> // Stuff to make reverse binding work… >>> NSDictionary* bindingsInfo = [self infoForBinding:@"rating"] ; >>> id object = [bindingsInfo objectF

Re: Exiting cleanly the init method under ARC

2012-06-27 Thread Quincey Morris
On Jun 27, 2012, at 09:12 , Tito Ciuro wrote: > However, if something critical happens within the init method when ARC is > activated, what would be the proper way to exit? Would it look like this?: > > - (id)init > { >self = [super init]; > >if (self) { >if () { >//

Re: CodeSigning with Developer ID Cert

2012-06-18 Thread Quincey Morris
On Jun 18, 2012, at 19:05 , danchik wrote: > We obtained the Apple Developer ID code signing cert, and signed our pkg with > it. > > When testing with different OSes it produced several errors. > > On Lion (turning on gatekeeper on), prior to installation the "Untrusted > Cert" (paraphrasing)

Re: NSTextField Tab Order.

2012-06-13 Thread Quincey Morris
On Jun 13, 2012, at 14:15 , Robert Tillyard wrote: > Window is created from a XIB using: > > - (id)initWithManagedObjectContext:(NSManagedObjectContext *)inMoc > { > if ((self = [super initWithWindowNibName:@"RunnersWindow" owner:self])) > [self setManagedObjectContext:inMoc]; > > retur

Re: Sandboxing. WTF?

2012-05-29 Thread Quincey Morris
On May 29, 2012, at 19:03 , Shawn Bakhtiar wrote: > Again, the technical answer (solution) is NOT to use it. If everyone on > this list really understood the damage it does by turning people away from > Apple (and the art of programing) many people, and acted accordingly, we can, > and will chan

Re: crashes loading saved file

2012-05-28 Thread Quincey Morris
On May 28, 2012, at 22:08 , James Maxwell wrote: > Well, yes, that's what happens. In fact, it's much hairier than that! There's > actually an array of parentNodes, not just one. It's a complex graph, as I > mentioned, not a straightforward tree (which would already contain mutual > parent/chil

Re: crashes loading saved file

2012-05-28 Thread Quincey Morris
On May 28, 2012, at 20:48 , James Maxwell wrote: > The only reason I've begun to even vaguely questioned the framework -- > honestly, for the first time today -- is because I've read a number of > threads today that talked about potential problems in NSKeyedUnarchiver when > dealing with large,

Re: crashes loading saved file

2012-05-28 Thread Quincey Morris
On May 28, 2012, at 15:14 , James Maxwell wrote: > Just to recap the problem: I get a exc_bad_access crash when unarchiving > certain files from disk. The file is a keyed archive, which contains a fairly > complex custom object graph, with plenty of circular references (i.e., > parentNode <--->

Re: Sandboxing. WTF?

2012-05-27 Thread Quincey Morris
On May 27, 2012, at 22:40 , Graham Cox wrote: > People will always click "Allow" if it gives them an easy life. Yes, and I think that's the potential weakness in Apple's sandbox-aware bookmark scheme. If you ask the user for permission, there's a good chance the user will just give it to you.

Re: Sandboxing. WTF?

2012-05-27 Thread Quincey Morris
On May 27, 2012, at 21:55 , Graham Cox wrote: > users getting used to a nice feature that makes their apps easier to use Of course, but that's one of sharp, hard-to-swallow corners. Insecure is insecure. > I guess what pains me is that Apple have not as yet provided a sanctioned way > to imple

Re: Sandboxing. WTF?

2012-05-27 Thread Quincey Morris
On May 27, 2012, at 19:44 , Graham Cox wrote: > The only feature of my app that is really affected by this is the ability to > directly browse a user's iPhoto Library. I use elements of Karelia's iMedia > framework to enable this, but sandboxing thwarts it, for fairly obvious > reasons (iMedia

Re: DisplayName not shown

2012-05-26 Thread Quincey Morris
On May 25, 2012, at 23:26 , Gerriet M. Denkmann wrote: > But when the app restarts, it does: > > - (void)restoreStateWithCoder:(NSCoder *)coder > { > [ super restoreStateWithCoder: coder ]; > NSString *s = [ coder decodeObjectForKey: @"DisplayName" ]; > [ self setDisplayName: s

Re: Sending a list of path strings to the Finder via Scripting Bridge

2012-05-25 Thread Quincey Morris
On May 25, 2012, at 00:14 , Peter wrote: > I am supporting OS 10.5, so I still have to find a way for it. Isn't there a solution using a sequence starting with: [[NSWorkspace sharedWorkspace] selectFile:currentFilePath [0] inFileViewerRootedAtPath: [currentFilePath stringByDeletingLastP

Re: Sending a list of path strings to the Finder via Scripting Bridge

2012-05-25 Thread Quincey Morris
On May 24, 2012, at 23:56 , Peter wrote: > I'd like to reveal/select multiple items in the Finder. > NSWorkspace only handles single files as in > >[[NSWorkspace sharedWorkspace] selectFile:currentFilePath > inFileViewerRootedAtPath:currentFilePath]; How

Re: Bidirectional, Manual Binding in custom control

2012-05-21 Thread Quincey Morris
On May 21, 2012, at 20:44 , Jerry Krinock wrote: > and then binding to it in the window controller's -awakeFromNib like this… > [starRatingView bind:@"rating" >toObject:fooController > withKeyPath:@"selection.rating" > options:beForgiving] ; > -(void)setRating:(fl

Re: dlopen error

2012-05-21 Thread Quincey Morris
On May 21, 2012, at 00:20 , Roland King wrote: > I have serious trouble making that work. I've tried delete. I've > triedselecting other.. and remove text followed by Return. Tried > Command-Delete .. the damnable settings just stick there. Here are all the steps I use, and it really does work

Re: dlopen error

2012-05-20 Thread Quincey Morris
On May 20, 2012, at 22:43 , Graham Cox wrote: > I'm not sure why Xcode (4) inserts a whole extra level of settings when the > first level is fine, then doesn't give you a way to remove the second level > of settings But it does … the Delete key. Well, that does it for individual settings. I ca

Re: trackingAreas can be snuck up on without triggering?

2012-05-20 Thread Quincey Morris
On May 20, 2012, at 02:21 , mlist0...@gmail.com wrote: > Your alternate approach is essentially to give up on tracking areas, no? The > tracking area approach has an attractive simplicity, especially once my view > hierarchy and cursor tracking needs get more complicated, but if it's broken, >

Re: trackingAreas can be snuck up on without triggering?

2012-05-19 Thread Quincey Morris
On May 19, 2012, at 22:10 , mlist0...@gmail.com wrote: > If I whip the mouse into the window's content area, my cursorUpdate method is > called and I see the correct cursor. If I slowly sneak the mouse into my > window's content area, I see the window resize cursor for a moment as I cross > int

Re: getting metadata for a file on iOS

2012-05-17 Thread Quincey Morris
On May 17, 2012, at 19:56 , Roland King wrote: > NSMetaDataQuery on iOS only works for iCloud, this I know, however the File > Metadata Search Programming Guide says the following about searching the > sandbox on iOS. > > " In order to search your application’s sandbox, you will need to travers

Re: Missing children in NSTreeController/NSOutlineView

2012-05-14 Thread Quincey Morris
On May 14, 2012, at 09:07 , Kyle Sluder wrote: > If properties is a collection type—NSArray, NSSet, or (as I understand it) > NSOrderedSet)—then it is necessary and sufficient to only return > "properties." These classes are not KVO-compliant for the key "count," and > any KVO-compliant change

Re: Missing children in NSTreeController/NSOutlineView

2012-05-14 Thread Quincey Morris
On May 14, 2012, at 08:40 , Kyle Sluder wrote: > On May 14, 2012, at 1:06 AM, Quincey Morris > wrote: > >> 2. Check the KVO compliance of whichever of these keys you use. For example, >> a leaf key like this: >> >> - (BOOL) isLeaf { >>

Re: Missing children in NSTreeController/NSOutlineView

2012-05-14 Thread Quincey Morris
On May 14, 2012, at 01:13 , Mikkel Eide Eriksen wrote: > I don't currently have leaf/count configured. They are empty in IB - my > impression was that they were optional and for performance? One or other of them is used, though I believe that the count key defaults to "count" if not specified i

Re: Missing children in NSTreeController/NSOutlineView

2012-05-14 Thread Quincey Morris
On May 14, 2012, at 00:40 , Mikkel Eide Eriksen wrote: > - An NSTreeController whose content object is bound to the selection of an > NSArrayController. The NSTreeController is configured with the children key > path "properties" 1. Check that you have the correct configuration for the count ke

Re: mutableBytes Creates Autoreleased Objects

2012-05-13 Thread Quincey Morris
On May 12, 2012, at 22:00 , Ken Thomases wrote: > Well, you're the one who asserted something very concrete about when the > interior pointer was deallocated. You were claiming that Andreas couldn't > have seen what he said he saw. My point is that in the absence of a contract > you can't be

Re: mutableBytes Creates Autoreleased Objects

2012-05-12 Thread Quincey Morris
On May 12, 2012, at 13:55 , Dave Fernandes wrote: > So when a method is declared __attribute__ ((objc_returns_inner_pointer)), > then LLVM tracks regular pointers like it would NSObject pointers to see when > the owning object can be dealloced? Just want to make sure I understand. … to see when

Re: mutableBytes Creates Autoreleased Objects

2012-05-12 Thread Quincey Morris
On May 12, 2012, at 12:56 , Jens Alfke wrote: > No; -[NSString UTF8String] returns a char*, not an object. I meant "object" in the more general sense of a block of allocated memory whose lifetime is managed by a memory model. That includes (at least): 1. Obj-C objects. 2. CF…Ref objects. 3. A

Re: mutableBytes Creates Autoreleased Objects

2012-05-12 Thread Quincey Morris
On May 12, 2012, at 10:17 , Ken Thomases wrote: > That's not necessarily so. And/or requesting the mutableBytes may do the > equivalent of retain+autorelease on the NSMutableData. > > Consider an inexact analog. The -[NSString UTF8String] method seems to > create an autoreleased NSData (or si

Re: mutableBytes Creates Autoreleased Objects

2012-05-12 Thread Quincey Morris
On May 12, 2012, at 08:27 , Andreas Grosam wrote: > It seems, sending mutableBytes creates autoreleased objects (currently, > tested with ARC only). > Anybody experienced this, too? > > In code as below this may severely impact performance and tie up lots of > memory, which are apparently depen

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