Re: How can I get a single threaded network call in ObjC on iOS?

2016-06-28 Thread Jerry Krinock
> On 2016 Jun 28, at 13:16, Jim Adams wrote: > > the second request cannot go through until the first request has completed … > with a multi threaded system, I cannot figure out a way to do that. Ideas > appreciated. dispatch_semaphore Documentation is currently here: https://developer.appl

Re: How do I get data out of NSRuleEditor?

2016-06-26 Thread Jerry Krinock
> On 2016 Jun 26, at 12:29, Jim Thomason wrote: > > I've been desperately trying to use NSRuleEditor for a while now, since it > presents exactly the type of interface I want to show to the users. NSRuleEditor and NSPredicateEditor give you a quite a boatload, but as you’ve discovered they are

Re: Is windowControllerDidLoadNib used only when windowNibName is?

2016-06-10 Thread Jerry Krinock
> On 2016 Jun 10, at 06:16, Daryle Walker wrote: > > I replaced windowNibName with makeWindowControllers since I'm moving window > management to a separate controller. I kept windowControllerDidLoadNib > around. Now I wondered if it still gets called. I put in a "print( #function > + "got cal

Re: NSTreeController selection and Swift

2016-05-24 Thread Jerry Krinock
This may not work even if you work through the Swift issues. In Objective-C, the selection, selection indexes, and selected objects are all *not* observeable as documented in NSArrayController. See Apple Bug 7827354, closed as duplicate of 3404770. Assuming that NSTreeController is somehow b

Re: NSSplitViewController contents are shifted at first

2016-05-22 Thread Jerry Krinock
> On 2016 May 22, at 02:25, Bill Cheeseman wrote: > I am using NSplitViewController in a Mac application with a storyboard, and I > think it's working well. I had tried it with a nib-based version of my > application first, without success despite a lot of time put into it. Yes, we noted a fe

Re: NSSplitViewController contents are shifted at first

2016-05-21 Thread Jerry Krinock
> On 2016 May 20, at 16:24, Rick Mann wrote: > > How do I set that? IB doesn't let me adjust the position of the split, Yes, it does if you’re persistent. I just tried it. Like many things in IB, you need to click on that divider several times, and if it doesn’t work, back out by clicking o

Re: NSSplitViewController contents are shifted at first

2016-05-20 Thread Jerry Krinock
> On 2016 May 20, at 00:00, Rick Mann wrote: > > I have a Storyboard using autolayout constraints. I have an > NSWindowController with an NSSplitViewController as its content view > controller. That has two sub controllers. The left one has an NSOutlineView > that has top,left,right, and bott

Re: Opening a file but not associating with NSDocument

2016-05-20 Thread Jerry Krinock
> On 2016 May 19, at 23:40, Rick Mann wrote: > > By "Reader," do you mean "Viewer?" I see no "Reader" option. Yes, I remembered the wrong word. English is so redundant. :) > Also, what do you mean "have no windows?" I just don't create anything in > -makeWindowControllers? Correct. > I'm c

Re: Opening a file but not associating with NSDocument

2016-05-19 Thread Jerry Krinock
> On 2016 May 19, at 16:13, Rick Mann wrote: > > I have a complex NSDocument with lots of files. One of those files is has a > .mfst extension. If the user double-clicks one of those files, I want my app > to create my NSDocument subclass, and then call a method on it to read the > contents o

Re: Application Activation Problem

2016-05-16 Thread Jerry Krinock
Dave, I’ve tried to do stuff similar to this with NSWorkspace, and found it to be often frustrating. According to your initial post, you’ve already tried pretty hard. If lengthening the time delay still does not work good enough for you, then, • If the apps that you want to cycle through are

Re: XCode snapshot function?

2016-05-09 Thread Jerry Krinock
D > On 2016 May 09, at 18:48, Graham Cox wrote: > > So what’s the best way to mothball and archive my project in its current > state so I can then fork it for the next version, and so on? Either make a git branch, or if you don’t trust git, copy project folder(s). Projects that involve multipl

Re: XCode snapshot function?

2016-05-09 Thread Jerry Krinock
> On 2016 May 09, at 18:48, Graham Cox wrote: > > So what’s the best way to mothball and archive my project in its current > state so I can then fork it for the next version, and so on? Either make a git branch, or if you don’t trust git, copy project folder(s). Projects that involve multiple

Re: Bind View-Based NSTableView to array of dictionaries in user defaults

2016-05-06 Thread Jerry Krinock
> On 2016 May 06, at 07:58, Keary Suska wrote: > If you substitute with a cell-based table, it works flawlessly. > I was able to get it to work properly by proxy-ing the array in the app > delegate Keary, thank you very much for taking the time to test my demo project, and digging in to disco

