Re: NSButton with NSTexturedRoundedBezelStyle outside of NSToolbar

2015-10-19 Thread Jacek Oleksy
I double checked it (I use the screenshot mechanism, it displays the size of selection rectangle), and it is 24 on my toolbar (and also e.g. on the toolbar in Finder). /Jacek On Fri, Oct 16, 2015 at 11:31 PM, Richard Charles wrote: > >> On Oct 16, 2015, at 1:24 AM, Jacek Oleksy wrote: >> >> Sti

Re: NSButton with NSTexturedRoundedBezelStyle outside of NSToolbar

2015-10-19 Thread Jacek Oleksy
On Fri, Oct 16, 2015 at 10:57 PM, Richard Charles wrote: > >> On Oct 16, 2015, at 1:24 AM, Jacek Oleksy wrote: > >> Still, I have no idea why the 22 vs 24px :/ > > It’s points not pixels. User interface elements are resolution independent. > Right, I meant logical pixels (or points). /Jacek __

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-10-19 Thread Marek Hrušovský
I just went through my crashes and this thread popped up in google. I have additional information (one helpful method in the stack). Even if I dig deep I still can't figure out what can cause the issue. Is anyone able to get from "_hierarchyDidChangeInView" the line where it crashes? Anyway I cr

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-10-19 Thread Gary L. Wade
That looks familiar back when I dealt with adding an accessory view under sand boxing. I don't have the code base available to me to know what I did differently or remind me further, but I know I did something different in the sandboxed version than the non-sandboxed. There's a number of web pag

App keeps being told to open nonexistent doc on launch

