Retaining non-document windows

2017-01-04 Thread Daryle Walker
The NSDocument system makes sure the windows it creates are retained until closing. You can see this in default new-project code. If you run the default code for non-document apps, you see that there's no way to bring back the initial window if closed, and therefore has no chance to show proper

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

2016-12-31 Thread Daryle Walker
that the list item tracks. (Hopefully NSProgress is sufficiently thread-safe.) Is that workable? Is there a better idea? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev

Connecting NSTextStorage to a string

2016-12-23 Thread Daryle Walker
The text controls on macOS use a NSTextStorage object to retain their text. That object is a extension of an attributed string. Let's say you use a NSString (or similar) in your document model. How should I get changes on one string to get mirrored on the other? I think there are

Re: Representing an object graph

2016-12-15 Thread Daryle Walker
> On Dec 6, 2016, at 10:18 PM, Chris Hanson <c...@me.com> wrote: > > On Dec 5, 2016, at 4:18 PM, Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: > >> I've heard that Core Data is a object graph and persistence library. What if >

Re: Representing an object graph

2016-12-15 Thread Daryle Walker
> On Dec 5, 2016, at 8:17 PM, Jens Alfke <j...@mooseyard.com> wrote: > > >> On Dec 5, 2016, at 4:18 PM, Daryle Walker <dary...@mac.com> wrote: >> >> I've heard that Core Data is a object graph and persistence library. What if >> you want just the

Re: Large "Data" support

2016-12-15 Thread Daryle Walker
nless I specify). Just ticked off that I skipped a lot of the WWDC 2016 videos from my binge since they were iPhone & friends oriented. And the first third of the last Mac announcement was a future AppleTV app. And get off my lawn.) — Daryle Walker Mac, Internet, and Video Game Junkie

NSPersistentContainer with alternate stores

2016-12-11 Thread Daryle Walker
Just binged on WWDC 2016, and saw a new NSPersistentContainer that merges the main types. It's initialized with a model, sets up its own coordinator, and vends contexts as needed. How are the actual stores used by the coordinator set up? I want to use an in-memory store instead of some

Representing an object graph

2016-12-05 Thread Daryle Walker
I've heard that Core Data is a object graph and persistence library. What if you want just the first part? The graph seems like a neat way to save on modeling code, the external format is not database-ish at all (so the capability for custom export formats won't help). Can I just not use the

Large "Data" support

2016-12-05 Thread Daryle Walker
[Binge-watching WWDC 2016 videos.] For the Swift 3 "Data" type, if I want to represent a multi-gigabyte file, it won't try to do it all in memory, would it? Or would I have to manage a memory-mapped NSData and somehow connect it to a Data object? Sent from my iPhone

Re: Is windowControllerDidLoadNib used only when windowNibName is?

2016-06-26 Thread Daryle Walker
> On Jun 10, 2016, at 9:45 AM, Jerry Krinock <je...@ieee.org> wrote: > >> On 2016 Jun 10, at 06:16, Daryle Walker <dary...@mac.com> wrote: >> >> I replaced windowNibName with makeWindowControllers since I'm moving window >> management to a separate con

Using NSTabView without a NSTabViewController; with storyboards, OS X

2016-06-12 Thread Daryle Walker
I put in a table-view for the top half of a OS X storyboard, and a tab-view for the bottom. I couldn't figure out how to modify the tabs with more controls. Eventually I followed web tutorial and replaced the tab-view with a custom view that's attached to a tab-view controller, which itself has

Open-file progress dialog with cancel button

2016-06-10 Thread Daryle Walker
I don't need this (yet), but it popped up in my head. Usually, readFromData: ofType: processes the data in place. But what if the process take a while, or you otherwise want to provide a progress window (maybe with a cancel button)? I guess you could handle the parsing in an NSOperation, but

Is windowControllerDidLoadNib used only when windowNibName is?

2016-06-10 Thread Daryle Walker
I replaced windowNibName with makeWindowControllers since I'm moving window management to a separate controller. I kept windowControllerDidLoadNib around. Now I wondered if it still gets called. I put in a "print( #function + "got called." )" and never saw the output. Is this method called only

Re: NSFileWrapper

