Re: Data, enumerateBytes: separate blocks?

2017-12-27 Thread Daryle Walker
’s contain test is covered 192 times! I’m guessing that’s once for each byte the code goes past, right? Between that and wondering how efficient the test is, I wonder if using something like [2] would be better. But I would test a megabyte at a time or something. Now I have to figure out how t

Re: Data, enumerateBytes: separate blocks?

2017-12-25 Thread Daryle Walker
t and there’s gigabytes of trailing data to fail to find the other value.) I would end up wasting the user’s time for a second result I’d never use. — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing

Re: Data, enumerateBytes: separate blocks?

2017-12-23 Thread Daryle Walker
> On Dec 22, 2017, at 2:18 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Dec 22, 2017, at 08:48 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >> DispatchData would need to be convertible to D

Re: Data, enumerateBytes: separate blocks?

2017-12-22 Thread Daryle Walker
> On Dec 21, 2017, at 11:10 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Dec 21, 2017, at 18:04 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >> when multiple blocks are used > > At this

Re: Data, enumerateBytes: separate blocks?

2017-12-21 Thread Daryle Walker
> On Dec 19, 2017, at 8:08 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Dec 19, 2017, at 14:57 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >> What are the hoops/bridges required? > > I

Re: Data, enumerateBytes: separate blocks?

2017-12-19 Thread Daryle Walker
spatchData domain rather than the plain Data domain. > However, as you say, there’s a bridge involving some simple hoops available > if necessary. What are the hoops/bridges required? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com _

SASL

2017-12-01 Thread Daryle Walker
Is there a (user-accessible) SASL library on macOS (X)? No need to download one for a mail client idea if the system comes with one. Sent from my iPhone ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Data, enumerateBytes: separate blocks?

2017-11-27 Thread Daryle Walker
Is there a way to make a (NS)Data that uses multiple contiguous blocks? Besides generating a multi-gig file and hoping, that is. I’m using enumerateBytes for efficiency and need to test sequences that cross sub-blocks. Sent from my iPhone ___

What are the closure parameters for the Swift version of "Data.enumerateBytes"?

2017-09-09 Thread Daryle Walker
ing the segment’s start and span. The second parameter used to represent which span of bytes within the total NSData object are modeled in the segment, now I guess it’s now the index within the Data object where the modeled segment starts. Is my guess correct? — Daryle Walker Mac, Internet, and Video G

Re: [webkit-dev] How to display new MIME types?

2017-07-29 Thread Daryle Walker
e URL) to your native code, which could then render it either in your > associated app or in a popover in Safari. What if my custom type is the first page visited (i.e. no link)? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com _

Re: [webkit-dev] How to display new MIME types?

2017-07-20 Thread Daryle Walker
layed its own UI when necessary. What kind of plug-in? One still using NPAPI? Some other format? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: [webkit-dev] How to display new MIME types?

2017-07-20 Thread Daryle Walker
[I originally had this on the WebKit development list first.] > On Jul 18, 2017, at 3:31 PM, Daryle Walker <dary...@mac.com> wrote: > > [I’m not sure this is the right forum.] > > If I want Safari for Mac to display a new MIME type, how do I do it? I know > there used t

Re: What do the font-related Cocoa Bindings in NSTableView and NSTableColumn do?

2017-04-07 Thread Daryle Walker
> On Apr 7, 2017, at 4:43 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Apr 7, 2017, at 07:24 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >> Does anyone have any ideas how to do this a runti

Re: What do the font-related Cocoa Bindings in NSTableView and NSTableColumn do?

2017-04-07 Thread Daryle Walker
> On Apr 5, 2017, at 5:19 PM, Daryle Walker <dary...@mac.com> wrote: > >> On Apr 5, 2017, at 5:08 PM, Daryle Walker <dary...@mac.com> wrote: >> >>> On Apr 5, 2017, at 12:19 PM, Charles Srstka <cocoa...@charlessoft.com> >>> wrote: >&g

Re: What do the font-related Cocoa Bindings in NSTableView and NSTableColumn do?

