Re: willPresentError being called with NSDocumentErrorRecoveryAttempter object

2012-01-16 Thread Quincey Morris
On Jan 16, 2012, at 18:22 , Gideon King wrote: > Further information: when the user selects to duplicate, - > (BOOL)readFromURL:ofType:error: is called with the error argument being an > NSDocumentErrorRecoveryAttempter object. > > I don't know why this is happening. > > Would it be save for

Re: File UTI on 10.6.8

2012-01-03 Thread Quincey Morris
On Jan 3, 2012, at 10:29 , Martin Hewitson wrote: > I don't know how to check that. In any case, I'm left wondering which one to > use. I want that .pdf is not a text file, so I guess I'll stick with the > UTTypeConformsTo() solution, though this all feels a little fragile. I may > make hard-co

Re: File UTI on 10.6.8

2012-01-03 Thread Quincey Morris
On Jan 3, 2012, at 02:11 , Martin Hewitson wrote: > Actually, it seems that the NSWorkspace method behaves differently, (assuming > I'm using it correctly): > > [[NSWorkspace sharedWorkspace] filenameExtension:@"pdf" > isValidForType:(NSString *)kUTTypeText] > > returns YES > > whereas the UT

Re: File UTI on 10.6.8

2012-01-03 Thread Quincey Morris
On Jan 2, 2012, at 23:57 , Martin Hewitson wrote: > I want to check if a file extension is registered as a text file. So I made a > little category method on NSString like this: > > - (BOOL)isText > { > BOOL fileIsText = NO; > > CFStringRef fileExtension = (CFStringRef) self; > CFStringRef

Re: How to update preview in NSPrintPanel?

2011-12-30 Thread Quincey Morris
On Dec 28, 2011, at 05:05 , Luc Van Bogaert wrote: > I haven't been able to set the checkbox's state to ON, when opening the print > panel. I've tried creating the view controller first and then sending > [viewcontroller setCheckBoxValue:YES], but that doesn't seem to work, so I > suspect I'm s

Re: How to update preview in NSPrintPanel?

2011-12-25 Thread Quincey Morris
On Dec 25, 2011, at 14:05 , Luc Van Bogaert wrote: > I'm adding a custom user setting to a NSPrintPanel by adding an "accessory > view controller" for a view that contains just one control (a checkbox) and > which is loaded from a nib file. The checkbox's value has a binding to the > view contr

Re: responding to NSStepper clicks

2011-12-16 Thread Quincey Morris
On Dec 16, 2011, at 20:04 , Koen van der Drift wrote: > It's not working yet. Whenever I type in the NSTextField, the number shows up > twice, eg if I type '6', I see '66'. And I get the message below in the > debugger console. Um, it's not just "a message", it's an exception. Your app crashe

Re: why does this method return an id?

2011-12-13 Thread Quincey Morris
On Dec 12, 2011, at 22:39 , Matt Neuburg wrote: > But if you subclassed NSSortDescriptor and didn't override > sortDescriptorWithKey:ascending: and expected [MyFancyEtc. > sortDescriptorEtc.] to magically produce a MyFancyEtc. instead of an > NSSortDescriptor, you'd *deserve* that warning. In f

Re: Best way to manage double-clicked files?

2011-12-10 Thread Quincey Morris
On Dec 10, 2011, at 16:51 , C.W. Betts wrote: > - (BOOL)readFromFileWrapper:(NSFileWrapper *)fileWrapper ofType:(NSString > *)typeName error:(NSError **)outError > { > int chosen = [self showMemoryCardChooserForFile:[fileWrapper filename]]; > if (chosen == 0) { > return

Re: NSIndexSet of NSButtonCells in NSOutlineView

2011-12-08 Thread Quincey Morris
On Dec 8, 2011, at 08:12 , Gilles Celli wrote: > The instrument's name is selectable as an NSButtonCell, the idea is to turn > on/off its respective graph / plot. > So there's a mix of NSButtonCells along with NSString in the NSOutlineView. > My model's NSButtonCells are based of NSMutableDiction

Re: bindings duplicates object returned

2011-12-07 Thread Quincey Morris
On Dec 7, 2011, at 20:05 , Eric Slosser wrote: > I have an NSTreeController whose 'content array' is bound to another object's > 'content' key. > > It appears that the binding mechanism duplicates the array that was returned > by [foo content]. > > This is bad, because changes that 'foo' mak

Re: awakeFromInsert called twice with nested contexts

2011-11-27 Thread Quincey Morris
On Nov 27, 2011, at 20:50 , Tom Harrington wrote: > If they're different objects then I'm getting duplicates, which is at > least as much of a bug and possibly more so. What I observe is that if > I add 10 objects, I get 20 calls to awakeFromInsert, 10 for the child > context and 10 for the parent

Re: awakeFromInsert called twice with nested contexts

2011-11-27 Thread Quincey Morris
On Nov 27, 2011, at 16:49 , Tom Harrington wrote: > Actually I don't, so far as I can tell. As I mentioned in my previous > message, I get the same managed object ID both times. I haven't > checked the address, but surely if they were different objects they > wouldn't have the same ID. You're wro

Re: NSTableView Binding NSSortDescriptor

2011-11-25 Thread Quincey Morris
On Nov 25, 2011, at 13:51 , Quincey Morris wrote: > or: > > [self willChangeValueForKey: @"sortDescriptorArray"]; > self.sortDescriptorArray = [NSArray arrayWithObject:sd]; > [self didChangeValueForKey: @"sortDescriptorArray"]; > > if

Re: NSTableView Binding NSSortDescriptor

2011-11-25 Thread Quincey Morris
On Nov 25, 2011, at 13:21 , Ben wrote: > @property (readonly, strong, nonatomic) IBOutlet NSArray > *sortDescriptorArray; (plus @synthesize it in the implementation) > > > In my applicationDidFinishLaunching method I have... > > > NSSortDescriptor * sd = [[NSSortDescriptor alloc] initWithKey:

Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView

2011-11-24 Thread Quincey Morris
On Nov 24, 2011, at 05:46 , Gilles Celli wrote: > My hierearchical list will not changed or sorted in the NSoutlineView….that's > why I was thinking to use NSArray for the buttons. In your scenario -- where the list is "really" flat but displayed hierarchically for esthetic reasons -- the array

Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView

2011-11-23 Thread Quincey Morris
On Nov 23, 2011, at 12:40 , Gilles Celli wrote: > things are a little more clear now, so I will stick with the NSArray version. Actually, I gave you a partially wrong answer. I noticed you are using a NSOutlineView, but then I forgot to take into account the list hierarchy. In general, trying t

Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView

2011-11-23 Thread Quincey Morris
On Nov 23, 2011, at 12:40 , Gilles Celli wrote: > Just a question at Quincey: Maybe it's me, but I'm not sure how I could > convert the 'item' parameter of both NSOutlineView datasource methods to a > row number ? Where should I get the index value ? [outlineView rowForItem: item] ___

Re: Is there an easier way of changing NSButtonCell state in an NSOutlineView

2011-11-23 Thread Quincey Morris
On Nov 23, 2011, at 07:58 , Gilles Celli wrote: > I've setup an NSOutlineView with 2 colums: the first one named > "buttonColumns" with NSButtonCell (Switch ON / OFF) > and the second one with TextFieldCell… > > While the state change works for NSButtonCell in the buttonColum I had to > create

Re: CoreData and Threading

2011-11-18 Thread Quincey Morris
On Nov 18, 2011, at 15:21 , patrick machielse wrote: > I need to _continuously_ merge changes made in the _main_ thread into a > context held by a background thread. Most (all?) discussions about > multi-threading in CoreData discuss merging changes from a _finite_ operation > in the _backgroun

Re: About iVars declaration and property

2011-11-16 Thread Quincey Morris
On Nov 16, 2011, at 01:00 , Don Quixote de la Mancha wrote: > Using properties significantly increased the size of my executable > file. If I had something like this: > > float a = [self foo: self.scale]; > float b = [self bar: self.scale]; > > I could cut down the size of my code quite a bit b

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-16 Thread Quincey Morris
On Nov 16, 2011, at 01:08 , Stefan Werner wrote: > Any application compiled today will have a constant number in place of > NSWindowCollectionBehaviorFullScreenPrimary. If the OS at some point changes > the meaning of that number, it will break all applications compiled before > that date. Yes

Re: Implementing Full Screen for 10.7 but app should also run on 10.6

2011-11-14 Thread Quincey Morris
On Nov 14, 2011, at 07:15 , Koen van der Drift wrote: > I'd like my application to use the full screen feature on 10.7, but > the app should also run on 10.6 I tried adding > NSWindowCollectionBehaviorFullScreenPrimary for my main window, but > got an error since I am building agains 10.6 SDK. >

Re: NSBitmapImageRep and alpha channel

2011-11-13 Thread Quincey Morris
On Nov 13, 2011, at 11:11 , James Merkel wrote: > This is kind of interesting -- if I rotate the image in Preview (rather than > Image Capture), then the histogram looks normal. > Looking at the NSBitmapImageRep from Preview image, the order is RGBA and > there is no reported alpha channel. > Fu

Re: NSBitmapImageRep and alpha channel

2011-11-12 Thread Quincey Morris
On Nov 12, 2011, at 14:01 , James Merkel wrote: > d' = a * s + (1 - a) * d > All premultiplication does is precalculate a * s." > > First question -- what is d' in that equation? It's the result of compositing the source (your image) onto the destination (the background). > I read images from

Re: 2 itunesconnect questions

2011-11-12 Thread Quincey Morris
On Nov 11, 2011, at 16:59 , April wrote: > That's why the meaningless name in my email even though by and large I do not > use a pseudonym anywhere else in the world. AFAIK, there is not and never has been any standard of etiquette for this list that forbids or even frowns upon the use of pseud

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-11 Thread Quincey Morris
On Nov 10, 2011, at 23:14 , Don Quixote de la Mancha wrote: > I implemented both the app delegate and view controller memory > warnings, then set breakpoints at both of them. The breakpoints don't > get hit. You missed the point of the comments made much earlier in the thread. The breakpoints w

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-10 Thread Quincey Morris
On Nov 10, 2011, at 18:03 , Don Quixote de la Mancha wrote: > I don't have a problem with the system killing runaway processes. > What I have a problem with is that calloc() NEVER returns NULL. If it > ever did, I would have plenty of opportunity to deallocate ALL of the > memory I just allocated

Re: automaticallyNotifiesObserversOf

2011-11-04 Thread Quincey Morris
On Nov 4, 2011, at 22:51 , Roland King wrote: > Then I went and looked in the documentation, couldn't find a reference to it > anywhere in iOS, eventually found a note in the 10.5 Leopard release notes > that that pattern had been introduced, that's the only documentation I can > find on it any

Re: NSTreeController won't initWithCoder on Leopard

2011-11-02 Thread Quincey Morris
On Nov 2, 2011, at 18:42 , Eric Slosser wrote: > I've created a modal dialog that uses an NSTreeController as part of a > master-detail style interface to a hierarchical storage model. Using > bindings (not delegate methods) to supply the data. Using 10.4 as the base > SDK. XIB attached. >

Re: Custom NSView binding

2011-11-01 Thread Quincey Morris
On Nov 1, 2011, at 15:27 , Livio Isaia wrote: > Thank you for your answer, > but i can't figure out which method(s) I must implement. I tried with some of > them and still doesn't work (e.g. valueForKey:) It's not very well documented. Start here: http://developer.apple.com/library/mac

Re: Custom NSView binding

2011-11-01 Thread Quincey Morris
On Nov 1, 2011, at 11:54 , Livio Isaia wrote: > I created an IB plug-in with a subclass of NSView with an exposed bind of > type NSNumber, and then I bind it to a MyNSImageView through an > NSObjectController (this is made directly in IB). > Now, everything works fine, except that when the metho

Re: Help with view constraints

2011-10-28 Thread Quincey Morris
On Oct 28, 2011, at 14:53 , David Catmull wrote: > - What is the simplest way to adjust the text field's height to fit its > content? AFAIK there's no *simple* way to do it perfectly. You can use [NSString sizeWithAttributes:] to determine the height but you'll need to match the text field's a

Re: Query core data store based on a transient calculated value

2011-10-28 Thread Quincey Morris
On Oct 26, 2011, at 14:17 , Darren Wheatley wrote: > I need to display a subset of those rows in a table view filtered on a > calculated search criteria, and for each row displayed add a value that I > calculate in real time but don't store in the entity. > > The calculation needs to use a couple

Re: ARC + return of autoreleased CFType

2011-10-20 Thread Quincey Morris
On Oct 20, 2011, at 15:38 , Jean-Daniel Dupas wrote: > Le 20 oct. 2011 à 23:38, Bill Cheeseman a écrit : > >> I found this discovery extraordinarily helpful in using Analyze to kill >> memory issues in a couple of frameworks I distribute. The frameworks make >> heavy use of CFTypeRef objects. I

Re: Core Data: Determine if managed object is deleted

2011-10-20 Thread Quincey Morris
On Oct 20, 2011, at 15:37 , Jerry Krinock wrote: > When I need to know whether or not a managed object is deleted, often I fall > into the trap of trying -[NSManagedObject isDeleted], forgetting that its > documentation states … > > "… It may return NO at other times, particularly after the ob

Re: Custom NSArrayController that manages its own array?

2011-10-18 Thread Quincey Morris
On Oct 18, 2011, at 17:01 , Keary Suska wrote: > When dealing with collections even the best of us forget that in the MVC > approach the model for the NSArrayController is the array itself, and not the > object that contains it. The key and the collection KVC methods are simply a > way to acqui

Re: 'Static' items in an NSOutlineView

2011-10-18 Thread Quincey Morris
On Oct 18, 2011, at 05:20 , Koen van der Drift wrote: > when my app starts the first time, I would like to have the > outline view be prepopulated with a few groups: LIBRARY, FAVORITES, > RECENT and maybe Group1 (a child of LIBRARY). I did all that, but did > not add Group1 to be a child of LIBRA

Re: Custom NSArrayController that manages its own array?

2011-10-18 Thread Quincey Morris
On Oct 18, 2011, at 10:44 , Jens Alfke wrote: > To help bind my data model to AppKit tables, I’ve written a custom class that > implements KVC collection accessors to define a mutable-array property. That > is, it implements methods like -countOfEntries, objectInEntriesAtIndex:, > insertObject:

Re: 'Static' items in an NSOutlineView

2011-10-17 Thread Quincey Morris
On Oct 17, 2011, at 19:58 , Koen van der Drift wrote: > What it should look like is: > > LIBRARY (static) > Group1 > Group2 > > > FAVORITES (static) > Group3 > Group4 > > RECENT(static) You've missed something basic. In the abo

Re: ARC conversion issue problem with Xcode 4.2

2011-10-16 Thread Quincey Morris
On Oct 16, 2011, at 10:13 , Sean Todd wrote: > Still not sure why the error message stated that the type of the property did > not match the type of the setter accessor though? My guess is that the @property causes the compiler to create an implicit declaration for the accessor, which includes

Re: Arc and performSelector

2011-10-16 Thread Quincey Morris
On Oct 16, 2011, at 00:23 , Gerriet M. Denkmann wrote: > I have this code: > > for( id aThing in someArray ) > { > if ( [ aThing respondsToSelector: @selector(setTitle:) ] ) > { > [ self replaceIn: aThing > readS

Re: Arcs and Bridges

2011-10-15 Thread Quincey Morris
On Oct 15, 2011, at 23:16 , Gerriet M. Denkmann wrote: > Formerly I had: > > CFStringEncoding encoding = ... > CFStringRef axa = CFStringGetNameOfEncoding ( encoding ); > NSString *encodingName = (NSString *)axa; > NSDictionary *d = [ [ NSDictionary alloc ] initWithObjectsAndKeys: >

Re: CFDictionarySetValue and ARC

2011-10-15 Thread Quincey Morris
On Oct 15, 2011, at 20:20 , Roland King wrote: > -(void)addView:(UIView *)view forElement:(id)element > { > CFDictionarySetValue( viewToElementMap, (__bridge id)view, (__bridge > id)element ); > } > > gives me > > error: incompatible types casting 'UIView *__strong' to 'id' with a __brid

Re: ARC conversion issue problem with Xcode 4.2

2011-10-15 Thread Quincey Morris
On Oct 15, 2011, at 18:02 , Sean Todd wrote: > I am trying to convert a Core Data app which uses garbage collection to ARC. > When I run the refactoring tool, I see issues like: > > Semantic Issue: Type of property 'person' does not match type of accessor > 'setPerson:' It's really, really imp

Re: Blocks vs. life, the universe and everything

2011-10-14 Thread Quincey Morris
On Oct 14, 2011, at 14:27 , Greg Parker wrote: > Do you actually use exceptions in your code, or do you follow the Cocoa > convention that exceptions are for programmer error only? If you don't use > exceptions, then you can omit any try blocks and let the uncaught exception > handler log the f

Blocks vs. life, the universe and everything

2011-10-14 Thread Quincey Morris
I'm rewriting for 10.7/ARC some code that (basically) trampolines status between threads to avoid affecting the UI from background threads. This time around I'm using blocks, and it turns out this *dramatically* simplifies the code, which is a good thing. However, I notice I have this pattern a

Re: 'Static' items in an NSOutlineView

2011-10-14 Thread Quincey Morris
On Oct 14, 2011, at 09:24 , Koen van der Drift wrote: > I’m trying to find out how to create the grayish, static items in an > NSOutlineView, eg “Library” in iTunes or “Mailboxes” in Mail. > Sometimes they have a disclosure triangle, eg "Devices" in the Finder. > I think I need to subclass NSCell

Re: Namespace clash problem

2011-10-13 Thread Quincey Morris
On Oct 13, 2011, at 18:55 , Graham Cox wrote: > Looks like I have no choice but to change the method name for the class > method at least :( Incidentally, I've been trying to remember for months why using a class object (plus static variables) wasn't a satisfactory implementation of a singleton

Re: Select model objects with NSTableView using cocoa bindings

2011-10-13 Thread Quincey Morris
On Oct 13, 2011, at 13:44 , Luc Van Bogaert wrote: > Thanks, I got this working in one 'direction', ie. when the selection in the > table is changed, this is reflected in my UI and the 'selected' Dot objects > are drawn in a different color. For this, I decided to use a > NSMutableIndexSet 'dot

Re: Select model objects with NSTableView using cocoa bindings

2011-10-12 Thread Quincey Morris
On Oct 12, 2011, at 13:31 , Luc Van Bogaert wrote: > I'm wondering if I should create a NSIndexSet property in my model object and > bind it to the NSArrayController's 'selectedIndexes' key? Yes, but you've got the terminology wrong. The relevant concept here is a binding name, and it's "select

Re: NSComboBoxCell & AutoComplete

2011-10-09 Thread Quincey Morris
On Oct 9, 2011, at 17:18 , livinginlosange...@mac.com wrote: > I have an NSComboBox bound to the selection of an NSArrayController. The > bound object is an NSDictionary. I use an NSValueTransfomer to represent the > NSDictionary. The ValueTransformer gives me the dictionary's summary property

Re: dataWithBytesNoCopy:length:freeWhenDone

2011-10-09 Thread Quincey Morris
On Oct 9, 2011, at 05:44 , silve...@wfmh.org.pl wrote: > But what I tried to achieve was to do it somewhat more "OO", although sharing > the payload between various instances seems to be contradicting it ;-) Not at all. Sharing the payload is neither a problem nor wrong, but trying to take a s

Re: return NO in tableViewSelectionDidChange: disables button cell

2011-10-08 Thread Quincey Morris
On Oct 8, 2011, at 20:10 , Michael Hanna wrote: > On Mac OS X 10.6.8, in an NSTableView I have a column that contains > nsbuttoncell class. Row selection isn't useful in my application but doing: > > - (BOOL)tableView:(NSTableView *)tableView shouldSelectRow:(NSInteger)row > { > return NO; > } >

Re: dataWithBytesNoCopy:length:freeWhenDone

2011-10-08 Thread Quincey Morris
On Oct 8, 2011, at 14:31 , silve...@wfmh.org.pl wrote: > What am I doing wrong? Shouldn't the instance created using > dataWithBytesNoCopy:length:freeWhenDone simply hold the same bytes as > the originally provided ones? Presumably you're using 'dataWithBytesNoCopy:length:freeWhenDone:NO', sin

Re: adding something to a setter

2011-10-06 Thread Quincey Morris
On Oct 6, 2011, at 17:12 , Charles Srstka wrote: > But isn't creating a whole abstract superclass for this a lot more of a > hassle than just making a private property? *Some* more. I'm not sure about a *lot* more. > What would you get from that approach that you wouldn’t get from just having

Re: adding something to a setter

2011-10-06 Thread Quincey Morris
On Oct 6, 2011, at 15:34 , Torsten Curdt wrote: > While I agree that this is not a big deal in practice, I am sure you'd > agree that it would be indeed nice if we could somehow call out to the > synthesized setters. I don't have so deep insights into the Obj-C > runtime but I was wondering if the

Re: How to blink with a focus ring of the text box?

2011-10-06 Thread Quincey Morris
On Oct 6, 2011, at 08:33 , Nick wrote: > Is there a way to change the color of the NSTextField's focus ring to red > (to highlight that this is an error)? I think this sounds like a *terrible* idea. Not because it's a terrible idea, but because introducing yet another subtle[-ish] sound/flash/c

Re: adding something to a setter

2011-10-06 Thread Quincey Morris
On Oct 6, 2011, at 04:28 , Torsten Curdt wrote: > Now you also want to setNeedsDisplay: when a new value is set. So one > can override the setter. > > - (void)setValue:(NSString*)theValue > { > ... > [self setNeedsDisplay:YES]; > } > > but - you would have to implement the setter yourself. N

Re: NSArrayController Selection and Managed Object Context Undo

2011-10-06 Thread Quincey Morris
On Oct 6, 2011, at 07:40 , Keary Suska wrote: > AFAIK you will need to manage selection restoration semantics yourself, and > it may not be easy and it may be fragile. Note also that the preserve and > avoid empty selection settings will also have an effect. That being said, the > approach woul

Re: Keyboard NSEvents and a NSObjectController?

2011-10-05 Thread Quincey Morris
On Oct 5, 2011, at 17:28 , Robert Monaghan wrote: > I have a bunch of Objects that are in an NSArrayController. My UI is bound to > an NSObjectController which is then set to work with one of these objects (in > the ArrayController). The user essentially selects one of the objects in the > Arra

Re: CoreData Relationships and Array Controllers

2011-10-04 Thread Quincey Morris
On Oct 4, 2011, at 01:49 , Amy Gibbs wrote: > If anyone could point me in the direction of a good fetching explanation or > tutorial that would be great. I don't know of a good reference for you. Googling is as likely as not to turn something up. I'd also suggest you try reading about fetches i

Re: Years-old mysterious bindings crash

2011-10-04 Thread Quincey Morris
On Oct 4, 2011, at 17:59 , Seth Willits wrote: > There aren't any bindings setup at the point it crashes. The controller is > connected to absolutely nothing. It literally is > > controller = [[NSObjectController alloc] initWithContent:nil]; > ... unrelated things ... > > [self view]; > > In a

Re: Years-old mysterious bindings crash

2011-10-03 Thread Quincey Morris
On Oct 3, 2011, at 18:29 , Seth Willits wrote: > I've been receiving reports of this rare but persistent crash over the past > few years, and I've never been able to reproduce it or figure out what's > causing it. One thing you could do, if you have an actual crash dump to examine, is to work

Re: how to set path on NSPathControl

2011-10-03 Thread Quincey Morris
On Oct 3, 2011, at 20:20 , Sandeep Mohan Bhandarkar wrote: > Can some one let me know if it is possible to set a NSPathControl using a > NSString. I tried the follwong. > > NSString *Node1 = @"Test1"; > NSString *Node2 = @"Test2"; > > [rootSubRootPath setURL:[NSURL URLWithString:[NSString > s

Re: NSOutlineView - display NSButtonCell only for leaf node with outlineView:dataCellForTableColumn:item: method

2011-10-03 Thread Quincey Morris
On Oct 3, 2011, at 01:36 , Gilles Celli wrote: > As you suggested I tried the different options (putting a button cell in IB) > and also returning with a non-nil cell for the NSOutlineView…but I'm not > quite sure what you mean: Do I need to remove the "buttonColumn" and have > only one column

Re: spin_lock$VARIANT$mp in Sketch

2011-10-03 Thread Quincey Morris
On Oct 3, 2011, at 09:38 , Boyd Collier wrote: > 6. Select Open... from the file menu > > Often, I get the following results : […] > On the 4th line, above, the message ' Thread 7: Program received signal: > "EXEC_BAD_ACCESS". ' is displayed. > In the area showing threads, Thread 7 reads "TFSV

Re: Mystery of the missing symbol

2011-10-02 Thread Quincey Morris
On Oct 2, 2011, at 17:50 , Graham Cox wrote: > A user is reporting this error logged to the console when trying to load a > plug-in bundle (an iTunes visualizer): > > dlopen(): Symbol not found: __NSConcreteStackBlock > Referenced from: > Expected in: /usr/lib/libSystem.B.dylib > > > The plu

Re: NSOutlineView - display NSButtonCell only for leaf node with outlineView:dataCellForTableColumn:item: method

2011-10-02 Thread Quincey Morris
On Oct 2, 2011, at 13:14 , Gilles Celli wrote: > Now I want to have a NSButtonCell for all the DataTypeNames (leaf node of the > OvItem items class)…I've setup an NSOutlineView with 2 columns: first column > named > "buttonColumn" and a second one to display the Items… > > I've tried to generat

Re: CoreData Relationships and Array Controllers

2011-10-02 Thread Quincey Morris
On Oct 2, 2011, at 10:37 , Amy Gibbs wrote: > so I tried to bind the table column to the customerBookcase array controller, > arranged objects, orderItemProduct.productTitle (orderItemProduct is the > relationship between CustomerOrderItems and Product) Yeah, that obviously can't work, because

Re: How to make Lion's autosaving work for my application?

2011-10-01 Thread Quincey Morris
On Oct 1, 2011, at 15:14 , Nick wrote: > Unfortunately I do not have Apple developer's account. When I try to access the videos while logged out, it offers a free "Apple Developer" registration, which is apparently different from a "Mac Developer" or "iOS Developer" registration, both of which

Re: NSOperationQueue: -waitUntilAllOperationsAreFinished and -setSuspended:

2011-10-01 Thread Quincey Morris
On Oct 1, 2011, at 15:06 , Kyle Sluder wrote: > NSOperationQueue backgroundQueue = /* some long-lived background queue */; > NSOperationQueue replyQueue = [NSOperationQueue new]; > int totalResult = 0; > > [replyQueue setSuspended:YES]; > > for (id foo in myFoos) { > [backgroundQueue addOperati

Re: How to make Lion's autosaving work for my application?

2011-10-01 Thread Quincey Morris
On Oct 1, 2011, at 13:56 , Nick wrote: > I was hoping this Autosave feature > could help me do it easier. Hoping at random isn't likely to help you do anything easier (though if it does, you can probably write a profitable self-help book). Also, expecting us to do your basic research for you is

Re: Core Data : Undo Delete : Cannot fulfill a fault

2011-09-30 Thread Quincey Morris
On Sep 30, 2011, at 13:22 , Jerry Krinock wrote: > The trick is the order in which they are deleted. If the child NewObject7 is > deleted before its parent NewObject6, Undo will succeed. If the parent is > deleted first, Undo will fail. In my app, the order is random due to > enumerating an

Re: Core Data : Undo Delete : Cannot fulfill a fault

2011-09-30 Thread Quincey Morris
On Sep 30, 2011, at 00:17 , Jim Correia wrote: > You are assuming that the only place this information can exist is in the row > cache itself. The information can exist anywhere. At the risk of > over-trivializing the problem—It’s just code™. > > All the information necessary to resurrect the o

Re: Core Data : Undo Delete : Cannot fulfill a fault

2011-09-30 Thread Quincey Morris
On Sep 29, 2011, at 22:52 , Jim Correia wrote: > Core Data’s undo stack does allow you to undo past the last save point. And > if it didn’t, it would remove actions from the undo manager, resulting in a > disabled undo menu, not leave a bunch of actions on the undo stack that would > generate e

Re: Core Data + Undo + Autosave = Instability? Was: … Undo Delete : Cannot fulfill fault

2011-09-29 Thread Quincey Morris
On Sep 29, 2011, at 16:50 , Jerry Krinock wrote: > The -[NSManagedObjectContext undo] method […] does not get invoked when user > clicks Edit ▸ Undo in a Cocoa application. I dunno. The issue isn't whether the method gets invoked. The issue is whether the property data that's needed to undo the

Re: Core Data : Undo Delete : Cannot fulfill a fault

2011-09-29 Thread Quincey Morris
On Sep 29, 2011, at 06:22 , Jerry Krinock wrote: > That's interesting that this occurs even if the object has never even been > faulted in. Further confirmation of my conclusion, and yours, that Core > Data is saving attributes elsewhere. I recall that the heavy lifter in a > Core Data undo

Re: controller question

2011-09-29 Thread Quincey Morris
m uses array controller to show and delete only, when the >> other is used for insertion only throw dragging therefor no need in >> controller. > > sorry for repost, how to safely insert objects in m_array? > >> 2011/9/28 Quincey Morris: >> >> If

Re: Initial Object in Array Controller

2011-09-29 Thread Quincey Morris
On Sep 29, 2011, at 02:42 , David Mirabito wrote: > My understanding is that because of 'preparesContent=YES' it manages the > array internally, which i get at with the [myController content]. Not quite so. Array controllers *always* manage a (separate) array, or an array property if configured

Re: Numeric Entry and Formatting With NSNumberFormatter Won't Append Zeros

2011-09-28 Thread Quincey Morris
On Sep 28, 2011, at 16:26 , Quincey Morris wrote: > based on a belief that the difference is small enough to be either really > confusing or annoying Oops, I meant "based on your belief that the difference is small enough to *not* be either really confusing o

Re: Numeric Entry and Formatting With NSNumberFormatter Won't Append Zeros

2011-09-28 Thread Quincey Morris
On Sep 28, 2011, at 15:50 , Philip McIntosh wrote: > I want the number in the display (which is a string representation of the > number) to be formatted as it is entered not after any "return" or > "calculate" keys are pressed. I can get it to format and display the string > correctly "after" s

Re: controller question

2011-09-27 Thread Quincey Morris
On Sep 27, 2011, at 17:51 , Ariel Feinerman wrote: > So in the case of insertion to m_array, we just have to reset content > property: > > // somewhere in the code > [self willChangeValueForKey: @"content"]; > [m_array insertObject: url atIndex: 0]; > [self didChangeValueForKey: @"content"]

Re: Trouble creating dictionary

2011-09-27 Thread Quincey Morris
On Sep 27, 2011, at 18:21 , Dale Satterfield wrote: >tzDict = [NSDictionary dictionaryWithObjects:tzKeys forKeys:tzValues]; Don't you mean: tzDict = [NSDictionary dictionaryWithObjects:tzValues forKeys:tzKeys]; ___ Cocoa-dev mailing lis

Re: controller question

2011-09-27 Thread Quincey Morris
On Sep 27, 2011, at 12:18 , Ariel Feinerman wrote: > So it is good news. Do -insertObject: atIndex:, -removeObject: or > removeObjects: use KVO? I guess they do. If you use these methods, you don't have to write any manual synchronization code. Your original array will contain the modified cont

Re: controller question

2011-09-27 Thread Quincey Morris
On Sep 27, 2011, at 07:40 , Keary Suska wrote: > On Sep 26, 2011, at 9:22 PM, Quincey Morris wrote: > >> On Sep 26, 2011, at 19:03 , Ariel Feinerman wrote: >> >>> if I use persistence NSMutableArray as content array in NSArrayController so >>> [arrayC

Re: controller question

2011-09-26 Thread Quincey Morris
On Sep 26, 2011, at 19:03 , Ariel Feinerman wrote: > if I use persistence NSMutableArray as content array in NSArrayController so > [arrayController setContent: m_array]; will controller copy one or retain? The array controller will *observe* the array, not copy it. > So every deletion or additi

Re: Custom border (repeated image) for NSTextView

2011-09-25 Thread Quincey Morris
On Sep 25, 2011, at 04:48 , Nick wrote: > I need to create a custom border for the textview. This border should be > made out of an image. > I subclassed NSScrollView (since i need the border to surround scroll bars > as well as the text area) and rewrote the -drawRect method. > At the end of this

Re: Why does Xcode define IBOutlet with @synthesize?

2011-09-23 Thread Quincey Morris
On Sep 23, 2011, at 15:24 , Jerry Krinock wrote: > When creating a new project in Xcode 4.1, I get a window which is declared in > the app delegate as: > > @property (assign) IBOutlet NSWindow *window; > > and defined as > > @synthesize window ; > > Is this not going to create unnecessary

Re: UTI in Lion

2011-09-22 Thread Quincey Morris
On Sep 22, 2011, at 17:24 , Charles Srstka wrote: > Sure there can be a “new or enhanced” UTI system, as long as its (rather > simple) interfaces continue to work with current applications. Since the > behind-the-scenes of how the UTI system detects what types of files is > abstracted away, it

Re: UTI in Lion

2011-09-22 Thread Quincey Morris
On Sep 22, 2011, at 15:48 , Charles Srstka wrote: > The idea of UTI is that you just want to handle a certain type of file; you > don’t care *how* the OS figures out that it’s that particular type of file. > If someone comes up with a newer and better way to implement file types in > the future

Re: Affinity between a document (plain text) file and app-specific parameters for this document

2011-09-21 Thread Quincey Morris
On Sep 21, 2011, at 13:34 , Nick wrote: > I am trying to implement some kind of "memory" for the documents in my > application. For example, each document window has a position on the > screen. So I'd like to see this position next time the user opens this saved > document. This is normally and

Re: Set NSFileModificationDate on USB key

2011-09-21 Thread Quincey Morris
On Sep 21, 2011, at 13:50 , Leonardo wrote: > I have a source file with NSFileModificationDate 2011-09-21 20:12:29 + > I copy this date to the destination file and I get 2011-09-21 20:12:28 + > So, one second earlier. This happens only on a FAT16 USB-key volume. FAT16 volumes store date/t

Re: Symbolic Breakpoints

2011-09-21 Thread Quincey Morris
On Sep 21, 2011, at 13:25 , Richard Somers wrote: > Results of Xcode 4.1 symbolic breakpoint testing. > > lldb will not break on any Apple supplied library symbols. > > gdb will break on some Apple supplied library symbols but not all. > > [NSObject alloc]Yes > > [NSUndoManager all

Re: Symbolic Breakpoints

2011-09-21 Thread Quincey Morris
On Sep 21, 2011, at 12:40 , Richard Somers wrote: > I made a brand new project in Xcode 4.1 and got the same results as before. > gdb crashes when just using a method name like 'keyDown:' for the symbolic > breakpoint. It would appear that this has been fixed in Xcode 4.2. Also you > have accur

Re: UTI in Lion

2011-09-21 Thread Quincey Morris
On Sep 21, 2011, at 03:10 , Gerriet M. Denkmann wrote: > I got from reading the documentation that UTIs are the modern way to go. > > NSAttributedString.h says "for reading, thNSFileTypeDocumentAttributes is > available along with NSDocumentTypeDocumentAttribute, but for writing the two > are m

Re: Symbolic Breakpoints

2011-09-21 Thread Quincey Morris
On Sep 21, 2011, at 09:29 , Richard Somers wrote: > That works! So apparently the entire symbol including square brackets and the > initial plus or minus indicating instance method versus class method is > required for an Objective-C symbolic breakpoint. > > The Xcode 4 User Guide explicitly st

Re: bindings confusion

2011-09-20 Thread Quincey Morris
On Sep 20, 2011, at 02:13 , Torsten Curdt wrote: > Before I was following the docs and wrote the bindings clue code myself > > http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaBindings/Concepts/HowDoBindingsWork.html#//apple_ref/doc/uid/20002373 > >- (void)bind:(NS

Re: How to do Save As... in Lion

2011-09-18 Thread Quincey Morris
On Sep 18, 2011, at 03:05 , Gerriet M. Denkmann wrote: > No, this is not what I really want. Yet that is what you asked about. :) > Think of a file which contains Englisch text, and which has been saved as > Ascii or Mac Roman. > Now I enter some Chinese characters and it has to be saved in Utf

Re: How to do Save As... in Lion

2011-09-17 Thread Quincey Morris
On Sep 17, 2011, at 19:59 , Gerriet M. Denkmann wrote: > My app had (before Lion) a Menu Item Save As... which brought up a save panel > with a SavePanelAccessory, which contained a PopUpButton with all available > stringEncodings. > > In Lion there is only Save... (which also shows my SavePane

<    13   14   15   16   17   18   19   20   21   22   >