Re: App refuses to launch after adding iCloud Drive support

2015-12-31 Thread Quincey Morris
On Dec 31, 2015, at 17:05 , Graham Cox wrote: > > Perhaps iCloud Drive is simply unavailable to non App Store apps? Yes, I believe that was the case up to 10.10. For 10.11+, see this:

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Quincey Morris
On Dec 29, 2015, at 00:44 , Roland King wrote: > > I want to capture, in the app, the value of the slider only at the end when > the mouse goes up, once Isn’t that what the NSControl property continuous==false is for? ___ Cocoa-dev

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Quincey Morris
On Dec 29, 2015, at 01:45 , Roland King wrote: > > the slider is hooked up via bindings in the UI to a label which shows the > value *as you slide it*, so it needs to be continuous for that purpose. Then > when you let go, only then do I want the final value to be delivered to

Re: Kernel Panics Developing for SpriteKit

2015-12-28 Thread Quincey Morris
On Dec 28, 2015, at 11:02 , Charles Jenkins wrote: > > No sarcasm. Since the advent of Swift, it seems each version of Xcode has its > weak and unstable points, and I just supposed SpriteKit was one of them for > this version. No, each version of Xcode has invented its own

Re: Swift Generics Error When Enforcing Protocol Conformance...

2015-12-24 Thread Quincey Morris
On Dec 24, 2015, at 15:55 , Peters, Brandon wrote: > > Maybe they will “remedy” it in the forever. A bug report would probably be a good idea. Either FloatingPointType should include arithmetic behavior (along the lines of the integer type protocol), or there should be a

Re: Swift Generics Error When Enforcing Protocol Conformance...

2015-12-24 Thread Quincey Morris
On Dec 24, 2015, at 13:22 , Peters, Brandon wrote: > > I do not see this one being any different from the integer type version. What’s different is that FloatingPointType doesn’t have any arithmetic operators defined on it. The solution is to add a protocol that requires

Re: Swift Generics Error When Enforcing Protocol Conformance...

2015-12-24 Thread Quincey Morris
On Dec 24, 2015, at 04:55 , Peters, Brandon wrote: > > I am using Xcode 7.2. What version of Xcode are you running? Unless I am > missing something, the version you typed into playground is not working for > me in code editor when I press run. Also 7.2. Here is exactly what

Re: Swift Generics Error When Enforcing Protocol Conformance...