2016-06-04 Thread Daryle Walker
extension to mark it as a package) and the files within. Also look at NSFileHandle, NSFilePresenter and NSFileCoordinator. You don’t have to go database overkill if you don’t want to. — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com > Peter > > Original Message

Re: Overriding custom KVC methods in Swift?

2016-06-04 Thread Daryle Walker
> On Jun 4, 2016, at 12:44 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Jun 4, 2016, at 07:10 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >> Since the KVC protocol is informal, getting the names

How to implement a control/view that maps to a "String?" (in Swift)

2016-06-04 Thread Daryle Walker
, this is on OS X and I’m using storyboards.) — 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

Overriding custom KVC methods in Swift?

2016-06-04 Thread Daryle Walker
tation?) — 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-dev-

Re: On getting the wrong file type

2016-06-02 Thread Daryle Walker
Jun 2, 2016, at 12:26 , Daryle Walker <dary...@mac.com> 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

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

2016-06-02 Thread Daryle Walker
But with your way, the method can't be reasonably unit-tested since a NIL may come up randomly. That seems pointless since you can synthesize the string from the other parameters anyway. Sent from my iPhone > On May 30, 2016, at 5:42 AM, Quincey Morris >

Re: How can I make NSString.stringEncodingForData fail?

2016-06-02 Thread Daryle Walker
I worked around this by making the encodings list a method argument, defaulted to the values mentioned. Then I could test by running the method with an encoding that I know will fail. Sent from my iPhone > On May 29, 2016, at 3:23 AM, Daryle Walker <dary...@mac.com> wrote: >

On getting the wrong file type

2016-06-02 Thread Daryle Walker
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? Sent from my iPhone ___

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

2016-06-02 Thread Daryle Walker
a NSDocument subclass). But a reference type, even a non-NSObject one, still seems easier. And I may want to use KVO or Core Data, which require NSObject subclasses. — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa

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

2016-05-29 Thread Daryle Walker
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? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com > On May 29, 2016, at 12:08 AM,

How can I make NSString.stringEncodingForData fail?

2016-05-29 Thread Daryle Walker
I'm about to test code that uses this method. My encodings are: ASCII, UTF-8, ISO Latin-1, then MacRoman. I think this covers all potential octet values. My "guard" blocks (I'm using Swift.) are for a 0 return and if the optional returned NSString can't be converted to a String. Can I cause

When can String.enumerateSubstringsInRange ever pass in NIL?

2016-05-28 Thread Daryle Walker
The last argument to the method is a closure with four parameters. The first argument is an optional String. I can't think of a circumstance where it'll be NIL. (I need to know for testing.) Especially since it can be recreated in terms of the callback's second argument, which isn't optional.

Using a Core Data model by itself

2016-04-28 Thread Daryle Walker
I'm planning a messaging app. I have in mind a message model class. In Phase 2 I plan to be able to send messages. (Phase 1 is just loading and saving from/to disk.) I plan on using Core Data to handle the combo draft folder / outbox / sent folder, with a CD Managed object class for the

Does NSString's "- initWithContentsOfURL:usedEncoding:error:" use the tightest encoding possible?

2016-04-16 Thread Daryle Walker
If the given method is used to read in a pure ASCII file, will the encoding be set to ASCII? Or could the method return a superset encoding (like Latin-1, MacRoman, or UTF-8)? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com

Asynchronous compatibility of NSDocument read/write methods

2016-04-16 Thread Daryle Walker
yet? — 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-dev-admins

Can a table insert be implemented with an exclusive "addition row"?

2016-04-16 Thread Daryle Walker
to having a “+” button lying around somewhere in the window. But would implementing it require too many heroic measures over using a button? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev

SASL on OS X

2016-04-16 Thread Daryle Walker
I found out that SASL, through the CMU Cyrus library, is on OS X. Is there a high-level API, like the Keychain, that wraps it? Or do I have to use the UNIX-level functions to use SASL in my Cocoa apps? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com

Make a version of NSData "rangeOfData: options: range:" for multiple search parameters

2016-04-14 Thread Daryle Walker
Setting up the parse table for multiple search string may take a lot of work, which is thrown away for single method calls, unless NSData starts secretly cacheing search string sets and their parse tries. — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT m

Thoughts on a line-at-a-time data-reading class