2017-04-05 Thread Daryle Walker
> On Apr 5, 2017, at 5:08 PM, Daryle Walker <dary...@mac.com> wrote: > > >> On Apr 5, 2017, at 12:19 PM, Charles Srstka <cocoa...@charlessoft.com> wrote: >> >> >> Actually, while NSTableCellView won’t bind to *most* things outside of the >>

Re: What do the font-related Cocoa Bindings in NSTableView and NSTableColumn do?

2017-04-05 Thread Daryle Walker
e RAM surreptitiously in the background until your Mac > runs out of swap space and you’re forced to do a hard reboot. Hooray for > Xcode! I am using a storyboard. And this hang upon XIB-compilation is what happens whenever I try font-binding. — Daryle Walker Mac, Internet,

Re: Is there a way to pluralize menu items?

2017-04-05 Thread Daryle Walker
> On Apr 5, 2017, at 9:10 AM, Steve Mills <sjmi...@mac.com> wrote: > > On Apr 4, 2017, at 22:09:34, Daryle Walker <dary...@mac.com> wrote: >> >> I have a menu item named like “Remove Item”. But I added support for >> multiple-selection in the table-vie

Is there a way to pluralize menu items?

2017-04-04 Thread Daryle Walker
locales do more than singular vs. non-singular in English). Can that help here? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Auto-layout: how do I make the other side "win"?

2017-04-04 Thread Daryle Walker
> On Apr 3, 2017, at 1:52 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Apr 3, 2017, at 08:57 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >> When I select the window in the window controller’s

Re: Auto-sized table cells, for macOS

2017-04-04 Thread Daryle Walker
> On Mar 18, 2017, at 3:21 AM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Mar 17, 2017, at 23:18 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >> The table isn’t using the new values, though

What do the font-related Cocoa Bindings in NSTableView and NSTableColumn do?

2017-04-04 Thread Daryle Walker
compiler jamming. (I always cancel and take out the change.) — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: Auto-layout: how do I make the other side "win"?

2017-04-03 Thread Daryle Walker
> On Apr 1, 2017, at 5:00 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Apr 1, 2017, at 12:07 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >> I got a feeling that, since the interior o

Auto-layout: how do I make the other side "win"?

2017-04-01 Thread Daryle Walker
that, since the interior of the window and the exterior of the view are probably bound, that the auto-layout system is choosing the view’s smaller size over the window’s bigger one. How do I reverse this? Or do I have to manually increase the size of all the interior views? — Daryle Walker Mac

Can't use +initialize, now what?

2017-03-29 Thread Daryle Walker
to override the initialize class method, because Swift can't guarantee that the Objective-C method will be called. (28954946)” So, what is code that needs to be setup early supposed to do? Use the application delegate’s will-finish-launching method and hope it is early enough? — Daryle Walker Mac

How to make a NSText​Find​Bar​Container client.

2017-03-28 Thread Daryle Walker
nibName: > NSTitlebarAccessoryViewController in bundle (null). Is anyone from Apple and/or has privately made a NSTextFindBarContainer class capable of helping? As I said, there are no answers from WebSearch (i.e. others will be helped by me). Is there Apple sample code that covers this? —

Where can I write in Undo/Redo action titles?

2017-03-27 Thread Daryle Walker
to live with plain “Undo” and “Redo” for my actions? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Can't access by data via KVC during KVO