Re: Bind NSTableView to array of dictionaries in user defaults

2016-05-05 Thread Jerry Krinock
Thank you, Keary. > On 2016 May 05, at 13:47, Keary Suska wrote: > > >> On May 5, 2016, at 7:44 AM, Jerry Krinock wrote: >> >> So I bound the Content Array of the array controller to the 'values' of the >> shared user defaults controller w

Bind NSTableView to array of dictionaries in user defaults

2016-05-05 Thread Jerry Krinock
In an OS X app, I wanted to bind a table of objects, each represented by a dictionary, to an array of dictionaries in user defaults. So I bound the Content Array of the array controller to the 'values' of the shared user defaults controller with an arbitrary key path, which pleasantly became th

Re: Core Data user-defined fields

2016-05-02 Thread Jerry Krinock
In a similar situation, I defined one Property to represent both your Required (A, B, C) and User-defined properties, and wrote some business logic to ensure that the Required properties were always present. A variation would be that this user-interfacing Property is a dependent property, conne

Re: Using a Core Data model by itself

2016-04-28 Thread Jerry Krinock
> On 2016 Apr 28, at 13:23, Jens Alfke wrote: > > So you can start out declaring the model classes like > @interface Message : NSObject Just to clarify, the reason why you must do this and not inherit from NSManagedObject is because the designated initializer of NSManagedObject is -ini

Re: [NSWorkspace openURL:] - any way to avoid a new tab?

2016-04-09 Thread Jerry Krinock
> On 2016 Apr 07, at 08:14, Jens Alfke wrote: > > If you send an AppleEvent directly to Safari, there might be a param to > control tab behavior. Oh, you could probably do that with AppleScript. Something like set myTab to make new tab set URL of myTab to http://whatever —- la

Re: How to turn of the Journal logging of CoreData/Sqlite?

2016-04-06 Thread Jerry Krinock
> On 2016 Apr 06, at 08:27, Jens Alfke wrote: > > If you’re seeing high memory utilization, it’s more likely something to do > with Core Data itself. It might be a symptom of a way you’re misusing Core > Data I agree, having had an experience like James’ last year. It is a huge project; the

Re: Does NSOutlineView's highlightedTableColumn work?

2016-04-05 Thread Jerry Krinock
In an app I was working on, I also wanted the whole column to be highlighted. Here are comments from the code indicating how I did it. Some of these ideas might help: We want the selected column to be highlighted, for purposes of deleting columns. NSTableView does not provide this. When yo

Re: Starting out with storyboards (on Mac)

2016-03-01 Thread Jerry Krinock
> On 2016 Mar 01, at 10:06, Quincey Morris > wrote: > > open TextEdit, open the storyboard, and choose File -> Revert To Saved -> > Browse All Versions… Very cool. I never realized that the Versions Browser would work across the edge case of document types (a text file, in this case) which

Re: Starting out with storyboards (on Mac)

2016-03-01 Thread Jerry Krinock
> On 2016 Mar 01, at 01:33, Daryle Walker wrote: > > Tried out Mac programming … turned on … storyboards. If: • Your primary experience is in OS X> • You know nibs. • Your purpose is to ship OS X apps, not broaden your horizons. Is there any reason to learn and use storyboards?

Re: Panes vs. Separate Windows

2016-01-09 Thread Jerry Krinock
> On 2016 Jan 09, at 14:19, Rick Mann wrote: > > Thoughts? You could argue this both ways until the cows come home, but here is one thought: I think the recent move toward one big window, like the move toward full-screen apps, has been advanced by the increased prevalance of laptops, with th

Re: Translating offset from crash dump

2015-12-19 Thread Jerry Krinock
> On 2015 Dec 19, at 08:05, Aandi Inston wrote: > Anyway, what would you do with a crash dump routine + offset, not > reproducible? Aandi, I would step back and consider that I am over-thinking the problem. I would look at the information I have, which should be my function in which the crash

Re: Non-Resizable Window and Autolayout

2015-12-08 Thread Jerry Krinock
> On 2015 Dec 08, at 06:31, Dave wrote: > > I then select the Window in IB and select “Reset to Suggested Constraints”. also known as the “Ruin My Day” selection. > Does anyone have an idea why this is happening? It would be interesting to look at the window’s styleMask in the debugger and

Re: NSDocument and NSViewControllers

