Re: #selector noob question

2016-03-22 Thread Quincey Morris
On Mar 22, 2016, at 07:21 , Eric E. Dolecki wrote: > > myButton.addTarget(self, action: #selector(AudioElement.selected(_:)), > forControlEvents: .TouchUpInside) > I get it now that I can see what's going on with better context. I can also > just replace AudioElement with

Re: NSThread to NSOperation and blockUntil

2016-03-21 Thread Quincey Morris
On Mar 21, 2016, at 18:07 , Trygve Inda wrote: > > I would like to move this to NSOperation and NSOperationQueue but I see no > way to replicate this behavior. I think the GCD/NSOperationQueue concept of “background” quality of service is what you want here. That

Re: #selector noob question

2016-03-21 Thread Quincey Morris
On Mar 21, 2016, at 20:27 , Eric E. Dolecki wrote: > > Quick question. If I use #selector(funcName) - does it always send an > argument of the obj if the func requests it or not? > > If the function being called has a typed argument of something like > sender:UIButton, I can

Re: UIDocument with NSFileWrapper

2016-03-21 Thread Quincey Morris
On Mar 19, 2016, at 18:54 , davel...@mac.com wrote: > > What I’m having trouble understanding is how I store the images (whose > filenames will vary from document to document) with NSFileWrapper. In my top > level directory do I have my main model file as a JSON file along with a file > (JSON

Re: NSOutlineView woes

2016-03-21 Thread Quincey Morris
On Mar 20, 2016, at 20:20 , Graham Cox wrote: > > This is driving me insane! a. Can you produce a test project that demonstrates the behavior? (Preferably not via drag-and-drop, since that’s so much harder to debug.) b. It’s not the actual problem, but I wonder why you

Re: UIDocument with NSFileWrapper

2016-03-19 Thread Quincey Morris
On Mar 19, 2016, at 14:23 , davel...@mac.com wrote: > > My thought is to have a dictionary mapping each image filename to a > NSFileWrapper You already have one, basically. The top level wrapper for a package is a directory wrapper, which lists the wrappers of contained files, indexed by file

Re: iOS - how to make documents visible in iTunes

2016-03-19 Thread Quincey Morris
On Mar 19, 2016, at 11:24 , Gerriet M. Denkmann wrote: > > I have an iOS app (9.2.1) (not document based) which contains stuff in: > /private/var/mobile/Containers/Data/Application/55…F0/Documents, which is the > NSDocumentDirectory in NSUserDomainMask. > > I want to see

Re: UIDocument with NSFileWrapper

2016-03-19 Thread Quincey Morris
On Mar 19, 2016, at 10:18 , davel...@mac.com wrote: > > The downside I see for my app is that UIDocument writes out the data to a > temporary location and then moves it to the new location so I think my app > will constantly be writing out these image/PDF files that never change. Is > there a

Re: Trying to understand weird NSOutlineVew behaviour

2016-03-18 Thread Quincey Morris
On Mar 16, 2016, at 20:53 , Graham Cox wrote: > > This is slightly different from the standard drag/drop stuff built-in to the > table, which appears to divide each row approximately into thirds (not > halves) when deciding which row the drag is over. Depending on

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

2016-03-16 Thread Quincey Morris
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 version of OS X than your deployment target.

Re: NSBitmapImageRep setSize: doesn't always do the right thing

2016-03-14 Thread Quincey Morris
On Mar 14, 2016, at 12:55 , Steve Mills wrote: > > The cropped NSImage is created at the scaled-up size, drawn into, and finally > the cropped NSImage's first NSImageRep is set to draw at the perceived, > high-res size via [cropped.representations.firstObject >

Re: How to set a TextField

2016-03-14 Thread Quincey Morris
On Mar 13, 2016, at 23:50 , Gerriet M. Denkmann wrote: > > - (void)computeSomething > { > self.message1 = @“Start computing”; > // some seconds of computations > self.message1 = @“Result = 42”; > } Assume, conceptually, that drawing only takes place

Re: Variable type representations

2016-03-11 Thread Quincey Morris
On Mar 11, 2016, at 12:55 , Quincey Morris <quinceymor...@rivergatesoftware.com> wrote: > > just use ‘unsignedIntegerValue’ Oops, forgot you were starting from a NSString, so there’s no unsigned variant. Use ‘integerValue’ and cast the result (possibly doing a run-time check for

Re: Variable type representations

2016-03-11 Thread Quincey Morris
On Mar 11, 2016, at 12:43 , Carl Hoefs wrote: > > Q1: How can 'long' and 'long long' have the same 8-byte representation? Go complain to the gods of C. That language is responsible for the concept: sizeof (int) <= sizeof (long) <= sizeof (long long)

Re: Can't generate receipt OS X after 173 exit

2016-03-10 Thread Quincey Morris
On Mar 9, 2016, at 18:47 , Trygve Inda wrote: > > When I launch, I get a box saying that the app was purchased on another > computer and that I need to validate it. I enter my Apple ID and password, > but I get "An unexpected error occurred while signing in” Did you

Re: Automatically restore last saved document on application launch

2016-03-10 Thread Quincey Morris
On Mar 10, 2016, at 17:05 , Eric Gorr wrote: > > I have a Core Data Document Based OS X application written in swift and using > storyboards. Whenever I build and launch the app, instead of automatically > opening the last opened document(s), it will create a new

Re: Move views relative to other view with Autolayout

2016-03-10 Thread Quincey Morris
On Mar 10, 2016, at 12:59 , Doug Hill wrote: > > I set up an auto layout constraint so that an another view is a fixed number > of pixels from the side view. I then want to move the origin of the side view > and have the other view move with it. > > If I set up an

Re: Safe cross references between scenes in an OS X storyboard

2016-03-09 Thread Quincey Morris
On Mar 9, 2016, at 16:22 , Quincey Morris <quinceymor...@rivergatesoftware.com> wrote: > >> NSWindowController Sorry, my brain was stuck on window controllers, but you’re doing this in the view controller. Same code, really. ___ Co

Re: Safe cross references between scenes in an OS X storyboard

2016-03-09 Thread Quincey Morris
On Mar 9, 2016, at 13:31 , Bill Cheeseman wrote: > >static var controller: MainContentViewController? { >get { >return MainContentViewController.controller >} >set(newController) { >MainContentViewController.controller =

Re: Safe cross references between scenes in an OS X storyboard

2016-03-09 Thread Quincey Morris
On Mar 9, 2016, at 11:36 , Bill Cheeseman wrote: > > But don't I still need to use optionals if I declare the window controller or > content view controller instance variable in AppDelegate but don't set it > until later in the window controller's windowDidLoad() method?

Re: Safe cross references between scenes in an OS X storyboard

2016-03-09 Thread Quincey Morris
On Mar 9, 2016, at 05:59 , Bill Cheeseman wrote: > > But the main thrust of my question was whether this is a safe and sensible > way to crossreference other storyboard scenes -- at least when > prepareForSegue(_:sender:) isn't available, as it isn't here. Having thought

Re: State Restoration thinks all my windows closes prior to quit

2016-03-07 Thread Quincey Morris
On Mar 5, 2016, at 01:36 , Daryle Walker wrote: > > The “applicationOpenUntitledFile:” and “newDocument:” methods call this > method. On Mar 7, 2016, at 12:30 , Daryle Walker wrote: > > I haven’t set any restoration class. But that wasn’t a problem before;

Re: App opens in wrong language on some users' machines

2016-03-05 Thread Quincey Morris
On Mar 5, 2016, at 17:24 , Quincey Morris <quinceymor...@rivergatesoftware.com> wrote: > > the strings themselves are demonstrably different Well, I take this back. The .strings *files* are demonstrably different. Normally, the method for looking up localized strings

Re: App opens in wrong language on some users' machines

2016-03-05 Thread Quincey Morris
On Mar 5, 2016, at 15:21 , SevenBits wrote: > > I did not, mainly because I was under the assumption that you didn't need to > explicitly localize the app in its development language; you could provide > translations for specific languages, and if there wasn't a

Re: App opens in wrong language on some users' machines

2016-03-05 Thread Quincey Morris
On Mar 5, 2016, at 14:41 , SevenBits wrote: > > On which Macs would this be the case? It hasn't happened on any of the ones > that I've tried. Is there a documentation page anywhere detailing this? I don’t know. The specific piece of information that would answer this

Re: App opens in wrong language on some users' machines

2016-03-05 Thread Quincey Morris
On Mar 5, 2016, at 13:32 , SevenBits wrote: > > Anyone have any pointers of things to try first? Looking in the project in github, I see that en.lproj is missing almost all of the files that the other localizations have. I think the problem is along the lines of the

Re: State Restoration thinks all my windows closes prior to quit

2016-03-05 Thread Quincey Morris
On Mar 5, 2016, at 01:36 , Daryle Walker wrote: > > Default project Xcode 7 with OS X Cocoa app, with Storyboards but without > Core Data nor Documents. Somewhere I messed up and State Restoration stopped > working correctly. It somehow thinks when quit happens and any open

Re: How to implement NSWindowRestoration protocol in Swift

2016-03-03 Thread Quincey Morris
On Mar 3, 2016, at 05:27 , Bill Cheeseman wrote: > > I use MainWindowController as the restoration class: > >static func restoreWindowWithIdentifier(identifier: String, state: > NSCoder, completionHandler: (NSWindow?, NSError?) -> Void) { >let controller =

Re: Is calling "-applicationOpenUntitledFile:" for app-open (but not app-reopen) out of fashion?

2016-03-02 Thread Quincey Morris
On Mar 2, 2016, at 10:00 , Daryle Walker wrote: > > If this is a policy change … Yes and no. With state restoration enabled (the default), the application re-launches to the same state as when it terminated. If there was no untitled window at quit, there’s none when it

Re: Starting out with storyboards (on Mac)

2016-03-01 Thread Quincey Morris
On Mar 1, 2016, at 07:20 , Jerry Krinock wrote: > > 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? There is one good (though mystical)

Re: NSURLErrorKey vs. NSURLErrorFailingURLErrorKey

2016-02-26 Thread Quincey Morris
On Feb 26, 2016, at 18:12 , Jens Alfke wrote: > > Thanks, but I did read the documentation before asking. Then your question makes no sense. One of the URL keys is specific to NSURLErrorDomain, and that isn’t your error domain to use. That means your only standard choice

Re: NSURLErrorKey vs. NSURLErrorFailingURLErrorKey

2016-02-26 Thread Quincey Morris
On Feb 26, 2016, at 16:33 , Jens Alfke wrote: > > What’s the difference between these? If I’m creating an NSError and adding a > URL to it, which one is preferred? According to NSError documentation: > • NSURLErrorKey > The corresponding value is an NSURL object. > > •

Re: ARC code in a non ARC app. iOS

2016-02-25 Thread Quincey Morris
On Feb 25, 2016, at 22:15 , Uli Kusterer wrote: > > Did you really mean +newBlah ? Not something like +blahWithX: or just +blah? > Because +new is documented to just be a shorthand for +alloc followed by > -init on the result, so +newBlah behaving differently than

Re: UI to allow user to scale and crop image within a circle

2016-02-24 Thread Quincey Morris
On Feb 24, 2016, at 13:44 , Graham Cox wrote: > > However, if you use a clipping path, you can just create this on the fly as > part of -drawRect: and so it’ll always be correct I don’t recall Charles’s drawing code exactly, but I think this is just part of the

Re: When to remove Gesture Recognizers

2016-02-24 Thread Quincey Morris
On Feb 24, 2016, at 12:17 , Dave wrote: > > I’m adding a Gesture Recognizer to a view in the awakeFromNIB method. This > works ok but I’m getting crashes sometimes and I’m wonder it its because I’m > not removing it? If so, when is the best place to call >

Re: UI to allow user to scale and crop image within a circle

2016-02-23 Thread Quincey Morris
On Feb 23, 2016, at 18:50 , Charles Jenkins wrote: > > I draw based on the overlay view’s frame, NOT based on the rect that gets > passed in to drawRect(). I must not understand what that parameter is for. From the UIView documentation for ‘drawRect’: > The portion of the

Re: ARC code in a non ARC app. iOS

2016-02-23 Thread Quincey Morris
On Feb 23, 2016, at 15:25 , Alex Zavatone wrote: > > Would it be recommended to package my ARC code with ARC turned off and > package that in a framework and then link to that from the non ARC app that > will need to load it? This would be a really bad idea. :) Your code has no

Re: ARC code in a non ARC app. iOS

2016-02-23 Thread Quincey Morris
On Feb 23, 2016, at 13:30 , Alex Zavatone wrote: > > Now, I'm familiar with the -fno-objc-arc build flags to disable compiling one > file at a time, but is there any possibility to include iOS code that does > use ARC within an app that doesn't? You can mix-and-match ARC source

Re: UI to allow user to scale and crop image within a circle

2016-02-23 Thread Quincey Morris
On Feb 23, 2016, at 12:32 , Charles Jenkins wrote: > > This is the first time I’ve tried to inject an overlay view into the view > hierarchy, so I’m probably doing it completely wrong or missing something > very basic. I’d suggest you go and watch the WWDC videos about

Re: UI to allow user to scale and crop image within a circle

2016-02-23 Thread Quincey Morris
On Feb 23, 2016, at 04:28 , Charles Jenkins wrote: > > My scrollview containing an imageview seems to work just fine: I can scale > and crop an image with no problem. But I’m having difficulty getting the > desired “crop circle” to hover over the scrollview properly. It’s

Re: Value of the MAC_OS_X_VERSION_MIN_REQUIRED macro

2016-02-20 Thread Quincey Morris
On Feb 20, 2016, at 23:07 , Ilya Kulakov wrote: > > Checking version of the OS is the least problem. Providing an implementation > is the actual one. > I want to use weaks, because they are easier for developers who are tought by > new documentation and didn't learn to

Re: Value of the MAC_OS_X_VERSION_MIN_REQUIRED macro

2016-02-20 Thread Quincey Morris
On Feb 20, 2016, at 21:03 , Ilya Kulakov wrote: > > There should be an ability to makes this decision in runtime I guess. Well, there is, if you mean that you make the decision — -[NSProcessInfo isOperatingSystemAtLeastVersion:]. I’m not sure I understand, though, why

Re: Can an NSArray ever have a count of -1?

2016-02-20 Thread Quincey Morris
On Feb 20, 2016, at 00:25 , Jean-Daniel Dupas wrote: > > Even if swift is planning to provide a Foundation framework, one of the > strong requirement is that it must be source compatible with the Apple > Foundation, as that is the one that will be used on Apple platforms.

Re: Can an NSArray ever have a count of -1?

2016-02-19 Thread Quincey Morris
On Feb 19, 2016, at 22:14 , Gerriet M. Denkmann wrote: > > Is there (yet) a Swift version of ‘[NSString stringWithFormat: “%08lx”, > (someCast) someValue]’ ? No, and yes, and no, and yes. There is currently AFAIK no such native formatting syntax in Swift print

Re: Can an NSArray ever have a count of -1?

2016-02-19 Thread Quincey Morris
On Feb 19, 2016, at 21:30 , Gerriet M. Denkmann wrote: > > One can NOT force NSUInteger to be different sizes. It will always be 4 bytes > on 32 bit systems, and 8 bytes on 64 bit ones. > > 32 bit without DNS_BUILD_32_LIKE_64 > NSUInteger = int; > 32 bit with

Re: Can an NSArray ever have a count of -1?

2016-02-19 Thread Quincey Morris
On Feb 19, 2016, at 20:43 , Gerriet M. Denkmann wrote: > > This: > UIDevice *theDevice = [UIDevice currentDevice]; > NSLog(@“%s NSUInteger %lu bytes on %@“,__FUNCTION__, > sizeof(NSUInteger), theDevice.localizedModel); > > prints: > -[AppDelegate

Re: Can an NSArray ever have a count of -1?

2016-02-19 Thread Quincey Morris
On Feb 19, 2016, at 19:00 , Gerriet M. Denkmann wrote: > > I use Other C Flags: -DNS_BUILD_32_LIKE_64=1 AFAIK this is a Mac-only thing. I don’t believe it works on a 32-bit iOS platform, in particular because I don’t believe there are any 64-bit system frameworks on such

Re: Breakpoints: Swift Error

2016-02-19 Thread Quincey Morris
On Feb 19, 2016, at 11:20 , Eric E. Dolecki wrote: > > Yes, it's in the AVAudioPlayer init. Which is a very interesting fact, because it suggests that the frameworks are using Swift code. I wasn’t aware that Apple had begun using Swift in actual frameworks yet, but I guess

Re: Breakpoints: Swift Error

2016-02-19 Thread Quincey Morris
On Feb 19, 2016, at 10:45 , Eric E. Dolecki wrote: > > I have an app where I have a breakpoint set for Swift Error. If it's on and > I run the debug app, I get the breakpoint for a crash. > > try player = AVAudioPlayer(contentsOfURL: url) What, according to the backtrace,

Re: Secure coding NSArray

2016-02-15 Thread Quincey Morris
On Feb 15, 2016, at 09:44 , Quincey Morris <quinceymor...@rivergatesoftware.com> wrote: > >> [archiver encodeObject: model forKey: @"model"]; Oh, in the test project that I pasted this code from, I used “model” as my root object key. In th

Re: Secure coding NSArray

2016-02-15 Thread Quincey Morris
On Feb 15, 2016, at 03:43 , Dave wrote: > > Do you know if same thing applies to dictionaries as well as arrays? In the project that got me started on this, I don’t yet have any dictionaries, so I don’t know. But I would assume so. On Feb 15, 2016, at 04:34 , Michael

Re: Swift bindings issue, Swift.Dictionary, NSMutableDictionary and NSObjectController

2016-02-14 Thread Quincey Morris
On Feb 14, 2016, at 02:06 , Samuel Williams wrote: > > 2/ Should I prefer NSMutableDictionary in the Swift code? Is your Swift property declared ‘dynamic’. Also, keep in mind that the Swift type that’s bridgeable to NSDictionary is [NSObject, AnyObject]. Your

Re: Swift bindings issue, Swift.Dictionary, NSMutableDictionary and NSObjectController

2016-02-14 Thread Quincey Morris
(sorry about the previous post, hit Send early by accident) On Feb 14, 2016, at 02:06 , Samuel Williams > wrote: > > 2/ Should I prefer NSMutableDictionary in the Swift code? Is your Swift property declared ‘dynamic’?

Secure coding NSArray

2016-02-14 Thread Quincey Morris
I might be late to this party, but since I just spent hours on it, I’ll document this for anyone who hasn’t run into it yet. If you’re using NSSecureCoding, there’s a problem decoding NSArray objects. You can’t use this: myArray = [coder decodeObjectForKey: @“myArray”]; and you can’t

Re: TreeController and "selection" Binding

2016-02-12 Thread Quincey Morris
On Feb 12, 2016, at 07:04 , Michael de Haan wrote: > > Ideally, I would like to omit the outlet/programmtically binding steps and > bind the treeControllers selection in IB to my local variable. So, the > “clunkiness” was a referral to the outlets and programmatic binding.

Re: Don't you hate it when Appkit crashes?

2016-02-12 Thread Quincey Morris
On Feb 12, 2016, at 19:46 , Graham Cox wrote: > > I’ve been running with zombies on and this crash occurs still I think, in the scenario I described, zombie detection won’t help. It’s not an undead object, but an undead reference. It’s also worth noting, though no help

Re: Don't you hate it when Appkit crashes?

2016-02-12 Thread Quincey Morris
On Feb 12, 2016, at 22:24 , Graham Cox wrote: > > It’s deallocated, so AppKit uses that memory for something else. I clobber > that memory using a stale reference. > > With zombies, the memory isn’t deallocated, it’s just marked as belonging to > a zombie. If I try and

Re: TreeController and "selection" Binding

2016-02-12 Thread Quincey Morris
On Feb 12, 2016, at 14:00 , Michael de Haan wrote: > > I could not get from that binding to the actual instance of my model. There > does not seem to be an “Array.ObjectAtThisIndexPath" which I think you are > alluding to? Ie bind this to a local variable (indexPaths) and

Re: UITableView -reloadData woes

2016-02-12 Thread Quincey Morris
On Feb 12, 2016, at 12:37 , Carl Hoefs wrote: > > Wouldn't that necessitate the invocation of the delegate callback method > -tableView:cellForRowAtIndexPath:? FWIW, the next time the app is run, the > additional data does appear in the table. Yes. In fact, the

Re: Don't you hate it when Appkit crashes?

2016-02-12 Thread Quincey Morris
On Feb 12, 2016, at 14:58 , Graham Cox wrote: > > 0 libobjc.A.dylib 0x7fff9673e4dd objc_msgSend + 29 > 1 com.apple.QuartzCore 0x7fff9550eb45 > CA::Layer::setter(unsigned int, _CAValueType, void const*) + 165 Unfortunately, it’s

Re: TreeController and "selection" Binding

2016-02-12 Thread Quincey Morris
On Feb 12, 2016, at 14:24 , Michael de Haan wrote: > > using the “selectionIndexPaths” binding of the TreeController (from IB) I > should be able to use that information to trace it back ( with key paths) to > my model instance Not unless you’ve provided the necessary key

Re: Datasource methods in view-based tables

2016-02-12 Thread Quincey Morris
On Feb 12, 2016, at 16:11 , Shane Stanley wrote: > > The documents insist it's required The documentation is incorrect to call it “mandatory”. If you look in the header file, you’ll find it described as optional for view-based table views. So, fuhggeddaboudit.

Re: UITableView -reloadData woes

2016-02-12 Thread Quincey Morris
On Feb 12, 2016, at 16:23 , Carl Hoefs wrote: > > When I issue the -reloadData, the -tableView:numberOfRowsInSection: callback > gets invoked. But, it returns the number of rows _before_ the addition. Whoa. *You* return the number of rows from *your* data model,

Re: OT? Xcode Question

2016-02-11 Thread Quincey Morris
On Feb 11, 2016, at 07:49 , Charles Jenkins wrote: > > With no close button on the left side to give me a one-click solution, it > would be mighty handy to find two quick keystrokes that would result in > leaving the right-side file open in the main editor. So you want

Re: TreeController and "selection" Binding

2016-02-11 Thread Quincey Morris
On Feb 11, 2016, at 13:26 , Michael de Haan wrote: > > Currently, I obtain the “selection” of the treeController by implementing and > outlet to the controller, and using the “selectionIndexPaths” binding to > update a local variable which holds the selected range

Re: OT? Xcode Question

2016-02-11 Thread Quincey Morris
On Feb 11, 2016, at 16:15 , Charles Jenkins wrote: > > I was hoping for something simpler than all that I think I agree with you that a more direct solution would be worth campaigning for. View -> Standard Editor -> Show Standard Editor (Command-Return) is the direct way to

Re: PSA: Does your app use Sparkle? Update it, or use an HTTPS server

2016-02-09 Thread Quincey Morris
On Feb 9, 2016, at 17:53 , Graham Cox wrote: > > The appcast supplies the URL for the release notes, so that can be updated to > https without having to republish the app itself. That makes this a lot less > trouble than it seems. Yes, but the appcast itself is

Re: Hierarchical split views and auto layout

2016-02-08 Thread Quincey Morris
On Feb 8, 2016, at 15:07 , Dragan Milić wrote: > > I’d be very thankful to anyone having the time to look at the video and try > to figure out what could be the root of the problem. If after watching anyone > has questions about implementation, code, etc, I’d be happy to provide

Re: Question about Archives and Serialisations Programming Guide

2016-02-05 Thread Quincey Morris
On Feb 5, 2016, at 07:27 , Dave wrote: > > If you set it strong, then it creates a dupe of the object over and over > again, as I said in the other thread a. If that’s the case, then your problem is nothing to do with the weak references. Something is causing those

Re: auto-layout and rotated UILabels

2016-02-04 Thread Quincey Morris
On Feb 4, 2016, at 13:01 , Steve Christensen wrote: > > it looks like the width of the embedding view is set to the text width of the > UILabel instead of the text height, which is borne out by the view geometry Can you use a custom class for the embedding view and override

Re: Protocol extensions returning self

2016-02-04 Thread Quincey Morris
On Feb 4, 2016, at 05:03 , Charles Jenkins wrote: > > am I tilting at a windmill? The problem is that the protocol in unspecific as to what kind of types it can be applied to, and your intentions don’t work if the type is a struct**. In fact, you only apply it to classes

Re: UIViews in SpriteKit Apps

2016-02-02 Thread Quincey Morris
On Feb 2, 2016, at 19:00 , Charles Jenkins wrote: > > I’m thinking of presenting a “menu” SpriteKit SKScene with an SKSpriteNode > button on it that says “Set Background Music,” and when the user touches that > node, I then switch to an entirely new screen for picking media.

Re: LGPL code in the Mac App Store?

2016-01-29 Thread Quincey Morris
On Jan 29, 2016, at 10:50 , Dru Satori wrote: > > I think that this is a slightly uncharitable view of OSS devs, but not > terribly inaccurate. To clarify, I wasn’t trying to be sarcastic at the expense of open-/free-source developers. There are some developers and some

Re: LGPL code in the Mac App Store?

2016-01-29 Thread Quincey Morris
On Jan 29, 2016, at 09:27 , thatsanicehatyouh...@me.com wrote: > > One thing I forget to add; probably the *very best way* to address this issue > is to contact the library author and say, “Hey, I want to use your LGPL code > in my Mac app and put it on the App Store; is that ok? Do you mind if

Re: LGPL code in the Mac App Store?

2016-01-26 Thread Quincey Morris
I dunno, but it seems to me that this thread ran off the rails right at the start. It would be the end of the App Store if it were possible to strip the code signature out of a downloaded app and then just run it. However, what happens after the code signature is tampered with is going to

Re: Dodgy Code - Low Level Memory Management Question!

2016-01-26 Thread Quincey Morris
On Jan 26, 2016, at 06:00 , Dave wrote: > > IOW, the autorelease will basically just be a NOP? An autorelease is never a NOP. It’s a “release later”, not a “release if necessary”. Rather than trying to count or balance retains globally, I think it’s easier to think

Re: DeepCopy Arrays and Dictionaries

2016-01-25 Thread Quincey Morris
On Jan 25, 2016, at 08:50 , Dave wrote: > > Could I hold the data read here somewhere and use that to save re-reading the > file the second time around? Yes, you can, and it’s not an unreasonable thing to do. At the same time, it may not be your best course right now.

Re: Dodgy Code - Low Level Memory Management Question!

2016-01-25 Thread Quincey Morris
On Jan 25, 2016, at 10:48 , Dave wrote: > > myNewObject = [super initWithSomething: something]; This is a dangerous thing to do. At this point ‘self’ might not be a properly initialized object, if the ‘super’ call returns a different object from ‘self’. You’re better

Re: Removing Observers eats up memory

2016-01-25 Thread Quincey Morris
On Jan 25, 2016, at 01:10 , Markus Spoettl wrote: > > Has anyone any idea how the removing of observers can cause this kind of > death spiral? Genocidal refreshes aside, are you absolutely sure that you’re always removing/adding observers on an appropriate thread?

Re: Obj-C - your thoughts on hiding data members?

2016-01-24 Thread Quincey Morris
On Jan 24, 2016, at 15:55 , Graham Cox wrote: > > Do you generally think this is worth doing? I’m not sure its *worth* doing, if you’re looking for a big pay-off, but I agree with Jens that I’d probably do it. Sometimes it can be illuminating to see how small a public

Re: Obj-C - your thoughts on hiding data members?

2016-01-24 Thread Quincey Morris
On Jan 24, 2016, at 17:34 , Alex Zavatone wrote: > > A prefix of _ is already used by the compiler to indicate the internal ivar > backing properties so, what convention should be used for private properties? That's kinda a whole different discussion. In Graham’s case, the

Re: DeepCopy Arrays and Dictionaries

2016-01-24 Thread Quincey Morris
On Jan 24, 2016, at 08:16 , Dave wrote: > > can I just do this? > > myDestNetwork.pArray1 = [mySourceNetwork copy]; No. The ‘copy’ method has no intrinsic depth or shallowness. For your custom classes, it does what you’ve implemented it to do. For Cocoa classes, they

Re: NSTextFields will not fully justify in 10.11

2016-01-24 Thread Quincey Morris
On Jan 24, 2016, at 07:24 , Trygve Inda wrote: > > It is not using Auto-Layout. I tried creating one with Auto-Layout and it > doesn't work either. For interest’s sake: a. If you specify the text field as being left justified instead of fully justified, does it wrap

Re: Problem Archiving/Un-archiving Custom Objects

2016-01-21 Thread Quincey Morris
On Jan 21, 2016, at 13:47 , Dave wrote: > > myObjectCopy. pNodeIndexPath = self. pNodeIndexPath; //Copy > Attribute on Property You have to be careful, depending on what’s already happened. If the object was copied with NSCopyObject, which might have

Re: Problem Archiving/Un-archiving Custom Objects

2016-01-21 Thread Quincey Morris
On Jan 21, 2016, at 15:22 , Dave wrote: > > I’m relying of the copy attribute for the NSString’s, do I need to change > these to do a [xxx copy] too If you’re writing the setter yourself, you must do the copy yourself. If you’re using the synthesized setter, it’s

Re: Using an anchor in NSURL file url

2016-01-21 Thread Quincey Morris
On Jan 21, 2016, at 17:17 , Jeff Evans wrote: > > In OSX I'm using an NSURLRequest to load a file url in WKWebView. Works > fine unless I try to add an anchor to the path, for example, > > [path]/filename.html#anchorname > > The problem appears to be that the # gets

Re: OT: Swift Code Autoformatter?

2016-01-15 Thread Quincey Morris
On Jan 15, 2016, at 04:49 , Charles Jenkins wrote: > > so I’m sorry I picked an example that bothered you. It’s not that it’s too > much trouble for me to manually fix a typo like “let half = numerator /2”; I > just wanted a completely innocuous example And I’m sorry I

Re: drawRect: wrong scale in a programmatically created window

2016-01-15 Thread Quincey Morris
On Jan 15, 2016, at 03:42 , Andreas Höschler wrote: > > It seems I have a lack of understanding of the difference of points and > pixels. With “retina” displays, there can be 2 or 3 pixels for each unit of the drawing coordinate system (points). When you did this: >

Re: drawRect: wrong scale in a programmatically created window

2016-01-15 Thread Quincey Morris
On Jan 15, 2016, at 11:24 , Andreas Höschler wrote: > > However, I generated the image rep with a 851 x 899 view and wrote it into a > PNG file (code in earlier mail). Yes, I saw, but you didn’t include (or I couldn't find) the log output that showed the size of the

Re: drawRect: wrong scale in a programmatically created window

2016-01-14 Thread Quincey Morris
On Jan 14, 2016, at 13:26 , Andreas Höschler wrote: > > This should in a view with size {851, 899} get me a purple line starting > close to the lower left corner and ending close to the top right corner. But > that's not the case. The picture is drawn zoomed in!?? I’m

Re: NSTableView registerNib:forIdentifier: - multiple IDs in a single NIB

2016-01-14 Thread Quincey Morris
On Jan 14, 2016, at 15:09 , Alex Kac wrote: > > Actually there is - the identifier. You set the NIB *and* the identifier. Now that I’ve had time, I think I remember doing exactly this sometime in the past. How soon we forget. > And I was able to make it work right after I

Re: NSTableView registerNib:forIdentifier: - multiple IDs in a single NIB

2016-01-14 Thread Quincey Morris
On Jan 14, 2016, at 14:38 , Alex Kac wrote: > > I can’t seem to get a good answer to if this should work or not (having > multiple cellViews in one NIB). No. There are 2 top level objects in your nib, but there’s nothing that tells the table view machinery which one to use.

Re: OT: Swift Code Autoformatter?

2016-01-14 Thread Quincey Morris
On Jan 14, 2016, at 17:15 , Graham Cox wrote: > > That’ll shut them up … Unfortunately not. I got in a huge fight with someone in the developer forums a year ago over this. This person was of the opinion that the inability to tolerate missing spaces was characteristic

Re: OT: Swift Code Autoformatter?

2016-01-14 Thread Quincey Morris
On Jan 14, 2016, at 12:36 , Charles Jenkins wrote: > > I keep eyeing a program that you can install to work with Xcode and > autoformat source code. You know, things like automatically fixing spacing > around arithmetic operators and other important types of punctuation.

Re: Panes vs. Separate Windows

2016-01-11 Thread Quincey Morris
On Jan 11, 2016, at 13:06 , Lee Ann Rucker wrote: > > no system is going to make everyone happy, so go for the most flexible one if > you can I’d like to advocate the opposite point of view: no system is going to make everyone happy, so go for the the one that works best.

Re: Modifying Set via NSArrayController breaks Set in weird way

2016-01-08 Thread Quincey Morris
On Jan 8, 2016, at 09:59 , Etan Kissling wrote: > > As the comments in the sample project describe in the introductory comments, > modifying the code to force an NSSet does not solve the problem. a. I believe your debugger display problems are just that — problems in the

Re: Modifying Set via NSArrayController breaks Set in weird way

2016-01-08 Thread Quincey Morris
On Jan 8, 2016, at 07:14 , Etan Kissling wrote: > > In my ViewController, there is a NSSet-based collection of such objects. > > final class ViewController: NSViewController { >dynamic var foos: Set = [Foo(x: 0), Foo(x: 1), Foo(x: 2)] > } I don’t think it’s true that

Re: Modifying Set via NSArrayController breaks Set in weird way

2016-01-08 Thread Quincey Morris
On Jan 8, 2016, at 13:44 , Etan Kissling wrote: > > a. Could be :-) However, since the Find feature of the minimal app stops > working properly after modifying the collection, there's definitely something > fishy. I suspect the inability to display Set members comes from

Re: Obtaining a value from a hex representation

2016-01-08 Thread Quincey Morris
On Jan 8, 2016, at 13:58 , Carl Hoefs wrote: > > Is there a Cocoa method (like .hexValue) to convert the hex representation > string into a value? There are the ‘scanHex…’ methods in NSScanner. It’s a bit annoying to set up, but if you packaged it as a function

Re: App refuses to launch after adding iCloud Drive support

2016-01-01 Thread Quincey Morris
On Jan 1, 2016, at 01:19 , Graham Cox wrote: > > It’s not essential that I do this - presumably the user can add folders as > they wish, but since iApps and other Apple apps do this, it would be nice to > follow suit. According to this thread on the developer forums:

<    1   2   3   4   5   6   7   8   9   10   >