2017-03-27 Thread Daryle Walker
gt; let field = newField as! RawHeaderField > newFieldRanges.append(contentsOf: [field.name, > field.body].map { NSMakeRange(0, ($0 as NSString).length) }) > } > textRanges.replaceSubrange(textRanges.startIndex ..< > bodyTextRangeIndex, with: newFieldR

Re: How do I set a NSTextView's font in Interface Builder?

2017-03-27 Thread Daryle Walker
> On Mar 24, 2017, at 2:28 PM, Keary Suska <cocoa-...@esoteritech.com> wrote: > >> On Mar 24, 2017, at 10:33 AM, Jens Alfke <j...@mooseyard.com> wrote: >> >>> On Mar 23, 2017, at 6:35 PM, Daryle Walker <dary...@mac.com> wrote: >>> >

Re: Is there a way to access other controller square's other icons programmatically?

2017-03-27 Thread Daryle Walker
> On Mar 24, 2017, at 3:49 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Mar 24, 2017, at 11:11 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >> I have a re-explaination, including a picture,

Click-through

2017-03-25 Thread Daryle Walker
Is there any way to disable click through? On a toolbar control or otherwise. Through an Interface Builder setting or otherwise. Sent from my iPhone ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Official sidebar?

2017-03-25 Thread Daryle Walker
Testing out my app. Finally noticed the new "Show Tab Bar" View menu item. The menu also handles the tool bar, full screen, and a sidebar. Never noticed that last one before. What do I have to do in my storyboard and/or window controller to support that? (Of course, I don't need one right now.

Re: Is there a way to access other controller square's other icons programmatically?

2017-03-24 Thread Daryle Walker
I have a re-explaination, including a picture, at <http://stackoverflow.com/questions/43002809/how-do-i-access-the-top-level-objects-of-a-storyboard-scene-programmatically>. — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com > On Mar 23, 2017, at 9:44 P

Is there a way to access other controller square's other icons programmatically?

2017-03-23 Thread Daryle Walker
icon strip besides the controller itself) I want to keep referencing the same object & array controllers already allocated when I build my tree of text blocks to support find. — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT

How do I set a NSTextView's font in Interface Builder?

2017-03-23 Thread Daryle Walker
the text-view with the initial font (the application/user non-fixed-width font). Is there a way to change the text-view’s font in IB? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev

Handling Cocoa Bindings over a tree of View Controllers

2017-03-21 Thread Daryle Walker
A design for my third window iteration involves using several NSViewController subclasses in a UI tree. The current (i.e. second) version just has the root NSViewController and a bunch of NSView objects. There is a NSObjectController and a NSArrayController to bind the various view objects to

Re: Of course I forgot some NSTextFinder questions

2017-03-21 Thread Daryle Walker
> On Mar 20, 2017, at 1:41 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Mar 20, 2017, at 04:58 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >>> If all the strings were concatenated together

Of course I forgot some NSTextFinder questions

2017-03-20 Thread Daryle Walker
ges for the cells’ text and flag that matches shouldn’t straddle boundaries. But should my text for the second half (i.e. the text view) be included in that list (going Make-Range(first-half-length, second-half-length))? Or as a separate string for the text view’s find bar (going Make-Range(0, second-h

NSTextFinder guide

2017-03-20 Thread Daryle Walker
for this class (besides Apple’s class definition page)? Or is there a cool guide on a seasoned developer’s blog (or here)? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Auto-sized table cells, for macOS

2017-03-18 Thread Daryle Walker
— Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com > On Mar 17, 2017, at 2:24 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Mar 17, 2017, at 01:45 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>&

Re: Calculating intrinsicContentSize for a NSTextField

2017-03-17 Thread Daryle Walker
; without relying on this side effect? > > An alternative way of calculating the intrinsic content size would be to use: > > attributedStringValue.boundingRect(with: size, options: > .usesLineFragmentOrigin) > > but this fails to take account of cell in

Re: NSTableView column sizes

2017-03-17 Thread Daryle Walker
and you can set minimum and maximum widths. > > You can do most reasonable things with these combinations of options, without > having to resort to programmatic adjustment. — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com __

Re: Auto-sized table cells, for macOS

2017-03-17 Thread Daryle Walker
> On Mar 14, 2017, at 11:33 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Mar 14, 2017, at 18:26 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >> You’d think that this would be a solved probl

NSTableView column sizes

2017-03-15 Thread Daryle Walker
will follow the new proportions.) — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Auto-sized table cells, for macOS

2017-03-14 Thread Daryle Walker
be a solved problem…. — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa

Re: Printing questions

2017-03-12 Thread Daryle Walker
Sent from my iPhone > On Mar 12, 2017, at 5:18 AM, Daryle Walker <dary...@mac.com> wrote: > > I hope it’s a nice first try, but I have some concerns. > > 1. I also added an “Export as PDF…” menu item, which uses the save-as-PDF > default action. I guess it cal

Document drafts

2017-03-12 Thread Daryle Walker
Some of the API for NSDocument is oriented around draft documents. What is a draft and how does it differ from a non-draft? How do I create/open a document in draft mode? I didn't see anything about it in the Document guide; were drafts supposed to be a New World Order like auto-saves or

Printing questions

2017-03-12 Thread Daryle Walker
limit is past the page margins so I lose part of the text. How can I set the wrapping-mode/margins correctly. 3. Are there any other (subtle) problems with the text-view code, since I just took it from Stack Overflow? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT c

Printing in a Mac app with multiple philosophies

2017-03-11 Thread Daryle Walker
have an interface question: what should I name the whole-model and specific window’s sub-view print actions? Should they be totally separate menu items, or with one hidden behind the Option key? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com

Re: How do I use a NSTextBlock in an attributed string?

2017-03-10 Thread Daryle Walker
> On Mar 9, 2017, at 7:05 AM, Daryle Walker <dary...@mac.com> wrote: > >> >> On Mar 8, 2017, at 4:17 PM, Daryle Walker <dary...@mac.com> wrote: >> >> I tried: >> >>> // Set the paragraph formatting for the body... >&g

Re: How do I use a NSTextBlock in an attributed string?

2017-03-09 Thread Daryle Walker
> On Mar 8, 2017, at 4:17 PM, Daryle Walker <dary...@mac.com> wrote: > > I tried: > >>// Set the paragraph formatting for the body... >>let bodyAdvancement = bodyFont.maximumAdvancement >>let bodyIndent = max(bodyAdvanceme

How do I use a NSTextBlock in an attributed string?

2017-03-08 Thread Daryle Walker
ingle string, and used a range to influence just the separator. This got the same result. I thought treating the separator and body in separate strings first wouldn’t infect the body with the text block, but it (illogically) does! How do I end the influence of a block? Put -1 entries in the text-

Re: My method causes DATA LOSS! (was: Can I use the restore/auto-save loading functions for imports?)

2017-03-06 Thread Daryle Walker
> On Mar 6, 2017, at 7:05 PM, Daryle Walker <dary...@mac.com> wrote: > > >> On Mar 6, 2017, at 4:58 PM, Daryle Walker <dary...@mac.com> wrote: >> >> The docs fo “NSDocumentController.reopenDocument(for: withContentsOf: >> display: comp

My method causes DATA LOSS! (was: Can I use the restore/auto-save loading functions for imports?)

2017-03-06 Thread Daryle Walker
> On Mar 6, 2017, at 4:58 PM, Daryle Walker <dary...@mac.com> wrote: > > The docs fo “NSDocumentController.reopenDocument(for: withContentsOf: > display: completionHandler:)” mention it’s for app restore. It ultimately > calls “NSDocument.init(for: withContentsOf: ofTy

Can I use the restore/auto-save loading functions for imports?

2017-03-06 Thread Daryle Walker
purposes? Or can I use them for general code, like an import-document function? They look perfect; they load in a file’s data to a new document, but leave the document’s file-identity anonymous afterwards. — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com

Enforcing Editor vs. Viewer (was: Which way should my document class handle an older format?)

2017-03-05 Thread Daryle Walker
> On Mar 4, 2017, at 3:40 AM, Daryle Walker <dary...@mac.com> wrote: > > My document class reads in UTF-8 data for its internal format. The format has > an older version that is ASCII-based. Since the latter is a subset of the > former, my parser can handle both format

Overriding the automatic-save type

2017-03-05 Thread Daryle Walker
class, but I don’t see anything that would help. However, could I use “NSDocumentController.typeForContents(of:)” to fill in the original file’s type? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing

Which way should my document class handle an older format?

2017-03-04 Thread Daryle Walker
substitute for “Save As” since Lion), I get a can’t-be-saved error. I guess the second scenario seems to be what I want, but it still seems ugly. Are there any better solutions? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com

Re: I think I messed up the undo-count during load

2017-03-03 Thread Daryle Walker
Nearly a day later, and the bug doesn’t show up now. I hate Heisen-bugs. But is there a timing issue on how “NSManagedObjectContext.save” works? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list

I think I messed up the undo-count during load

2017-03-02 Thread Daryle Walker
saveError { > self.initError = saveError > } > } > mainContext.automaticallyMergesChangesFromParent = true > mainContext.undoManager = self.undoManager Is “automaticallyMergesChangesFromParent” messin

Re: UTI and/or bundle-IDs with small letters

2017-03-02 Thread Daryle Walker
> On Mar 2, 2017, at 2:38 PM, Daryle Walker <dary...@mac.com> wrote: > > I’m trying out my document-based Mac app’s data-read routine, and the code it > being skipped. I actually check the typeName (i.e. the UTI) and it doesn’t > match. My bundle identifier for the app h

UTI and/or bundle-IDs with small letters

2017-03-02 Thread Daryle Walker
, I looked at the TextEdit sample code, and it uses the type conformance methods instead of an exact string match. Should I be doing that instead? (Although that means no more “switch” statement.) — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com

Search terms with NSDocument and Apple Events

2017-03-02 Thread Daryle Walker
, at least). — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-

Re: macOS 10.13 suggestion for init() throws

2017-03-01 Thread Daryle Walker
> On Feb 28, 2017, at 4:26 PM, Jens Alfke <j...@mooseyard.com> wrote: > > >> On Feb 28, 2017, at 11:56 AM, Daryle Walker <dary...@mac.com >> <mailto:dary...@mac.com>> wrote: >> >> The problem here is an interface mismatch where Swift has

Re: Replacement of deprecated API GetProcessInformation

2017-02-28 Thread Daryle Walker
etween starting a Mac app project in Xcode 7 and 8, the latter dropped the signature entry in the default-generated Info.plist file. — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev@lis

Re: macOS 10.13 suggestion for init() throws

2017-02-28 Thread Daryle Walker
> On Feb 28, 2017, at 12:27 PM, Jens Alfke <j...@mooseyard.com> wrote: > > >> On Feb 28, 2017, at 4:56 AM, Daryle Walker <dary...@mac.com >> <mailto:dary...@mac.com>> wrote: >> >> Could we have a NSDocument.init() that throws in the next

macOS 10.13 suggestion for init() throws

2017-02-28 Thread Daryle Walker
Could we have a NSDocument.init() that throws in the next macOS? That would translate to a "initWithError" in Objective C (I think). It would be the new primary initializer, with the current one calling it and dropping any error to oblivion. This doesn't make any difference to Objective-C

Memory-mapped sub-data?

2017-02-26 Thread Daryle Walker
If I take a "subdata" of a memory-mapped (NS)Data, does it stay mapped (i.e. use a range and reference)? Or does a full copy get made? I'm thinking of making a parser be a sub-parser too, and this would make the difference between scanning the next megabyte or the rest-of-file (even if it's

Re: I think I screwed up Core Data multi-threading rules.

2017-02-25 Thread Daryle Walker
> On Feb 23, 2017, at 10:43 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Feb 23, 2017, at 18:25 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >>>override func save(to url: URL,

Re: I think I screwed up Core Data multi-threading rules.

2017-02-23 Thread Daryle Walker
> On Feb 23, 2017, at 1:56 AM, Daryle Walker <dary...@mac.com> wrote: > > I naively thought this was OK, multi-threading wise. It worked before I added > the “canAsynchronusly…” method to say TRUE for my main file type. When that > method is added, the save hangs the progr

I think I screwed up Core Data multi-threading rules.

2017-02-22 Thread Daryle Walker
s. Is the new persistent-container class not thread-safe even for returning (new) contexts? Am I calling “unblockUserInteraction” inappropriately? (I had that question in another post.) Is it the way I handle throwing? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com _

When to call unblockUserInteraction()

2017-02-22 Thread Daryle Walker
Although that method doesn't mention it, can I call it during data(ofType:), which is called by those other methods by default (I think)? Sent from my iPad ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Typing into a NSTextView and overriding it

2017-02-20 Thread Daryle Walker
1. How can one type in control characters into a text-view? I mean ASCII range 0 through 31 and 127, not counting horizontal-tab and line-feed. 2. Is there a way to filter out the user from typing (or pasting, etc.) characters you don't want (like NUL)? 3. Is there a way to limit the length of a

Re: How hard is it to make a NSOrderedSetController?

2017-02-18 Thread Daryle Walker
> On Feb 19, 2017, at 2:30 AM, Daryle Walker <dary...@mac.com> wrote: > > There is one problem though. The button for “add:” works; it adds a new > entry. But the button for the “remove:” action only works once. Worse, it > only removes the last added row, no matter

Re: How hard is it to make a NSOrderedSetController?

2017-02-18 Thread Daryle Walker
> On Feb 18, 2017, at 7:06 PM, Keary Suska <cocoa-...@esoteritech.com> wrote: > > >> On Feb 18, 2017, at 4:44 PM, Daryle Walker <dary...@mac.com> wrote: >> >> I’m using a NSValueTransformer object to convert my Core Data to-many >> ordered rel

How hard is it to make a NSOrderedSetController?

2017-02-18 Thread Daryle Walker
ntries for custom Binding-capable classes? If the answer is no customization, then I would have to connect the NSManagedObject instance to the controller in code. — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev m

Re: A horizontal line rule within a NSAttributedString?

2017-02-18 Thread Daryle Walker
e NSTextAttachment, create an attributed string from it, and > combine your three attributed strings into one. > -- > Gary L. Wade > http://www.garywade.com/ <http://www.garywade.com/> >> On Feb 18, 2017, at 2:16 PM, Daryle Walker <dary...@mac.com >> <mailto:dary..

A horizontal line rule within a NSAttributedString?

2017-02-18 Thread Daryle Walker
). Poking around NSAttributedString, there seems to be a NSTextBlock that could do it. Any advice on how? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

NSArrayController still doesn't support NSOrderedSet? (was: Are instances of a NSManagedObject subclass usable as regular objects?)

2017-02-15 Thread Daryle Walker
> On Feb 14, 2017, at 6:50 PM, Daryle Walker <dary...@mac.com> wrote: > > Looking at my code again, I had a massive brain-fart. I created all the data > objects with local “let,” but forgot to assign the top-level object to my > document’s data property. > >

Re: Throwing an error from a NSDocument.init override

2017-02-15 Thread Daryle Walker
> On Feb 14, 2017, at 1:24 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Feb 14, 2017, at 00:26 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >> But I can’t call the “super” versions of those o

Re: Are instances of a NSManagedObject subclass usable as regular objects?

2017-02-14 Thread Daryle Walker
> id: 0x60031140 > ; data: { > body = planet; > message = "0x60031300 > "; > name = Bye; > }) > )} of class _NSFaultingMutableOrderedSet This error came up twice on app start. It came up once more when I tried clicking on the app icon.

