Re: Creating NSTableView programmatically

2017-12-12 Thread Jonathan Mitchell
> On 12 Dec 2017, at 19:56, Richard Charles wrote: > > I always assumed the reason bindings never came over to iOS was they consumed > too much cpu power and were too difficult to understand. It seems evident > that 10 or 20 years from now Apple anticipates the bulk of it programmers > coming

Re: Creating NSTableView programmatically

2017-12-11 Thread Jonathan Mitchell
For NSTableCellView see https://developer.apple.com/documentation/appkit/nstablecellview objectValue is a property on NSTableCellView not on NStableView. The NSTableViewDelegate method - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)

Re: NSDocument -canCloseDocumentWithDelegate::: not called when terminating

2017-08-30 Thread Jonathan Mitchell
> On 30 Aug 2017, at 18:30, Quincey Morris > wrote: > > On Aug 30, 2017, at 06:18 , Jonathan Mitchell <mailto:li...@mugginsoft.com>> wrote: >> >> My documents have a lot of variable user cancellable activity that must run >> prior to document closur

NSDocument -canCloseDocumentWithDelegate::: not called when terminating

2017-08-30 Thread Jonathan Mitchell
This is one from the archives: https://lists.apple.com/archives/cocoa-dev/2012/Jul/msg00740.html In short NSDocument -canCloseDocumentWithDelegate::: gets called on documents when closing the document window but only for dirty documents when closing the app via NSApp -terminate: (i.e.: the appl

Re: NSMutableParagraphStyle -paragraphSpacingBefore

2017-08-22 Thread Jonathan Mitchell
> On 22 Aug 2017, at 18:17, Quincey Morris > wrote: > > On Aug 22, 2017, at 10:02 , Jonathan Mitchell wrote: >> >> I don’t seem to be having much luck getting NSMutableParagraphStyle >> -paragraphSpacingBefore to render. > > To render where? I have n

NSMutableParagraphStyle -paragraphSpacingBefore

2017-08-22 Thread Jonathan Mitchell
macOS 10.12 I don’t seem to be having much luck getting NSMutableParagraphStyle -paragraphSpacingBefore to render. NSMutableParagraphStyle -paragraphSpacing seems fine. Any thoughts? I know I can work around it if needs be. J ___ Cocoa-dev mailing l

Re: Release mode bindings crash and release pools

