Re: XCTest and window restoration

2017-08-27 Thread Samuel Williams
wrote: > (resent because I forgot to copy the list) > > On Aug 24, 2017, at 17:30 , Samuel Williams <space.ship.travel...@gmail.com> > wrote: > > > What am I doing wrong? > > > Nothing wrong, AFAICT. There is a scheme run option for disabling state > restoratio

XCTest and window restoration

2017-08-24 Thread Samuel Williams
When running unit tests, the app starts up and restores all windows which causes tests to fail in odd ways. Is there some way to get the UI tests to start with a clean slate every time? What am I doing wrong? Thanks for any advice. Kind regards, Samuel

Re: CoreData headaches

2016-10-30 Thread Samuel Williams
> CoreData [is] just a pile of confusion with no human explanation[.] I know this doesn't help anyone but I couldn't help but agreeing with this statement. On 31 October 2016 at 16:22, Steve Mills wrote: > On Oct 30, 2016, at 14:11:01, Chris Hanson wrote: >> >> On

Re: Font alignment when using bold variant of system font

2016-10-14 Thread Samuel Williams
addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, editor.textStorage.length)]; } On 13 October 2016 at 13:26, Samuel Williams <space.ship.travel...@gmail.com > wrote: > That's crazy, how can Apple make a system font which breaks existing apps!? > > On 13 Oct

Re: Font alignment when using bold variant of system font

2016-10-12 Thread Samuel Williams
That's crazy, how can Apple make a system font which breaks existing apps!? On 13 October 2016 at 12:19, Steve Mills <sjmi...@mac.com> wrote: > > On Oct 12, 2016, at 16:55, Samuel Williams <space.ship.traveller@gmail. > com> wrote: > > > > It's the standar

Re: Font alignment when using bold variant of system font

2016-10-12 Thread Samuel Williams
It's the standard font "San Francisco" from Apple. That's odd that it would be buggy like that. I'll try what you suggested. On 13 October 2016 at 10:52, Jens Alfke wrote: > It looks as though the bold style of the font has a higher cap height, > which causes the text view

Font alignment when using bold variant of system font

2016-10-12 Thread Samuel Williams
Hello, I've got an app "Truth Tables" which does parsing and highlighting of an expression. I use a custom subclass of NSTextField in a toolbar.. it's worked fine until the system font changed I think, but I'm not 100% sure because I've only noticed the problem recently. Here is the font code

Re: Swift bindings issue, Swift.Dictionary, NSMutableDictionary and NSObjectController