Are instances of a NSManagedObject subclass usable as regular objects?

2017-02-14 Thread Daryle Walker
, but not enough to know what I’m actually doing.] — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Throwing an error from a NSDocument.init override

2017-02-14 Thread Daryle Walker
“init()”? I could just call “fatalError” or similar instead. (Oh, I got error objects because I’m initializing my (per-document) Core Data stack in “init()”.) — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev

Does the NSPersistentContainer name mean anything?

2017-02-12 Thread Daryle Walker
), or is the name still relevant? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Is it OK to use the default initializer of NSPersistentStoreDescription?

2017-02-12 Thread Daryle Walker
an in-memory store, which doesn’t need a URL (as far as I know). Is this an official way to start declaring a NSPersistentStoreDescription (for in-memory stores)? Or should I put in a junk URL in the publicized initializer then set the field to NIL? — Daryle Walker Mac, Internet, and Video Game

Re: Optionality in a NSManagedObject sub-class

2017-02-10 Thread Daryle Walker
> On Feb 10, 2017, at 3:02 AM, Daryle Walker <dary...@mac.com> wrote: > > It’s simple: > > - I’m writing this framework for an app, both macOS, with Swift 3 and Xcode 8. > - My protocol has two non-optional strings. > - I unchecked “Optional” for those attributes