2015-12-23 Thread Quincey Morris
On Dec 23, 2015, at 22:08 , Peters, Brandon wrote: > > func linconv(signal_A signal_A: [T], signal_B: [T]) -> > [T]? { > >var arr = [T](count: 4, repeatedValue: 0.0) > >return nil > } This works in a playground: > func linconv(signal_A signal_A: [T], signal_B:

Re: applicationSupportDirectory access for admin and standard users

2015-12-21 Thread Quincey Morris
On Dec 21, 2015, at 14:16 , Jonathan Mitchell wrote: > > Is there anything I need to be aware of here? Try using ‘URLsForDirectory:inDomains:' instead. But what does “trouble” mean? Are you having trouble getting the correct URL, or trouble accessing the directory at

Re: CGContextClipToRects: invalid context 0x0.

2015-12-18 Thread Quincey Morris
On Dec 18, 2015, at 08:59 , Richard Charles wrote: > > Apple’s frameworks do not have symbols. IIRC several OS X versions ago, Apple use to release versions of the system frameworks that included symbols, but this wasn’t very useful because they came out so much later

Re: Validating NSButton in Swift

2015-12-14 Thread Quincey Morris
On Dec 13, 2015, at 23:53 , Roland King wrote: > > You appear to be a little out of luck here because I was afraid that was going to be the answer. I suspect the problem is the Swift Obj-C importer, rather than any misguided SDK intention, because there are also a *lot* of

Re: Validating NSButton in Swift

2015-12-14 Thread Quincey Morris
On Dec 14, 2015, at 01:12 , dangerwillrobinsondan...@gmail.com wrote: > > because it inherits from a class that conforms to the protocol NSControl conforms informally (that is, it has the requisite methods) but not formally, which isn’t conformance in Swift terms. But there’s still a conflict

Re: Validating NSButton in Swift

2015-12-13 Thread Quincey Morris
On Dec 13, 2015, at 14:59 , Luc Van Bogaert wrote: > > I have a NSButton subclass that I want to conform to > NSValidatedUserInterfaceItem, so I can call validateUserInterfaceItem: on a > validator passing the button as a parameter. This requires my subclass to >

Re: RSSI is deprecated since iOS 8...

2015-12-10 Thread Quincey Morris
On Dec 10, 2015, at 12:20 , Eric E. Dolecki wrote: > > How do I get an Int value for readRSSI? The header file is your friend in cases like this, although the warning you got should have had a note attached that redirected you to the replacement API. According to the

Re: NSViewController -identifier unrecognized selecto problem

2015-12-09 Thread Quincey Morris
On Dec 9, 2015, at 09:20 , Jonathan Mitchell wrote: > > On 10.9 I get > > 'NSInvalidArgumentException', reason: '-[TSToolbarGroup identifier]: > unrecognized selector sent to instance 0x6018ee10’ You get this … when? When the NIB is loaded? > TSToolbarGroup is an

Re: Determining underlying type of array in swift?

2015-12-09 Thread Quincey Morris
On Dec 9, 2015, at 14:35 , Rick Mann wrote: > > If I have var foo : [Int], how can I get that type, Int? I need to get the > size of each element. I imagine there’s a direct way, but I can’t find it in a program. You can do something like this: strideofValue

Re: NSView -identifier - is there more to it?

2015-12-09 Thread Quincey Morris
On Dec 9, 2015, at 15:17 , Jonathan Mitchell wrote: > > Does AppKit make any use of NSView -identifier to influence actual rendering > behaviour? Accessibility APIs? According to the docs, it’s used for 2 purposes: 1. For cell views of view-based table views, it is

Re: NSDocument and NSViewControllers

2015-12-05 Thread Quincey Morris
On Dec 5, 2015, at 12:20 , Rick Mann wrote: > > I'll probably make the document a delegate of the view controller so it can > be informed of changes to the model. This may not apply to your app, but what I usually end up doing in an app of any complexity is have

Re: ARC and IBOutlet - strong vs weak......

2015-12-04 Thread Quincey Morris
On Dec 4, 2015, at 06:16 , Dave wrote: > > I asked about this on Twitter to an engineer on the IB team and he confirmed > that strong should be the default and that the developer docs are being > updated. That sounds like a definitive answer. So you’re asking us

Re: Need Help with Swift

2015-12-03 Thread Quincey Morris
On Dec 3, 2015, at 23:12 , Stevo Brock wrote: > > The Module field is empty. The MediaItemViewController was loading fine > until I decided to add the protocol and all the subsequent decoration.. Well, I realized afterwards that your view controller class is

Re: Need Help with Swift

2015-12-03 Thread Quincey Morris
On Dec 3, 2015, at 23:30 , Roland King wrote: > > Quincey had one idea - but I don’t know how you @objcname a specialisation of > a generic. Well, yes, that’s a good objection. It seems to me that the three things to try, if they haven’t been tried yet are: 1. class:

Re: Need Help with Swift

2015-12-03 Thread Quincey Morris
On Dec 3, 2015, at 22:45 , Stevo Brock wrote: > > 2015-12-03 22:07:23.966 Media Tools[14143:276368] Unknown class > _TtC11Media_Tools23MediaItemViewController in Interface Builder file. > Could not cast value of type 'UIViewController' (0x10d1dfd60) to >

Re: TableviewSelectionDidChange(_:) not called

2015-12-01 Thread Quincey Morris
On Dec 1, 2015, at 12:15 , Luc Van Bogaert wrote: > > As I already had an outlet to the ArrayController, I tried to solve this > problem by observing its 'selectedObjects' property, which seems to work fine. > I guess that would practically be the same as what you have

Re: iOS: Using AppDelegate as an app-wide singleton

2015-12-01 Thread Quincey Morris
On Dec 1, 2015, at 12:58 , Carl Hoefs wrote: > available to all classes via [[UIApplication sharedApplication] delegate]. > Are there any drawbacks to this? I don’t find this practice very objectionable, but the drawback is that '[[UIApplication

Re: iOS: Using AppDelegate as an app-wide singleton

2015-12-01 Thread Quincey Morris
On Dec 1, 2015, at 16:20 , Carl Hoefs wrote: > The following seems to be working out for me. > > #import "AppCommon.h" > @implementation AppCommon > + (AppCommon *)shared > { > static AppCommon *shared = nil; > static dispatch_once_t token; >

Re: iOS: Using AppDelegate as an app-wide singleton

2015-12-01 Thread Quincey Morris
On Dec 1, 2015, at 21:38 , Alex Zavatone wrote: > > On Dec 2, 2015, at 12:24 AM, Luther Baker wrote: > >> Alex, the API uses lots of different words to grab a-hold of the so-called >> "standard", "default" or "shared" static instance. Unfortunately, I'm not >> aware of any docs

Re: TableviewSelectionDidChange(_:) not called

2015-11-30 Thread Quincey Morris
On Nov 30, 2015, at 12:18 , Luc Van Bogaert wrote: > > I can see this is being called when I make any selection change; except when > I delete the (last) selected row. Deleting the second last row does trigger a > call, but only when I set the arraycontroller to 'avoid

Re: TableviewSelectionDidChange(_:) not called

2015-11-30 Thread Quincey Morris
On Nov 30, 2015, at 11:07 , Luc Van Bogaert wrote: > > I have noticed that TableviewSelectionDidChange(_:) is not called in my > tableview delegate when after I select a row and then delete it, even when it > is the only row in the table. I would have assumed that this

Re: Self and associated type requirements (yes again!)

2015-11-30 Thread Quincey Morris
On Nov 30, 2015, at 04:12 , Roland King wrote: > > I want to say that timeSeries is any TimeSeries with an underlying type of > Float, but you can’t. The problem is that this says that you want a generic protocol, and there’s no such thing. Unfortunately, TimeSeries is not (in

Re: Bunch of CoreData based NSDocument questions.

2015-11-30 Thread Quincey Morris
(moved to a new thread, because we hijacked Motti’s thread) On Nov 29, 2015, at 16:30 , dangerwillrobinsondan...@gmail.com wrote: > But do bear in mind a doc from Apple with a last updated date that old may > have been superseded by a header comment, release notes, a WWDC presentation > or no

Re: NSWindow

2015-11-30 Thread Quincey Morris
On Nov 30, 2015, at 10:23 , Jerry Krinock wrote: > > Did I miss the announcement of this rather major change? I don’t think so, I think you are Doing It Wrong™. ;) I’m not aware that the APIs you mention in 1 and 2 have any known contract about when they have their effect. It

Re: Bunch of CoreData based NSDocument questions.

2015-11-30 Thread Quincey Morris
On Nov 30, 2015, at 15:18 , Quincey Morris <quinceymor...@rivergatesoftware.com> wrote: > > (moved to a new thread, because we hijacked Motti’s thread) Except that I forgot to change the subject after all. Oops. ___ Cocoa-dev mailing lis

Re: NSWindow displaying asynchronously starting in 10.11

2015-11-30 Thread Quincey Morris
On Nov 30, 2015, at 21:53 , Jerry Krinock wrote: >> The correct approach has always been to retrieve the result URL(s) you want, >> then orderOut: the panel before doing something else in the completion >> handler > > I just tried adding an -orderOut before the 5-second sleep

Re: Bunch of CoreData based NSDocument questions.

2015-11-29 Thread Quincey Morris
On Nov 29, 2015, at 14:21 , Graham Cox wrote: > > If you don’t clear your undo stack on save, then it’s possible to undo past > the last save point. IIRC the context was that Motti proposed autosaving by doing a Core Data “save” operation, which writes the in-memory

Re: Bunch of CoreData based NSDocument questions.

2015-11-29 Thread Quincey Morris
On Nov 29, 2015, at 15:28 , Ben Kennedy wrote: > > (Are you suggesting this is sensible or intuitive?! Is this what the average > user expects? Unbelievable.) > The app has no business overwriting my original file without either a) my > explicitly hitting save, or b) prompting