2015-10-19 Thread Jens Alfke
I’ve got a weird problem in an OS X app project I’m dusting off after a long hiatus. Every time the app launches, it pops up error alerts saying it can’t open two documents. The underlying problem is that the files for those documents don’t exist (and they have weird paths that are down inside t

Swift: Trying to use ViewController(). to access object

2015-10-19 Thread Eric E. Dolecki
I have been using NSNotificationCenter to affect objects in other classes to good effect. However, is it possible to do something like this: *ViewController().someObject.hidden = true* When I compile and run, I get a EXC_BAD_INSTRUCTION at that line. *fatal error: unexpectedly found nil while un

titleForHeaderInSection wrong section count.

2015-10-19 Thread James Cicenia
I have a fetch let aFetchedResultsController = NSFetchedResultsController(fetchRequest: fetchRequest, managedObjectContext: getManagedObjectContext(), sectionNameKeyPath:"product.sectionKey", cacheName:nil) In the following function: func tableView(tableView: UITableView, titleForHeaderInS

Re: App keeps being told to open nonexistent doc on launch

2015-10-19 Thread Jens Alfke
Arghh! I found the problem, and it’s my fault. At some point I added command-line args to the scheme, intending for them to set user defaults, but forgot the “-” before the names, so they got interpreted as file paths to open. —Jens ___ Cocoa-dev ma

UIActivityItemSource and Facebook?

2015-10-19 Thread Steve Mykytyn
Working with the UIActivityItemSource, I'm finding that Facebook won't take anything except an image or URL - is there any way to supply it with text? My code works fine with Mail, Twitter, etc. The Facebook and Messenger apps will display a supplied image, will extract an image from a URL in pre

Re: Swift: Trying to use ViewController(). to access object

2015-10-19 Thread Jens Alfke
> On Oct 19, 2015, at 11:12 AM, Eric E. Dolecki wrote: > > I have been using NSNotificationCenter to affect objects in other classes > to good effect. I don’t understand … that class is used to register notification observers and to post notifications. What do you mean by “affect”? > *ViewCo

Re: Swift: Trying to use ViewController(). to access object

2015-10-19 Thread Eric E. Dolecki
By effect I meant it works as expected. Even when I set a variable to that ViewController, I get the error. I am asking if there is a way to call a method or set a property on an ViewController object from another class. let foo = ViewController() foo.object.hidden = true Something like that, but

Debugging Faux Delegate calls

2015-10-19 Thread livinginlosangeles
I have 4 NSComboBoxes in a view. I have a controller class which acts as the delegate for these ComboBoxes. For some reason, after a period of time, and I am trying to figure out why this is happening, when I enter ComboBoxA, my delegate is invoked, but when I query the ComboBox making the call

Re: titleForHeaderInSection wrong section count.

2015-10-19 Thread Kyle Sluder
On Mon, Oct 19, 2015, at 01:26 PM, James Cicenia wrote: > I have a fetch > > let aFetchedResultsController = NSFetchedResultsController(fetchRequest: > fetchRequest, managedObjectContext: getManagedObjectContext(), > sectionNameKeyPath:"product.sectionKey", cacheName:nil) > > In the following fun

Re: Debugging Faux Delegate calls

2015-10-19 Thread Ken Thomases
On Oct 19, 2015, at 4:11 PM, livinginlosange...@mac.com wrote: > > I have 4 NSComboBoxes in a view. I have a controller class which acts as the > delegate for these ComboBoxes. For some reason, after a period of time, and I > am trying to figure out why this is happening, when I enter ComboBoxA

Re: Swift: Trying to use ViewController(). to access object

2015-10-19 Thread Jens Alfke
> On Oct 19, 2015, at 1:53 PM, Eric E. Dolecki wrote: > > I am asking if there is a way to call a method or set a property on an > ViewController object from another class. Sure, you just need a reference to it. > let foo = ViewController() > foo.object.hidden = true > Something like that, b

Re: NSButton with NSTexturedRoundedBezelStyle outside of NSToolbar

2015-10-19 Thread Richard Charles
> On Oct 19, 2015, at 1:08 AM, Jacek Oleksy wrote: > > I double checked it (I use the screenshot mechanism, it displays the > size of selection rectangle), and it is 24 on my toolbar (and also > e.g. on the toolbar in Finder). I measured the height of the View segmented control in the Finder to

Re: NSButton with NSTexturedRoundedBezelStyle outside of NSToolbar

2015-10-19 Thread Richard Charles
> On Oct 19, 2015, at 1:08 AM, Jacek Oleksy wrote: > > I double checked it (I use the screenshot mechanism, it displays the > size of selection rectangle), and it is 24 on my toolbar (and also > e.g. on the toolbar in Finder). Another option for this measurement would be to use the Pixie applic

Re: NSButton with NSTexturedRoundedBezelStyle outside of NSToolbar

2015-10-19 Thread Lee Ann Rucker
Or use the UI debugger in newer Xcodes. On Oct 19, 2015, at 5:58 PM, Richard Charles wrote: > >> On Oct 19, 2015, at 1:08 AM, Jacek Oleksy wrote: >> >> I double checked it (I use the screenshot mechanism, it displays the >> size of selection rectangle), and it is 24 on my toolbar (and also >>

Re: Best Advice for accessing App Delegate's Managed Object Context

2015-10-19 Thread Jerry Krinock
> On 2015 Oct 18, at 13:07, Michael de Haan  wrote: > > I got rid of all the notification code, and substituted this in each > controller that needed access to the managedObjectContect > >> Just show me how to do that in Swift :) > > lazy var managedObjectContext:NSManagedObjectContext! …

Re: NSButton with NSTexturedRoundedBezelStyle outside of NSToolbar

2015-10-19 Thread Jacek Oleksy
On Tue, Oct 20, 2015 at 2:48 AM, Richard Charles wrote: > >> On Oct 19, 2015, at 1:08 AM, Jacek Oleksy wrote: >> >> I double checked it (I use the screenshot mechanism, it displays the >> size of selection rectangle), and it is 24 on my toolbar (and also >> e.g. on the toolbar in Finder). > > I m