2016-03-09 Thread Daryle Walker
I'm thinking of creating a Document-based app for my pet project. And I'm thinking about how to read the data in. I could load all the data, change it to a string, then process it; but I want to process the data in layers and do some work before string conversion. Specifically, I want to

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

2016-03-08 Thread Daryle Walker
On Mar 7, 2016, at 3:40 PM, Quincey Morris <quinceymor...@rivergatesoftware.com> wrote: > > On Mar 5, 2016, at 01:36 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >> The “applicationOpenUntitledFile:” and “newDocument:” methods ca

Re: Staggering new windows

2016-03-08 Thread Daryle Walker
On Mar 3, 2016, at 10:56 PM, Seth Willits <sli...@araelium.com> wrote: > >> On Mar 3, 2016, at 2:46 PM, Daryle Walker <dary...@mac.com> wrote: >> >> This new Xcode project (with storyboards) makes new windows at the same >> coordinates, on top of each

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

2016-03-07 Thread Daryle Walker
On Mar 5, 2016, at 12:11 PM, Quincey Morris <quinceymor...@rivergatesoftware.com> wrote: > > On Mar 5, 2016, at 01:36 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >> Default project Xcode 7 with OS X Cocoa app, with Storyboards

State Restoration thinks all my windows closes prior to quit

2016-03-05 Thread Daryle Walker
t I don’t see where anything could have gone wrong there. — 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 l

Re: Starting out with storyboards (on Mac)

2016-03-05 Thread Daryle Walker
factoring into smaller classes with > heavy use of NSViewController, container views and other new stuff. > > Broadening my horizons is *always* one of my purposes. What sites did you find via web-search? The ones I found weren’t that great. — Daryle Walker Ma

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

2016-03-04 Thread Daryle Walker
> On Mar 2, 2016, at 1:25 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Mar 2, 2016, at 10:00 , Daryle Walker <dary...@mac.com > <mailto:dary...@mac.com>> wrote: >> >> If this is a policy change … > > Yes and n

Staggering new windows

2016-03-03 Thread Daryle Walker
This new Xcode project (with storyboards) makes new windows at the same coordinates, on top of each other. Just the ever increasing shadow gives that behavior away. Is there a way to (automatically) get that old Mac behavior of staggered windows? I think it was 20 pixels down and right. Sent

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

2016-03-02 Thread Daryle Walker
. — 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-dev-admins

Starting out with storyboards (on Mac)

2016-03-01 Thread Daryle Walker
n delegate? Does this mean I now don’t have to keep references for windows either? — 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

Is Core Data / NSAtomicStore only for data objects with IDs?

2016-02-29 Thread Daryle Walker
the “use NSIncrementalStore for Internet-based stores” claims too. The main database’s URL serves as the store’s ID, and the inner objects and attributes can be represented by sub-URLs and/or index paths.) — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com

Re: Scattered NSProgress use

2015-04-17 Thread Daryle Walker
On Apr 13, 2015, at 12:33 PM, Jens Alfke j...@mooseyard.com wrote: On Apr 11, 2015, at 12:49 PM, Daryle Walker dary...@mac.com mailto:dary...@mac.com wrote: We have to make sure that the automatic parent/nesting aspect doesn’t make sibling cousin progress objects, whose actions

Scattered NSProgress use

2015-04-11 Thread Daryle Walker
will be interlaced, interfere with each other. — 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

Un-pause a NSProgress?

2015-04-10 Thread Daryle Walker
is read-only. So how are we supposed to un-pause? I’m not talking about the developer’s own action code, but how to tweak the NSProgress object to let it know the action is back on. — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com

Re: Making an array property without a backing store. How?

2015-04-07 Thread Daryle Walker
On Apr 6, 2015, at 10:18 PM, Graham Cox graham@bigpond.com wrote: On 7 Apr 2015, at 12:01 pm, Daryle Walker dary...@mac.com wrote: I have an object like: @interface MyClass : NSObject @property (readonly) NSArray * myDatumList; @property NSArray * myDataList; @end

Making an array property without a backing store. How?

2015-04-06 Thread Daryle Walker
the array accessor methods). Is that accurate? — 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

Re: Does - replaceItemAtURL: withItemAtURL: backupItemName: options: resultingItemURL: error: handle cross-volume moves?