Re: Bunch of CoreData based NSDocument questions.

2015-11-29 Thread Quincey Morris
On Nov 29, 2015, at 15:44 , Ben Kennedy wrote: > > although it does not mitigate the actual insidious destruction which I want > to believe, as Quincey postulated, is only a bug rather than deliberate > design). Well, it turns out that I’m absolutely wrong. I just checked the

Re: swift - making array of subclass of class also conforming to protocol

2015-11-28 Thread Quincey Morris
On Nov 28, 2015, at 03:51 , Roland King wrote: > > private var myViews : Array > // nope > private var myViews : Array // nope The problem is that you’re defining a variable. It can’t be generic — that would imply a

Re: swift - making array of subclass of class also conforming to protocol

2015-11-28 Thread Quincey Morris
On Nov 28, 2015, at 10:32 , Quincey Morris <quinceymor...@rivergatesoftware.com> wrote: > > It can’t be UIView+MasterControllable (in some syntax), because no such > *single* type exists. One other dopey alternative occurred to me. You could add all the methods from UIView

Re: Bunch of CoreData based NSDocument questions.

2015-11-28 Thread Quincey Morris
On Nov 28, 2015, at 14:41 , Motti Shneor wrote: > > This I don’t get. If that’s not a close what is a ‘close'… the document > disappears, windows close and disappear I’ll think about the other things you wrote, but I’ll answer this right now, since it’s an important

