How to present a web view while supporting 10.9?

2020-02-06 Thread John Brownie via Cocoa-dev
    var webView: WKWebView } else {     var webView: WebView } ...but that is for running code, not declarations. Is there a way to do this through IB? Or is my alternative to build the window in code, using whatever is available based on the runtime platform? John -- John Brownie Mussau-Emira langua

Re: Sierra Document Handling

2017-04-06 Thread John Brownie
001013bbee8 _dispatch_worker_thread3 + 114 12 libsystem_pthread.dylib 0x00010143189a _pthread_wqthread + 1299 13 libsystem_pthread.dylib 0x000101431375 start_wqthread + 13 -- John Brownie In Australia on furlough from SIL Papua New Guinea ___ Cocoa-dev mailing list

Re: Table selection and bindings

2017-02-14 Thread John Brownie
list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/john_brownie%40sil.org This email sent to john_brow...@sil.org -- John Brownie In Finland on fu

Table selection and bindings

2017-02-14 Thread John Brownie
problem becomes that now the inspector is still pointed at an object, but there's no selection, and the logic goes badly wrong. Am I doing things incorrectly, or is there something that I can do to ensure that the change to the underlying array shown by the table triggers a selection chan

Re: Debugging a privileged helper

2017-01-27 Thread John Brownie
7;s added to the binary with the linker flag -sectcreate __TEXT __launchd_plist (path to the file). The launchd plist is exactly analogous to the tool that is already working, just the identifiers changed. -- John Brownie In Finland on furlough fr

Re: Debugging a privileged helper

2017-01-26 Thread John Brownie
xy with the appropriate code proxy.authenticatedCreateDirectory(url: location, authorization: authorization) { handler($0, $1) } == All of this is derived from Even Better Authorization Sample, translated to Swift. -- John Brownie In Finland on furlough fr

Debugging a privileged helper

2017-01-26 Thread John Brownie
some more ideas on how to track down the problem. Any suggestions? Thanks in advance! -- John Brownie In Finland on furlough from SIL Papua New Guinea ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator c

FSEventStreamCallback in Swift

2017-01-24 Thread John Brownie
mEventId(kFSEventStreamEventIdSinceNow), scanInterval, FSEventStreamCreateFlags(kFSEventStreamCreateFlagUseCFTypes)) I may well have the wrong way of handling the conversion through the context with all the unsafe pointer types, as I'm still rather new to Swift. -- John Brownie In Finland on furlough from

Is SMJobBless still the correct way to do authorisation?

2017-01-09 Thread John Brownie
hat I can learn from? How will mixing Objective-C in the helper application and Swift in the main application work in practice? Any other advice? Thanks, John -- John Brownie In Finland on furlough from SIL Papua New Guinea ___ Cocoa-dev mailing list (

Re: Giving names to undo actions

2016-12-21 Thread John Brownie
the other actually doing the work. The other is to check whether we're undoing and not set the name in that case. At present I'm leaning towards the latter. John Quincey Morris <mailto:quinceymor...@rivergatesoftware.com> 21 December 2016 at 10:44 On Dec 21, 201

Giving names to undo actions

2016-12-21 Thread John Brownie
e only when you are actually doing the original action, and not when doing the undo version of it. Is that a correct interpretation? If so, how do you implement it? Do you test the NSUndoManager's undoing property and only set the name if it is NO? Any insights welcomed! John -- John Brown

Re: Traceback from [SFLList removeItem:]

2016-10-26 Thread John Brownie
Australia, snow is still pretty exciting, though less so for my wife, who is the Finn. -- John Brownie In Finland on furlough from SIL Papua New Guinea ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Traceback from [SFLList removeItem:]

2016-10-26 Thread John Brownie
libsystem_pthread.dylib 0x000100e9e8c2 _pthread_wqthread + 1299 12 libsystem_pthread.dylib 0x000100e9e39d start_wqthread + 13 I assume that I can safely ignore these as someone leaving debug printing on, since all continues to work. Or do I need to worry? -- John Brownie In

Re: Normalising file names on macOS

2016-09-22 Thread John Brownie
gFold() to case-fold the string,*after* normalising, before using it as a dictionary key.) John -- John Brownie In Finland on furlough from SIL Papua New Guinea ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reques

Re: Normalising file names on macOS

2016-09-22 Thread John Brownie
two different file systems. I could perhaps create a scratch file with the given name, but that runs into the possibility of different file systems. Still, if there's no better option, I can work with that. Oh, and if it makes any difference, I'm supporting back to OS X 10.8 curren