2017-06-17 Thread Jonathan Mitchell
> On 17 Jun 2017, at 16:36, Charles Srstka wrote: > >> On Jun 17, 2017, at 8:36 AM, Jonathan Mitchell > <mailto:li...@mugginsoft.com>> wrote: > > > Just tested it on 10.9; it works :-) > > import Foundation > > class C: NSObject { >

Re: Release mode bindings crash and release pools

2017-06-17 Thread Jonathan Mitchell
> On 17 Jun 2017, at 14:21, Charles Srstka wrote: > >> On Jun 17, 2017, at 5:32 AM, Jonathan Mitchell > <mailto:li...@mugginsoft.com>> wrote: >> >>> On 16 Jun 2017, at 23:18, Quincey Morris >>> >> <mailto:quinceymor...@rivergat

Re: Release mode bindings crash and release pools

2017-06-17 Thread Jonathan Mitchell
> On 17 Jun 2017, at 01:54, Charles Srstka wrote: > >> it’s preferred that bindings go either through an NSObjectController, an >> NSViewController, or something else that implements NSEditorRegistration. I think that is a crucial aspect in all this. I while back I configured bindings in cont

Re: Release mode bindings crash and release pools

2017-06-17 Thread Jonathan Mitchell
> On 16 Jun 2017, at 23:18, Quincey Morris > wrote: > > On Jun 16, 2017, at 14:41 , Jonathan Mitchell wrote: >> >> I sometimes use the default NSObject bind: to set up a simple one way >> operation as you describe as opposed to a discrete observation. >

Re: Release mode bindings crash and release pools

2017-06-16 Thread Jonathan Mitchell
> On 16 Jun 2017, at 22:32, Quincey Morris > wrote: > > On Jun 16, 2017, at 13:48 , Charles Srstka wrote: >> >> This is incorrect. > > It’s incorrect as a 2-way binding, but it works as a pair of so-called 1-way > bindings, with the proviso that they may need to be unbound manually, to > p

Re: Release mode bindings crash and release pools

2017-06-15 Thread Jonathan Mitchell
> On 15 Jun 2017, at 20:03, Quincey Morris > wrote: > > On Jun 15, 2017, at 04:46 , Jonathan Mitchell wrote: >> >> The crash occurs when the pool gets drained. > >> Wrapping my -bind: calls in a release pool solves the issue too. > > The informatio

Release mode bindings crash and release pools

2017-06-15 Thread Jonathan Mitchell
My macOS 10.12 ARC app has a gazillion bindings. Many are made in the NIBS but a lot are dynamically applied in code. In release mode I see the odd crash that can be traced back to NSAutoUnbinder getting dealloc'd in a release pool. With build optimisations set to 0 there is no issue. With build

Re: Drawing a 5 Sided Star Shape

2017-06-02 Thread Jonathan Mitchell
> On 2 Jun 2017, at 12:56, Dave wrote: > > Hi, > > I want to draw a 5 sided Star Shape using UIBezierPath. I’ve search for a > general purpose algorithm, but I can’t find anything that I can get to work > with Cocoa/Objective-C. > You could take a peek at https://www.paintcodeapp.com

Re: KVO - deallocation with observers attached

2017-06-02 Thread Jonathan Mitchell
> On 1 Jun 2017, at 00:51, Ken Thomases wrote: > > On May 31, 2017, at 5:02 PM, Jonathan Mitchell wrote: >> >> It is common for deallocating objects to abort if they have observers still >> registered. >> >> The Data_Test object is deallocated w

Re: switching text field between editable and non-editable

2017-05-31 Thread Jonathan Mitchell
> On 31 May 2017, at 21:13, Ken Thomases wrote: > > On May 31, 2017, at 1:51 PM, J.E. Schotsman wrote: >> >> I have a hard time achieving what the message title says. >> Depending on user settings I want a text field to be either editable or >> non-editable. The following works for me. @imp

KVO - deallocation with observers attached

2017-05-31 Thread Jonathan Mitchell
It is common for deallocating objects to abort if they have observers still registered. However in some cases it seems that an object can get deallocated with observers attached and not abort. I have instrumented my test case thoroughly and overridden -setObservationInfo: to log the observatio

Re: inactive menu item

2017-05-24 Thread Jonathan Mitchell
> On 24 May 2017, at 10:07, J.E. Schotsman wrote: > > Hello, > > I have a popup button with a menu item that I have set disabled in the xib. > Every time the popup is enabled the item is enabled too! > Why isn’t the latent state of the item preserved? > I can solve the problem by binding the en

Re: Context leak detected, msgtracer returned -1 ?

2017-05-22 Thread Jonathan Mitchell
> On 22 May 2017, at 22:24, Greg Parker wrote: > > >> On May 22, 2017, at 8:52 AM, Jonathan Mitchell > <mailto:li...@mugginsoft.com>> wrote: >> >> Context leak detected, msgtracer returned -1 >> > > The context is an IOAccelContext, which i

Context leak detected, msgtracer returned -1 ?

2017-05-22 Thread Jonathan Mitchell
Hi On occasion I see the following in the Xcode console when running my Obj-C app: Context leak detected, msgtracer returned -1 I have tried setting symbolic breakpoints on NSLog etc but to no avail. Is the context in question a CGContext? Thanks J

Re: Times in other cities

2017-05-15 Thread Jonathan Mitchell
You might want to err on the side of caution and ensure that the Calendar object is explicitly set to Gregorian rather than using the current system setting. Jonathan > On 15 May 2017, at 13:50, Eric E. Dolecki wrote: > > Thanks for your reply. Does this look safe to use? > > // London > let

Re: disable group of controls

2017-04-05 Thread Jonathan Mitchell
> On 5 Apr 2017, at 12:05, J.E. Schotsman wrote: > > >> On 05 Apr 2017, at 11:48, Jack Carbaugh wrote: >> >> Get a list of the controls then loop through it, setting each enabled >> property to false. The container holding them will hold a reference to them > > That way you lose the latent

Re: disable group of controls

2017-04-05 Thread Jonathan Mitchell
> On 5 Apr 2017, at 10:45, J.E. Schotsman wrote: > > >> On 03 Apr 2017, at 21:00, J.E. Schotsman wrote: >> >> What is the Cocoa way of enabling/disabling a group of controls? >> In Carbon I used to use a user pane for that. >> I thought I would try an NSBox but then I realized it is not a cont

Re: Printing questions

2017-03-13 Thread Jonathan Mitchell
> On 12 Mar 2017, at 21:23, Daryle Walker wrote: > > > > Sent from my iPhone > >> On Mar 12, 2017, at 5:18 AM, Daryle Walker wrote: >> >> I hope it’s a nice first try, but I have some concerns. >> >> 1. I also added an “Export as PDF…” menu item, which uses the save-as-PDF >> default acti

struts and springs layout

2017-03-10 Thread Jonathan Mitchell
In Xcode 8 we can use struts and springs style layout until we add an explicit constraint. The idea seems to be that the strut + spring definition get turned into constraints. However, querying NSView -constraints returns nothing in this case, nor does the debug view hierarchy. Is it just tha

Re: ncurses type wrapper for NStextview

2017-03-06 Thread Jonathan Mitchell
> On 6 Mar 2017, at 21:43, Julie Porter wrote: > > I am looking for something much simpler along the lines of > > textmoveto(3,4) > displaytext(Hello World) > This is probably not what you were thinking of but it does provide for positional layout to a pdf view though not an NSTextView.. It

Re: Binding NSTextField to an array

2017-03-06 Thread Jonathan Mitchell
Sounds like NSValueTransformer is in fact what you need. It can take in your NSArray ref and spit out a single NSString that the NSTextField binding can live with. Defining NSValueTransformer subclass for every binding can be a pain. So I use a block approach. This has the big advantage that you

Re: Attributed strings - and bounding rects

2017-03-04 Thread Jonathan Mitchell
> I’m still not out of the wood yet though. Sorry. I should have provided more details. What I do to support table cell view wrapping is this. However, I have to support back to 10.9 so it may be possible to use some of the newer auto NSTextField line wrapping stuff. 1. Create a nib containin

Re: Attributed strings - and bounding rects

2017-03-03 Thread Jonathan Mitchell
Hi I needed to do this for my pdf builder implementation: Using the NSLayoutManager directly gives the best level of control. https://github.com/ThesaurusSoftware/PDFPageBuilder/blob/master/PDFPageBuilder/TSPageTextItem.m#L95 NSRect boundingRect = self.containerRect; // if no rec

Re: Xcode Framework wrapper for Library ( Exposing library headers)

2017-02-06 Thread Jonathan Mitchell
Its been a while since I wrapped my little noggin around this issue but perhaps this will help: https://github.com/mugginsoft/Single-Object-Prelink-Framework-Demo There is a thread too, but the Apple list server seems to be on

Re: Merging scrolling/clipping with NSStackView

2017-01-20 Thread Jonathan Mitchell
> On 20 Jan 2017, at 21:36, Quincey Morris > wrote: > > On Jan 20, 2017, at 02:47 , Jonathan Mitchell <mailto:li...@mugginsoft.com>> wrote: >> >> NSTableView might go something like this: >> >> @implementation TSTableView >> >> - (

Re: Merging scrolling/clipping with NSStackView

2017-01-20 Thread Jonathan Mitchell
> On 19 Jan 2017, at 18:25, Quincey Morris > wrote: > > On Jan 19, 2017, at 06:39 , Daryle Walker wrote: >> >> The inner views should be as tall as they need to be. > > I don’t understand this part. How tall is that? > > I assume you mean that you want the text and table views to be tall en

Re: Merging scrolling/clipping with NSStackView

2017-01-19 Thread Jonathan Mitchell
> On 19 Jan 2017, at 14:39, Daryle Walker wrote: > > Right now, my window has a table view sitting on top of a text view. Those > templates from Interface Builder have those NSViews surrounded by a clip view > surrounded by a scroll view. But I want to flip that around; put the table > and te

NSPredicateEditor query

2016-12-14 Thread Jonathan Mitchell
I have an NSPredicateEditor configured to generate my queries. I have two questions: 1. I want my users to be able to construct queries from a simple initial predicate. Ideally I would like the initial predicate to operate on a single key path and look something like: @"(self.fullName CONTAINS

Re: Using floating point instructions

2016-12-06 Thread Jonathan Mitchell
> On 6 Dec 2016, at 15:27, G 3 wrote: > > Is there a way to fix this problem? > Have you tried lowering the release build optimisation level to match the level used for debug build?. It might get you on the right track. J ___ Cocoa-dev mailing li

Re: Substituting instance of cell subclass for instance of superclass

2016-11-12 Thread Jonathan Mitchell
> On 12 Nov 2016, at 01:34, James Walker wrote: > > However, the new cell has failed to copy much of the state of the old one. > Things like title, font, target, action, bezelStyle... I can manually copy > anything that I notice is missing, but I'm just wondering why the keyed > archiver ap

Re: Programmatically Clear Dirty NSDocument

2016-11-07 Thread Jonathan Mitchell
> On 7 Nov 2016, at 18:46, Richard Charles wrote: > > NSChangeUndone try NSChangeCleared ___ 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-d

Re: iOS: Preventing a singleton from being deallocated when the app is in the background.

2016-10-19 Thread Jonathan Mitchell
> On 19 Oct 2016, at 22:14, Jens Alfke wrote: > So that’s not what the problem is. > It may be that the a separate instance of the singleton is getting created via the normal alloc - init sequence outside of the normal singleton accessor. That should be trivial to check for. _

Re: PDFKit on 10.12

2016-10-05 Thread Jonathan Mitchell
> On 5 Oct 2016, at 07:52, Antonio Nunes wrote: > > On 04 Oct 2016, at 14:26, Jonathan Mitchell wrote: >> >> PDFKit seems a bit disturbed on Sierra. >> The 10.12 beta 3 seems to improve things but there are still some rendering >> stutters etc. > > 1

PDFKit on 10.12

2016-10-04 Thread Jonathan Mitchell
PDFKit seems a bit disturbed on Sierra. The 10.12 beta 3 seems to improve things but there are still some rendering stutters etc. Has PDFKit been reworked - there doesn’t seem to be any mention of it in the release notes? If so it might be a question of waiting for the internal gremlins to be hu

Re: Mystery Threads

2016-09-30 Thread Jonathan Mitchell
> On 30 Sep 2016, at 10:57, Gerriet M. Denkmann wrote: > > > > But I just cannot see anything which forces my function to run 16 times > longer in the first case. > > Any ideas where to look for a reason? https://github.com/apple/swift-corelibs-libdispatch/blob/ab16f5e62859ff2f54996b8838f83

Re: Stupid objective-c question

2016-09-23 Thread Jonathan Mitchell
> On 23 Sep 2016, at 10:04, Quincey Morris > wrote. > > As previously mentioned, the safest way to do this is: > >> static void* kMyContext = &kMyContext; > Thats a neat trick. It’s not an initialisation that I have seen before and on first glance I thought it was a typo but it works. I norm

Re: Package installation on MacOS Sierra

2016-09-20 Thread Jonathan Mitchell
Sorry. This was a false alarm. It turns out that I was anticipating a new installation into /Applications. However I had a prior installation in username/Downloads so that got updated instead. J > On 18 Sep 2016, at 22:22, Jonathan Mitchell wrote: > > Hi > > I have a Mac

Package installation on MacOS Sierra

2016-09-18 Thread Jonathan Mitchell
Hi I have a MacOS package that installs into /Applications on 10.11. On 10.12 it appears to install into the user’s Downloads folder. Is this change related to the new feature in MacOS 12 to encapsulate downloaded apps into a read only container? Thanks J __

Re: C callbacks with NSNotificationCenter?

2016-09-07 Thread Jonathan Mitchell
> Of course, I can't use this code in a normal C function because there are > references to "self" and the selector thing doesn't look like it's compatible > to > C. So I could just subclass AVPlayerItem and voila, everything's fine. I forgot to say that as long as your c function is in a .m file

Re: C callbacks with NSNotificationCenter?

2016-09-07 Thread Jonathan Mitchell
> On 7 Sep 2016, at 17:09, Andreas Falkenhahn wrote: > > > Still, I'm wondering: Is it also possible to have NSNotificationCenter call > a C function for me whenever the notification triggers? Can this somehow > be achieved or am I forced to use full Objective C here? > I would go about this b

Re: Unusual Conditional Formatting

2016-09-07 Thread Jonathan Mitchell
A couple of suggestions. > Here is what I have so far: I used a category on NSNumber to add a > "valueType" attribute as described at > http://nshipster.com/associated-objects/. > > The formatter checks this and the user preference when formatting an incoming > value. It sets some instance va

Re: Emailing from a daemon process

2016-07-07 Thread Jonathan Mitchell
> On 7 Jul 2016, at 17:13, Carl Hoefs wrote: > > I have a daemon app built on Foundation (aka "command line tool") running in > the background and I need it to issue a textual email on certain conditions. > > The solutions for emailing that I've been able to find (NSWorkspace, > NSSharingSer

NSTextView pagination

2016-07-07 Thread Jonathan Mitchell
Is there a recommended way to change the content of an NSTextView subclass during an NSPrintOperation preview? My subclass needs to adjust its content depending on the NSPrintInfo page orientation. Drawing into the margin with NSView -drawPageBorderWithSize: is not an appropriate solution in thi

Re: NSArrayController - error inserting object at arranged object index N

2016-06-24 Thread Jonathan Mitchell
> On 23 Jun 2016, at 23:03, Quincey Morris > wrote: > > On Jun 23, 2016, at 13:39 , Jonathan Mitchell <mailto:li...@mugginsoft.com>> wrote: >> >> Do you mean something like this? >> NSMutableArray *proxy = [NSArrayController >> mutableArrayVal

Re: unnamed function586 $$ AMDRadeon X4000GLDriver

2016-06-23 Thread Jonathan Mitchell
> On 23 Jun 2016, at 21:39, Ken Thomases wrote: > > O > > Are there any logs generated from the above call (other than your app's crash > log)? Browse around within Console.app's log list to see. Had a poke around but nothing significant that I can see. > >> CIFilter *colorFilter = [CIFilt

Re: NSArrayController - error inserting object at arranged object index N

2016-06-23 Thread Jonathan Mitchell
> On 23 Jun 2016, at 17:51, Quincey Morris > wrote: > > >> My workaround was to set controller.clearsFilterPredicateOnInsertion == YES >> and reset the filterPredicate following -addObject: >> >> It might be possible to subclass NSArrayController … > > There’s no need to work around at all.

unnamed function586 $$ AMDRadeon X4000GLDriver

2016-06-23 Thread Jonathan Mitchell
On a rare occasion I encounter the following abort while rendering an image in an NSImage category. The method (shown below) gets called frequently to render resources as grayscale. Looks like the driver has issues but beyond that I am stuck. Any ideas? Thread 1 (main-thread) #0 0x7fff9

Re: NSArrayController - error inserting object at arranged object index N

2016-06-23 Thread Jonathan Mitchell
> On 23 Jun 2016, at 14:27, Jonathan Mitchell wrote: > > The following raises with NSInternalInconsistencyException when : > > 1. an NSArrayController filter is in place, > 2. controller.clearsFilterPredicateOnInsertion = NO > 3. added content object is rejected by the

NSArrayController - error inserting object at arranged object index N

2016-06-23 Thread Jonathan Mitchell
The following raises with NSInternalInconsistencyException when : 1. an NSArrayController filter is in place, 2. controller.clearsFilterPredicateOnInsertion = NO 3. added content object is rejected by the filter. Is this behaviour by design? #import “AppDelegate.h" @interface AppDelegate () @

Re: TableView crash with Delegate

2016-06-14 Thread Jonathan Mitchell
> On 14 Jun 2016, at 12:26, Gerriet M. Denkmann wrote: > > > But no problem, as long one keeps in mind (as you recommended) that > awakeFromNib “can get called many times”. > You may be experiencing this, as described in docs for view based table views: NSTableView - (__kindofNSView

Re: iOS - the joy of observers and NSInternalInconsistancyException for KVO

2016-05-19 Thread Jonathan Mitchell
> On 19 May 2016, at 17:55, Jonathan Mitchell wrote: > > That way the observed object can get deallocated before the observer. Should say That way the observed object cannot get deallocated before the observer. J ___ Cocoa-dev mailing li

Re: iOS - the joy of observers and NSInternalInconsistancyException for KVO

2016-05-19 Thread Jonathan Mitchell
> > Is there any safer KVO technique to prevent or detect the dreaded "An > instance of xx was deallocated while key value observers were still > registered with it"? > I have a ton of observers in NSViewController subclasses. Generally when I use an observer I make 100% sure I have a stro

Re: Set font on NSTextView that uses bindings?

2016-05-19 Thread Jonathan Mitchell
> On 19 May 2016, at 04:47, Rick Mann wrote: > > I seem to be unable to set the font used in an NSTextView that uses bindings > to set the text content. The property it's bound to creates a plain NSString > (no attributes). > > I've tried setting the font, setting the typing attributes, setti

Re: Codesigning pain, god it hurts!

2016-05-18 Thread Jonathan Mitchell
> On 18 May 2016, at 04:29, Quincey Morris > wrote: > > Yes, it’s awful. > I agree. Screwing it up is easy. I use the following project archive scheme post action script to run a Gatekeeper security check on archive builds. This provides decent confirmation that all is well. if [ "${CONFIGU

Re: discontiguous bounds ?

2016-05-09 Thread Jonathan Mitchell
> On 9 May 2016, at 08:59, Graham Cox wrote: > > I’ve done this, based on that code. Yes, it was a bit buggy, but I got it to > work. The app it’s a part of still works when compiled with the latest tools > and SDK. But yes, you need two separate table views to do this. > I have done somethin

Re: NSTableView is messaging zombie delegate

2016-05-06 Thread Jonathan Mitchell
> On 6 May 2016, at 21:03, Matthew LeRoy wrote: > > Hello, > > I'm having an issue where an NSTableView appears to be messaging its delegate > after the delegate has been deallocated, causing an EXC_BAD_ACCESS crash. It > doesn't always happen, but it happens regularly. My understanding is th

Re: Yosemite NSCollectionView appropriate for spreadsheet-like view?

2016-05-03 Thread Jonathan Mitchell
> On 1 May 2016, at 17:06, thatsanicehatyouh...@me.com wrote: > > My guess is that since the basic unit here is NSTableRowView, all of the > columns are loaded into each row view whether they are on the screen or not. > View based table views recycle their views and I have found them to be ver

Re: Thoughts on autolayout

2016-04-21 Thread Jonathan Mitchell
> On 21 Apr 2016, at 11:48, Stephane Sudre wrote: > > > - you still have to use intermediary subviews to deal with complex cases. NSLayoutGuide can help out here https://developer.apple.com/library/mac/documentation/AppKit/Reference/NSLayoutGuide_ClassReference/index.html#//apple_ref/doc/uid/TP

Re: Thoughts on autolayout

2016-04-21 Thread Jonathan Mitchell
> On 21 Apr 2016, at 08:12, Quincey Morris > wrote: > > I think I’d much rather have a scheme where you can’t drag or resize UI > elements at all, but you would essentially drag on the constraints (or on > attributes that uniquely represent constraints that can be consistently > altered by d

Re: How to find the file (url) that was double-clicked to open my Cocoa Application?

2016-03-30 Thread Jonathan Mitchell
> On 30 Mar 2016, at 06:47, Motti Shneor wrote: > > Hi Everyone. My issue is tied to a very specific scenario, but still a Cocoa > question. > > I write a custom Installer Plugin (code bundle), used to customize our > installations (done via Mac Installer). The plugin bundle is loaded at som

Re: Xcode 7.2.1 - Apps not running on 10.8 and 10.9

2016-03-16 Thread Jonathan Mitchell
> On 16 Mar 2016, at 07:02, Quincey Morris > wrote: > > On Mar 7, 2016, at 09:29 , Frank Bitterlich wrote: >> >> Does anybody have a suggestion what this could be? > > It sort of sounds like your main XIB or storyboard is failing to load. > Possibly your file is set to compile for a later v

Re: Xcode 7.2.1 - Apps not running on 10.8 and 10.9

2016-03-16 Thread Jonathan Mitchell
> On 7 Mar 2016, at 17:29, Frank Bitterlich wrote: > > Hi, > > I have a weird problem. When I build a Cocoa app in Xcode 7.2.1, it fails to > run properly on certain machines running OSX versions 10.8 and 10.9. The app > launches (=icon in dock), but no window shows up, and the menus are all

Re: Returning a string value from a c function to a Objective-C class method. Is there an approved approach?

2016-03-08 Thread Jonathan Mitchell
ure. > > > > On Mar 4, 2016, at 7:06 PM, John McCall wrote: > >> >>> On Mar 4, 2016, at 4:03 PM, Greg Parker wrote: >>> >>> >>>> On Mar 4, 2016, at 2:24 PM, Jonathan Mitchell wrote: >>>> >>>> Hi Alex >

Re: Returning a string value from a c function to a Objective-C class method. Is there an approved approach?

2016-03-04 Thread Jonathan Mitchell
Hi Alex Not sure if this will help at all as I am not 100% sure what you are doing. In my case, using Mono, I needed to track events being raised in the Mono C runtime back into Obj-C space. You need some method of defining a call back function in the target C Api - without that thinks would loo

Re: CG Error with popovers - known issue?

2015-12-30 Thread Jonathan Mitchell
HI Graham I am seeing the exact same issue with NSPopover on 10.11. The stack trace is identical. Did you manage to make any further progress with this? Thanks Jonathan > On 9 Dec 2015, at 22:42, Graham Cox wrote: > > I’m getting this message logged when I show a popover sometimes: > > Dec 1

Re: applicationSupportDirectory access for admin and standard users

2015-12-22 Thread Jonathan Mitchell
> On 22 Dec 2015, at 12:21, Roland King wrote: > > >> On 22 Dec 2015, at 20:11, Jonathan Mitchell wrote: >> >> >>> On 21 Dec 2015, at 22:24, Sean McBride wrote: >>> >>> On Mon, 21 Dec 2015 22:16:39 +, Jonathan Mitchell said: &

Re: applicationSupportDirectory access for admin and standard users

2015-12-22 Thread Jonathan Mitchell
> On 21 Dec 2015, at 22:24, Sean McBride wrote: > > On Mon, 21 Dec 2015 22:16:39 +, Jonathan Mitchell said: > >> My app seems to be having trouble reading and writing to the >> applicationSupportDirectory. > > What's "trouble"? What

applicationSupportDirectory access for admin and standard users

2015-12-21 Thread Jonathan Mitchell
Hi My app seems to be having trouble reading and writing to the applicationSupportDirectory depending on whether the logged in user is an admin or standard user. I don’t use the sandbox. NSURL *appSupportDir = [[NSURL alloc] initFileURLWithPath:[[NSFileManager defaultManager] applicationSuppor

NSView -identifier - is there more to it?

2015-12-09 Thread Jonathan Mitchell
22:55:50.038 Buster[-] _NS:53 2015-12-09 22:55:50.376 Buster[-] _NS:36 2015-12-09 22:55:50.377 Buster[-] _NS:9 2015-12-09 22:55:50.394 Buster[-] _NS:36 2015-12-09 22:55:50.395 Buster[-] _NS:9 2015-12-09 22:55:50.419 Buster[-] _NS:10 2015-12-09 22:55:50.460 Buster[-] _NS:10 Regards Jonathan

Re: NSViewController -identifier unrecognized selecto problem

2015-12-09 Thread Jonathan Mitchell
HI Kyle. Thanks for that. I totally missed the fact that NSUserInterfaceItemIdentification is a recent addition. Looks like I will just have to refactor. J > On 9 Dec 2015, at 21:19, Kyle Sluder wrote: > > On Wed, Dec 9, 2015, at 11:20 AM, Jonathan Mitchell wrote: >> NSViewCont

NSViewController -identifier unrecognized selecto problem

2015-12-09 Thread Jonathan Mitchell
NSViewController conforms to NSUserInterfaceItemIdentification so should implement @property (nullable, copy) NSString *identifier; I build my app on 10.11 with a deployment target of 10.9 Om 10.10 and 10.11 no issues. On 10.9 I get 'NSInvalidArgumentException', reason: '-[TSToolbarGroup ident

Re: Best Control for a Matrix these days?

2015-12-04 Thread Jonathan Mitchell
ttp://lists.apple.com/> >> >> Help/Unsubscribe/Update your Subscription: >> https://lists.apple.com/mailman/options/cocoa-dev/lrucker%40vmware.com >> <https://lists.apple.com/mailman/options/cocoa-dev

Overriding property attributes

2015-12-03 Thread Jonathan Mitchell
Hi NSObject declares: @property(readonly, copy) NSString *description However, on occasion I may require a non atomic variant: @property (nonatomic, readonly, copy) NSString * description; My usage case involves using a code generator that outputs property declarations in a standardised way tha

Re: Best Control for a Matrix these days?

2015-12-03 Thread Jonathan Mitchell
> On 3 Dec 2015, at 16:23, Jim Crate wrote: > > On Dec 3, 2015, at 8:00 AM, Dave wrote: >> >> This is a Mac question, not iOS. >> >> Which Class is the latest best practise for displaying a matrix in a View. >> >> The matrix can be maximum 3 rows x 4 columns and each item contains a small

Helper tool

2015-12-03 Thread Jonathan Mitchell
I need to install a persistent always on launch daemon/agent for my app that queries an external URL and optionally communicates with the app if it is running. Is EvenBetterAuthorizationSample the current best practice? J ___ Cocoa-dev

Re: NSView - trouble setting next responder on 10.10 - works okay on 10.9

2015-11-06 Thread Jonathan Mitchell
controller can then be inserted higher up in the responder chain as before. https://github.com/mugginsoft/XSViewController/commit/29b406a4e1882edea2203eaff3c44f1c6a2f4cbd > On 4 Oct 2015, at 11:02, Jonathan Mitchell wrote: > > >> On 3 Oct 2015, at 18:43, Quincey Mo

Re: Crash running C code built on OS X El Capitan in Xcode 7

2015-11-02 Thread Jonathan Mitchell
> On 2 Nov 2015, at 17:24, Jens Alfke wrote: > > >> On Nov 2, 2015, at 6:27 AM, Jonathan Mitchell >> wrote: >> >> It fails if I build and run it on OS X 10.11 using Xcode 7.1 - >> EXC_BAD_ACCESS in mono_jit_runtime_invoke() when calling >>

Re: Crash running C code built on OS X El Capitan in Xcode 7

2015-11-02 Thread Jonathan Mitchell
> On 2 Nov 2015, at 16:40, Fritz Anderson wrote: > > [Cross-ref the query “EXC_BAD_ACCESS puzzle when not running as test bundle” > on cocoa-dev. The OP determined this was likely a tools issue, and has > brought it here.] > > > On 2 Nov 2015, at 8:27 AM,

Re: EXC_BAD_ACCESS puzzle when not running as test bundle

2015-11-02 Thread Jonathan Mitchell
Hmm. Some more testing has enabled me to remove my Cocoa wrapper altogether and the issue persists. So I will move the query over to the Xcode list. > On 2 Nov 2015, at 09:45, Jonathan Mitchell wrote: > > This has me puzzled. > > I have some code that is giving trouble onl

EXC_BAD_ACCESS puzzle when not running as test bundle

2015-11-02 Thread Jonathan Mitchell
This has me puzzled. I have some code that is giving trouble only when built on 10.11. I have set up a simple test scenario and it boils down to the following. If I execute the same 4 line test code as part of a unit test bundle it works fine. If I try and execute the exact same code as part of a

Re: NSView - trouble setting next responder on 10.10 - works okay on 10.9

2015-10-04 Thread Jonathan Mitchell
> On 3 Oct 2015, at 18:43, Quincey Morris > wrote: > > > I suggest you consider breaking your view controllers apart into two objects. > One, a “view responder” would be a NSResponder subclass that you insert into > the responder chain just below the window controller. The other, an actual

Re: NSView - trouble setting next responder on 10.10 - works okay on 10.9

2015-10-03 Thread Jonathan Mitchell
> On 3 Oct 2015, at 03:40, Quincey Morris > wrote: > > On Oct 2, 2015, at 15:03 , Jonathan Mitchell wrote: > > “When a view is assigned” sounds to me an awful lot like “when > [NSViewController setView:] is called”. You might have more success moving > the super

Re: NSView - trouble setting next responder on 10.10 - works okay on 10.9

2015-10-02 Thread Jonathan Mitchell
Hi Conrad > On 2 Oct 2015, at 18:35, Conrad Shultz wrote: > >> >> On Sep 30, 2015, at 9:15 AM, Jonathan Mitchell >> wrote: >> >> In my app i manage the responder chain on 10.8 and 10.9 to insert the >> NSViewController into the responder chain.

NSView - trouble setting next responder on 10.10 - works okay on 10.9

2015-09-30 Thread Jonathan Mitchell
In my app i manage the responder chain on 10.8 and 10.9 to insert the NSViewController into the responder chain. The view controllers are inserted just below the NSWindowController so that designated view controllers can respond to actions coming up the chain from any source. ie: the NSViewContr

Re: best way to implement a clickable grid?

2015-09-15 Thread Jonathan Mitchell
> On 15 Sep 2015, at 01:17, Patrick J. Collins > wrote: > > Hi everyone, > > I am looking to implement something that would look somewhat like a > graphic equalizer. Meaning, a grid of blocks... Clicking on a single > grid block would change the appearance of all cells directly under it.. >

Re: StackViews and XCode 6.4

2015-09-10 Thread Jonathan Mitchell
Hi Dave NSStackView works great and I use it extensively to build my entire UI, encapsulating one stack view inside another. I don’t use XCode at all to manage the stack view content. I generally create my stack view in code, set its properties then load in subviews from a nib(s). I use a Stack

Re: Swift generics, circular type declarations, and segfaults, oh my!

2015-09-06 Thread Jonathan Mitchell
> On 6 Sep 2015, at 21:19, Quincey Morris > wrote: > > I’ve been thinking about the implications of this for a couple of days now. > Of course, you should file a Radar if you see some compiler behavior that > looks like it ought to work. But I think there’s a higher order problem > that’s wo

NSXMLDocument - XSLT version

2015-09-06 Thread Jonathan Mitchell
It seems that NSXMLDocument only supports XSLT v 1.0. In particular I am interested in the date format support that is part of XSLT 2. I have found extension code such as this: http://exslt.org/date/functions/format-date/ But it seems rather old school. Is there a better approach out there? Sam

Re: Xcode 6.4 on the Developer download site.

2015-08-07 Thread Jonathan Mitchell
> On 7 Aug 2015, at 20:45, Alex Zavatone wrote: > > We were told a few times that the latest Xcodes should always be on the > developer downloads site at: > > https://developer.apple.com/downloads/ > > I'm trying to download a copy of Xcode 6.4's installer and I can't see > anything up on th

Re: Xcode 6.4 on the Developer download site.

2015-08-07 Thread Jonathan Mitchell
> On 7 Aug 2015, at 20:45, Alex Zavatone wrote: > > We were told a few times that the latest Xcodes should always be on the > developer downloads site at: > > https://developer.apple.com/downloads/ > > I'm trying to download a copy of Xcode 6.4's installer and I can't see > anything up on th

Re: Occasional NSInternalInconsistencyException - could not load nib

2015-08-07 Thread Jonathan Mitchell
Hi Sean > On 7 Aug 2015, at 15:30, Sean McBride wrote: > > On Fri, 7 Aug 2015 15:04:19 +0100, Jonathan Mitchell said: > >> Occasionally I get crash reports like so: >> >> Terminating app due to uncaught exception >> 'NSInternalInconsistencyExcept

Occasional NSInternalInconsistencyException - could not load nib

2015-08-07 Thread Jonathan Mitchell
Occasionally I get crash reports like so: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[TSStackMenuItem loadView] could not load the "TSStackMenuItem_Image_Info" nib.’ They are very infrequent and don’t occur in testing. I doubt that the nibs are actua

Re: Dubrovnik Sucesss!

2015-07-23 Thread Jonathan Mitchell
> On 22 Jul 2015, at 11:54, Uli Kusterer wrote: > > On 22 Jul 2015, at 11:58, Dave wrote: >> Success! Thanks so much for your help Jonathan, I definitely owe you a pint >> or two! >> >> If anyone is trying use Dubrovnik/Mono on Mac OS X and needs to know how to >> make it work - give me a s

Re: Has anyone used Dubrovnik?

2015-07-21 Thread Jonathan Mitchell
> On 21 Jul 2015, at 14:11, Dave wrote: > Probably something is out of date, but with no real support, who knows? With FOSS perseverance is the only game in town. Jonathan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post adm

  1   2   >