Optionality in a NSManagedObject sub-class

2017-02-10 Thread Daryle Walker
versions to non-optionals? What’s the risk/trade-offs if I do so? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: Merging scrolling/clipping with NSStackView

2017-01-21 Thread Daryle Walker
> On Jan 19, 2017, at 1:25 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Jan 19, 2017, at 06:39 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >> The inner views should be as tall as they need

Re: On NSIncrementalStore UUID Uniqueness

2017-01-19 Thread Daryle Walker
> On Jan 16, 2017, at 12:08 PM, Charles Srstka <cocoa...@charlessoft.com> wrote: > >> On Jan 14, 2017, at 4:41 AM, Daryle Walker <dary...@mac.com >> <mailto:dary...@mac.com>> wrote: >> >> Could I base the UUID off a hash of the URL? Maybe, but it

Re: On NSIncrementalStore UUID Uniqueness

2017-01-19 Thread Daryle Walker
> On Jan 16, 2017, at 3:59 AM, Alastair Houghton <alast...@alastairs-place.net> > wrote: > > On 14 Jan 2017, at 10:41, Daryle Walker <dary...@mac.com> wrote: >> >> Could I base the UUID off a hash of the URL? Maybe, but it wouldn’t survive >> file

Re: Purge all remnants of an old incarnation of my app