Re: FSIsAliasFile deprecated - typeOfFile is slow

2015-11-27 Thread Quincey Morris
On Nov 27, 2015, at 14:00 , Leonardo wrote: > > The problem is that the IsAliasNew method is 3.7 times slower than the > IsAliasOld method. Do you know a way to accomplish that with a faster > method? It may not be faster but it’s probably more correct to use [NSURL

Re: Bunch of CoreData based NSDocument questions.

2015-11-27 Thread Quincey Morris
On Nov 26, 2015, at 22:41 , Motti Shneor wrote: > > So -- I MUST warn him and allow him to cancel this quit command. > unfortunately, the @$@$@ NSDocument architecture insists I'm not to be > involved, and shortcuts even the ApplicationDelegate >

Re: Why can't a Swift method directly access a static member?

2015-11-25 Thread Quincey Morris
On Nov 25, 2015, at 00:34 , Rick Mann wrote: > > It seems rather lame that a Swift instance method can't access a static > member without prefixing it with the class. Why is this? This is something > C++ and Java do just fine. In a technical sense, the reason is

Re: Swift - internal class conforming to public protocol

2015-11-25 Thread Quincey Morris
On Nov 25, 2015, at 00:30 , Andreas Mayer wrote: > > I can't replicate that behavior. Since Roland hasn’t contributed to this thread for 24 hours, I vote we blame *him*. ;) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Avoid selection marking on cell tap

2015-11-24 Thread Quincey Morris
On Nov 24, 2015, at 16:04 , Rick Mann wrote: > > The iOS Photos app is a perfect example of the behavior I've been asked to > implement. I don’t think your approach is wrong, I just don’t know what the recommended behavior is. The other thing that confuses me is that

Re: Swift - internal class conforming to public protocol

2015-11-24 Thread Quincey Morris
On Nov 24, 2015, at 16:16 , Roland King wrote: > if I define an internal class which implements a public protocol, who is able > to call the methods in that protocol? Anyone (it’s a public protocol), only > classes in the same framework or source file (the class is internal)?

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

2015-11-24 Thread Quincey Morris
On Nov 24, 2015, at 14:54 , Graham Cox wrote: > > you close the sheet itself by sending -endSheet to the SHEET, not its parent I’ve been puzzling over this statement for a while. At first I thought, “Oh, that’s right, you can. I guess you can send it to the sheet or

Re: Avoid selection marking on cell tap

2015-11-24 Thread Quincey Morris
On Nov 24, 2015, at 15:38 , Rick Mann wrote: > Our selection marking doesn't really work for the tap that segues into the > detail view. We only use the selection marking when in edit mode (e.g. > deleting a bunch of items). I believe the old iOS HIG used to say that

Re: Swift - internal class conforming to public protocol

2015-11-24 Thread Quincey Morris
On Nov 24, 2015, at 23:13 , Marco S Hyman wrote: > As I read that adopting a public protocol requires the methods that implement > the protocol to be public (but only those methods). As I said earlier, this isn’t true any more. (I think this change was made in the Swift that

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

2015-11-24 Thread Quincey Morris
On Nov 24, 2015, at 08:47 , Jerry Krinock wrote: > > 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 sheet is handy but the parent window is not. No

Re: Swift - internal class conforming to public protocol

2015-11-24 Thread Quincey Morris
On Nov 24, 2015, at 06:10 , Roland King wrote: > > How can this be, how can an internal function make a class conform to a > public method on a public protocol. IIRC, until fairly recently (i.e. WWDC 2015 or one of the later Xcode releases), it worked as your intuition tells

Re: Bunch of CoreData based NSDocument questions.

2015-11-24 Thread Quincey Morris
On Nov 23, 2015, at 22:34 , Motti Shneor wrote: > > All that […] I think perhaps you’re making my argument for me. ;) Much of what you say *demonstrates* the difficulty of using a NSDocument-based design for your app. (Core Data makes it harder, because it does slow

Re: Bunch of CoreData based NSDocument questions.

2015-11-23 Thread Quincey Morris
On Nov 23, 2015, at 12:50 , Motti Shneor wrote: > > Any references to that old discussion? I’d like to read it. However, I think > there should be a reasonable way to provide close-enough interpretation to > NSDocument’s view of documents using CoreData's persistence.

Re: Making custom table cells for view-based tables on mac?

2015-11-23 Thread Quincey Morris
On Nov 23, 2015, at 16:06 , Alex Hall wrote: > > When I look at the cell I got by default, it has a lot of levels to it. I'm > not sure where to add my own views, or how to assign a separate view > controller to the cell (just for modularity's sake). What I see is this: >

Re: Bunch of CoreData based NSDocument questions.

2015-11-22 Thread Quincey Morris
On Nov 22, 2015, at 22:41 , Motti Shneor wrote: > I wish I knew enough to write my own MyPersistentDocument The problem is that the way NSDocuments are used is semantically different from the way databases are used, and you *cannot* reconcile the two across all the

Re: Bunch of CoreData based NSDocument questions.

2015-11-22 Thread Quincey Morris
On Nov 22, 2015, at 11:44 , Motti Shneor wrote: > > 1. My app supports autosave in-place. This means each "save" practically > recreates the whole document as temporary file, then replaces the document > with the new one. Such behavior is reasonable for a relatively small

Re: Assigning an element of a swift array to a userdata parameter triggers didSet

2015-11-18 Thread Quincey Morris
On Nov 18, 2015, at 05:24 , Eric Gorr wrote: > > Yes, that all makes sense. So, the question is what can I do about it? The > number of tooltips I need is the same number of elements in the array and the > number of elements in the array can change over the lifetime of

Re: Assigning an element of a swift array to a userdata parameter triggers didSet

2015-11-18 Thread Quincey Morris
On Nov 18, 2015, at 10:57 , Jens Alfke wrote: > > Doesn’t the pointer become invalid as soon as myElement goes out of scope? > (There’s a reason that type is called *Unsafe*Pointer…) Yes, but so does [0] in the original code. According to your hypothesis, it’s copied into

Re: KVO question

2015-11-18 Thread Quincey Morris
On Nov 18, 2015, at 16:29 , Roland King wrote: > > I didn’t read his original question as saying that I could easily have got it wrong, but I believe what he was saying was that much of his system was working. The part that doesn’t work is when (e.g.) the Font Manager updates

Re: KVO question

2015-11-18 Thread Quincey Morris
(sorry, posted the incomplete message by accident) On Nov 18, 2015, at 16:29 , Roland King > wrote: > > I didn’t read his original question as saying that I could easily have got it wrong, but I believe what he was saying was that much of his system was

Re: Installing older OS X

2015-11-18 Thread Quincey Morris
On Nov 18, 2015, at 12:16 , Lee Ann Rucker wrote: > > Hmm... it's the same path as the big button Ah, I see what happened. I didn’t realize that the Big Button was a separate choice, I thought it was a picture that illustrated what the list entries meant. Why? Because my

Re: KVO question

2015-11-18 Thread Quincey Morris
On Nov 18, 2015, at 14:35 , Graham Cox wrote: > > it’s just that if other code changes the attributes dictionary (such as the > Font Manager) then I need these split out properties to trigger their > notifications so that the UI shows the change I think I understand,

Re: a question concerning how to fire a message at the beginning of my application

2015-11-17 Thread Quincey Morris
On Nov 17, 2015, at 15:59 , Scott Berry wrote: > > I was wondering would it be wiser for me to put a notification or an art. You mean “alert"? > This must be presented because otherwise this program could be dangerous > without the message. If it’s dangerous, you

Installing older OS X

2015-11-17 Thread Quincey Morris
I want to install 10.8.5 somewhere, to debug an app compatibility issue on that OS, but I can’t seem to figure out how. I have an empty hard disk I can use, but there’s nothing installed on it. I’ve got the Mountain Lion installer app from the App Store, but it won’t run under El Capitan.

Re: Installing older OS X

2015-11-17 Thread Quincey Morris
On Nov 17, 2015, at 17:42 , Shane Stanley wrote: > > Does this help? > > > I’ll try it a bit later, but it seems to be an answer. I’d assume, though, that I need *two* empty

Re: Installing older OS X

2015-11-17 Thread Quincey Morris
On Nov 17, 2015, at 17:02 , Graham Cox wrote: > > If you copy the old installer to the hard disk partition and set it as the > boot drive and reboot, does that work? No. It’s no listed as a disk I can start up from. There might be something I can do by restarting with

Re: Installing older OS X

2015-11-17 Thread Quincey Morris
On Nov 17, 2015, at 17:52 , Quincey Morris <quinceymor...@rivergatesoftware.com> wrote: > > On Nov 17, 2015, at 17:42 , Shane Stanley <sstan...@myriad-com.com.au > <mailto:sstan...@myriad-com.com.au>> wrote: >> >> Does this help? >> >> &

Re: Installing older OS X

2015-11-17 Thread Quincey Morris
On Nov 17, 2015, at 21:03 , Charles Srstka wrote: > > I can personally vouch for Mountain Lion running well in VMWare. Where it > gets hard is when you are running Snow Leopard or earlier, and not for any > technological reason—those versions are artificially blocked

Re: Installing older OS X

2015-11-17 Thread Quincey Morris
On Nov 17, 2015, at 21:47 , Charles Srstka wrote: > > I think what I did was go to File -> New, choose “Install from disc or > image”, and choose the InstallESD.dmg file that’s inside the Mountain Lion > installer (I think it was still bootable back then At one point

Re: Installing older OS X

2015-11-17 Thread Quincey Morris
On Nov 17, 2015, at 23:13 , Charles Srstka wrote: > > Oh, sorry, I didn’t mean to insult with the “without the quotes” bit. No, that wasn’t it. When I read your post, I fell over laughing at ‘Type ⌘-Shift-G, then “NameOfApp.app/Contents”’, because the chances of my

Re: KVO question

2015-11-17 Thread Quincey Morris
On Nov 17, 2015, at 17:18 , Graham Cox wrote: > > Mostly this is working, but when code directly sets the dictionary property, > the other properties don’t trigger their observers, even though I’m > implementing the +keyPathsForValuesAffecting, which I believe > should

Re: Installing older OS X

2015-11-17 Thread Quincey Morris
On Nov 17, 2015, at 22:11 , Charles Srstka wrote: > > Type ⌘-Shift-G, then “NameOfApp.app/Contents”, without the quotes, into the > resulting sheet. I see. It’s nice to know that developers can do standup too. ;) ___

Re: changing the name of my webview

2015-11-16 Thread Quincey Morris
On Nov 16, 2015, at 15:30 , Scott Berry wrote: > > In my main storyboard I’d like to call my web view “BrowseAirports.” How do > I tell Xcode to do this so that when I call the code to open the web view it > knows that my web view in storyboard is “BrowseAirports”? OS X

Re: UserDefaults not letting me access a dictionary?

2015-11-14 Thread Quincey Morris
On Nov 14, 2015, at 10:18 , Alex Hall wrote: > > In a playground, accessing a dictionary of [String:Bool] works fine, as > expected. In the app, though, I get an error that I can't index [String:Bool] > with type 'String'. I don't understand why that is, so wanted to see if

Re: The joys of people using valueForKey to get objects out of a dictionary.

2015-11-10 Thread Quincey Morris
On Nov 10, 2015, at 10:52 , Alex Zavatone wrote: > > For what we're doing on a daily basis, if we're not using @ within our keys, > I still can't see anything concrete besides "objectForKey is an NSDictionary > method" while "valueForKey is a KVO method". You don’t really have

Re: Storing files into the Documents folder

2015-11-10 Thread Quincey Morris
On Nov 10, 2015, at 13:54 , Samuel Williams wrote: > > Can anyone give me advice about this > and point me to the official information from Apple? You can start here:

Re: Trouble w/ key-value binding validation

2015-11-06 Thread Quincey Morris
On Nov 6, 2015, at 15:23 , Luc Van Bogaert wrote: > > In a tableview with a content binding and a value binding on the table cell > view textfields to the model's objectValue keypaths, I'm having trouble > getting the key-value validation to work correctly. In the model

Re: Modify JSON in Swift

2015-11-06 Thread Quincey Morris
On Nov 6, 2015, at 22:54 , Rick Mann wrote: > > if var images = json["images"] as? [[String:AnyObject]] No, that won’t work because Swift dictionaries have *value* semantics, so you’re *asking* for a copy here. The same thing in Obj-C works because the variable ‘images’

Re: Do playgrounds work at all in 7.1?

2015-11-06 Thread Quincey Morris
On Nov 6, 2015, at 22:14 , Rick Mann wrote: > > Ah, syntax error, Xcode doesn't report errors. Incidentally, when I tried it, I got regular compile errors in the playground. However, I have noticed, that sometimes the errors appear in the debug area below the

Re: NSControl Multiple Values

2015-11-02 Thread Quincey Morris
On Nov 2, 2015, at 10:55 , Richard Charles wrote: > > Does anyone know how to fix this? The simplest way is probably to create a derived property in your data model that is the correctly-rounded value to display. Alternatively, I think you could write a value

Re: NSControl Multiple Values

2015-11-02 Thread Quincey Morris
On Nov 2, 2015, at 12:51 , Richard Charles wrote: > > So that is interesting that NSControl will work with a double. My custom > binding works with double values. But after doing a little searching on the > web it appears that value transformers do not work with double

Re: mysterious behavior of system font metrics

2015-10-28 Thread Quincey Morris
On Oct 28, 2015, at 12:17 , Alan Snyder wrote: > > The mysterious behavior that I observe is that the result of [NSFont > systemFontOfSize:1] can change over time. For example: > > 2015-10-28 10:22:15.033 java[19620:15284886] >

Re: NSFileWrapper - is this really so bad?

2015-10-27 Thread Quincey Morris
On Oct 27, 2015, at 16:24 , Graham Cox wrote: > > NSFileWrapper* fw = [[NSFileWrapper alloc] > initDirectoryWithFileWrappers:nil]; //<— Null passed to a callee > that requires a non-null argument It’s not necessarily so much about null vs non-null. A

Re: [UIResponder firstResponder] stuck in infinite loop?

2015-10-22 Thread Quincey Morris
On Oct 22, 2015, at 16:56 , Daniel Stenmark wrote: > > Any thoughts as to where I could be going awry here? Do you follow the steps listed here:

Re: CGContextShowTextAtPoint

2015-10-13 Thread Quincey Morris
On Oct 13, 2015, at 15:02 , Raglan T. Tiger wrote: > > I see that CGContextShowTextAtPoint is deprecated in 10.9 ... is it gone in > 10.11? Apparently. There’s this:

Re: NSTextField subclass needs cell subclass as well - how?

2015-10-07 Thread Quincey Morris
On Oct 7, 2015, at 21:08 , Graham Cox wrote: > > Radar time. If you’re going that route, it sure seems like ‘cellClass’ shouldn’t not be called — if it’s not possible to use it, then “deprecated” seems like a mis-description. But perhaps there’s a pattern of old

Re: NSTextField subclass needs cell subclass as well - how?

2015-10-07 Thread Quincey Morris
On Oct 7, 2015, at 17:50 , Graham Cox wrote: > > I’d rather do it in code, because I have hundreds of these fields and it > would be a lot simpler to simply set the cell class once in code instead of > hundreds of times in IB. On Oct 7, 2015, at 20:13 , Graham Cox

Re: Custom UIView receiving no touch events?

2015-10-06 Thread Quincey Morris
On Oct 6, 2015, at 16:48 , Eric Dolecki wrote: > > I had a UI view on the storyboard and set its class to my custom UI view > class. Init with coder fired and I set my UI from there. However doing so > produced dead controls. Does one need to call a method to get around

Re: Custom UIView receiving no touch events?

2015-10-06 Thread Quincey Morris
On Oct 6, 2015, at 13:25 , Eric E. Dolecki wrote: > > Off-screen I have a custom UIView that has a UIScrollView in it. What’s the parent view of the custom view? If it’s not in the view hierarchy underneath the UIWindow, then it’s not going to get any events.

Re: Value of type '[AnyObject]!' has no member 'Generator'

2015-10-04 Thread Quincey Morris
On Oct 4, 2015, at 05:10 , Roland King wrote: > > Quincey sharpens his keyboard No, the only person who’d get hurt is me. There are actually several strange things going on here in the AVCaptureDevice API, and they look like bugs to me: — ‘devices’ and ‘formats’ are documented

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

2015-10-03 Thread Quincey Morris
On Oct 3, 2015, at 07:42 , Jonathan Mitchell wrote: > > The responder chain is, as you know, very flexible. I’m not accusing you of mistreating the responder chain, I’m accusing you of mistreating event handling. :) Event handling is based on the idea of hierarchical

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