2015-03-31 Thread Daryle Walker
On Mar 30, 2015, at 8:37 PM, Kevin Perry kpe...@apple.com wrote: On Mar 30, 2015, at 5:17 PM, Daryle Walker dary...@mac.com wrote: On Mar 30, 2015, at 7:59 PM, Kevin Perry kpe...@apple.com wrote: -replaceItemAtURL:… relies on the atomicity of the POSIX rename() function in order

Re: Bug with Localized Failure Reason and file moving

2015-03-31 Thread Daryle Walker
On Mar 24, 2015, at 8:44 PM, Daryle Walker dary...@mac.com wrote: A segment from my command-line tool: NSURL * const finalLocation = [NSURL fileURLWithPath:response.suggestedFilename isDirectory:NO]; [[NSFileManager defaultManager] moveItemAtURL:location

Re: Bug with Localized Failure Reason and file moving

2015-03-30 Thread Daryle Walker
On Mar 30, 2015, at 3:00 AM, dangerwillrobinsondan...@gmail.com wrote: On 2015/03/25, at 9:44, Daryle Walker dary...@mac.com wrote: A segment from my command-line tool: NSURL * const finalLocation = [NSURL fileURLWithPath:response.suggestedFilename isDirectory:NO

Does - replaceItemAtURL: withItemAtURL: backupItemName: options: resultingItemURL: error: handle cross-volume moves?

2015-03-30 Thread Daryle Walker
since those docs do mention temporary directories, that we have to do different-volume detection (possibly harder than in the pre-X days) and copying manually. I don’t want to do that, since Apple already includes that logic in the former method. — Daryle Walker Mac, Internet, and Video Game

Re: Does - replaceItemAtURL: withItemAtURL: backupItemName: options: resultingItemURL: error: handle cross-volume moves?

2015-03-30 Thread Daryle Walker
to ensure -replaceItemAtURL:… won’t fail due to rename's EXDEV. On Mar 30, 2015, at 4:44 PM, Daryle Walker dary...@mac.com mailto:dary...@mac.com wrote: NSFileManager’s “- moveItemAtURL: toURL: error:” method does a copy if the source and destination file-URLs are on different volumes

Re: Bug with Localized Failure Reason and file moving

2015-03-29 Thread Daryle Walker
On Mar 24, 2015, at 8:56 PM, Quincey Morris quinceymor...@rivergatesoftware.com wrote: On Mar 24, 2015, at 17:44 , Daryle Walker dary...@mac.com mailto:dary...@mac.com wrote: [[NSFileManager defaultManager] moveItemAtURL:location toURL:finalLocation error:error

Re: Best way to move a file out of the way?

2015-03-29 Thread Daryle Walker
someday). — 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-dev

Best way to move a file out of the way?

2015-03-24 Thread Daryle Walker
current Trash items are emptied)? If renaming is the answer, is there any sample code to do this safely, taking care of all cases? (For example, replacement name already taken, or adding an extension if the file doesn’t start with one, etc.) — Daryle Walker Mac, Internet, and Video Game Junkie

Bug with Localized Failure Reason and file moving

2015-03-24 Thread Daryle Walker
something here, or should I try to figure out how to send in bug reports to Apple? — 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

Want advice on NSURLSession command line tool

2015-03-18 Thread Daryle Walker
** parameter to give the developer the file’s actual final location.) Moving files to the Trash is an example of Apple’s code renaming when needed during a move. — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev

Using NSURLSession in a command line tool?

2015-03-16 Thread Daryle Walker
just fire and forget. — 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

Re: Full-screen mode broken after upgrading to Yosemite

2015-03-14 Thread Daryle Walker
On Mar 13, 2015, at 9:16 PM, Ken Thomases k...@codeweavers.com wrote: On Mar 13, 2015, at 4:29 PM, Daryle Walker dary...@mac.com wrote: My main browser window supports full-screen and optimized zoom. In Yosemite, those two functions share the green titlebar button. When I activate full

Full-screen mode broken after upgrading to Yosemite

2015-03-13 Thread Daryle Walker
(newFrame)) { frame = NSOffsetRect(frame, 0.0, NSMinY(newFrame) - NSMinY(frame)); } return frame; } — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev

Can't get first try of NSURLProtocol subclass to work.