2017-01-19 Thread Daryle Walker
I posted this on the Xcode list, but one of the respondents suggested adding it here too…. > On Jan 15, 2017, at 8:11 PM, Daryle Walker <dary...@mac.com> wrote: > > I threw away an app I made in Xcode 7, including clearing its Git space and > replacing it with an empty branc

Merging scrolling/clipping with NSStackView

2017-01-19 Thread Daryle Walker
Right now, my window has a table view sitting on top of a text view. Those templates from Interface Builder have those NSViews surrounded by a clip view surrounded by a scroll view. But I want to flip that around; put the table and text views together in a stack view, and surround that with

Re: On NSIncrementalStore UUID Uniqueness

2017-01-15 Thread Daryle Walker
> On Jan 14, 2017, at 2:32 PM, Jens Alfke <j...@mooseyard.com> wrote: > > >> On Jan 14, 2017, at 2:41 AM, Daryle Walker <dary...@mac.com >> <mailto:dary...@mac.com>> wrote: >> >> I’m seemingly stuck since the data format doesn’t have a U

Re: On NSIncrementalStore UUID Uniqueness

2017-01-14 Thread Daryle Walker
ive file moves. There are file references in macOS, which would be more stable, but I read that there’s a bug in the URL class where it would degrade file-reference URLs to standard-file URLs, so that’ll be problematic. Another solution would to create bookmark data