2016-02-14 Thread Samuel Williams
Yeah, the easiest solution was to not use a dictionary but use a class, which copied the data into the dictionary. Here is the top level sheet: class PMSRConfigurationSheet: NSWindowController { dynamic var metadata: [String : AnyObject] = [String : AnyObject]() override class func

Swift bindings issue, Swift.Dictionary, NSMutableDictionary and NSObjectController

2016-02-14 Thread Samuel Williams
I have a .xib with a NSObjectController with it's content bound to a Swift [String : AnyObject] variable, but get the following error: *Cocoa Bindings: Error setting value for key path selection.startDate of object [object class: NSMutableDictionary] (from bound object ):

Storing files into the Documents folder

2015-11-10 Thread Samuel Williams
A while ago I seem to recall reading on Apple's documentation that applications storing log files, save games, and other related data-files automatically into ~/Documents/ was not recommended, but I can't seem to find that advice now when searching. Can anyone give me advice about this and point

NSTokenField in NSTableView??

2015-10-09 Thread Samuel Williams
I found this: http://lists.apple.com/archives/cocoa-dev/2009/May/msg00437.html I'm still having problems that after editing the tokens and pressing enter, it isn't committed back to the object. Just wondering if this is a known bug? ___ Cocoa-dev

NSTextView scroll to attribute/bookmark?

2014-08-24 Thread Samuel Williams
Hi I'm generating a NSAttributedString which looks like the following: function_name_1 disassembled code output disassembled code output disassembled code output function_name_2 disassembled code output disassembled code output function_name_3 disassembled code output disassembled code output

Code signing Quick Look Generators?

2013-03-09 Thread Samuel Williams
Hi, I have a Quick Look Generator for my application Library Inspector which won't generate thumbnails on 10.8.2. It does work fine for previews (e.g. pressing space bar) however, and it also works fine in 10.7 for thumbnails. In 10.8 it appears there is an issue with sandboxing and generating

Re: Code signing Quick Look Generators?

2013-03-09 Thread Samuel Williams
I thought I should add - it works fine if I don't sign the quick look generator - however, I guess for the App Store everything has to be signed so this isn't really an option. On 10 March 2013 03:31, Samuel Williams space.ship.travel...@gmail.comwrote: Hi, I have a Quick Look Generator

Shared NSNumberFormatters

2012-09-28 Thread Samuel Williams
Hi Friends, I have an application that is currency using multiple NSNumberFormatters. Now a requirement has come up to support a per-document currency code. I have about 10 NIB files and the most complex NIB files have about 10-15 fields using per-NIB file formatters connected to fields using

Re: Shared NSNumberFormatters

2012-09-28 Thread Samuel Williams
Binding the formatter's currencyCode worked brilliantly and lets me reuse almost all the existing NIBs without change. Thanks =) On 29 September 2012 02:28, Sean McBride s...@rogue-research.com wrote: On Sat, 29 Sep 2012 01:37:58 +1200, Samuel Williams said: Hi Friends, I have

Re: NSSavePanel runModal isn't working in sandbox?

2012-06-10 Thread Samuel Williams
: CoreData automatic migrations fail in sandbox. Problem ID: 11634243: NSSavePanel.URL is nil in sandbox Thanks to everyone for your help. Kind regards, Samuel On 9 June 2012 08:48, Corbin Dunn corb...@apple.com wrote: On Jun 8, 2012, at 11:20 AM, Samuel Williams space.ship.travel...@gmail.com wrote

Re: NSSavePanel runModal isn't working in sandbox?

2012-06-08 Thread Samuel Williams
I've had no problems at all with NSSavePanel under the sandbox (the inherited methods limitation that Graham mentioned excepted). My usage looks almost exactly like the code above except that I call -beginSheetModalForWindow:completionHandler: instead of -runModal. BUT. You need the

Re: CoreData, automatic migration and sandbox problems.

2012-06-05 Thread Samuel Williams
for the document in question and [NSManagedObjectModel isConfiguration:compatibleWithStoreMetadata:] to check whether that is compatible with the current MOM. A good place to do these checks is in NSDocumentController before attempting to open the doc. On 2012-05-28, at 9:59 AM, Samuel Williams wrote

NSSavePanel runModal isn't working in sandbox?

2012-06-05 Thread Samuel Williams
Hi, I'm having trouble with NSSavePanel runModal in a sandbox: NSSavePanel * savePanel = [NSSavePanel savePanel]; savePanel.title = @Document Migration; savePanel.directoryURL = url; savePanel.nameFieldStringValue = [url lastPathComponent]; savePanel.allowedFileTypes = [NSArray

Re: NSSavePanel runModal isn't working in sandbox?

2012-06-05 Thread Samuel Williams
inherit from NSPanel under sandboxing, so if you are expecting to use inherited methods, they don't work. File bugs - we can't adopt sandboxing until these issues are properly fixed. --Graham On 06/06/2012, at 1:41 PM, Samuel Williams wrote: Hi, I'm having trouble with NSSavePanel

CGWarpMouseCursorPosition and large delta/offset at next mouse motion event

2012-02-16 Thread Samuel Williams
Hi, I'm using CGWarpMouseCursorPosition to position the cursor in the window after grabbing it and hiding it. I'm using CGAssociateMouseAndMouseCursorPosition(true/false) to ensure that the motion can be captured separately from the mouse position. However, after doing this, the next motion

Re: Drag Drop/Pasteboard issue in Lion

2012-02-01 Thread Samuel Williams
Hi, A while ago someone mentioned an issue ( http://www.cocoabuilder.com/archive/cocoa/307250-drag-drop-pasteboard-issue-in-lion.html#307250) where NSPasteboard from AddressBook on Lion was having problems delivering data: *(gdb) **po [[[pboard pasteboardItems] objectAtIndex:0] types]*

Square NSWindow corners?

2012-02-01 Thread Samuel Williams
Hi, I seem to be getting some weird artefacts on my sheets: http://imgur.com/3L8Hk The corners next to the Cancel and Create buttons are not looking so good. There is no view affecting this - I removed everything from the window and still got the same effect. Anyone have any ideas? Kind

Re: Data managment

2010-04-12 Thread Samuel Williams
Dear Billy, It might depend on whether you want to remain cross platform or not. Also, if your requirements are very limited, CoreData might be considered overkill. On the other hand, CoreData has great integration with NSDocument type applications and Cocoa UIs. Kind regards, Samuel On

Xcode build settings (such as llvm-config)

2010-04-06 Thread Samuel Williams
Hello, I want to execute a command to get a list of libraries for inclusion into my application llvm-config --libs Gives me: -lLLVMXCoreCodeGen -lLLVMXCoreAsmPrinter -lLLVMXCoreInfo -lLLVMSystemZCodeGen -lLLVMSystemZAsmPrinter -lLLVMSystemZInfo [snip] Normally it is used such as

NSArrayController and NSUserDefaultsController values not saving...

2008-04-02 Thread Samuel Williams
Hi, I have an app I am working on which will eventually be released open source available from http://svn.oriontransfer.org/Applications/GPSTool That program has a menu item under preferences which shows a window. That window has an NSTableView bound to an NSArrayController. This appears