Re: UIStackView: Variable Spacing

2016-07-06 Thread Quincey Morris
On Jul 6, 2016, at 13:37 , Daniel Stenmark wrote: > > What’s the best way to achieve variable spacing between children of a > UIStackView? I’ve had success placing leading/trailing/top/bottom constraints on the child view, or on components within the child view, to

Re: Prioritize my own app's disk access

2016-07-06 Thread Quincey Morris
On Jul 6, 2016, at 03:06 , Jonathan Taylor wrote: > > a single lost frame will be fairly catastrophic for the scientific experiment If this is genuinely your scenario, then nothing mentioned in this thread is going to satisfy your requirements. It is pure whimsy

Re: Prioritize my own app's disk access

2016-07-05 Thread Quincey Morris
On Jul 5, 2016, at 05:36 , Jonathan Taylor wrote: > > suggestions that might be relevant here What worries me about the Darwin-level (i.e. Unix-level) API suggestions that others have made is that you don’t know how these interact with Cocoa apps. You didn’t

Re: Property synthesis trouble - 32 vs 64 bit builds

2016-07-05 Thread Quincey Morris
On Jul 5, 2016, at 04:36 , Jonathan Taylor wrote: > > @interface ImmutableSettings : NSObject > { >BOOL_myFlag; > } > @property (readonly) BOOL myFlag; > @end > > @interface MutableSettings : ImmutableSettings > @property (readwrite) BOOL myFlag; > @end >

Re: Working around radio button grouphing behaviour in 10.8 SDK?

2016-07-03 Thread Quincey Morris
On Jul 2, 2016, at 23:19 , Jo Meder wrote: > > radio buttons which have the same superview and action now all behave as if > they’re part of one radio group > Our framework expects the radio buttons to be independent. > Having AppKit manage them automatically short

Re: Imported UTI taking precedence over Exported UTI

2016-07-01 Thread Quincey Morris
On Jul 1, 2016, at 13:58 , Matthew LeRoy wrote: > > Am I missing something, or is it really as broken as it sounds? I don’t think you’re missing anything, but “broken” isn’t quite the right word. In a non-adversarial situation, you can come to some accommodation with the

Re: Imported UTI taking precedence over Exported UTI

2016-07-01 Thread Quincey Morris
On Jul 1, 2016, at 13:03 , Matthew LeRoy wrote: > > Just to clarify, there’s only one file extension in question here. Ah, apologies if I misread the original explanation. > Our app declares an exported UTI for our file format, while the competitor’s > app declares an

Re: Imported UTI taking precedence over Exported UTI

2016-07-01 Thread Quincey Morris
On Jul 1, 2016, at 09:18 , Matthew LeRoy wrote: > > steps to troubleshoot/rectify the issue? Since it’s hard to find out what’s going on with UTIs, I suggest you start by making sure your assumptions are correct. I’d try getting rid of the app that has the imported UTI

Re: WWDC 2016 direct download