2015-12-05 Thread Jerry Krinock
> On 2015 Dec 04, at 16:32, Rick Mann wrote: > > I have an NSViewController subclass and SCNView subclass. I can get at the > document from the NSViewController subclass via a rather cumbersome "let doc > = self.view.window?.windowController?.document as? ModelDocument” I just happened to hav

Re: NSWindow displaying asynchronously starting in 10.11

2015-11-30 Thread Jerry Krinock
> On 2015 Nov 30, at 14:35, Quincey Morris > wrote: > > I’m not aware that the APIs you mention in 1 and 2 have any known contract > about when they have their effect. It could be synchronous or asynchronous, > and it could be now or later. You are correct. But after 20 years, seems like a

NSWindow

2015-11-30 Thread Jerry Krinock
Apple has made a huge change in the way windows are drawn in El Capitan, which I cannot find mentioned in the Release Notes. Here are some examples: 1. Create a NSWindow, send it a -display message, and then in that same run loop cycle execute some task of noticeable duration. In 10.10, the w

Re: Non-deprecated way to determine Process Type (LSUIElement etc.) ?

2015-11-27 Thread Jerry Krinock
> On 2015 Nov 26, at 23:33, Ken Thomases wrote: > > Don't use NSRunningApplication when NSApplication will do. Oh, thank you Ken – that’s even better. NSApplication has the same ‘activationPolicy’ property. > The replacement for TransformProcessType() is -[NSApplication > setActivationPolic

Re: Non-deprecated way to determine Process Type (LSUIElement etc.) ?

2015-11-26 Thread Jerry Krinock
> On 2015 Nov 26, at 23:08, Ken Heglund wrote: > > NSRunningApplication.activationPolicy might do the trick for you. Yes, just tested and it works. Bonus: Looks like setActivationPolicy should replace TransformProcessType(), and it even comes with KVO support :) Thank you, Ken. ___

Non-deprecated way to determine Process Type (LSUIElement etc.) ?

2015-11-26 Thread Jerry Krinock
Several years ago I succumbed to a few users who wanted the ability to switch my OS X apps between foreground (regular app) and background (LSUIElement) on the fly. Switching has been possible in both directions since OS X 10.7, using TransformProcessType(). The user interface is, for example,

Re: -[NSWindow parentWindow] for sheet never works?

2015-11-26 Thread Jerry Krinock
> On 2015 Nov 25, at 02:49, Graham Cox wrote: > > I looked at the docs, saw [NSWindow -endSheet:sheetWindow] and totally > misinterpreted it. I might be losing my mind, this sort of thing seems to be > happening a lot lately. Your mind is fine – you’ve just been using Cocoa for so long that y

Re: -[NSWindow endSheet?], was parentWindow

2015-11-24 Thread Jerry Krinock
> On 2015 Nov 24, at 14:54, Graham Cox wrote: > > You don’t send the parent window endSheet to run the completion handler - you > close the sheet itself by sending -endSheet to the SHEET, not its parent. Graham, I cannot find such a method, endSheet with no colon. > If you need to communicate

Re: -[NSWindow parentWindow] for sheet never works?

2015-11-24 Thread Jerry Krinock
> On 2015 Nov 24, at 09:46, Quincey Morris > wrote: > > wrong property … The parent window in relation to *sheets* is “sheetParent”. Yes. Thank you. Another “bingo” for Quincey :) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

-[NSWindow parentWindow] for sheet never works?

2015-11-24 Thread Jerry Krinock
I’m updating an old project which used the -[NSApp beginSheet:] methods to use -[NSWindow beginSheet:completionHandler:]. In so doing, I now need the parent window in my action methods, so I can send the -[NSWindow endSheet::] message which runs the completion handler. In many cases, the s

Re: dateFromString won't accept this string:

2015-11-22 Thread Jerry Krinock
> On 2015 Nov 22, at 21:12, Alex Hall wrote: > I'd still be curious to know about templates, but this works so I won't > spend time on it right now. The answer, with an example of why you might want to use templates, is explained in Data Formatting Programming Guide > Date Formatters > Custo

Re: dateFromString won't accept this string:

2015-11-22 Thread Jerry Krinock
> On 2015 Nov 22, at 13:12, Alex Hall wrote: > > Is there something else I have to do, like tell the formatter what order to > expect components to be in? Yes, and more. You must set the dateFormat property of your date formatter exactly. Documentation of property ‘dateFormat’ refers you to

Re: Issue with NSTokenFieldCell in NSTableView and bindings..

2015-11-13 Thread Jerry Krinock
> On 2015 Nov 11, at 19:36, Samuel Williams > wrote: > > I'm trying to do something which in theory is rather simple: Use a > NSTokenFieldCell in a NSTableView and bind the table column value to the > token field. > > 1/ The binding doesn't seem to propagate the value back to the model. Known