2015-10-02 Thread Quincey Morris
On Oct 2, 2015, at 15:03 , Jonathan Mitchell wrote: > > I am not disputing the veracity of the release notes! When you first posted, I originally suspected (but had no specific knowledge) that the problem was your call to [super setView:] — specifically that this

Re: How to install 10.11 ?

2015-10-01 Thread Quincey Morris
On Oct 1, 2015, at 02:19 , Roland King wrote: > > i’m sure it will work if your volume names aren’t rather unusual, it’s been > tested for a while. “เม่น” looks like 3 characters, well it is 3 grapheme > clusters but it’s 4 code points, one of which combines with the next one to

Re: How to override properties

2015-10-01 Thread Quincey Morris
On Oct 1, 2015, at 22:18 , Graham Cox wrote: > > It’s not really about making the compiler happy, it’s about making your code > clear and bug-free. > The compiler is telling you your design is probably faulty, but the correct > solution depends on your true intentions.

Re: Drawing many different strings quickly

2015-09-28 Thread Quincey Morris
On Sep 28, 2015, at 01:41 , Ben wrote: > > Unfortunately NSTableView doesn't offer the type of interactions I want. I > have filed a radar requesting enhancements. What about a hybrid approach? Use a NSTableView to draw the strings as a background “layer” of