Re: Retaining non-document windows

2017-01-14 Thread Daryle Walker
files. Easier to handle early in case I add more code. One big question I had was how to remove the window (controller) reference. I think there’s an NSNotification whenever a window closes; do I have to use that (or the equivalent window delegate method) to flag when to remove the pointer fro

Re: What should we do if file-opening takes a long time?

2017-01-14 Thread Daryle Walker
te completion. (You can’t use fraction-complete attribute since it’s floating-point.) The “Progress” page has an “isOld” attribute that isn’t documented, also with some undocumented publish & subscribe API. Are those a mistake? Or an obsolete API (and we should use the documented members)?

What do NSArrayController, etc. do for me?

2017-01-13 Thread Daryle Walker
If my data model supports KVC/KVO, it seems like I should be able to bind my views to my data directly via Cocoa Bindings, without using NSArrayController or NSObjectController or the like. What advantage do those classes give me? Sent from my iPhone

Opposite of windowDidLoad

2017-01-12 Thread Daryle Walker
I was thinking of adding a Cocoa Binding during my window-controller's did-load method. But where would the unbinding go? I see waiting until deinit or implementing NSWindowDelegate and using windowWillClose. Is there a similar access point for view-controllers? Sent from my iPhone

Refreshing Cocoa Bindings

2017-01-11 Thread Daryle Walker
I'm going to store a reference to a model in a NSViewController's representedObject field. The various contained views will reference that field through KVO (Is that possible?) for their bound values. If I change the value of the represented object (what it points to, not any attributes

On NSPersistentStore Modeling

2017-01-10 Thread Daryle Walker
I read about store coordinators and managed contexts using Core Data models (I.e. "momd" files). But persistent store subclasses use them too right? From looking at the docs for the atomic and incremental stores, their internal scheme have to match a specific model too; they can't support

On NSIncrementalStore UUID Uniqueness

2017-01-10 Thread Daryle Walker
Been reading up on NSIncrementalStore, including its guide. I think I grok it more now. When initializing an instance, you're supposed to submit an UUID. Can a single value be used for all instances, or is it supposed to unique per instance? If the latter, and the source data doesn't already

  1   2   3   >