Re: NSUserDefaults Bindings Reset

2015-11-03 Thread Jerry Krinock
> On 2015 Nov 01, at 04:58, Michael de Haan  wrote: > > NSUserDefaults.standardUserDefaults().removePersistentDomainForName(bundleIdentifier!) That line of code seems like it is pulling the rug out from under Cocoa Bindings, which might explain why they don’t work. A better way to reset to d

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: Best Advice for accessing App Delegate's Managed Object Context

2015-10-18 Thread Jerry Krinock
On 2015 Oct 18, at 12:18, Michael de Haan  wrote: > I have not worked that much with SplitViewControllers, The fact that it is a split view controller is not relevant here. You’d have the same issue with any kind of controller. > The immediate hurdle was to supply each “child” controller of

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

2015-10-18 Thread Jerry Krinock
> On 2015 Oct 18, at 05:05, Michael de Haan  wrote: > > I am using a separate, second “standAlone" Window to display a > SplitViewController. Design is StoryBoard, for an OS X application. > From appDelegate, I instantiate the SplitViewController in > “applicationDidFinishLaunching" > > let

Re: -[NSThread start] blocks ?!?

2015-10-17 Thread Jerry Krinock
> On 2015 Sep 28, at 13:10, Greg Parker wrote: > > The threads listed are all waiting for a spinlock used by the debugging > tools. (Specifically, it's the machinery that records stack traces of queue > operations.) > > If you see this again, please capture a spindump and file a bug report. >

Re: Data not retained in document based core data app with cocoa bindings

2015-10-12 Thread Jerry Krinock
> On 2015 Oct 11, at 09:30, Richard Charles wrote: > >> On Oct 11, 2015, at 2:41 AM, Devarshi Kulshreshtha >> wrote: >> >> Looking for more clues :-| Devarshi, I tried the kludge which Richard found on Stack Overflow (self.view.window.windowController.document.managedObjectContext), and it

Re: Data not retained in document based core data app with cocoa bindings

2015-10-10 Thread Jerry Krinock
Hello, Devarshi. I think that adding the Document to your storyboard was a mistake. To prove that, log self to console in Document's init function, and you will see that, when one document opens, *two* Document objects get created. Your user interface is bound to one, and the persistent store

Re: NSSplitViewController : not in Interface Builder library?

2015-10-07 Thread Jerry Krinock
> On 2015 Sep 16, at 08:48, Bill Cheeseman wrote: > > I recently spent two weeks trying to get NSSplitViewController to work > programmatically in an application with nibs, without success. I got close, > and I concluded that it probably can be done, but I gave up because it was > taking too

Re: -[NSThread start] blocks ?!?

2015-09-27 Thread Jerry Krinock
On 2015 Sep 27, at 17:01, John Daniel wrote: > There is no way to tell what is causing the deadlock without knowing exactly > what is happening relating to: > 1) instance > 2) beginWithInfo: > 3) info Thank you, John. You are referring to what my secondary thread is doing. My point is that

Re: -[NSThread start] blocks ?!?

2015-09-27 Thread Jerry Krinock
> On 2015 Sep 26, at 18:03, Quincey Morris > wrote: > > I don’t understand what you’re asking. I mean that if it is possible for -[NSThread start] to block indefinitely, it is not a useable API. I clicked the “Pause” and “Continue” multiple times in Xcode, but each time, in the main thread,

Re: -[NSThread start] blocks ?!?

2015-09-26 Thread Jerry Krinock
> On 2015 Sep 26, at 15:53, Quincey Morris > wrote: > > On Sep 26, 2015, at 15:33 , Jerry Krinock wrote: >> >> Should not -[NSThread start] always return before running any of my code in >> the new thread? > > You have absolutely no control ov

-[NSThread start] blocks ?!?

