Swap NSBox content without user seeing it when animation is involved

2013-04-01 Thread Brad Stone
Desired action: 1) An NSBox (dstBox) with View A in it's content animates out to the left 2) NSBox's content is replaced with View B 3) NSBox with View B in it's content animates in from the right. Actual action: 1) An NSBox (dstBox) with View A in it's content animates out to the left 2) NSBox

Re: Swap NSBox content without user seeing it when animation is involved

2013-04-01 Thread Brad Stone
, 2013, at 1:30 PM, Fritz Anderson fri...@manoverboard.org wrote: On 1 Apr 2013, at 11:11 AM, Brad Stone cocoa-...@softraph.com wrote: Desired action: 1) An NSBox (dstBox) with View A in it's content animates out to the left 2) NSBox's content is replaced with View B 3) NSBox with View B

How to: NSPopover Refuse First Responder?

2013-03-20 Thread Brad Stone
I'm trying to replicate the NSPopover functionality that the new iTunes has and I'm 99% there. The las problem I'm facing is when the NSPopover appears it steals the firstResponder status from the NSSearchField so the user's typing gets interrupted when the popover appears. I tried giving the

Syncing w/o iCloud

2012-12-20 Thread Brad Stone
I have an app in OS X that shares files with an app in iOS. Because of security restrictions some information cannot be shared with iCloud. I'd like to do it over a wire. What are my alternatives? If someone could point me in the right direction I'd appreciate it. Thanks

Is it possible to read a file icon from iOS file system?

2012-12-10 Thread Brad Stone
In iOS is there a way I can get access a file's icon? I use [NSWorkspace iconForFile] in OS X. I looked a lot yesterday and I don't **think** there is a way in iOS. My OS X app has an iOS client and the files will be synced using iCloud. My app's document structure is a file package with

Re: Is it possible to read a file icon from iOS file system?

2012-12-10 Thread Brad Stone
file. If no custom icon exists, the images in this property represent the generic document icon. On Dec 10, 2012, at 5:34 PM, Brad Stone cocoa-...@softraph.com wrote: In iOS is there a way I can get access a file's icon? I use [NSWorkspace iconForFile] in OS X. I looked a lot yesterday

Re: FileWrapper iCloud

2012-11-21 Thread Brad Stone
The wrapper functionality is a remnant of NSPersistentDocument but I don't use it anymore. Thanks for your answers, this was helpful. On Nov 10, 2012, at 1:28 PM, Sean McBride s...@rogue-research.com wrote: On Sat, 10 Nov 2012 18:09:58 +, Luke Hiesterman said: File wrappers don't make

FileWrapper iCloud

2012-11-10 Thread Brad Stone
Does fileWrapper functionality make it easier or harder or is completely irrelevant for iCloud document functionality? My app used to need the fileWrapper functionality and it's still in there but I don't need it anymore and I want to remove it all. Would it help me keep it? Thanks

Simple question driving me CRAZY

2012-06-16 Thread Brad Stone
I have a subclass of a NSViewController. In fact, I created on just as a test with no custom code. I then throw an NSTextView in the NSView that comes with it and then drag from the NSTextView to the .h file to create an outlet. Why why why is it making it unsafe_unretained? I'm using ARC.

Re: Convert to Objective-C ARC Syntax Error

2012-04-12 Thread Brad Stone
Dave - I am not linking directly to any of the files causing the errors listed in my original email. I did a search on #import and got: #import Cocoa/Cocoa.h #import Security/Security.h #import Carbon/Carbon.h #import Security/SFKeychainSavePanel.h #import Foundation/Foundation.h #import

Convert to Objective-C ARC Syntax Error

2012-03-31 Thread Brad Stone
I used Edit-Refactor-Convert to Objective-C ARC My app works fine but I'm getting a syntax error in Apple's header files. They're all in the same place: @private. There error is '__strong' only applies to objective-c object or block pointer types; type here is 'void *' Here's an

Proper Way to use the Sandbox

2012-02-18 Thread Brad Stone
I modified my Mac shoebox app for sandboxing. My application stores the user info as a series of file packages in a series of directories all rolling up into a Documents folder. It works fine but now I noticed the sandbox directory structure doesn't get backed up with Time Machine.