2014-10-20 Thread Daryle Walker
the encoding string would make a difference. It didn’t. — 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

How do I show application-specific data on a web page?

2014-10-19 Thread Daryle Walker
. Looking at the WebKit APIs, there seem to be ways to specify web-scripting objects directly; would that be a better choice? And, how would I do this, both in the Objective-C and HTML code? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com

Is this a good implementation of optimized-zoom?

2014-10-12 Thread Daryle Walker
or not). — 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-dev-admins

Re: Questions on using a NSTextView as a source viewer.

2014-10-11 Thread Daryle Walker
On Oct 10, 2014, at 1:58 AM, Ken Thomases k...@codeweavers.com wrote: On Oct 10, 2014, at 12:02 AM, Daryle Walker dary...@mac.com wrote: On Oct 7, 2014, at 8:03 PM, Ken Thomases k...@codeweavers.com wrote: On Oct 7, 2014, at 5:29 PM, Daryle Walker dary...@mac.com wrote: 1. Although

Re: Questions on using a NSTextView as a source viewer.

2014-10-11 Thread Daryle Walker
On Oct 11, 2014, at 10:23 AM, Keary Suska cocoa-...@esoteritech.com wrote: On Oct 11, 2014, at 3:53 AM, Daryle Walker dary...@mac.com wrote: On Oct 10, 2014, at 1:58 AM, Ken Thomases k...@codeweavers.com wrote: On Oct 10, 2014, at 12:02 AM, Daryle Walker dary...@mac.com wrote: On Oct 7

Re: Questions on using a NSTextView as a source viewer.

2014-10-09 Thread Daryle Walker
On Oct 7, 2014, at 8:03 PM, Ken Thomases k...@codeweavers.com wrote: On Oct 7, 2014, at 5:29 PM, Daryle Walker dary...@mac.com wrote: 1. Although the text in the window expands vertically as needed, it never does horizontally. Wrapping always happens when lines are too long

Questions on using a NSTextView as a source viewer.

2014-10-07 Thread Daryle Walker
wrapping. 2. I wonder if I should scrap this way of viewing source and use an attached sheet. This obviously gives up source-viewing as independent. I also have to add a property to the web-browser window to indicate if source-viewing is active (so I can Restore that). — Daryle Walker Mac

Re: Questions on using a NSTextView as a source viewer.

2014-10-07 Thread Daryle Walker
On Oct 7, 2014, at 6:29 PM, Daryle Walker dary...@mac.com wrote: I implemented a new window XIB and controller class for my web-browsing project. It’s for “View Source.” It’s active if the current page’s WebDataSource object indicates it supports a text representation. The window just

Finding in a WebView

2014-10-07 Thread Daryle Walker
.) This would also need the WebView to always generate a scroll-view, even when the main content completely fits in the window. — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev

Re: WebView and User Interface Restore