Re: How to get remote metadata

2015-09-28 Thread Quincey Morris
On Sep 27, 2015, at 22:43 , Gerriet M. Denkmann wrote: > > The NSHTTPURLResponse allHeaderFields dictionary contains keys like: > “Content-Length” and “Last-Modified”. > Are these standardized or might other sites use other keys like > “Modification-Date” or

Re: ARC, blocks, capture variables

2015-09-28 Thread Quincey Morris
On Sep 28, 2015, at 15:20 , Scott Ribe wrote: > > The essential problem was in the library design, not the calls. I was keeping > self.authfun as an instance var for the sole purpose of unregistering the > callback when the owner (a window controller) was being

Re: ARC, blocks, capture variables

2015-09-28 Thread Quincey Morris
On Sep 28, 2015, at 17:33 , Scott Ribe wrote: > > Ah, I just tried assignment to weak ivar then registration, gets the same > value. Anyway, avoiding monkeying with temp vars to fool the compiler is why > I re-did the API. I’d say that the monkeying comes from

Re: Drawing many different strings quickly

2015-09-27 Thread Quincey Morris
On Sep 27, 2015, at 10:42 , Ben wrote: > > - Not all strings to be drawn at once, a scroll view is being used and I am > using responsive scrolling to pre-draw areas. The problem occurs when quickly > scrolling a large distance I think your answer is in this

Re: o Swift generics, y no can I haz u dispatch correctly?

2015-09-27 Thread Quincey Morris
On Sep 27, 2015, at 15:02 , has wrote: > > The problem is, it all falls apart again when `AppData.unpack()` is called > from another generic method: > >class Commands { >func get(v:Any) -> T { >return d.unpack(v, returnType: T.self) as T >

Re: ARC, blocks, capture variables

2015-09-27 Thread Quincey Morris
On Sep 27, 2015, at 17:17 , Scott Ribe wrote: > > But I know that it does not result in a retain cycle, because I nil out fun > at the appropriate time. So how to get rid of the warning? IIRC you can simply assign ‘self’ to a local variable just before assigning

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