Normalising file names on macOS

2016-09-22 Thread John Brownie
g] returns "A string made by normalizing the string’s contents using the Unicode Normalization Form D." That seems not to give what I need, but I haven't seen a better option. Is there such a method? John -- John Brownie In Finland on furlough

Re: Creating NSXMLDocument programmatically

2016-03-22 Thread John Brownie
___ 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(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.co

Creating NSXMLDocument programmatically

2016-03-22 Thread John Brownie
ay to do this now. Thanks for any pointers. John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics, Ukarumpa, Eastern Highlands Province, Papua New Guinea Mussau-Emira language, Mussau Island, New Ireland Province, Papua New Guinea ___

Re: Reading XML 1.1

2016-03-19 Thread John Brownie
On 14/03/2016 19:14, John Brownie wrote: Is it possible to read an XML 1.1 file using NSXMLDocument? The crucial thing for my purposes is that the character set allowed in XML 1.1 is larger. XML 1.0 defines characters as: Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD

Reading XML 1.1

2016-03-14 Thread John Brownie
RestrictedChar characters, but NSXMLDocument apparently only handles the XML 1.0 character set. Is there a way to make NSXMLDocument handle the fuller character set? If not, is there an alternative that will enable me to parse an XML 1.1 file with a minimum of effort? Thanks, John -- John

Re: Cocoa-dev Digest, Vol 13, Issue 14

2016-01-11 Thread John Brownie
e some code which is adapted from EBAS, so the comments misled me, as it's a couple of years since I got all that stuff going. Sorry for the confusion. John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics, Ukarumpa, Eastern Highlands Province, P

Re: Why doesn't SMJobBless sample work?

2016-01-11 Thread John Brownie
SMJobBless() its daemon. Now — any heads-up or hint will be greatly appreciated. You want the Even Better Authorization Sample Code rather than SMJobBless. John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics, Ukarumpa, Eastern Highlands Province, Papua New

Re: Hurdles in converting to Swift

2015-12-24 Thread John Brownie
On 24/12/2015 11:49, Quincey Morris wrote: On Dec 23, 2015, at 17:38 , John Brownie mailto:john_brow...@sil.org>> wrote: 2015-12-24 10:43:40.664 AppName[10464:1086828] Unknown class SearchViewController in Interface Builder file. Try going to the inspector in IB and remove the clas

Re: Hurdles in converting to Swift

2015-12-23 Thread John Brownie
___ 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(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.co

Hurdles in converting to Swift

2015-12-23 Thread John Brownie
t as the class for one scene. I've cleaned the build folder, but it still happens. Any wisdom on how to proceed? John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics, Ukarumpa, Eastern Highlands Province, Papua New Guinea Mussau-Emira language, Mu

Crash in printing

2015-07-30 Thread John Brownie
uce the crash myself, I can't tell what to look for. Any suggestions? John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Highlands Province | New Ireland Provinc

Re: Drag highlight problems

2015-07-20 Thread John Brownie
On Mon Jul 20 2015 20:39:12 GMT+1000 (PGT) Uli Kusterer wrote: On 20 Jul 2015, at 04:36, John Brownie wrote: Everything works correctly except for the drag highlight. Sometimes, and I haven't been able to work out what the sequence is, the drag highlight will be left on after the

Drag highlight problems

2015-07-19 Thread John Brownie
ong? I'm on OS X 10.10.4, Xcode 6.4. John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Highlands Province | New Ireland Province Papua New Guinea

Drag highlight problems

2015-07-19 Thread John Brownie
the sequence is, the drag highlight will be left on after the drop happens. The problem seems to be some sort of race condition, but I'm finding it hard to track down. Putting logging in each of the three methods makes the problem go away, so that isn't useful. Am I doing somethi

Re: Going back to non-ARC

2015-06-13 Thread John Brownie
at earlier memory errors have been fixed by this. Thanks for the pointers that eventually led to a solution. John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Highlands Province | New Irelan

Re: Going back to non-ARC

2015-06-12 Thread John Brownie
On Fri Jun 12 2015 21:11:26 GMT+1000 (PGT) Alex Zavatone wrote: Got a link to the iibrary? https://github.com/refnum/nano/tree/master John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern

Re: Going back to non-ARC

2015-06-12 Thread John Brownie
On Fri Jun 12 2015 18:45:49 GMT+1000 (PGT) Ken Thomases wrote: On Jun 12, 2015, at 3:18 AM, John Brownie wrote: Having worked with ARC code for a long while, I discovered an incompatibility with a library that means I have to convert to non-ARC code. Before we address the how, let's

Going back to non-ARC

2015-06-12 Thread John Brownie
variables, and I think I should be releasing strong properties. What about IBOutlets that are declared as strong? Do they have to be released as well, or is there some magic in nib handling that makes that unnecessary? Any advice welcome before I go back to testing and looking at leaks, etc. Jo

Re: Another bindings question

2015-06-02 Thread John Brownie
___ 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(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.co

Another bindings question

2015-06-02 Thread John Brownie
was trial and error, as I haven't really found a good guide to this whole area, so I would be happy to have a better solution. John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Hig

Re: How to debug a binding exception?

2015-06-02 Thread John Brownie
___ 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(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.co

How to debug a binding exception?

2015-06-02 Thread John Brownie
ff9350d5c9 libdyld.dylib`start + 1 My problem is that I don't know what binding would be causing the problem. Is there a way to find out which it is? John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Uk

Re: Runtime message on Yosemite seems spurious?

2015-03-19 Thread John Brownie
u can ignore it, and it's probably somewhere in Apple's code. John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Highlands Province | New Ireland Province Papua New Guinea

Re: AuthorizationExecuteWithPrivileges with execution failure error

2014-07-23 Thread John Brownie
. Look for the EvenBetterAuthorizationSample to see the current method of doing so. John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Highlands Province | New Ireland Province Papua New Guinea

Re: Advice on document handling

2014-06-23 Thread John Brownie
Thanks all for the input. I ended up keeping file wrappers for the expensive parts of the bundle, invalidating them when an action takes place, and that has brought the save time down to an acceptable level in most cases. John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg

Re: Advice on document handling

2014-06-20 Thread John Brownie
___ 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(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.co

Re: Advice on document handling

2014-06-20 Thread John Brownie
Jerry Krinock wrote: On 2014 Jun 19, at 22:15, John Brownie wrote: Looks like I need to keep a local flag for when the document gets changed and when it gets saved. No, you can just use -[NSDocument isDocumentEdited]. Back when Auto Save first appeared, in OS X 10.7, I too found that it

Re: Advice on document handling

2014-06-19 Thread John Brownie
On Fri Jun 20 2014 12:58:11 GMT+1000 (PGT) Graham Cox wrote: On 20 Jun 2014, at 12:37 pm, John Brownie wrote: OK, thank you for the pointers. After a lot of refactoring, I've got things working without deadlocks, and cleaned up various things on the way. However, the autosave is gettin

Re: Advice on document handling

2014-06-19 Thread John Brownie
ht direction on this one. John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Highlands Province | New Ireland Province Papua New Guinea

Re: Advice on document handling

2014-06-09 Thread John Brownie
On Tue Jun 10 2014 13:14:51 GMT+1000 (PGT) Graham Cox wrote: On 10 Jun 2014, at 11:28 am, John Brownie wrote: I think that the problem is likely to involve the fact that documents can be owned by both the bundle document class and the simple document class, and trying to save the same

Advice on document handling

2014-06-09 Thread John Brownie
he problem in a way to get a meaningful trace. Before I spend too much longer on this, am I handling the two document types in a safe manner? Or is there another pattern I should be using for this sort of nested document? Thanks for any pointers here. John -- John Brownie, john_brow...@sil.org

Re: How to write a .icns file

2014-06-03 Thread John Brownie
— create a CGImageRef, then create the NSBitmapImageRef from that. Thanks for the pointer. John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Highlands Province | New Ireland Province Papua New

Re: How to write a .icns file

2014-06-03 Thread John Brownie
John Brownie wrote: Thanks for the thoughts. I am not sure that I agree with the statement that the 'icns' format is well documented. A search turned up the Wikipedia page, which is pretty cursory, but eventually led me to the IconFamily page, which looks (at a first glance) to do w

Re: How to write a .icns file

2014-06-02 Thread John Brownie
s file (via NSData) works, sort of. I only seem to get one representation, is32 (16x16 24-bit), which is weird, since I'm giving it eight types. I don't see a simple way of working out which ones are the @2x versions for the purposes of creating a full .icns file, either. All in all,

How to write a .icns file

2014-05-29 Thread John Brownie
Simplified from the previous question, which didn't get any responses: How can I write a .icns file when there are 15 images, which is too many for ImageIO to handle? I can get it as an NSImage, but can't see how to write it to a file (or to an NSData object). John -- John Brownie,

Limit on CGImageDestination?

2014-05-27 Thread John Brownie
lternate strategy? If so, what? John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Highlands Province | New Ireland Province Papua New Guinea

Re: Fast NSArray compare

2014-04-15 Thread John Brownie
On Tue Apr 15 2014 12:41:50 GMT+1000 (PGT) Graham Cox wrote: On 15 Apr 2014, at 12:03 pm, John Brownie wrote: think you're an order of magnitude out. Searching an array is linear with the length of the array, O(n), whereas a set or hash should be close to constant, O(1), if there&#x

Re: Fast NSArray compare

2014-04-14 Thread John Brownie
ing arrays. Of course, if it's a sorted array, you can do it in O(log n) by binary searching. John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Highlands Province | New Ireland Provi

Re: Crash when printing (including printing to PDF)

2012-12-06 Thread John Brownie
Fritz Anderson wrote: On 6 Dec 2012, at 2:47 AM, John Brownie wrote: I am working on implementing printing, and have it working to the point where the preview in the print sheet works. However, I get a crash if I then go on to print or go to PDF (Open in Preview, Save as PDF). In the print

Crash when printing (including printing to PDF)

2012-12-06 Thread John Brownie
? Thanks in advance, John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Highlands Province | New Ireland Province Papua New Guinea | Papua New Guinea

Re: Getting a .icns file from IconRef data

2012-11-16 Thread John Brownie
ily API instead, even though it's obsolete and deprecated. Thanks, this is what I needed. I'm targetting 10.7, so CGImageDestination is what I want. IconRef -> NSImage ->CGImageDestination seems to work, at least from a quick test. John -- John Brownie, john_brow...@sil.org

Getting a .icns file from IconRef data

2012-11-16 Thread John Brownie
in the .icns format. I have not been able to find documentation on how to do that step. Lack of internet access has also complicated things, but a search just now didn't throw up anything that looked helpful. Thanks for pointers to documentation or just how to do it! John -- John Br

Re: NSDate/NSDateFormatter question

2012-03-24 Thread John Brownie
your problem? John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg On furlough in Australia from: Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Highlands Province | New Ireland Province Papua New Guinea

Recommended way to present a font preference

2012-02-26 Thread John Brownie
uggestions, John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg On furlough in Australia from: Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Highlands Province | New Ireland Province Papua New Guinea | Papua

Re: Graphical Keyboard Map

2011-08-15 Thread John Brownie
ither do a screen capture or print to PDF for each one. John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg On furlough in Finland from: Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Highlands Province | New Ireland Province Papua

Re: A question of memory management style

2011-07-18 Thread John Brownie
to references and reminders about method names. Having come from Carbon, I do get myself confused about the different naming convention between Cocoa and Core Foundation. All is working, with the analyzer happy and no apparent crashes or leaks in limited testing so far. John -- John Brownie

A question of memory management style

2011-07-17 Thread John Brownie
the document object release it? Or is there another method I haven't thought of? Thanks for any suggestions! John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Highlands Province | New I

Re: Missing connection

2011-01-03 Thread John Brownie
Plenty of traps for those of us new to Cocoa... John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Highlands Province | New Ireland Province Papua New Guinea | Papua

Missing connection

2011-01-03 Thread John Brownie
B, and the same thing always happens. Where do I look to find out why the connection isn't there? I'm still a beginner in Cocoa, so it's quite likely I've missed something elementary, but I'm stumped for now. John -- John Brownie, john_brow...@sil.org or j.bro

Re: Ensuring no selection in a table view

2010-12-29 Thread John Brownie
I might just give up on solving it and move on to the next thing. [stateStackScroll setNeedsDisplay:YES]; This is unnecessary. Once the table view gets wind that its data has been updated, it will call -setNeedsDisplayInRect: on itself. That's nice, I hadn't realised that. Thanks for your input!

Re: Ensuring no selection in a table view

2010-12-29 Thread John Brownie
ble deselectAll:self]; NSArray *tempArray = [NSArray array]; [stateStackController setSelectedObjects:tempArray]; [tempArray release]; [stateStackScroll setNeedsDisplay:YES]; } John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics

Re: Ensuring no selection in a table view

2010-12-29 Thread John Brownie
a one in an otherwise Carbon application, so I'm trying to limit the amount of impact on the rest of my code. Enabling copy would mean more changes than I'm interested in at this point, but I'll put that on my list for further examination. John -- John Brownie, john_brow.

Ensuring no selection in a table view

2010-12-28 Thread John Brownie
What am I doing wrong or not doing? Is there something about the window appearing that I need to override? John -- John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg Summer Institute of Linguistics | Mussau-Emira language, Mussau Is. Ukarumpa, Eastern Highlands Province | New Irelan