2014-09-25 Thread Daryle Walker
On Sep 21, 2014, at 7:48 PM, Daryle Walker dary...@mac.com wrote: Do WebView instances participate in the Resume feature (with +restoreWindowWithIdentifier: state: completionHandler:, etc.), or do I have to manually handle their state (the web-view’s back-forward list and which item

restorableStateKeyPaths versus invalidateRestorableState

2014-09-21 Thread Daryle Walker
explicitly calling -invalidateRestorableState also be unnecessary (assuming full coverage)? Can anyone confirm? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

WebView and User Interface Restore

2014-09-21 Thread Daryle Walker
Do WebView instances participate in the Resume feature (with +restoreWindowWithIdentifier: state: completionHandler:, etc.), or do I have to manually handle their state (the web-view’s back-forward list and which item is current) myself? — Daryle Walker Mac, Internet, and Video Game Junkie

Re: Still need help with Services. Is there sample code?

2014-09-19 Thread Daryle Walker
On Sep 18, 2014, at 7:13 PM, Keary Suska cocoa-...@esoteritech.com wrote: On Sep 18, 2014, at 3:22 PM, Daryle Walker dary...@mac.com wrote: I removed the old style type (“NSStringPboardType”) and it still worked. When I changed the “public.plain-text” to “public.url” and tested

Re: Still need help with Services. Is there sample code?

2014-09-19 Thread Daryle Walker
On Sep 19, 2014, at 3:49 AM, Daryle Walker dary...@mac.com wrote: On Sep 18, 2014, at 7:13 PM, Keary Suska cocoa-...@esoteritech.com wrote: On Sep 18, 2014, at 3:22 PM, Daryle Walker dary...@mac.com wrote: I removed the old style type (“NSStringPboardType”) and it still worked. When I

About the Bundle creator OS Type code

2014-09-19 Thread Daryle Walker
is ignored nowadays, can I put a vanity value there, or do I have to keep it “”? I noticed (due to work in another thread) that Safari has a creator code (“sfri”), and I think TextEdit reuses TeachText/SimpleText’s creator code (“ttxt”). — Daryle Walker Mac, Internet, and Video Game Junkie

Re: Still need help with Services. Is there sample code?

2014-09-18 Thread Daryle Walker
On Sep 16, 2014, at 10:17 AM, Keary Suska cocoa-...@esoteritech.com wrote: On Sep 16, 2014, at 6:22 AM, Daryle Walker dary...@mac.com wrote: Still can’t get my Service to trigger. daryle$ /Applications/TextEdit.app/Contents/MacOS/TextEdit -NSDebugServices io.github.me.MyApp 2014-09-16

Still need help with Services. Is there sample code?

2014-09-16 Thread Daryle Walker
and the referenced post was http://lists.apple.com/archives/Cocoa-dev/2009/Sep/msg00201.html. — 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

Can't get Service to run.

2014-09-15 Thread Daryle Walker
keyNSSendFileTypes/key array stringpublic.url/string /array /dict /array — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev

Questions on Sudden Termination, Automatic Termination, and (User Interface) Resume

2014-09-14 Thread Daryle Walker
of loading a web page did print the log. But waiting after a minute (with another log message) still had the log for a normal quit. I think that although my code resumed Sudden Termination, NSUserDefaults probably didn’t due to caching. — Daryle Walker Mac, Internet, and Video Game Junkie darylew

Reset dispatch_once_t if the initialization failed?

2014-09-13 Thread Daryle Walker
, ^{ sharedInstance = [[SomeSingleton alloc] init]; }); return sharedInstance; } What happens if that initialization fails? Shouldn’t there be a test for NIL and a reset of the “onceToken” somewhere?… (Or is the chance of failure too unlikely?) — Daryle Walker Mac, Internet, and Video Game

Sudden termination and WebKit

2014-09-12 Thread Daryle Walker
suspensions too? — 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-dev

Apple event for open contents: re-entry and multiple qualifying services

2014-09-12 Thread Daryle Walker
override for the open-contents event? (And Apple’s writers need to add that case.) — 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: Apple event for open contents: re-entry and multiple qualifying services

2014-09-12 Thread Daryle Walker
On Sep 13, 2014, at 12:09 AM, Ken Thomases k...@codeweavers.com wrote: On Sep 12, 2014, at 12:37 PM, Daryle Walker dary...@mac.com wrote: I’m looking at https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_handle_AEs/SAppsHandleAEs.html

Re: Add bindings for custom menu items' isHidden to (an attribute of) a custom object?