2016-06-27 Thread Quincey Morris
On Jun 26, 2016, at 23:47 , tridiak wrote: > > Where do you download the 2016 WWDC videos directly? Can you run the WWDC app on your iPod Touch? If so, you can download them from within the app. (Er, sry if it’s weird that I can’t remember what functionality iPods have any

Re: exposing only what you want - headers and Swift?

2016-06-26 Thread Quincey Morris
On Jun 26, 2016, at 11:48 , William Squires wrote: > > they'd still have the source .swift file as the compiler would need this to > know what symbols, identifiers, etc... there were, even if they were marked > private No, only the public symbols would be in the

Re: Satisfying a protocol - getters vs. functions

2016-06-25 Thread Quincey Morris
On Jun 25, 2016, at 12:49 , William Squires wrote: > > I was looking at the problem from the caller's end (i.e. client code), not > the callee's end, so the semantic requirements (such as getters not being > able to modify instance variables) aren't a consideration here.

Re: Are NSFileWrappers safe for concurrent access?

2016-06-25 Thread Quincey Morris
On Jun 25, 2016, at 01:40 , Rick Mann wrote: > > It seems that they might not be, but I can't find documentation either way. What do you mean by “access”? Are you referring to their internal state, or their relationship to the file system? NSFileWrapper is *not* listed

Re: Satisfying a protocol - getters vs. functions

2016-06-25 Thread Quincey Morris
On Jun 25, 2016, at 11:59 , William Squires wrote: > > But would it make a difference if you have a getter named description that > has type String? They’re not interchangeable in Swift. The semantics are not even the same: getters aren’t allowed to mutate instance

Re: How to pre-select a file in NSOpenPanel -- specifically, a .app bundle?

2016-06-24 Thread Quincey Morris
On Jun 24, 2016, at 16:24 , Charles Srstka wrote: > > How could this be a security threat, when a malicious program could just set > canChooseDirectories to true, open the panel to the app’s parent directory, > and spearphish the user into clicking OK on that? (I

Re: How to pre-select a file in NSOpenPanel -- specifically, a .app bundle?

2016-06-24 Thread Quincey Morris
On Jun 24, 2016, at 13:31 , Andy Lee wrote: > > It almost looks like the ability to pre-select a file was deliberately > removed from the NSOpenPanel API. Could that be the case? I don’t know, but I can think of three possible rational explanations: 1. [Security] Being able to

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

2016-06-24 Thread Quincey Morris
On Jun 24, 2016, at 03:12 , Jonathan Mitchell wrote: > > The downside would be having to implement the compliant accessor methods in > the real model object (in my case the array is a constructed property of an > NSViewController subclass which obtains its array data from

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

2016-06-23 Thread Quincey Morris
On Jun 23, 2016, at 13:39 , Jonathan Mitchell wrote: > > Do you mean something like this? > > NSMutableArray *proxy = [NSArrayController > mutableArrayValueForKey:@"content"]; That wasn’t what I had in mind. I meant that you would make the array a property of a real

Re: unicode fraction symbol in a NSTextView

2016-06-22 Thread Quincey Morris
On Jun 22, 2016, at 09:32 , tridiak wrote: > > What I see is 'Aasimar CR ½’ instead of 'Aasimar CR ½’. > Where is the ‘Â' coming from? Well, the first thing you need to determine is whether this is the value of ’s’ itself, or the result of interpreting ’s’ as HTML.

Re: Can initialKey & initialValue be set via bindings?

2016-06-16 Thread Quincey Morris
On Jun 16, 2016, at 11:11 , John Chacho wrote: > > 1. Declare and synthesize two properties to hold a key NSString and a value > NSString in the controller. > 2. Bind the NSTextFields to the properties and check "Continuously Updates > Values" > 3. Bind the

Re: Can initialKey & initialValue be set via bindings?

2016-06-16 Thread Quincey Morris
On Jun 15, 2016, at 21:23 , John Chacho wrote: > > If not, how can I add an arbitrary new record into the dictionary? If I understand correctly, you have to go the long way round for this scenario (which is not specific to NSDictionaryController). Instead of connecting your

Re: Properties: A question of style

2016-06-15 Thread Quincey Morris
On Jun 15, 2016, at 16:34 , Graham Cox wrote: > > If the property is ‘isFoo’, then in every situation (such as KVO, or using > dot syntax) I would be using the keypath “isFoo”, and that’s fine, but it’s > inconsistent with other properties that are not readonly, where

Re: Properties: A question of style

2016-06-14 Thread Quincey Morris
On Jun 14, 2016, at 16:48 , Graham Cox wrote: > > n.b. I’d always use the latter form for read/write properties FWIW, I prefer to use the other form for setters, too. I don’t see why: self.animal = YES; is any improvement over: self.isAnimal = YES;

Re: Sorry to ask again, but maybe I'm asking the question incorrectly. Remote Notifications outside app delegate.

2016-06-04 Thread Quincey Morris
On Jun 4, 2016, at 14:14 , Alex Zavatone wrote: > > Currently, the hosting app just needs 1 line of code to start up and use a > whole app that is within the framework. Not being able to get the APNS token > within our framework makes it harder to … So why can’t the 1 line be

Re: NSFileWrapper

2016-06-04 Thread Quincey Morris
On Jun 4, 2016, at 14:10 , Markus Spoettl wrote: > > you have complete control over what individual file you read and when That’s fine for documents where it’s helpful not to have to read files only to write them out unchanged on a save. It doesn’t really help when

Re: Sorry to ask again, but maybe I'm asking the question incorrectly. Remote Notifications outside app delegate.

2016-06-04 Thread Quincey Morris
On Jun 4, 2016, at 12:44 , Alex Zavatone wrote: > > I'm wondering if (man, I detest the term) method swizzling of the app > delegate would work or possibly modifying the methods of UIApplication at > runtime to pipe the methods to a class in the framework? > > Initially, i'm

Re: Overriding custom KVC methods in Swift?

2016-06-04 Thread Quincey Morris
On Jun 4, 2016, at 12:54 , Daryle Walker wrote: > > It was the same except I mapped, based on the Swift w/ Cocoa & Obj-C guide, > the “id *” in the KVC guide to a “UnsafeMutablePointer”. Anyone > know why it’s different? It’s not unusual that the property being bound to can

Re: Overriding custom KVC methods in Swift?

2016-06-04 Thread Quincey Morris
On Jun 4, 2016, at 07:10 , Daryle Walker wrote: > > Since the KVC protocol is informal, getting the names and/or types wrong > doesn’t mean an error, but that your implementation is ignored and default > handling is done. Well, there’s the same danger in Obj-C code, too.

Re: On getting the wrong file type

2016-06-02 Thread Quincey Morris
On Jun 2, 2016, at 12:26 , Daryle Walker wrote: > > The NSDocument file handler methods are passed a UTI string of the file's > (supposed) type. What error are you supposed to throw when you get an > unrecognized UTI? Or can you punt up to super for that default handling?

Re: What type category should I use for my model in Swift?

2016-06-02 Thread Quincey Morris
On Jun 2, 2016, at 08:55 , Daryle Walker wrote: > > My model in mind is dumb data, so a struct seems appropriate. The thing is, though, that Swift value objects are no dumber than reference objects (that is, structs can have behavior just like classes). Conversely, in

Re: PDF image template comes out too small

2016-06-01 Thread Quincey Morris
On Jun 1, 2016, at 10:55 , David Catmull wrote: > > On OS X. I have an NSSegmentedControl in my xib, with my template images > assigned to the segments by specifying the image names. It’s a bit hard to tell what’s going on if it’s all done in IB. You might consider

Re: PDF image template comes out too small

2016-06-01 Thread Quincey Morris
On Jun 1, 2016, at 07:51 , David Catmull wrote: > > I'm trying to use PDF files as image templates for my segment controls, but > they come out too small. What platform? What does “use” mean? That is, are you creating NSImage/UIImage objects, drawing them into bitmaps,

Re: Changing the name of a build scheme?

2016-05-31 Thread Quincey Morris
On May 31, 2016, at 18:44 , Graham Cox wrote: > > though why a double-click acts a short cut for the default button and Return > edits the name makes no sense Well, that’s the same as the Finder, etc. ___ Cocoa-dev mailing

Re: Changing the name of a build scheme?

2016-05-31 Thread Quincey Morris
On May 31, 2016, at 16:45 , Graham Cox wrote: > > Does anyone know how the name of a build scheme can be changed? In the scheme list, click twice (not double-click) or select then press Return to edit the name. Why the name isn’t in the “edit” dialog, I dunno.

Re: When can String.enumerateSubstringsInRange ever pass in NIL?

2016-05-30 Thread Quincey Morris
On May 29, 2016, at 22:31 , Ken Thomases wrote: > > I think the documentation for SubstringNotRequired is sufficient design > contract: > > "NSStringEnumerationSubstringNotRequired > "A way to indicate that the block does not need substring, in which case nil > will be

Re: When can String.enumerateSubstringsInRange ever pass in NIL?

2016-05-29 Thread Quincey Morris
On May 29, 2016, at 19:16 , Daryle Walker wrote: > > Since I am using the substring and not including “.SubstringNotRequired”, I > can just remove the “guard” block, tack on a “!” to substring’s identifier, > and be done with it, right? The problem is there’s no API contract

Re: NSTreeController selection and Swift

2016-05-25 Thread Quincey Morris
On May 24, 2016, at 23:26 , Rick Mann wrote: > > Eh, I think I'll just use my current workaround using NSOutlineView methods. Really? There’s nothing wrong with using ‘selectedObjects’. The only drawback is that it has to create an actual NSArray each time you ask for

Re: NSTreeController selection and Swift

2016-05-24 Thread Quincey Morris
On May 24, 2016, at 18:01 , Rick Mann wrote: > > That's what I tried, but .selection is always _NSControllerObjectProxy, and > the resulting conditional cast never triggers. Urg. You could assigning treeController.selection.self to an AnyObject variable, and see if that

Re: NSTreeController selection and Swift

2016-05-24 Thread Quincey Morris
On May 24, 2016, at 17:49 , Rick Mann wrote: > > I'm trying to observe an NSTreeController's selection property, and then do > something with that selection when it changes. But Swift doesn't just let me > treat .selection as my object type (the way Obj-C would). So, can

Re: Core Data, OutlineView, TreeController

2016-05-23 Thread Quincey Morris
On May 23, 2016, at 11:16 , Raimond Hettrich wrote: > > I have the following problem with the constellation > coreData-treeController-outlineView. Well, you keep asking, and you keep getting no answer, because no one on this list knows the answer — the problem domain is

Re: All threads in app periodically blocked

2016-05-22 Thread Quincey Morris
On May 22, 2016, at 10:48 , Seth Willits wrote: > > Can anyone think of what I should look for to figure out *why* they're > blocked? Do these operations go on long enough that you can see the usage stabilize in Activity Monitor? If so, what are the user and system

Re: Need advice on a custom run-loop mode

2016-05-21 Thread Quincey Morris
On May 20, 2016, at 22:48 , Roland King wrote: > > I wondered about this when you first posted about using a custom runloop mode. I always think runloops are like Fred Flintstone’s feet when he drives his car. There’s something undefinably wrong with the concept, but (I’m led to

Re: Question about orderFront/orderBack etc.

2016-05-20 Thread Quincey Morris
On May 20, 2016, at 07:53 , Dave wrote: > > I’m thinking I should call “orderFront” on my fake window when the window in > the real app gets focus, but do I need to call “orderBack" or whatever on the > window that used to be in front? It’s not clear what you’re

Re: Codesigning pain, god it hurts!

2016-05-17 Thread Quincey Morris
On May 17, 2016, at 21:14 , Graham Cox wrote: > > but the resulting app itself crashes on launch with a codesigning issue, > possibly because the entitlments don’t match the code signature (?). That was > what set me on the path to trying to harmonise my various

Re: Codesigning pain, god it hurts!

2016-05-17 Thread Quincey Morris
On May 17, 2016, at 20:01 , Graham Cox wrote: > > I have an apparently intractable problem with codesigning a Mac app. I don’t > really understand the process very well, so when it fails to work I have no > idea what the problem is, let alone how to fix it. It doesn’t

Re: Programmatically pinch a UIView

2016-05-11 Thread Quincey Morris
On May 11, 2016, at 14:14 , Carl Hoefs wrote: > > the UIView that's currently there handles pinch zoom in/out fine. You should at this point explain what mechanism you’re using to do this. > Is there a way to programmatically cause a 'pinch zoom out by 10%'?

Re: Programmatically pinch a UIView

2016-05-11 Thread Quincey Morris
On May 11, 2016, at 13:56 , Carl Hoefs wrote: > > I just tried UIScrollView & -setZoomScale:. No effect. I think you’re flailing now. ;) > I was hoping there was a way to initially programmatically pinch the view > down by 10%, so the view's frame isn't reduced

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Quincey Morris
On May 10, 2016, at 16:43 , Roland King wrote: > > Well no he hasn’t Correct … no he hasn’t. I mis-edited a longer draft of the post. > Now that I've changed things over to use the context value, I get this at the > moment I add an NSOperation to the NSOperationQueue: > >

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Quincey Morris
On May 10, 2016, at 16:22 , Carl Hoefs wrote: > > I will set 'context' and use it in my check instead. Yup, use the context to decide whether to call super *and return* but nothing else. Once you get past that check, don’t call super. > It appears that for

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Quincey Morris
On May 10, 2016, at 16:11 , Jens Alfke wrote: > > what goes wrong if it’s NULL If anything else uses NULL, then your observation is not uniquely identified, which means that: — you might respond to a notification registered by an ancestor class of your observer instance,

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Quincey Morris
On May 10, 2016, at 16:05 , Carl Hoefs wrote: > > I'm not sure how context is to be used here It has to be a value that’s unique to the piece of code that tests it. In effect, this means unique to the class that creates and responds to the observations. If

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Quincey Morris
On May 10, 2016, at 13:38 , Carl Hoefs wrote: > > At last, it blew again! Well, here’s the exception message: > An -observeValueForKeyPath:ofObject:change:context: message was received but > not handled. > Key path: operations > Observed object: {name = 'Upload

Re: Receiver type for instance message is a forward declaration

2016-05-09 Thread Quincey Morris
On May 9, 2016, at 11:26 , Carl Hoefs wrote: > > Alas, there appear to be no GCD dispatch queue introspection functions, > specifically to find out what is executing (if anything) and what's waiting > in the queue. Or did I overlook something? Also, no, I don’t

Re: discontiguous bounds ?

2016-05-08 Thread Quincey Morris
On May 8, 2016, at 22:32 , Miller Dale wrote: > > I wish to provide a facility with a NSTableView wherein the leftmost > (specifiable) columns remain statically on the left of the display (subject > to vertical scrolling) while the remaining columns scroll normally

Re: How to keep things alive in Arc?

2016-05-08 Thread Quincey Morris
On May 8, 2016, at 22:12 , Gerriet M. Denkmann wrote: > > Is there any other documentation (e.g. with a list of all __attribute__s and > their respective meaning)? Documented here for ARC: http://clang.llvm.org/docs/AutomaticReferenceCounting.html If you search

Re: NSTableView is messaging zombie delegate

2016-05-08 Thread Quincey Morris
On May 8, 2016, at 12:19 , Matthew LeRoy wrote: > > Unfortunately, setting the table view’s delegate to nil during tear-down > (either in -windowWillClose: or in NSViewController’s -dealloc) doesn’t seem > to fix the issue. I still get random but regularly reproducible

Re: Receiver type for instance message is a forward declaration

2016-05-06 Thread Quincey Morris
On May 6, 2016, at 14:58 , Alex Zavatone wrote: > > Can we come up with a suitable set of tests to replicate and verify this This was the code from the forum thread that I played around with: > class ViewController: UIViewController { > let backgroundQueue =

Re: Receiver type for instance message is a forward declaration

2016-05-06 Thread Quincey Morris
On May 6, 2016, at 13:32 , Carl Hoefs wrote: > > Once in a while, NSOperationQueue -addOperation: throws an exception. I guess > this is a well-known bug going all the way back to 2008. I found Mike Ash's > writeup on the issue, and have downloaded his

Re: Setting a prefs value at quit time

2016-05-05 Thread Quincey Morris
On May 5, 2016, at 16:38 , Graham Cox wrote: > > If it’s NOT legal to write a prefs value at quit time, how is one supposed to > record persistent state that is only final by that time? Are you using an observer for NSApplicationWillTerminateNotification explicitly, or

Re: Very basic need, very difficult to achieve.

2016-05-05 Thread Quincey Morris
(A postscript to this thread. I wasn’t sure which of the original posts to frame this as a reply to, so I decided to pick on Kyle.) On May 3, 2016, at 17:17 , Kyle Sluder wrote: > > Virtualization of recent versions of OS X is permitted on Apple-branded > hardware. That’s

Re: Bind NSTableView to array of dictionaries in user defaults

2016-05-05 Thread Quincey Morris
On May 5, 2016, at 06:44 , Jerry Krinock wrote: > > I’m disapointed that the “magic of Cocoa Bindings” does not seem to provide a > simple “code-less” solution to this simple requirement. Did I miss something? It’s never been possible to bind “through” a NSArray or NSSet.

Re: Initial scroller style

2016-05-04 Thread Quincey Morris
On May 3, 2016, at 21:21 , Quincey Morris <quinceymor...@rivergatesoftware.com> wrote: > > these scrollers are shown in scroll bar “channels” on the right and bottom of > the scroll view Well, I found out what’s causing this, though not why. My content view actually consists of

Initial scroller style

2016-05-03 Thread Quincey Morris
I’m designing a new OS X UI via a storyboard, which is mostly a scroll view with a fixed-size documentView. If the scroll view is smaller than the documentView, IB shows scrollers in the design canvas, which is OK. What’s not OK is that these scrollers are shown in scroll bar “channels” on the

Re: Very basic need, very difficult to achieve.

2016-05-03 Thread Quincey Morris
On May 3, 2016, at 20:28 , Graham Cox wrote: > > Going for VMWare, does Fusion do the job, or do I need Fusion Pro? Just Fusion. “Pro” has enterprise features you don’t need, unless you’re running a coding slave farm up there in the tropics. > Within the installer app,

Re: Very basic need, very difficult to achieve.

2016-05-03 Thread Quincey Morris
On May 3, 2016, at 17:21 , Alex Zavatone wrote: > > Whaat? Any OS installers at all? > > What types of errors does it throw? IIRC, however you get the older installer, you still have to run it as an app under the current OS, and it just says the installer is too old to run

Re: Very basic need, very difficult to achieve.

2016-05-03 Thread Quincey Morris
On May 3, 2016, at 16:28 , Graham Cox wrote: > > I need to install a 10.9 image on a disk partition for development testing. > > How? I did start a thread about this, which might be the one you are remembering. You’re fighting a number of road blocks. The important one

Re: Refresh View After Mouse Inactivity

2016-04-30 Thread Quincey Morris
On Apr 30, 2016, at 17:27 , Richard Charles wrote: > > NSNumber *yes = [NSNumber numberWithBool:YES]; > [self performSelector:@selector(setNeedsDisplay:) withObject:yes > afterDelay:0.0]; No, that’s the opposite of the solution to that particular issue. :) The problem

Re: undomanger performance

2016-04-30 Thread Quincey Morris
On Apr 30, 2016, at 12:49 , Jean-Daniel Dupas wrote: > > Maybe registering the changes is not executed immediately but deferred until > the end of the current event loop cycle There’s no “maybe” about it. By default, the undo manager groups all undo actions registered

Re: Refresh View After Mouse Inactivity

2016-04-30 Thread Quincey Morris
On Apr 30, 2016, at 16:08 , Richard Charles wrote: > > - (void)mouseInactive > { >// This does not work. >[self setNeedsDisplay:YES]; > >// This does not work. I think this did work at one time but stopped >// working on OS X 10.10 Yosemite. >[self

Re: Split view priority

2016-04-22 Thread Quincey Morris
On Apr 22, 2016, at 18:56 , Ken Thomases wrote: > > After that, what is the design-time size of the left split view and the > window? You should set them to the default configuration. The window will > stay that way so long as there are no constraints of priority 500 >

Re: Split view priority

2016-04-22 Thread Quincey Morris
On Apr 22, 2016, at 18:56 , Ken Thomases wrote: > > First, the split view holding priorities should generally be less than 490. > That's NSLayoutPriorityDragThatCannotResizeWindow. If they are greater than > that, then they'll potentially override the window's size.

Split view priority

2016-04-22 Thread Quincey Morris
I have a window that contains a split view of 2 split items. The item on the left is a source list whose width constraint is '>= 70’ @priority 1000. The item on the right is a view whose width constraint is '>= 700’ @priority 1000. The window itself has no minimum size specified in IB or any

Re: BOOL parameter passed as nil object

2016-04-22 Thread Quincey Morris
On Apr 22, 2016, at 16:12 , Carl Hoefs wrote: > > Yes, CFRunLoopPerformBlock: works well! But it sounded like you *didn’t* want to prevent the block from running. In that case, dispatch_async would be all you’d need. (AFAIK, it doesn’t interact with run loops,

Re: BOOL parameter passed as nil object

2016-04-22 Thread Quincey Morris
On Apr 22, 2016, at 14:48 , Carl Hoefs wrote: > > does this mean that there is no inherent way to handle the 1000s of > Foundation and AppKit method signatures which don't specify an object but a > value parameter? There is no recommended way to have them

Re: Text field alignment

2016-04-21 Thread Quincey Morris
On Apr 20, 2016, at 21:43 , Roland King wrote: > > I’m fairly sure the NSTextField doesn’t properly take account of the border > when aligning baselines. Turning off the border fixes half of the problem — the baseline alignment. I agree the borderless text field doesn’t look

Re: Correct way to specify anchors with NSURL?

2016-04-21 Thread Quincey Morris
On Apr 21, 2016, at 00:09 , Graham Cox wrote: > > It strikes me that it’s a bug that URLByAppendingPathComponent: doesn’t parse > for a fragment just as -initWithString: does though, the anchor/fragment is a > perfectly reasonable part of a path and what other possible

Thoughts on autolayout

2016-04-21 Thread Quincey Morris
After spending all of the last 3 days on designing autolayout-based layouts in IB, I’m going to submit some bug reports. First, I want to try to clarify my thoughts about “what’s wrong with autolayout”, and see if I need to revise my thinking: 1. Part of the problem is branding. “Autolayout”

Re: Correct way to specify anchors with NSURL?

2016-04-20 Thread Quincey Morris
On Apr 20, 2016, at 22:16 , Graham Cox wrote: > > But it’s 10.9+ only. I really need a solution that will work back to 10.7 (or > 10.8 at the latest). Then I’d guess you’d need to construct the entire URL as a string first, then use initWithString. Presumably

Text field alignment

2016-04-20 Thread Quincey Morris
I’m laying out some views (using auto-layout, though I don’t think that’s the cause of the problem) on OS X 10.11.4 with Xcode 7.3. In many cases, I’m baseline-aligning a pair of text fields, one label and one editable. The font is the default (System-Regular, i.e. 13 pt) and the text field

Re: Correct way to specify anchors with NSURL?

2016-04-20 Thread Quincey Morris
On Apr 20, 2016, at 19:59 , Graham Cox wrote: > > What’s the correct way to append an anchor to a URL? I believe you need to use NSURLComponents, and specify the “fragment” property. ___ Cocoa-dev mailing list

Re: No Alert, Discard Change, & Beep

2016-04-19 Thread Quincey Morris
On Apr 19, 2016, at 22:25 , Richard Charles wrote: > > I am not sure where the alert sheet comes from but … I just looked this up here: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/MessageFlow.html

Re: No Alert, Discard Change, & Beep

2016-04-19 Thread Quincey Morris
On Apr 19, 2016, at 16:11 , Richard Charles wrote: > > I have a NSTextField with a NSFormatter. When the user enters an incorrect > value an alert sheet drops down from the document window stating “Please > provide a valid value.”. Is the text field bound to a

Re: Proper way to set up constants when building an iOS framework

2016-04-19 Thread Quincey Morris
On Apr 19, 2016, at 12:14 , Ben Kennedy wrote: > > While a trivial detail, this does not seem to be true (at least in Xcode > 7.2). We have a prefix header called "Kashoo_Prefix.pch", and if I hit > cmd-shift-O and type that string, I get a pile of results: first the source >

Re: Proper way to set up constants when building an iOS framework

2016-04-19 Thread Quincey Morris
On Apr 19, 2016, at 11:41 , Quincey Morris <quinceymor...@rivergatesoftware.com> wrote: > > There is a build setting for “Prefix Header” […] Sorry, after I posted, I realized my description was a bit fuzzy. To clarify: — There is a per-target build setting that specifi

Re: Proper way to set up constants when building an iOS framework

2016-04-19 Thread Quincey Morris
On Apr 19, 2016, at 11:27 , Alex Zavatone wrote: > > Sorry this is going on so long, but all I'm looking for is to set up a simple > constants file that works in a framework (and only for my framework) just the > same manner they work within an iOS app. You have the answer

Re: Using protocol extension to dismiss keyboard on outside tap

2016-04-18 Thread Quincey Morris
On Apr 18, 2016, at 01:07 , Devarshi Kulshreshtha wrote: > >extension DismissKeyboardOnOutsideTap { >func configureToDismissKeyboard() { >… >} > >func hideKeyboard() { >… >} > >} I think the problem

Re: Creating a series of sequenced files

2016-04-16 Thread Quincey Morris
On Apr 16, 2016, at 15:29 , Carl Hoefs wrote: > > I have potentially n different ongoing sequences, so it seems like this > approach could end up hitting the filesystem really hard One enumeration per candidate directory shouldn’t be inefficient. That’s the

Re: Creating a series of sequenced files

2016-04-16 Thread Quincey Morris
On Apr 16, 2016, at 15:10 , Carl Hoefs wrote: > > But I'm concerned mainly with efficiency, as determining the next number in > the naming sequence potentially can be extremely inefficient - trying 1000s > of times until the next available number every time a

Re: Creating a series of sequenced files

2016-04-16 Thread Quincey Morris
On Apr 16, 2016, at 14:36 , Carl Hoefs wrote: > > I have a daemon process that needs to generate a series of sequenced files Oh, sorry, I think I misunderstood the question. I thought you wanted to generate all the files at once. Alex’s interpretation sounds

Re: Creating a series of sequenced files

2016-04-16 Thread Quincey Morris
On Apr 16, 2016, at 14:36 , Carl Hoefs wrote: > > I have a daemon process that needs to generate a series of sequenced files > (named sequentially, such as "file_01944576_1.dat", "file_01944576_2.dat", > etc.) in the same directory. Does Cocoa provide a way to

Re: NSDocument saving query (SOLVED)

2016-04-14 Thread Quincey Morris
On Apr 14, 2016, at 12:42 , Michael McLaughlin wrote: > > A solution appears to be > > [newDoc saveDocumentWithDelegate: > > which looks to be a simplified version of > > [newDoc runModalSavePanelForSaveOperation: It’s probably a poorer choice, not a simpler choice,

Re: NSDocument saving query

2016-04-14 Thread Quincey Morris
On Apr 14, 2016, at 11:55 , Michael McLaughlin wrote: > > What is the recommended way to capture a Cancel in this case? Any sample code > available? If you look in the header file NSDocument.h, you’ll see that ‘saveDocumentAs' (by default) invokes

Re: Proper target for table cell view buttons

2016-04-08 Thread Quincey Morris
On Apr 8, 2016, at 08:53 , David Catmull wrote: > > I don’t see any additional nib files in the application package. It may not be a separate file, it may just be archived data that’s loaded as if a NIB file. Note that it is possible to register a custom NIB for a

Re: Proper target for table cell view buttons

2016-04-07 Thread Quincey Morris
On Apr 7, 2016, at 10:45 , Fritz Anderson wrote: > > (2) Is your view controller not a table delegate already? As you say. I don’t actually know the answer to the original question, but I wonder if the problem is that (for a view-based table view) the cell view is

Re: UTI

2016-04-04 Thread Quincey Morris
On Apr 4, 2016, at 18:16 , Gerriet M. Denkmann wrote: > > The importing iOS app has both exported and imported UTI defined (not sure > what is really needed). > > But when the Document Types is only “my.private.uti”, then I am not asked to > open in which app (good) but

Re: NSFileWrapper serializedRepresentation

2016-04-04 Thread Quincey Morris
On Apr 4, 2016, at 17:41 , Gerriet M. Denkmann wrote: > > What are the alternatives? What I had in mind is that you would construct a composite NSData object that contained the results of compressing each file’s content as sub-components. By compressing this yourself,

Re: NSFileWrapper serializedRepresentation

2016-04-04 Thread Quincey Morris
On Apr 4, 2016, at 09:59 , Gerriet M. Denkmann wrote: > > Both the Simulator and the OS X App compress the same folder (which resides > on OS X). You can’t really use a convenience API such as ‘serializedRepresentation’ and then complain it doesn’t optimize for your

Re: UTI

2016-04-04 Thread Quincey Morris
On Apr 4, 2016, at 08:30 , Gerriet M. Denkmann wrote: > > That is, how to associate a special UTI with the file? You first need to *define* your own UTI. Add an entry to the Exported UTIs section of the Info pane of the OS X app target in Xcode. For the UTI identifier,

Re: Silence Swift 2.2 warnings?

2016-04-01 Thread Quincey Morris
On Apr 1, 2016, at 07:35 , Eric E. Dolecki wrote: > > I can't go in an fix all the warnings because most of my team has not yet > upgraded their copies of Xcode. I don’t know if there’s a way of silencing specific warnings in Swift. The best place to ask would be the

Re: Seeking image manipulation book/site/course recommendations

2016-03-23 Thread Quincey Morris
On Mar 23, 2016, at 10:41 , Charles Jenkins wrote: > > Can anyone recommend a good book or site or video course where I could learn > how to do such image manipulation on iOS? I don’t think you need a book or tutorial. ‘UIGraphicsGetImageFromCurrentImageContext’ is your

Re: Creating NSXMLDocument programmatically

2016-03-22 Thread Quincey Morris
On Mar 22, 2016, at 19:46 , John Brownie wrote: > > setDTD: became unavailable in 10.10, but there appears to be no replacement A number of redundant “freestanding” getter/setter method declarations were removed from the SDK, but the DTD property remains. You should be

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