Re: Recently Opened in Doc

2012-02-04 Thread Brad Stone
*)applicationDockMenu:(NSApplication *)sender. I'm not doing a lot of calculations here so it comes up quickly for the user. On Jan 28, 2012, at 5:58 PM, James Merkel wrote: On 28 Jan 2012 08:46:48 -0800 Quincey Morris wrote: On Jan 28, 2012, at 08:19 , Brad Stone wrote: I have a shoebox app like

Re: Recently Opened in Doc

2012-01-28 Thread Brad Stone
way to access the info in my app so if I could eliminate them that would be OK too. Changing the filename is not an option at this point. On Jan 27, 2012, at 11:19 PM, James Merkel wrote: On 27 Jan 2012 10:20:37 Brad Stone wrote: I'd like to 1) change the menu titles of the recently opened

Re: Recently Opened in Doc

2012-01-28 Thread Brad Stone
isEqualToString:@Clear Menu]) { continue; } // code to change the menuItem title } } On Jan 28, 2012, at 11:46 AM, Quincey Morris wrote: On Jan 28, 2012, at 08:19 , Brad Stone wrote: I have a shoebox app like iPhoto where the actual filename

Recently Opened in Doc

2012-01-27 Thread Brad Stone
I'd like to 1) change the menu titles of the recently opened documents listed in the dock menu if I can't do that I'd like to 2) remove the list of recently opened documents all together. I haven't been able to find a way to do this. Can someone provide guidance? Thanks

Core Animation + Focus Ring

2011-10-28 Thread Brad Stone
I understand there's an issue with focus rings not appearing in an editable cell if, like I do, you have an NSOutlineView sitting on a view that has Core Animation turned on. Since it's not working and I'm using the latest XCode I'm assuming it's not fixed. I'd be interested in any

Confused with block completionHandler

2011-08-24 Thread Brad Stone
I need to call this method manually but I'm confused how to format the completionHandler. I don't understand what I'm reading. Can anyone give me an example of how to define the completionHandler or point me to some documentation? [self saveToURL:[self fileURL] ofType:@myDocType

Re: Confused with block completionHandler

2011-08-24 Thread Brad Stone
All these answers are great. Thanks On Aug 24, 2011, at 9:01 PM, Graham Cox wrote: On 25/08/2011, at 10:46 AM, Brad Stone wrote: I need to call this method manually but I'm confused how to format the completionHandler. I don't understand what I'm reading. Can anyone give me

Lion's Auto Save Versions