2015-09-26 Thread Jerry Krinock
In a OS X app, predating Grand Central Dispatch, in the main thread, I create and start a new thread NSThread* worker ; worker = [[NSThread alloc] initWithTarget:instance selector:@selector(beginWithInfo:) object:info] ; [worker

Re: OpenGL Vertical Syncing effect on run loops

2015-09-26 Thread Jerry Krinock
On 2015 Sep 22, at 19:51, Greg Parker wrote: > But at some point the timer callback will provoke an OpenGL buffer swap, and > that will block until the next retrace when vertical synchronization is > enabled. The gated buffer swap inside the timer callback is the rate-limiting > factor, not a

OpenGL Vertical Syncing effect on run loops

2015-09-22 Thread Jerry Krinock
In Apple document QA1385, in Listing 2, describing how to drive OpenGL Rendering Loops 10 years ago, an NSTimer, repeating every 1 millisecond, is added to an app’s run loop [1]. Referring to this timer, the text says that: "When vertical synchronization is enabled in your OpenGL application, d

Re: NSSplitViewController : not in Interface Builder library?

2015-09-16 Thread Jerry Krinock
Thank y’all for the replies. The omission is in both Xcode 6.4 and 7.1. The answer is: > On 2015 Sep 15, at 23:26, dangerwillrobinsondan...@gmail.com wrote: > > those are only available in storyboards in IB. I got the opposite impression from here: http://asciiwwdc.com/2014/sessions/411 wh

NSSplitViewController : not in Interface Builder library?

2015-09-15 Thread Jerry Krinock
NSSplitViewController was introduced in 10.10. I’ve read some posts which imply that there should be such a thing, with associated NSSplitViewItem objects, in the Object Library in Interface Builder. And it seems like they certainly should be in there. But for the life of me I cannot find any

Re: Display USB Video Camera output : AVFoundation?

2015-09-12 Thread Jerry Krinock
Well, AVCaptureView is not very malleable. I needed to use an AVCaptureVideoPreviewLayer, which needed quite a few more lines of code than the zero I reported yesterday :( For the record, I have pasted in the working code below. The only problem is that this silly warning prints to the consol

Re: Display USB Video Camera output : AVFoundation?

2015-09-10 Thread Jerry Krinock
> On 2015 Sep 10, at 07:50, Gordon Apple wrote: > > Second, you can use AVCaptureView or AVCaptureVideoPreviewLayer. Holy cow. I just instantiated an AVCaptureView in InterfaceBuilder, added AVKit.framework to the project, build, run and what to my wondering eyes did appear but my ugly face,

Display USB Video Camera output : AVFoundation?

2015-09-09 Thread Jerry Krinock
In a Mac app, I need to display real-time video (as in “movies”) from a USB camera on the screen. Can someone please confirm that AVFoundation the way to go? I’ve read that QTKit is deprecated but, oddly, I cannot find any mention of deprecation here in the QTKit Programming Guide: https://de

Re: Basics of Cocoa Bindings

2015-09-08 Thread Jerry Krinock
> On 2015 Sep 08, at 21:04, Alex Hall wrote: > > why are keyPathsForValuesAffecting needed? Is this method taking the > place of something I might do in IB, or is this something different? Of course, they are not required, as many successful apps were written before we had Cocoa Bindings. On

Re: Auto-Layout Again

2015-08-27 Thread Jerry Krinock
In a hurry here, but, I know Auto Layout does not always play well with scroll views. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins

Re: Is NSTreeController good with Cocoa Bindings and Core Data now?

2015-08-24 Thread Jerry Krinock
> On 2015 Aug 23, at 17:50, Dave Fernandes wrote: > > It’s been working pretty well since Snow Leopard. Haven’t had any weird undo > issues in a while. Thank you, Dave. With the votes thus counted as 1 YAY and 0 NAY, I’ll give it a try :) ___ Coc

Is NSTreeController good with Cocoa Bindings and Core Data now?

2015-08-23 Thread Jerry Krinock
A long time ago, I was advised to use an old-fashioned data source on my outline views for Core Data trees, because NSTreeController did not work the way it should have. Have those issues now been resolved now? I’m working on a new app, with Core Data and Cocoa Bindings. The new app will requ

Re: Translate curl command to NSURLRequest

2015-07-04 Thread Jerry Krinock
> On 2015 Jul 04, at 02:52, Antonio Nunes wrote: > > Is there a way to see exactly what the request looks like when it goes out? Search for “OS X Packet Sniffer” and you will find many apps for this, and even some stuff built into OS X, which are quite fun to use. My favorite (because it can

Re: Menu Bar App: [NSStatusItem popUpStatusItem] : Menu shows popupmenu too high

2015-06-15 Thread Jerry Krinock
> On 2015 Jun 13, at 13:24, Dan Stenning wrote: > > thanks for the reply but i’m afraid that suggestion didn’t work either :( I think what you need to do then is to get yourself some Apple sample code that works, compare it line-by-line with yours and figure out what you’re doing wrong. If

Re: Menu Bar App: [NSStatusItem popUpStatusItem] : Menu shows popupmenu too high

2015-06-12 Thread Jerry Krinock
> On 2015 Jun 12, at 14:22, Dan Stenning wrote: > > here is the code in question: Hello, Dan. >[pimpl->getView() setMenu:pimpl->theMenu]; It looks like you’re setting your menu into some kind of view. In contrast, I set it into my status item. Paraphrasing my code, [statusItem s

Re: Rotate a standard Cocoa control?

2015-05-28 Thread Jerry Krinock
Epilog to a three-week old thread: Surprise, there *is* a one-liner to rotate a standard Cocoa control: http://digerati-illuminatus.blogspot.com/2009/09/how-do-you-rotate-nsbutton-nstextfield.html (But Graham’s GCVolumeControl is still way better than circular NSSlider no matter how you rotate

Re: Custom NSView subclass - expressing the fact that a property affects the displayed image

2015-05-23 Thread Jerry Krinock
> On 2015 May 23, at 07:10, Marek Hrušovský wrote: > > Haven't read all the thread but i would use a custom property with overridden > setter to call setNeedsDisplay with combination of > keyPathsForValuesAffectingValueForKey: I think you can get rid of the glue > code. Yes, but you don’t ne

Re: Rotate a standard Cocoa control?

2015-05-08 Thread Jerry Krinock
Graham, from one who has been using your code since MacZoop, I say thank you AGAIN :) After using Apple’s NSSlider in circular style, I discovered other issues in addition to the two mentioned in my original post… - NSSlider has only one size. - NSSlider requires the eyesight and dexterity of

Rotate a standard Cocoa control?

2015-05-07 Thread Jerry Krinock
I would like to subclass NSSlider to make it work like the "volume control" on a mid 19th-century radio receiver. That is, I want the minimum value to be at 7 o'clock, and the maximum value to be at 5 o'clock. There two issues in using the circular version of NSSlider for this: 1. There is no

Re: Help Bundle Trouble...

2015-03-27 Thread Jerry Krinock
> On 2015 Mar 27, at 19:39, Peters, Brandon wrote: > > I found the .app bundle in the derived data folder. It should not be there. Delete it and see if it reappears during the next build. > The help is not making it into the resources folder for the bundle. For something to make it into Con

Re: Help Bundle Trouble...

2015-03-27 Thread Jerry Krinock
> On 2015 Mar 27, at 16:26, Peters, Brandon wrote: > > I copied the .help bundle into my project by right-clicking Supporting Files > > Add Files to , etc. Yet it seems my application still cannot > find the content. Any pointers from experience? 1. Look inside your product’s Contents/Resour

Re: Core Data Model Editor without Core Data

2015-03-21 Thread Jerry Krinock
> On 2015 Mar 20, at 21:25, Roland King wrote: > > I don’t see that Apple has been neglecting Core Data. I hope you are correct. I suppose they were preoccupied with Swift last year. I had a dream last night that we’ll soon get a new “metal” persistent store to replace SQLite, one which is

Re: Scrolling Text Field Class for Logging?

2015-03-20 Thread Jerry Krinock
On 2015 Mar 20, at 14:24, Dave wrote: > how do you check the Scroll Position for being at the end? I would try comparing NSMaxY([[myScrollView documentView] visibleRect]) with NSMaxY([[myScrollView documentView] frame]) If that doesn’t work, try NSMinY instead. In simple cases, it’s us

Core Data Model Editor without Core Data

2015-03-20 Thread Jerry Krinock
I’m rewriting a large old C++ (PowerPlant!) project to Cocoa, and am thinking that I’m probably not going to use Core Data because of its uncertain future (I think Apple has been neglecting it lately, its incompatibility with newer ideas such as asynchronous saving, etc.), and the fact this app

Re: Delete propagation to parent context

2015-03-11 Thread Jerry Krinock
> On 2015 Mar 09, at 14:56, Rick Mann wrote: > > Am I wrong to expect the object to still have its values at this point? Yes, I’ve seen objects “gutted” like that as soon as they're deleted. As to the documentation of -prepareForDeletion, I would say that, although your expectation is reason

Re: Trying to create a 1px width NSBox

2015-03-08 Thread Jerry Krinock
I did this cheesy hack – used a “Vertical Line” from the IB library to get a black line – until Yosemite when it became a gray line :( Do as Graham says. Draw your own line instead. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Re: Error migrating: "Unacceptable type of value for attribute"

2015-02-28 Thread Jerry Krinock
> On 2015 Feb 27, at 20:10, Rick Mann wrote: > > *** Terminating app due to uncaught exception ‘NSInvalidArgumentException' … > Any ideas? Maybe add a symbolic breakpoint at ‘NSInvalidArgumentException’, and when it breaks, poke around. Or do a heavyweight migration; at least then it should

Re: Delete empty Core Data entities from to-many relationship

2015-02-14 Thread Jerry Krinock
> On 2015 Feb 13, at 11:27, Steve Mills wrote: > > Is there a better strategy for deleting empty container entities? At first I > tried setting the Asset's folder relationship to Cascade, but that threw up > all over. Apparently the “count is never 1” because Core Data does not delete your Fo

Re: NSBezierPath + thin lines + antialias = :(

2015-02-10 Thread Jerry Krinock
> On 2015 Feb 10, at 05:36, Charles Jenkins wrote: > > This may explain why my purchase of a program that outputs code for vector > images resulted in disappointment. Counterintuitive at first, but, yes :)) I’ve always wondered why, when you’re dragging a window around a non-Retina screen, t

Re: NSBezierPath + thin lines + antialias = :(

2015-02-09 Thread Jerry Krinock
> On 2015 Feb 09, at 13:28, Uli Kusterer wrote: > > The image didn’t make it to the list, Oh, well. I recall being able to send pictures in the past, as long as the message size was < 25K. Maybe this is a new feature :( > Here’s an article (with pictures!) about this issue I wrote ages ago:

NSBezierPath + thin lines + antialias = :(

2015-02-09 Thread Jerry Krinock
I may need to break down and learn something about graphics and drawing. I use NSBezierPath in a -[NSView drawRect:] to do an engineering-style drawing. Here is a tiny arrowhead pointing to a vertical “dimension line”: Not very nice. If instead I draw this in a graphics program, with antiali

Re: Identify all open files of current OS X process

2015-02-08 Thread Jerry Krinock
Thank you, Roland. I am using your idea, iterating over fd with > fcntl( fd, F_GETPATH, filePath ) I think that it’s less fragile than what I was thinking of doing, less code, and it works :) On 2015 Feb 07, at 18:59, Roland King wrote: > Well if you can figure out which file descriptors are

Identify all open files of current OS X process

2015-02-07 Thread Jerry Krinock
, but I’m hoping for something less fragile (lsof has lots of weird options including a timeout) and more lightweight. Thanks, Jerry Krinock (*) Actually, this code is going in to a binary plug-in in another app, so my plug-in is going to get the open files of its host app. The purpose is to

Re: Core Data concurrency during import of folder contents

2015-02-03 Thread Jerry Krinock
> On 2015 Feb 03, at 08:02, Steve Mills wrote: > > On Feb 3, 2015, at 06:51:35, Dave Fernandes > wrote: >> >> Mike Abdullah’s BSManagedDocument. > > Too bad it always saves as a package Actually, that’s an advantage, because flat files do not play well with the new Write Ahead Lookup (WAL)

Re: Core Data concurrency during import of folder contents

2015-01-31 Thread Jerry Krinock
> On 2015 Jan 30, at 22:01, Steve Mills wrote: > > Isn't there just an example of a document-based app that implement concurrent > Core Data importing and all that jazz? I liked this one [1] by Aaron Douglas (all in Swift) when I was needed to do a presentation on Core Data last September. A

Re: copyWithZone archive/unarchive

2015-01-30 Thread Jerry Krinock
> On 2015 Jan 30, at 10:08, Trygve Inda wrote: > > Do you see non-ARC code becoming obsolete? Non-ARC code is already obsolete, but what I think you mean is will non-ARC code fail to compile or run in some future OS version. Never say “never” with Apple, but in this case, I don’t think so, b

Re: Detecting Managed Object Property Change From Undo Redo

2015-01-27 Thread Jerry Krinock
> On 2015 Jan 27, at 12:44, Keary Suska wrote: > > What exactly happened when you specified the setter, but not the getter? I said I wasn’t sure because the project has a bunch of warnings due to ongoing major rework, but I just retested again. Answer: Compiler does *not* warn if you have a

Re: How to add a window to a window list(or open document list) on a dock tile menu?

2015-01-27 Thread Jerry Krinock
> On 2015 Jan 27, at 13:25, JongAm Park wrote: > > I am still curious how the window list doesn’t appear on the dock menu of the > interested app. > Probably they removed Window menu from “menu bar”? More likely, they just didn’t put it in there to begin with. The Dock Menu is different than

Re: How to add a window to a window list(or open document list) on a dock tile menu?

2015-01-27 Thread Jerry Krinock
> On 2015 Jan 27, at 10:38, JongAm Park wrote: > > I searched Apple’s documents, but there looks to be no explicit way to > remove/add window list. I don’t think there is. If the app is using the Cocoa frameworks and has an NSApplication (NSApp), you would do this by implementing -applicatio

Re: Detecting Managed Object Property Change From Undo Redo

2015-01-27 Thread Jerry Krinock
> On 2015 Jan 27, at 06:46, Keary Suska wrote: > > Better, however, to have a property declaration, which would also synthesize > an ivar in modern LLVMs (as of Xcode 5?). You mean the property declaration would synthesize the ivar. I didn’t try that. I agree it would be better. >> It stil

Re: Detecting Managed Object Property Change From Undo Redo

2015-01-27 Thread Jerry Krinock
> On 2015 Jan 27, at 01:24, Quincey Morris > wrote: > > I’m not sure that it’s “bad”, though it is nontypical, which is why there’s a > [nontypical] custom accessor. a Core Data property access has two general > steps … you can customize one or both of these steps. OK, the documentation writ

Re: Detecting Managed Object Property Change From Undo Redo

2015-01-26 Thread Jerry Krinock
> On 2015 Jan 26, at 22:14, Quincey Morris > wrote: > > On Jan 26, 2015, at 17:55 , Jerry Krinock wrote: >> >> What in the world is that nonCompliantKVCivar? > > It’s just an ivar that was defined separately from this particular code > fragment. It’s

Re: Detecting Managed Object Property Change From Undo Redo

2015-01-26 Thread Jerry Krinock
On 2015 Jan 26, at 16:10, Richard Charles wrote: > It is not uncommon for this application to work with large data sets. I > tested using KVO on a managed object property and undo took 34 seconds. I > implemented custom accessors (public and primitive) containing custom change > code and undo

Re: licence key validation method

2015-01-26 Thread Jerry Krinock
At 06:41 PST on 2015-01-12, Dave Fernande wrote: > If you use AquaticPrime, unfortunately, it does not generate standard > signatures. It manually hashes and then encrypts using the private key. This > sounds like a normal signature, but it is missing some information stored in > standard PKC

Re: Detecting Managed Object Property Change From Undo Redo

2015-01-26 Thread Jerry Krinock
On 2015 Jan 26, at 07:00, Richard Charles wrote: > Where do you post the notification from for a managed object property change? Just to clarify: Your question refers to how I do it in my real apps, using NSNotificationCenter, not how I did it in the YouTube video, which was demonstating KVO.

Re: Detecting Managed Object Property Change From Undo Redo

2015-01-25 Thread Jerry Krinock
> On 2015 Jan 25, at 22:03, Kyle Sluder wrote: > > On Sun, Jan 25, 2015, at 05:16 PM, Jerry Krinock wrote: >> • When an observer is being torn down you can remove all observers with >> one line of code, >> [NSNotificationCenter removeObserver:self]. > Th

Re: Detecting Managed Object Property Change From Undo Redo

2015-01-25 Thread Jerry Krinock
On 2015 Jan 25, at 01:20, Mike Abdullah wrote: > You are mistaken. Core Data *does* fire KVO notifications during undo/redo. Although I wasn’t aware of this, I just did a little experiment and found that Mike is correct… http://youtu.be/PUHBAq-Me_4 On 25 Jan 2015, at 06:35, Richard Charles

Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]

2015-01-23 Thread Jerry Krinock
> On 2015 Jan 23, at 17:17, Steve Mills wrote: > > Oh, that reminds me. I had to change it to mainBundle instead of > mainAppBundle. The method is -mainAppBundle, but indeed you don’t have it. I wrote it. It returns the bundle of the enclosing “main” app when run from a helper tool, so tha

Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]

2015-01-23 Thread Jerry Krinock
> On 2015 Jan 23, at 12:36, Michael Crawford wrote: > > perhaps the bug occurred somewhere else and either corrupted the heap or… Yes, that is a good point. > If you haven't already tried it, enable Guard Malloc and friends in > your build. Ah, I forgot about that. Just tried it. Worked per

Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]

2015-01-23 Thread Jerry Krinock
> On 2015 Jan 23, at 11:40, Steve Mills wrote: > > I can't find any docs for "present last logged error”. Thank you, Steve. Oh, there isn’t any. It is only my app, as in MyApp, which implements that command. I made it up. :) > How do I set up a state so that it will do something? I'm tryi

Inexplicable Crash in -[NSAppleScript executeAndReturnError:]

2015-01-23 Thread Jerry Krinock
Can anyone explain this weird crash report I got from a user and symbolized? The last thing my code does (frame 24 in the call stack below), is to send -[NSAppleScript executeAndReturnError:]. The crash says someone tried to set a *dictionary* object with a nil key. How could I have done that

  1   2   3   4   5   6   7   8   9   10   >