2014-09-08 Thread Daryle Walker
On Sep 8, 2014, at 1:12 AM, Daryle Walker dary...@mac.com wrote: Yesterday, I had a thread (b6bbfa38-4761-4d25-bdfa-d6e5d71c1...@mac.com “Bindings to enable a menu item based on an array's element count”) on this list on how to add a Binding to a menu item’s Hidden flag based on the length

Re: Add bindings for custom menu items' isHidden to (an attribute of) a custom object?

2014-09-08 Thread Daryle Walker
On Sep 8, 2014, at 3:10 AM, Daryle Walker dary...@mac.com wrote: On Sep 8, 2014, at 1:12 AM, Daryle Walker dary...@mac.com wrote: [SNIP] @interface MyOverflowMenuController : NSObject //! Starts as nil; when set, this instance stores copies of the menu’s //! items and tracks the menu

Re: Add bindings for custom menu items' isHidden to (an attribute of) a custom object?

2014-09-08 Thread Daryle Walker
On Sep 8, 2014, at 4:21 AM, Daryle Walker dary...@mac.com wrote: The test value and the target menu were always the same. Four runs of double NULL then four more with Today’s sub-menu (Sep. 8). So the transformer always returns YES and every per-day history menu item (and sub-menu) is hidden

Re: Add bindings for custom menu items' isHidden to (an attribute of) a custom object?

2014-09-08 Thread Daryle Walker
the applicable items are already in place, reactively done when the WebHistory store changed. — 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

Bindings to enable a menu item based on an array's element count

2014-09-07 Thread Daryle Walker
then, I still need to stick in the “ 0” part somewhere (unless Bindings does the zero vs. non-zero to Boolean conversion C does). What about that? Or do I have to go indirect and use something like an NSArrayController? — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT

Re: Bindings to enable a menu item based on an array's element count

2014-09-07 Thread Daryle Walker
On Sep 7, 2014, at 7:02 AM, Ken Thomases k...@codeweavers.com wrote: On Sep 7, 2014, at 5:15 AM, Daryle Walker dary...@mac.com wrote: Right now, the menu item that holds the submenu where the overflow menu items go is always visible. I was thinking of controlling its visibility with Cocoa

Re: Bindings to enable a menu item based on an array's element count

2014-09-07 Thread Daryle Walker
On Sep 7, 2014, at 3:53 PM, Ken Thomases k...@codeweavers.com wrote: On Sep 7, 2014, at 2:09 PM, Daryle Walker dary...@mac.com wrote: Putting “my2ndCoordinator.overflowArray” gives me a red exclamation stop-sign in the text field […]. Appending a “.@count” gives a grey exclamation stop

Add bindings for custom menu items' isHidden to (an attribute of) a custom object?

2014-09-07 Thread Daryle Walker
arrays). — 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-dev-admins

WebHistoryItemChangedNotification

2014-08-31 Thread Daryle Walker
a substitute notification. Has someone filed this as a bug? (I’m too tired right now.) — 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

What exactly does NSDocumentController do when there's no NSDocument architecture?

2014-08-27 Thread Daryle Walker
, then rip it out, the “Open Recent” menu stays, unchanging but functional. (I never tried the “Clear Menu” option during that period.) — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev

Re: What exactly does NSDocumentController do when there's no NSDocument architecture?

2014-08-27 Thread Daryle Walker
On Aug 27, 2014, at 6:36 AM, Manoah F. Adams mhfad...@federaladamsfamily.com wrote: On Aug 27, 2014, at 02:03:000, Daryle Walker wrote: AFAIK, NSDocumentController has the only API for the “Open Recent” menu[1], so I added it (back) to my project. I moved my app delegate’s actions

Re: What exactly does NSDocumentController do when there's no NSDocument architecture?

2014-08-27 Thread Daryle Walker
On Aug 27, 2014, at 5:03 AM, Daryle Walker dary...@mac.com wrote: But I saw something weird one time running my app through the Xcode debugger after a previous crash. I saw an NSLog message complaining about app restore data. I think NSDocumentController does app-restore actions even without

Re: WebView shorting me on print jobs.

2014-08-26 Thread Daryle Walker
On Aug 25, 2014, at 3:06 PM, Daryle Walker dary...@mac.com wrote: When I print from the menu command, going through the action method, a text document I have loaded in my WebView prints all its pages. When I did it through the print-files Apple event, I only got 2 pages

WebView shorting me on print jobs.

2014-08-25 Thread Daryle Walker
point in the process is dropping pages.) — 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

How is the -NSPrint command line option supposed to be used?

2014-08-24 Thread Daryle Walker
. But I’m still wondering how to use the command line “-NSPrint” option. Either it’s broken or (more likely) I was using it wrong. — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev

Re: What is the modern Cocoa way to send an Apple Event to yourself?

2014-08-22 Thread Daryle Walker
On Aug 22, 2014, at 1:24 AM, Daryle Walker dary...@mac.com wrote: I changed my app from implementing -application:openFile: to -application:openFiles: in my application delegate. Then, I noticed that my Open File menu command directly calls my window creation function, and I decided

What is the modern Cocoa way to send an Apple Event to yourself?

2014-08-21 Thread Daryle Walker
parameters? (If some Apple expert says calling [NSApp replyToOpenOrPrint:X] arbitrarily is OK, I still want to switch to Apple Events.) — Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com ___ Cocoa-dev mailing list (Cocoa-dev

<    1   2   3   >