2011-07-05 Thread Brad Stone
I'm testing my app in Lion with 4.1 and I'd like to play around with Auto Save and Versions (http://developer.apple.com/technologies/mac/whats-new.html). I've been through the documentation and I can't find anything new about how this works. Is there any documentation how we implement Auto

Re: Help with relationship objects

2011-06-29 Thread Brad Stone
Quincey, that helps. Thanks On Jun 28, 2011, at 1:36 PM, Quincey Morris wrote: On Jun 28, 2011, at 08:40, Brad Stone wrote: I get the below. Notice the new SRTodoEntity is properly in the todos relationship but there's also a reference to it outside of the SRNoteEntity. Intuitively, I

Help with relationship objects

2011-06-28 Thread Brad Stone
I need a little guidance. Did I properly add a relationship object? I don't know what's normal in this scenario. I referred to here: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreData/Articles/cdUsingMOs.html I have an entity called SRNoteEntity which has a

Re: Quick Looking big files crash

2011-05-24 Thread Brad Stone
executeAndReturnError:nil]; On May 3, 2011, at 9:09 PM, Brad Stone wrote: Interesting, OK, now remember, t this is new to me. To begin the QL panel I run this required method: - (void)beginPreviewPanelControl:(QLPreviewPanel *)panel { previewPanel = [panel retain]; panel.delegate = self

selectionIndexesForProposedSelection on mouse Up or mouse Down

2011-05-12 Thread Brad Stone
For my NSTableView (NSIndexSet *)tableView:(NSTableView *)tableView selectionIndexesForProposedSelection:(NSIndexSet *)proposedSelectionIndexes fires on mouseDown and (void)tableViewSelectionDidChange:(NSNotification *)aNotification fires on mouseUp. For my NSOutlineView (NSIndexSet

Re: selectionIndexesForProposedSelection on mouse Up or mouse Down

2011-05-12 Thread Brad Stone
: On May 12, 2011, at 10:05, Brad Stone wrote: For my NSTableView (NSIndexSet *)tableView:(NSTableView *)tableView selectionIndexesForProposedSelection:(NSIndexSet *)proposedSelectionIndexes fires on mouseDown and (void)tableViewSelectionDidChange:(NSNotification *)aNotification fires

Quick Looking big files crash

2011-05-03 Thread Brad Stone
I added Quartz and QuickLook frameworks to my garbage-collection-required app and then added simple Quick Look functionally. The bigger the file the more errors I get. Small pdfs show no errors, large ppts, xl or zip files show a bunch of errors and eventually crash. I'm not familiar with

Re: Quick Looking big files crash

2011-05-03 Thread Brad Stone
I have a symbolic breakpoint set and it stops on auto_refcount_underflow_error, even the small files. If I continue the doc shows in QL. On May 3, 2011, at 6:52 PM, Wim Lewis wrote: On 3 May 2011, at 3:45 PM, Brad Stone wrote: Here's what I get when I QL a large file. proNotes

Re: Quick Looking big files crash

2011-05-03 Thread Brad Stone
My app stores an NSURL to a file. All I'm doing is acting as the data source and delegate for QL and giving it access to an NSArray with the URL. I'm not creating a plugin (or am I misunderstanding you). On May 3, 2011, at 6:59 PM, Nick Zitzmann wrote: On May 3, 2011, at 4:45 PM, Brad

Re: Quick Looking big files crash

2011-05-03 Thread Brad Stone
Lewis wrote: On 3 May 2011, at 4:03 PM, Brad Stone wrote: I have a symbolic breakpoint set and it stops on auto_refcount_underflow_error, even the small files. If I continue the doc shows in QL. Presumably, a few stack frames up, there will be a call to CFRelease() which is causing

Re: Is a file open in another application?

2011-03-20 Thread Brad Stone
After sleeping on it my choices are to remove the encryption feature or make a big ugly dialog box warning the user if they encrypt a file that's open they will lose their changes. Neither of these approaches are optimum. On Mar 19, 2011, at 11:04 PM, Brad Stone wrote: I do need it to work

Re: Is a file open in another application?

2011-03-20 Thread Brad Stone
might just implement the encryption in a droplet, or a drop window - so users can choose when to encrypt rather than having the encryption 'done' to them. I just kept thinking about it, so thought I would mention it! Rob On Mar 19, 2011, at 9:34 AM, Brad Stone wrote: Is there a way

Is a file open in another application?

2011-03-19 Thread Brad Stone
Is there a way for me to tell if a particular file is open in another application? I have a feature I'd like to provide to my users that involves encrypting files that belong to other apps (i.e. my application can encrypt/decrypt a Word or Excel file). I want to prevent the user from

Re: Is a file open in another application?

2011-03-19 Thread Brad Stone
I do need it to work for any app, not just Word or XL. I guess a poor workaround would be since it's not possible to reliably check if the file is open I can force the user to quit the file's default app before allowing them to encrypt. It's just kind of heavy-handed. On Mar 19, 2011, at 6:20

Re: Accessing a managedObject property from within an accessor of another property

2011-02-23 Thread Brad Stone
triggered this by typing 'po self' in the debugger: On Feb 22, 2011, at 19:34, Brad Stone wrote: Breakpoint 28, -[SRMainWindowController toggleLock:] (self=0x2000df5e0, _cmd=0x1000a9239, sender=0x2000df5e0) at SRMainWindowController.m:2897 2897 [note setIsEncrypted:[NSNumber

Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Brad Stone
I've been trying for days to determine why I get EXC_BAD_ACCESS when I try to access a managedObject property from within an accessor of another property? this code in main.m [[self note] setValue:@HELLO WORLD forKey:@category]; NSNumber *tmpVal = [NSNumber numberWithBool:![[[self note]

Fwd: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Brad Stone
FYI - my managedObject is defined as such: @interface Note : NSManagedObject { } @property (nonatomic, retain) NSNumber * uid; @property (nonatomic, retain) NSString * category; @property (nonatomic, retain) NSNumber * isEncrypted; @interface Note (CoreDataGeneratedPrimitiveAccessors) -

Re: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Brad Stone
Yes, all my other classes are prefixed with SR since this one. I haven't gotten back to fixing this. On Feb 22, 2011, at 10:22 AM, Uli Kusterer wrote: On 22.02.2011, at 16:13, Brad Stone wrote: FYI - my managedObject is defined as such: @interface Note : NSManagedObject { } That's

Re: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Brad Stone
*thisNote = [self note], no change I've been trying these variations for days. On Feb 22, 2011, at 12:44 PM, Quincey Morris wrote: On Feb 22, 2011, at 06:19, Brad Stone wrote: I've been trying for days to determine why I get EXC_BAD_ACCESS when I try to access a managedObject property from

Re: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Brad Stone
In my Note entity: self = (Note *)0x20027bda0 In my .h file have this property defined: @property (nonatomic, retain) NSNumber * isFlagged; and this in .m @dynamic isFlagged; and no custom accessors New code in my Note entity: - (void)setIsEncrypted:(NSNumber *)value { // see po #1

Re: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Brad Stone
SCENARIO 1: The thread is: 0 - [SRMainWindowController toggleLock:] //self = (SRMainWindowController *) 0x20009d440 1-[NSToolbarButton sendAction:to:] - (IBAction)toggleLock:(id)sender { NSError *fetchError = nil; NSArray *fetchResults; NSFetchRequest *fetchRequest =

exception when I try to access a managedObject property from within an accessor of another property

2011-02-21 Thread Brad Stone
I am getting an exception when I try to access a managedObject property from within an accessor of another property. As ridiculous as it sounds I've been at this for over three days. Hopefully someone can point out what I'm doing wrong. - (NSString *)category { NSString * tmpValue;

Re: Community Suggestions on Encryption

2011-02-17 Thread Brad Stone
code: https://github.com/nicerobot/objc/tree/master/NSData/NSData%2BAES/ Cheers to the author for sharing. On Feb 16, 2011, at 10:48 AM, Brad Stone wrote: Jean - thanks to your tip I was able to find this code at http://pastie.org/966473. It works very well (I tried to paste it below

Re: Community Suggestions on Encryption

2011-02-16 Thread Brad Stone
I'm investigating how I can write similar code for NSData. On Feb 15, 2011, at 10:52 AM, Jean-Daniel Dupas wrote: Le 15 févr. 2011 à 16:35, Brad Stone a écrit : I've been doing a lot of hunting to find a simple way for me to encrypt an NSString and NSData. I've found a bunch of useful blogs

Community Suggestions on Encryption

2011-02-15 Thread Brad Stone
I've been doing a lot of hunting to find a simple way for me to encrypt an NSString and NSData. I've found a bunch of useful blogs like Cocoa Nut (http://cocoa-nut.de/?tag=encryption, Deusty:Using OpenSSL in Cocoa (http://deusty.blogspot.com/2007/01/using-openssl-in-cocoa.html) and the

Re: Abstract Text Example and Question

2011-02-10 Thread Brad Stone
Matt and Graham - I knew there was a better approach. I'll look into the things you suggest. On Feb 10, 2011, at 10:19 AM, Matt Neuburg wrote: On Wed, 9 Feb 2011 22:04:58 -0500, Brad Stone cocoa-...@softraph.com said: I made this code to remove any duplicate words from a large group of text

Abstract Text Example and Question

2011-02-09 Thread Brad Stone
I made this code to remove any duplicate words from a large group of text. The result is stored in an index file so the text doesn't need to make sense. I'm removing the duplicates to save space in the index file. I was wondering if anyone had a suggestion for a more efficient way to

Predicate Help

2011-01-12 Thread Brad Stone
I'm been trying for two days to get this to work. I've googled, read the Predicate Programming Guide - I guess I just don't get it. I'm trying to develop a predicate to populate a mutable array . I have an array that contains SRIndexObjects. @interface SRIndexObject : NSObject NSCoding {

Re: Predicate Help

2011-01-12 Thread Brad Stone
at least one todo object, where that todo object's todoCompletedDate is on or after aParticularDate. Sweet, huh? Dave On Jan 12, 2011, at 3:58 PM, Brad Stone wrote: I'm been trying for two days to get this to work. I've googled, read the Predicate Programming Guide - I guess I just

A Quick Look contribution and a question

2011-01-03 Thread Brad Stone
I'm submitting this code for anyone who needs a quick hack to get Quick Look working. It's a hack because it's using AppleScript and the Quick Look Server debug and management tool. If you send an array of paths this will bring them up in a Quick Look window. I don't think the Quick Look

Re: Strange error solved by turning off Non-contiguous Layout

2010-12-27 Thread Brad Stone
Yeah, that was it. I get by the place where the it used to deadlock. I'm make a note of that! Thanks On Dec 26, 2010, at 10:57 PM, Nick Zitzmann wrote: On Dec 26, 2010, at 5:00 PM, Brad Stone wrote: Ken - I never knew how to take a sample of the processes. It's given me some

Re: Strange error solved by turning off Non-contiguous Layout

2010-12-26 Thread Brad Stone
2761 __semwait_signal On Dec 22, 2010, at 12:37 AM, Ken Thomases wrote: On Dec 21, 2010, at 10:08 PM, Brad Stone wrote: I have an NSTextView that has about 1,900 characters in it. Just regular text. If I edit the text and save my app hangs at [[self

Re: Strange error solved by turning off Non-contiguous Layout

2010-12-22 Thread Brad Stone
, Douglas Davidson wrote: On Dec 21, 2010, at 8:08 PM, Brad Stone wrote: I have an NSTextView that has about 1,900 characters in it. Just regular text. If I edit the text and save my app hangs at [[self managedObjectContext] commitEditing]; I found setting nonContinuousLayout

Strange error solved by turning off Non-contiguous Layout

2010-12-21 Thread Brad Stone
I have an NSTextView that has about 1,900 characters in it. Just regular text. If I edit the text and save my app hangs at [[self managedObjectContext] commitEditing]; I found setting nonContinuousLayout to NO in the NSTextView prevents the hang but that's not really solving the problem.

Converting an AttributedString into NSData for an NSTextView

2010-09-25 Thread Brad Stone
I have an NSMutableString that I want to set as the NSData source for an NSTextView. I'm stuck and don't know how to do it. I'm importing about 4,000 XML files and I have to programmatically create the attributedString for each one, there's no way around it. How do I convert an

Re: Converting an AttributedString into NSData for an NSTextView

2010-09-25 Thread Brad Stone
, Brad Stone wrote: I have an NSMutableString that I want to set as the NSData source for an NSTextView. I'm stuck and don't know how to do it. I'm importing about 4,000 XML files and I have to programmatically create the attributedString for each one, there's no way around it. How do

Re: One last try: how do you make a bookmark bar like Safari?

2010-09-21 Thread Brad Stone
These are all great resources. Thanks On Sep 20, 2010, at 6:08 PM, John Nairn wrote: On Sep 20, 2010, at 12:02 PM, cocoa-dev-requ...@lists.apple.com wrote: I sent this out last week and go no replies. Please excuse me for sending it out again but I want to try one more time in case

One last try: how do you make a bookmark bar like Safari?

2010-09-20 Thread Brad Stone
I sent this out last week and go no replies. Please excuse me for sending it out again but I want to try one more time in case someone has an answer. I've been spending some time searching and thinking about how I can make a bookmark bar like in Safari or Firefox. It has some of the

How to: Bookmark bar like Safari?

2010-09-15 Thread Brad Stone
I've been spending some time searching and thinking about how I can make a bookmark bar like in Safari or Firefox. It has some of the characteristics of a toolbar especially when the window is small it puts the remaining toolbar items in a drop-down menu but it also has some of the properties

Re: Highlight Text like with FIne

2010-09-07 Thread Brad Stone
setSelectedRanges:selRangeArray]; } } On Sep 6, 2010, at 1:19 PM, Ross Carter wrote: On Sep 5, 2010, at 7:33 PM, Brad Stone wrote: I want to highlight different substrings contained in controls in a window (two different comboBoxes for example) programmatically when

Highlight Text like with FIne

2010-09-05 Thread Brad Stone
I want to highlight different substrings contained in controls in a window (two different comboBoxes for example) programmatically when the user is searching for a subString. I can do this for one comboBox but not both simultaneously. Here's one. NSString *s = [titleComboBox stringValue];

Re: stringWithQuotedPrintableString almost perfect

2010-08-20 Thread Brad Stone
and fix my code. On Aug 20, 2010, at 12:28 AM, Quincey Morris wrote: On Aug 19, 2010, at 19:27, Brad Stone wrote: Can someone help me figure out why (brackets not included) [• m] (which is, on the Mac, an option-8 character, a tab character and a lowercase m) converts to (brackets

stringWithQuotedPrintableString almost perfect

2010-08-19 Thread Brad Stone
Can someone help me figure out why (brackets not included) [• m] (which is, on the Mac, an option-8 character, a tab character and a lowercase m) converts to (brackets not included [‚Ä¢ m] ? The source text is quoted-printable UTF-8 text I created and saved in an XML file in a different

Re: Reading in UTF-8 to Data

2010-07-16 Thread Brad Stone
, at 9:20 PM, Greg Guerin wrote: Brad Stone wrote: Yes, quoted-printable. That's precisely it but in doing my research in the documentation and on the internet it doesn't seem like it's a simple process especially for someone like me with 9 months of Cocoa development experience

Re: Reading in UTF-8 to Data

2010-07-16 Thread Brad Stone
format w/o the quoted-printable encoding. Hopefully that's a clearer explanation. Does anyone have any code snippets they can share that will decode quoted-printable? On Jul 16, 2010, at 11:31 AM, Kyle Sluder wrote: On Fri, Jul 16, 2010 at 5:58 AM, Brad Stone cocoa-...@softraph.com wrote

Re: Reading in UTF-8 to Data

2010-07-16 Thread Brad Stone
Agreed Thomas but code snippets have been elusive. On Jul 16, 2010, at 1:00 PM, Thomas Engelmeier wrote: Am 16.07.2010 um 14:58 schrieb Brad Stone: The XML file is from an app I wrote a long time ago and contains thousands of documents similar to this one. Once Nick mentioned quotable

Re: Reading in UTF-8 to Data

2010-07-16 Thread Brad Stone
I was all over the internet last night including Stack Overflow, Coco Dev, this mailing list. I can' t believe I missed this. Thanks! On Jul 16, 2010, at 2:58 PM, Kirk Kerekes wrote: In the first page of Google hits for nsstring quoted-printable

Reading in UTF-8 to Data

2010-07-15 Thread Brad Stone
I'm having trouble getting text to appear properly in an NSTextView which is binded to an NSData attribute in core data. I've been all over the internet but I'm still stumped. The original text looks like this: There is a period at the end of this sentence. You should have also just seen a

Re: Reading in UTF-8 to Data

2010-07-15 Thread Brad Stone
, at 6:19 PM, Nick Zitzmann wrote: On Jul 15, 2010, at 4:03 PM, Brad Stone wrote: I'm having trouble getting text to appear properly in an NSTextView which is binded to an NSData attribute in core data. I've been all over the internet but I'm still stumped. The original text looks like

Re: How to revert to an unedited document window?

2010-06-30 Thread Brad Stone
: On 2010 Jun 29, at 05:23, Brad Stone wrote: Using [NSPersistentDocument revertToContentsOfURL:(NSURL *)inAbsoluteURLofType:(NSString *)inTypeName error:(NSError**)outError] works except the window closes and opens. If that didn't happen I'd be fine. Reverting a Core Data document is tricky

How to revert to an unedited document window?

2010-06-29 Thread Brad Stone
I have a subclassed windowController that has an associated core data managedObject called note, a managedObjectContext and a NSPersistendDocument. Sometimes I need to reset everything back to the last time the doc was saved and make the doc clean (isDocumentEdited == NO) so that when I close

applicationShouldTerminate gets called on with no edited documents

2010-06-11 Thread Brad Stone
I have (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender in my app delegate and it gets called when the user quits if **no** documents have been edited (I'm using Core Data). If one of my documents **is** edited it doesn't get called. It goes right to -

Newbie Question re: callback signatures

2010-06-04 Thread Brad Stone
How do I create the callback method? I don't understand what the signature is telling me. I have canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo: in my NSDocument and I want to set up the callback method. When I create a method as below it never fires. I must just not be

Loading PersistentDocuments into the same window

2010-04-30 Thread Brad Stone
I want to open NSPersistentDocuments and load them into the same window one at a time. I'm almost there but missing some steps. Hopefully someone can help me. I have a few saved documents on the hard drive. On launch my app opens to an untitled NSPersistentDocument and creates a separate

Re: Loading PersistentDocuments into the same window

2010-04-30 Thread Brad Stone
open up in a new window. The difference here is you can edit the file in preview. I'll try your code. Thanks for the reply. On Apr 30, 2010, at 1:17 PM, Quincey Morris wrote: On Apr 30, 2010, at 08:56, Brad Stone wrote: I want to open NSPersistentDocuments and load them into the same window

Re: Loading PersistentDocuments into the same window

2010-04-30 Thread Brad Stone
be straightforward. On Apr 30, 2010, at 3:36 PM, Quincey Morris wrote: On Apr 30, 2010, at 10:55, Brad Stone wrote: Think about the Finder. You click on a file, get a preview. If you like it you can open it. That's what I'm driving at. You click on a row in a tableView, you get a preview

Re: Loading PersistentDocuments into the same window

2010-04-30 Thread Brad Stone
, Brad Stone wrote: [dc openDocumentWith...] is opening the new doc and it'll be associated with the same windowController in the makeWindowControllers method. I see how you're doing that. What I don't understand is the documentation for openDocumentWIthCOntentsOfURL doesn't mention anything

XCode 3.2.2 Hangs after Clean All but Previous Version Doesn't

2010-04-26 Thread Brad Stone
The same code builds fine after a clean all in 3.2.1 and 3.2. In the new version, 3.2.2, it hangs during the build. Here's the sequence: 1) I open the code 2) clean all 3) I build and it hangs (still says Clean succeeded in the bottom right of the window) 4) I force quit and reopen code 5)

Re: XCode 3.2.2 Hangs after Clean All but Previous Version Doesn't

2010-04-26 Thread Brad Stone
folder and checking it out again. On 26 April 2010 14:06, Brad Stone cocoa-...@softraph.com wrote: The same code builds fine after a clean all in 3.2.1 and 3.2. In the new version, 3.2.2, it hangs during the build. Here's the sequence: 1) I open the code 2) clean all 3) I build

Re: How do I get a file reference w/o relying on the path?

2010-04-25 Thread Brad Stone
, Brad Stone wrote: The error comes back file does not exist and the NSLog statement shows url = (null) after I change the name of the file in the Finder. If I change the file name back to what it was when the bookmark was saved the file opens fine. I changed my creation option to 0

Re: How do I get a file reference w/o relying on the path?

2010-04-18 Thread Brad Stone
that in my array, recreate it in a temp folder and launch that. I'm sure that's wrong - there has got to be a better way. On Apr 3, 2010, at 6:55 PM, Ken Thomases wrote: On Apr 3, 2010, at 5:20 PM, Brad Stone wrote: I want to store a reference to a file in an ivar that will allow the user

Re: How do I get a file reference w/o relying on the path?

2010-04-18 Thread Brad Stone
description]); if (error != nil) { [NSApp presentError:error]; } On Apr 18, 2010, at 11:45 AM, Noah Desch wrote: On Apr 18, 2010, at 10:43 AM, Brad Stone wrote: I'm storing the bookmark data in an array displayed

Re: NSInvocation error when closing a dirty document

2010-04-12 Thread Brad Stone
find yourself doing something extraordinary to achieve a result which is ordinary, it means that you took a wrong turn somewhere. Anyone else with a similar problem should instead try the object controller I suggested. On 2010 Apr 11, at 14:42, Brad Stone wrote: - (void

Re: NSInvocation error when closing a dirty document

2010-04-11 Thread Brad Stone
, Jerry Krinock wrote: On 2010 Apr 10, at 12:43, Brad Stone wrote: I have a strange bug that I've been tracking for a while and I'd like the benefit of your experience. It happens with I close a window that needs to be saved. When closing a dirty Core Data NSPersistentDocument I get

NSInvocation error when closing a dirty document

2010-04-10 Thread Brad Stone
I have a strange bug that I've been tracking for a while and I'd like the benefit of your experience. It happens with I close a window that needs to be saved. When closing a dirty Core Data NSPersistentDocument I get the following error between the Do you want to save sheet and the save

How do I get a file reference w/o relying on the path?

2010-04-03 Thread Brad Stone
I want to store a reference to a file in an ivar that will allow the user to change the file's name and/or the directory (i.e. the path) and still allow me to access it. I don't want to create a file (like an ailas). I need to store the file reference in a variable so I can open the file no

Re: How do I get a file reference w/o relying on the path?

2010-04-03 Thread Brad Stone
a URL, see “Working with Bookmarks and Aliases.” THANK YOU so much for pointing me in the correct direction. On Apr 3, 2010, at 6:55 PM, Ken Thomases wrote: On Apr 3, 2010, at 5:20 PM, Brad Stone wrote: I want to store a reference to a file in an ivar that will allow the user to change

Re: NSBrowser Question

2010-02-15 Thread Brad Stone
and clicked it after the save it works fine. Ugh - if I did this yesterday I would have saved hours of frustration! On Feb 14, 2010, at 9:19 PM, Keary Suska wrote: On Feb 14, 2010, at 3:53 PM, Brad Stone wrote: I have an app that saves it's documents in a fileWrapper. The document's

NSBrowser Question

2010-02-14 Thread Brad Stone
I have an app that saves it's documents in a fileWrapper. The document's window has a NSBrowser where users can attach files. Before the document is saved for the first time the NSBrower's root is a temporary attachments folder (because the filewrapper doesn't exist). After it's saved that

Re: NSTextField sendActionOn:

2010-01-17 Thread Brad Stone
but the CollectionViewItem never receives it (other objects do). This is tricky, any help you may have would be appreciated. Brad On Jan 17, 2010, at 6:12 AM, Graham Cox wrote: On 17/01/2010, at 3:56 PM, Brad Stone wrote: I was able to capture the mouseDown event in the field but only in a subclass which

Re: NSTextField sendActionOn:

2010-01-17 Thread Brad Stone
I finally had a breakthrough! I'm not sure it's the best solution but it works and hopefully will be instructive for others trying to do the same thing connection views. There's a lot of steps (which is why I think it may not be the best) so I'll try to be as clear as possible. 1) when a

NSTextField sendActionOn:

2010-01-16 Thread Brad Stone
I have an NSTextField and an NSDatePicker on a view. As soon as the user clicks into either on (and before they type anything) I want to send an action. I thought I'd use sendActionOn: but I can't get it to work. The best I can do for the NSTextField is bind an action and in, IB, in the

Re: NSTextField sendActionOn:

2010-01-16 Thread Brad Stone
to capture the mouseDown event in the field but only in a subclass which is causing me problems elsewhere. On Jan 16, 2010, at 3:08 PM, Matthew Lindfield Seager wrote: On Sunday, January 17, 2010, Brad Stone cocoa-...@softraph.com wrote: The best I can do for the NSTextField is bind an action

How do I know when a new object is added to an NSArray or NSCollectionView?

2010-01-10 Thread Brad Stone
I'd like a viewController to be notified whenever an arrayController adds a new object. Here's why: I have an NSTextField in a view that gets added in an NSCollectionView. There's also an array controller and when I fire the add: selector the new view shows up in the collection. The view