Can't get Service to run.

2014-09-15 Thread Daryle Walker
I’m trying out writing a Service associated with my app: @implementation PrServicesProvider - (void)openURL:(NSPasteboard *)pboard userData:(NSString *)userData error:(NSString *__autoreleasing *)error { NSURL * const targetURL = [WebView URLFromPasteboard:pboard]; NSString *

Re: Swift Compiler Bug?

2014-09-15 Thread Charles Jenkins
Duhh! I have created dictionaries already—there’s a sample one for testing in my app already—but the syntax of that prototype went right over my head. I’m accustomed to JSON and Python’s use of braces to declare dictionaries, and I was so fully convinced the variable was an array that I

Want NSTableView NSOutlineView to load lazy like iOS?

2014-09-15 Thread Jerry Krinock
OS X app has an NSOutlineView with a data source. Clicking on a disclosure triangle to expand an item that has 13,000 children causes its data source to immediately receive -outlineView:child:ofItem: 13,000 times, on the main thread. The app presents a beachball until it’s over, which is

Re: Want NSTableView NSOutlineView to load lazy like iOS?

2014-09-15 Thread Kyle Sluder
On Mon, Sep 15, 2014, at 01:52 PM, Jerry Krinock wrote: It would be nice! Is that correct? If so, how might my outline view be abnormal? My data source is backed by Core Data, but I don’t think that matters to this issue. Below is a call stack of how my data source gets a typical one of

Re: Want NSTableView NSOutlineView to load lazy like iOS?

2014-09-15 Thread Jerry Krinock
On 2014 Sep 15, at 11:56, Kyle Sluder k...@ksluder.com wrote: Are you using a view-based outline view? No. It is cell-based. App currently runs in Mac OS X 10.6. Does your outline view have constant row heights, or are you implementing -tableView:heightOfRow:? Constant row heights. I am

Re: Want NSTableView NSOutlineView to load lazy like iOS?

2014-09-15 Thread Kyle Sluder
On Sep 15, 2014, at 12:31 PM, Jerry Krinock je...@ieee.org wrote: On 2014 Sep 15, at 11:56, Kyle Sluder k...@ksluder.com wrote: Are you using a view-based outline view? No. It is cell-based. App currently runs in Mac OS X 10.6. Can’t very well keep “only the onscreen views” if the

Re: Want NSTableView NSOutlineView to load lazy like iOS?

2014-09-15 Thread Jerry Krinock
On 2014 Sep 15, at 12:35, Kyle Sluder k...@ksluder.com wrote: Can’t very well keep “only the onscreen views” if the table isn’t view-based… Makes sense! Are you implying that lazy loading is a side benefit of view-based tables, and hence that this performance bottleneck is a legacy that I

Re: Want NSTableView NSOutlineView to load lazy like iOS?

2014-09-15 Thread Ken Thomases
On Sep 15, 2014, at 1:52 PM, Jerry Krinock je...@ieee.org wrote: OS X app has an NSOutlineView with a data source. Clicking on a disclosure triangle to expand an item that has 13,000 children causes its data source to immediately receive -outlineView:child:ofItem: 13,000 times, on the main

Re: Want NSTableView NSOutlineView to load lazy like iOS?

2014-09-15 Thread Ken Thomases
On Sep 15, 2014, at 2:46 PM, Jerry Krinock je...@ieee.org wrote: On 2014 Sep 15, at 12:35, Kyle Sluder k...@ksluder.com wrote: Can’t very well keep “only the onscreen views” if the table isn’t view-based… Makes sense! Are you implying that lazy loading is a side benefit of view-based

Binding Exception

2014-09-15 Thread Richard Charles
I have a binding that throws an Objective-C exception but the console displays no output and the application does not crash but rather the application runs fine. Enabling NSBindingDebugLogLevel 1 does not help, the console still displays nothing. I am using Xcode 5.1.1 with the All Exceptions

Re: Binding Exception

2014-09-15 Thread Keary Suska
On Sep 15, 2014, at 2:42 PM, Richard Charles rcharles...@gmail.com wrote: I have a binding that throws an Objective-C exception but the console displays no output and the application does not crash but rather the application runs fine. Enabling NSBindingDebugLogLevel 1 does not help, the

Re: Binding Exception

2014-09-15 Thread Mike Abdullah
On 15 Sep 2014, at 21:42, Richard Charles rcharles...@gmail.com wrote: I have a binding that throws an Objective-C exception but the console displays no output and the application does not crash but rather the application runs fine. Enabling NSBindingDebugLogLevel 1 does not help, the

Re: Want NSTableView NSOutlineView to load lazy like iOS?

2014-09-15 Thread Jerry Krinock
On 2014 Sep 15, at 12:47, Ken Thomases k...@codeweavers.com wrote: Check the places where you can control how the outline view sizes the columns. It seems that I only set column widths during -awakeFromNib. Definitely not upon expanding an item. In particular, from the docs for

Re: Binding Exception

2014-09-15 Thread Richard Charles
On Sep 15, 2014, at 2:52 PM, Keary Suska cocoa-...@esoteritech.com wrote: Yes, The exception will leave your app in an invalid state. Thank you, I was not aware of that. The breakpoint catches before the exception would be logged to console. Simply keep clicking the continue button in the

Re: Want NSTableView NSOutlineView to load lazy like iOS?

2014-09-15 Thread Ken Thomases
On Sep 15, 2014, at 3:54 PM, Jerry Krinock je...@ieee.org wrote: On 2014 Sep 15, at 12:47, Ken Thomases k...@codeweavers.com wrote: In particular, from the docs for -[NSOutlineViewDelegate outlineView:sizeToFitWidthOfColumn:]: By default, NSOutlineView iterates every row in the table,

Nib unloading and ARC

2014-09-15 Thread Jonathan Mitchell
I am using a NIB template, loading the same nib repetitively with a different owner each time (a non NSViewController subclass). In the nib there is an NSValueBinding binding to the owner say: self.itemValue. This all works fine. However, nib owner items are not being dealloc’d. This behaviour

Re: Nib unloading and ARC

2014-09-15 Thread Ken Thomases
On Sep 15, 2014, at 5:00 PM, Jonathan Mitchell jonat...@mugginsoft.com wrote: I am using a NIB template, loading the same nib repetitively with a different owner each time (a non NSViewController subclass). In the nib there is an NSValueBinding binding to the owner say: self.itemValue.

Updating Content of NSFileWrapper

2014-09-15 Thread Charles Jenkins
My app’s document consists of a tree of individual word processing files to be saved as separate files within an NSFileWrapper. Apple’s documentation suggests you can make the process of saving to a file wrapper more efficient if you only write out new or changed files. I’d like to do that and

Re: Updating Content of NSFileWrapper

2014-09-15 Thread Quincey Morris
On Sep 15, 2014, at 19:12 , Charles Jenkins cejw...@gmail.com wrote: // What the heck do I do here? How to I update fw's contents? You do the “obvious” thing — remove the existing file wrapper and create a new one. The clearest logic for this would be: If this file’s content