Re: Core Data design patterns

2009-07-19 Thread Jerry Krinock
On 2009 Jul 19, at 13:59, Squ Aire wrote: Thanks for these wonderful answer and tips. I like how you have designed this stuff. Gladly, it is similar to what I've been doing. Based on this I can now refine my own stuff, e.g. by doing a subclass for each entity like you are doing. Don't ge

Re: How to schedule an application

2009-07-20 Thread Jerry Krinock
On 2009 Jul 20, at 02:06, rethish wrote: I had tried using a plist file and launchd to do it, but it always opens in a new application. Instead of launching your application directly, you need to have launchd launch a little process of some kind which will do what you want. Is this

Challenge: Block Main Thread while Work is done, with Timeout

2009-07-23 Thread Jerry Krinock
rt a job with a duration of 1.0 seconds and a timeout of 2.0 seconds. Expected result: The job should complete and program should continue. Actual result: Run loop never "fires", so the program gets stuck. (In Test #2, I would start a similar job which ^should^ time out.) Can

Re: Framework Image Error

2009-07-23 Thread Jerry Krinock
On 2009 Jul 22, at 10:49, Stephen Smith wrote: The frameworks used in the program are all within a build phase titled Link Binary With Libraries and are also within a Frameworks folder as a part of the project. But does it get built into the product? Right-click the product in Finder, s

Re: Challenge: Block Main Thread while Work is done, with Timeout

2009-07-23 Thread Jerry Krinock
On 2009 Jul 23, at 17:44, Ken Thomases wrote: Do consider NSConditionLock as an alternative, though. It's likely to be much simpler and more straightforward. Indeed Ken is correct. I'll post the code tomorrow. ___ Cocoa-dev mailing list (Cocoa-de

Re: Challenge: Block Main Thread while Work is done, with Timeout

2009-07-24 Thread Jerry Krinock
On 2009 Jul 23, at 17:44, Ken Thomases wrote: On Jul 23, 2009, at 6:44 PM, Jerry Krinock wrote: I'd often like to block the main thread First question is: why? Blocking the main thread is usually bad and to be avoided. What are you actually trying to achieve? Can you give an ex

Re: Rotating image

2009-07-26 Thread Jerry Krinock
On 2009 Jul 26, at 01:00, Agha Khan wrote: Now suppose I want to rotate that image at 90 degree. Is there an easy way to accomplish this task? Easy, yes. (Just copy Steve Christensen's code ... it works) http://www.cocoabuilder.com/archive/message/cocoa/2009/3/1/231362 Here's the header

NSPopUpButtonCell needs Extra Oomph to -display

2009-07-28 Thread Jerry Krinock
ly not in displaying the menu. It's a conventional design, bindings set in Interface Builder. Until I implemented my kludges, the table view was a plain old NSTableView, the cell was a plain old NSPopUpButtonCell, and the table column still is a plain old NSTableColumn. Any

Re: Copying Managed Objects from App to Doc MOContext

2009-07-28 Thread Jerry Krinock
ull null] forKey:@"comments", I get this... Unacceptable type of value for attribute: property = "comments"; desired type = NSString; given type = NSNull; value = Apparently I've misunderstood Ben. What was he trying to tell me? Sincerely, Jerry Krinock [1] - (NS

Re: Copying Managed Objects from App to Doc MOContext

2009-07-28 Thread Jerry Krinock
On 2009 Jul 28, at 16:07, Ben Trumbull wrote: Accessor methods don't accept NSNull in place of NSString. Yes. I think I understand this now -- I was having trouble with your terms "copy/snapshot" and "restore". Accessor methods don't accept NSNull...the swapping has to happen in your c

Re: Bindings for dictionaries inside of an array

2009-07-30 Thread Jerry Krinock
On 2009 Jul 30, at 12:40, Lance Braud wrote: I thought that the keys in your objects are these: bounds, contents, quadrilateralPoints, type, pageIndex, color I have tried making the second table bind to the array controller's "Controller Key" using "selection," and binding "Model Key Path"

Re: NSURLConnection issues

2009-07-30 Thread Jerry Krinock
On 2009 Jul 30, at 17:44, Jack Carbaugh wrote: I am working on a program that is basically a wrapper around some web pages. I am using NSURLConnection to download the various pages needed, however, with 2 specific users, NSURLConnection returns immediately with an error, NSURLErrorDomain

Re: How to set the name of open-with application for a specific file?

2009-07-31 Thread Jerry Krinock
On 2009 Jul 31, at 01:02, MATSUMOTO Satoshi wrote: I want to choose a different application to associate with the file. Off-topic but, oh well, you wouldn't have known Activate Finder. Select a subject document file. In main menu click File > Get Info. In the Info Window which appea

Re: How to set the name of open-with application for a specific file?

2009-07-31 Thread Jerry Krinock
On 2009 Jul 31, at 06:00, MATSUMOTO Satoshi wrote: I want to do this programmatically. I don't know if there are API to do this programatically or not. Search Xcode documentation for functions that "Start With" "LS". ___ Cocoa-dev mailing lis

Surprise: -[NSInvocation retainArguments] also Autoreleases them

2009-07-31 Thread Jerry Krinock
The document for -[NSInvocation retainArguments] tells me: "If the receiver hasn’t already done so, retains the target and all object arguments of the receiver and copies all of its C-string arguments. ... Newly created NSInvocations don’t retain or copy their arguments, nor do they retain

Re: Surprise: -[NSInvocation retainArguments] also Autoreleases them

2009-08-01 Thread Jerry Krinock
Thank you, Ken. Yes, your explanation -- that the NSInvocation retains them as instance variables -- makes more sense than mine. I submitted Document Feedback that Apple make clear what they mean by "retain" in this method. ___ Cocoa-dev mailing

Re: Disabling Undo in Core Data

2009-08-01 Thread Jerry Krinock
On 2009 Aug 01, at 05:11, Squ Aire wrote: 1) disableUndoRegistration ... NSManagedObjectContextObjectsDidChangeNotification will stop being sent when the context changes! I'd call that a bug, at least in the documentation. It is implied in a roundabout way... "The notification is pos

Extending Undo Group with delay creates "invalid state" -- Why?

2009-08-03 Thread Jerry Krinock
11:27:15.986 MyApp[3775:10b] endUndoGrouping: SSYUndoManager 0x15f24c00 is in invalid state, endUndoGrouping called with no matching begin But why? As you can see there ^was^ a "matching begin". 1-1=0. By the way, I presume that this undo grouping created during undo is

Re: NSSound play often fails

2009-08-03 Thread Jerry Krinock
On 2009 Aug 03, at 11:28, James Walker wrote: I'm having trouble getting sounds to play reliably. When it happens, -[NSSound play] returns YES, but I hear nothing, and the sound:didFinishPlaying: delegate method is not called. The sound in question is an AIFF file with a duration of abou

Re: adding a sub menu to multiple super menus?

2009-08-06 Thread Jerry Krinock
On 2009 Aug 05, at 22:08, Graham Cox wrote: On 06/08/2009, at 5:41 AM, David M. Cotter wrote: in carbon, you can have a sub menu that is used in more than one super menu. is there a trick to get this to go in Cocoa? As far as I know a menu has to be a distinct instance - you can't sha

System Sound, and Audio Services [solved more] (was: NSSound play often fails)

2009-08-08 Thread Jerry Krinock
On 2009 Aug 04, at 10:32, James Walker wrote: Matt Neuburg wrote: Either load the sound from the file yourself with NSSound alloc and initWithContentsOfFile, and release it when done, or just use the auto-released sound provided for you by soundNamed: Originally my code was simpler... S

Re: NSTimer not firing

2009-08-09 Thread Jerry Krinock
On 2009 Aug 09, at 09:26, Alastair Houghton wrote: I think the problem, therefore, is that you're trying to schedule your timer on the wrong thread (I guess you're expecting it to be scheduled on your app's main thread)? The performSelectorOnMainThread::: methods are your friend in situ

Re: Undo's setActionName: and Core Data

2009-08-12 Thread Jerry Krinock
On 2009 Aug 11, at 11:32, Squ Aire wrote: The question is: How can I set the name of the undo action to "Modify Name" using setActionName of the MOC's undo manager just before the user changes an employee's name in the table view (or by any other means)? Do I have to subclass the MO and

FSDetermineIfRefIsEnclosedByFolder(): No const for Cocoa's Temp Dir?

2009-08-12 Thread Jerry Krinock
path. Of course, this works. What's the correct way to do this? Sincerely, Jerry Krinock @interface NSFileManager (SomeMore) /*! @briefReturns YES if a file or directory exists at a given path and is not in a temporary or Trash folder.  Otherwise, returns NO. */

Re: FSDetermineIfRefIsEnclosedByFolder(): No const for Cocoa's Temp Dir?

2009-08-12 Thread Jerry Krinock
On 2009 Aug 12, at 08:33, Jean-Daniel Dupas wrote: What did you used as domainOrVRefNum ? Well, I tried various values but eventually settled on zero (0) because, according to the FSDetermineIfRefIsEnclosedByFolder() documentation, this will "check all domains and volumes". On 2009 Aug

Releasing ivars in -didTurnIntoFault. Should set to nil?

2009-08-12 Thread Jerry Krinock
anyone disagree? Sincerely, Jerry Krinock ___ 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 yo

Re: Can I tell [NSAppleScript executeAppleEvent] to wait for script to complete?

2009-08-13 Thread Jerry Krinock
On 2009 Aug 13, at 15:45, DeNigris Sean wrote: When I use [NSAppleScript executeAppleEvent] to call handlers in a compiled script, it returns immediately. Is there a way to get it to block until the script is finished? Maybe there a notification I can listen for? H, my NSAppleScript

Re: Cleaning "garbage" in Core Data

2009-08-16 Thread Jerry Krinock
On 2009 Aug 16, at 05:00, Squ Aire wrote: I really don't want to clean the garbage "on the go/before persisting" because I don't want to let the user wait unnecessarily. The purpose of this garbage buildup is the benefit of more responsive app, at the cost of little more temporary storage.

Re: Turn off menu highlight in outline view?

2009-08-16 Thread Jerry Krinock
On 2009 Aug 16, at 17:21, Graham Cox wrote: I have an outline view using source list style. When I right-click on the view, the item under the mouse highlights with a blue outline independent of the current selection. This gives the impression that the menu command applies to that item, no

Re: Cleaning "garbage" in Core Data

2009-08-16 Thread Jerry Krinock
To Squ: I read through all your posts today and, although several people have asked you, I still don't see where you've confirmed that this garbage/ cleanup is indeed a performance issue. My recommendation remains that you confirm this first, especially now that multithreading Core Data h

"too many nested undo groups" -- What does that mean?

2009-08-17 Thread Jerry Krinock
ion, "too many nested undo groups" implies that -groupingLevels is too high. But by default, - levelsOfUndo is inifinite. The "Undo Architecture" document seems to just scratch the surface in so many places! If someone can answer th

Re: "too many nested undo groups" -- What does that mean?

2009-08-17 Thread Jerry Krinock
On 2009 Aug 17, at 12:50, Alastair Houghton wrote: All this makes sense. Then, by extension, "too many nested undo groups" implies that -groupingLevels is too high. But by default, -levelsOfUndo is inifinite. Levels of undo and nested undo groups are separate things, I think. The mes

Re: Need advice about how to create a Cocoa Framework

2009-08-19 Thread Jerry Krinock
On 19 Awst 2009, at 01:05, Gevik wrote: I would like to know what (and how) the recommended way is to bundle my C library as a Cocoa framework http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Tasks/CreatingFrameworks.html ___

Re: FYI - new debug & profile libraries are out

2009-08-19 Thread Jerry Krinock
On 2009 Aug 05, at 19:48, Nick Zitzmann wrote: The good news is, yesterday new debug & profile libraries appeared on ADC. Woohoo! I have searched and searched the Apple website but can't find this. Someone please post a link. Also, if anyone has a link to or any tips on how to use a Deb

Statements in Replaced Method execute out of sequence - How?

2009-08-19 Thread Jerry Krinock
Maybe this is the Challenge of the Day. In debugging my undo grouping issue, I've replaced NSUndoManager's -beginUndoGrouping and - endUndoGrouping with methods that log whenever they're invoked. I suppose I could do this be setting breakpoints and debugging, but I've always trusted NSLog(

Re: FYI - new debug & profile libraries are out: Installer Refuses

2009-08-19 Thread Jerry Krinock
Thanks, all. I found them, and Nick is correct that the 10.5.8 is now available. So I downloaded the 10.5.8 libraries, updated my Mac to 10.5.8, but no go. Has anyone ever seen this: Doubleclicking installer brings down a sheet "Mac OS X 10.5.8 (9L30) Required. The Debug and Profile Li

Execution of Replaced Method Jumps back to top -- How??

2009-08-20 Thread Jerry Krinock
[Re-sending this message with new details, and also because my thread was hijacked yesterday.] In debugging my undo grouping issue, I've replaced NSUndoManager's - beginUndoGrouping and -endUndoGrouping with methods that log whenever they're invoked. - (void)replacement_beginUndoGrouping {

Re: How to disable the table view when search bar is active

2009-08-20 Thread Jerry Krinock
The -setScrollEnabled method does not show up in my documentation browser, so I'm not sure what it will do. However, whenever a view does not change as expected, invoke - display. In your case, [[self tableView] display] ; If it works, this may or may not be a correct fix for production

Re: Authorization Question (Possibly a simple POSIX question?)

2009-08-21 Thread Jerry Krinock
On 2009 Aug 21, at 00:27, Stephen J. Butler wrote: Also, the MoreIsBetter samples include MoreSecurity which helps you write helper tools For Mac OS 10.4 and above, MoreIsBetter has been superceded by BetterAuthorizationSample. For help with BetterAuthorizationSample, search list archive

Re: Setting multi line Text to Radio button

2009-08-21 Thread Jerry Krinock
On 2009 Aug 21, at 06:39, Vijay Kanse wrote: I want my radio buttons to have multi line text I've found this to be one of those things that "just doesn't work". Set the title to an empty string, and display the title in an adjoining text field ("Multi-line Label" from the Library) instea

Re: CoreData: Using to-may relationships in fetch request predicates

2009-08-21 Thread Jerry Krinock
Everything I.S. said is true, and as far as I know you're out of luck. You might want to log into Bug Reporter and "second" my bug 6857142: 05-May-2009 07:05 AM Jerry Krinock: Summary: Core Data's fetches cannot handle arbitrary predicates produced by NSPredicateEditor

Re: Execution of Replaced Method Jumps back to top -- How??

2009-08-21 Thread Jerry Krinock
p so if that is adequate it can save a lot of headaches." But since the out-of-box behavior definitely doesn't work properly, I'm going to have to slog through the headaches. On 2009 Aug 20, at 08:54, Jerry Krinock wrote: [Re-sending this message with new details, and also be

Re: Possible reasons why "no help is available"?

2009-08-22 Thread Jerry Krinock
The of your "index.html" needs some tags like this: BookMacster Help Also, make sure that there is only one file in the Help folder with these tags. If there's more than one, it will fail. If it works, reply and let us know which one or more of those

Re: Running shell scripts as root.

2009-08-23 Thread Jerry Krinock
On 2009 Aug 23, at 11:57, I. Savant wrote: On Aug 23, 2009, at 2:31 PM, PCWiz wrote: Basically I need to run the chown/chmod utilities and probably cp/ mv/mkdir as well using root privileges. What would be the best way to do this? http://developer.apple.com/referencelibrary/GettingStarte

Re: Using Core Data NSManagedObject subclasses outside of a managed object context

2009-08-23 Thread Jerry Krinock
On 2009 Aug 23, at 17:32, Dieterich Lawson wrote: Does anyone know of a way to modify the objects so that I can use them wherever I want without having to insert them into a managed object context? No, you can't to that. But you're asking the wrong question. The problem is not the manag

How is "Open Recent >" identified and populated?

2009-08-25 Thread Jerry Krinock
ings, no special subclass. The "Clear Menu" item of the submenu does have a connection to First Responder's - clearRecentDocuments:, but removing that in my duplicate didn't change the behavior. Is there some magic under the covers

Re: How is "Open Recent >" identified and populated?

2009-08-25 Thread Jerry Krinock
On 2009 Aug 25, at 08:38, I. Savant wrote: On Aug 25, 2009, at 11:33 AM, Jerry Krinock wrote: Is there some magic under the covers? How does Cocoa know which menu item is "Open Recent"? What about its title? :-) No, that can't be, because a title has to be local

Re: How is "Open Recent >" identified and populated?

2009-08-25 Thread Jerry Krinock
On 2009 Aug 25, at 16:43, Jeff Johnson wrote: http://lapcatsoftware.com/blog/2007/07/10/working-without-a-nib-part-5-open-recent-menu/ So, maybe Interface Builder sends _setMenuName:@"NSRecentDocumentsMenu" to the submenu of its "Open Recent" menu item. Good work figuring it out, Jeff.

Correct way to have nil undo manager in Core Data document?

2009-08-29 Thread Jerry Krinock
the menu, Edit > Undo is always disabled, as expected. In my actual application, my document subclass is in a framework, of which my non-gui background worker and the gui app are thin wrappers. So, I condition the code in the above methods with if(!NSApp). Am I violating the "spirit

Re: Correct way to have nil undo manager in Core Data document?

2009-08-29 Thread Jerry Krinock
On 2009 Aug 29, at 13:41, Quincey Morris wrote: AFAIK, the problem is that NSPersistentDocument overrides *some* of NSDocument's undo-related methods, but not all, and calling the un- overridden ones really messes things up -- you can end up with 2 undo managers, one in a NSDocument private

Re: nsuserdefaults woes

2009-08-30 Thread Jerry Krinock
I may be wrong, because I'm in a hurry here, but I believe ethat - addSuiteNamed only works for reading preferences. If you want to write preferences to another app you've got to use the CFPreferences API (unfortunately). ___ Cocoa-dev mailing li

Re: nsuserdefaults woes

2009-08-30 Thread Jerry Krinock
On 2009 Aug 30, at 08:11, Rick C. wrote: if that's the only way i'll have to look into it. one question though, is there anything i could have done that i can no longer read using addSuiteNamed along with arrayForKey like i mentioned in my original post? Maybe it's not an array any more

Re: KVO: when to stop observing?

2009-08-30 Thread Jerry Krinock
On 2009 Aug 29, at 23:59, Michel Schinz wrote: I'm therefore looking for better solutions, and would be interested to know what people have come up with. I believe the best answer to the question of "when to stop observing" is "as soon as possible". I was having trouble with a Core Data

Re: Popup button cells in a table view

2010-07-28 Thread Jerry Krinock
On 2010 Jul 27, at 18:53, Kiel Gillard wrote: > My problem is this. When I run my app, the popup button menus contain the > descriptions of the arranged objects in the popup array controller instead of > respecting the content value binding I have specified. > > I am certain my model is key-va

Re: Equivalent of NSManagedObjectContextWillSaveNotification in 10.5?

2010-07-28 Thread Jerry Krinock
On 2010 Jul 28, at 15:43, Gideon King wrote: > I was successfully using NSManagedObjectContextWillSaveNotification in 10.6, > but have to also support OS X 10.5, where that notification is not available. > Was there some notification sent prior to 10.6? I'm not sure, but if it was, Apple prob

Re: Equivalent of NSManagedObjectContextWillSaveNotification in 10.5?

2010-07-28 Thread Jerry Krinock
On 2010 Jul 28, at 20:07, Gideon King wrote: > Thanks Jerry, it is part of an NSPersistentDocument subclass. I get a bit > confused about which save method(s) I would have to implement in my subclass, > as there seem to be a number of save... methods and a number of writeTo... > methods. The p

Re: table header cells not on even lines

2010-08-01 Thread Jerry Krinock
On 2010 Jul 31, at 21:52, Shane wrote: > table header cell is all white and even extends slightly into the gray area Maybe your custom table header cell might have the wrong width, and that you've hard-coded it: > [column setWidth:40]; Try changing that.

How troubleshoot when Managed Object disappears from Store?

2010-08-01 Thread Jerry Krinock
bjects disappear too, and it's possible that the store is being "hosed" more generally. But, oddly, I don't get even a peep from Core Data in console. It even loads OK if I close and reopen the document. How can I debug this? Thanks, Jerry Krinock

Re: How troubleshoot when Managed Object disappears from Store?

2010-08-02 Thread Jerry Krinock
On 2010 Aug 01, at 20:59, Quincey Morris wrote: > Are you sure this isn't just a memory management error, perhaps in > combination with an incorrect delete rule? What's the delete rule for the > "department" relationship in the "Employee" entity? Nullify in both directions. > Is there a stron

Re: How to delete read only files in LaunchAgent folder

2010-08-04 Thread Jerry Krinock
On 2010 Aug 03, at 19:40, Nick Zitzmann wrote: >> How will i delete the read only file programatically? > > Search ADC for the "BetterAuthorizationSample" sample project. You're going > to have to use Authorization Services to perform the tasks your app can't due > to permissions. which is q

Re: How troubleshoot when Managed Object disappears from Store?

2010-08-04 Thread Jerry Krinock
Ah, so the problem in my understanding is that I've been conflating "file type" and "document type". Quincey, thank you also for the "bonus" explanation of compatibility between UTI and "Display Name". On 2010 Aug 02, at 20:57, Quincey Morris wrote: >> WHY DID THE OBJECT DISAPPEAR? > > I d

Re: String Tables

2010-08-06 Thread Jerry Krinock
On 2010 Aug 06, at 09:05, Dave DeLong wrote: > Sometimes a word in your original language can have multiple translations, > depending in the context. Yes. Example: /* Name of a preference tab which contains preference settings for how things look when they are viewed. This is intentionally

Core Data : Multiuser ?

2010-08-06 Thread Jerry Krinock
Can more than one process be accessing the same Core Data sqlite file? This post from author Marcus Zarra says "no"… http://forums.pragprog.com/forums/90/topics/1476 But this post from Ben Trumbull seems to say "yes", as long as the two processes are accessing it via the same filesystem:

Re: Core Data : Multiuser ?

2010-08-06 Thread Jerry Krinock
On 2010 Aug 06, at 17:03, Kyle Sluder wrote: > http://lists.apple.com/archives/cocoa-dev/2010/Mar/msg01026.html > > Short answer: it's not supported. I'm not sure, Kyle. In the message you linked to, Ben was talking about access from multiple machines. But in an earlier message in that threa

Re: Core Data : Multiprocess (was Multiuser) ?

2010-08-07 Thread Jerry Krinock
Sorry. I see I've created confusion by putting "Multiuser" in the subject. I should have said "Multiprocess"… On 2010 Aug 06, at 23:43, Ben Trumbull wrote: > p.s. > Thank you, Ben. In the

Re: Extra menu item in a bound NSPopUpButton menu

2010-08-07 Thread Jerry Krinock
On 2010 Aug 07, at 14:39, John Ackert wrote: > I have an NSPopUpButton bound to an NSArrayController which manages the > content of the NSPopUpButton menu. Now I want some extra menu items at the > end of the dynamic content separated by a separator menu item. > What is the best way to do this

Re: How to search for specific bindings in IB

2010-08-10 Thread Jerry Krinock
On 2010 Aug 09, at 17:14, Chris Tracewell wrote: > In larger NIB files this can be hard to find and remove. Is there anyway to > search IB for bindings other than selecting individual elements and looking > at the bindings inspector? Not in Interface Builder 3.3.2. The only workaround, when yo

Re: Updating timestamp on save => merge error

2010-08-11 Thread Jerry Krinock
On 2010 Aug 10, at 21:48, Gideon King wrote: > I have a managed object I want to update with a "last saved timestamp" on > save. I have the update done on the NSPersistentDocument > -saveToURL:ofType:forSaveOperation:error: method. > > This works fine, except on save as. I know that the save

Re: Recursive file remove

2010-08-14 Thread Jerry Krinock
As noted, your choices are either NSFileManager methods of BSD/POSIX functions. I would tend to start with the latter because, at the end of the week, NSFileManager might not have the configurability you need to handle the nitty-gritty like system "dot" or "dot dot" files, (not) following symbo

Re: Recursive file remove

2010-08-14 Thread Jerry Krinock
On 2010 Aug 14, at 11:28, Tom Jones wrote: > I'm surprised that there isn't a task as part of NSFileManager to remove > items recursively like "removeItemAtPath:recursive:error:" for example. I > mean Mac OS X is over 10 years old. :-) My guess is that the unix geeks are concerned with the man

Re: MOC Migrations Using .xcdatamodeld

2010-08-15 Thread Jerry Krinock
On 2010 Aug 13, at 12:08, Brad Gibbs wrote: > I'm having some real problems performing my first migration. I've been looking at your post for a couple days but haven't yet found time to study it in detail, which is what it would take, and I probably wouldn't know the answers either. So I'll j

Re: NSArrayController + KVO + Core Data Question

2010-08-22 Thread Jerry Krinock
On 2010 Aug 22, at 15:55, Ajay Sabhaney wrote: > it was *necessary* [emphasis added] > for me to receive a KVO notification when either a new item was added to the > array controller, or removed from the array controller I'd say that this assumption is the problem. What you probably *really n

Documentation for -release is not quite true

2010-08-23 Thread Jerry Krinock
Kind of late in the decade for this, but anyhow, the documentation for -release says: - (oneway void)release Decrements the receiver’s reference count. Discussion. The receiver is sent a dealloc message when its reference count reaches 0. So it's always bothered me that if I override -de

Re: Documentation for -release is not quite true

2010-08-23 Thread Jerry Krinock
On 2010 Aug 23, at 18:47, Gary L. Wade wrote: > Have you considered that the code for -release may be implemented in a > manner like this? > > -(oneway void)release > { >if (1 == self->retainCount) >{ >// Let's save a few CPU cycles and not bother >// decrementing retainC

Overriding -release to break retain cycle. Was: Doc for -release not quite true

2010-08-29 Thread Jerry Krinock
On 2010 Aug 23, at 19:02, Daniel DeCovnick wrote: > But it doesn't really matter since you should never be calling dealloc except > from release or dealloc (as [super dealloc];) anyway. No, I haven't called -dealloc for quite a few years :) Actually, I was studying Uli Kusterer's old UKKQueue

sdef NSXMLParserErrorDomain error 1549 in 10.5, PowerPC

2010-08-29 Thread Jerry Krinock
When testing my app and its command-line helper in Mac OS 10.5 on a PowerPC machine, I see these annoying pairs of entries in the Console Log: sdef error: Operation could not be completed. (NSXMLParserErrorDomain error 1549.) line number: 2 I'm not sure whether or not they're related to the p

Re: Binding an objects "Enabled" to a button in IB

2010-08-30 Thread Jerry Krinock
On 2010 Aug 30, at 05:42, Joanna Carter wrote: > The usual way to handle this would be to have a simple boolean property on > the controller class… True, but let's answer the poster's question, > Le 30 août 2010 à 13:26, co...@wamundson.eu a écrit : > >> Can this binding be done … completely

Re: Binding an objects "Enabled" to a button in IB

2010-08-31 Thread Jerry Krinock
On 2010 Aug 31, at 00:34, Joanna Carter wrote: > Eeeuuuwww!!! > > It might work but is it really code as we know it ? ;-) It's definitely not code, Joanna. That's what the poster asked for, though. Poster wanted to know if we could do it "in IB". > Surely, if you already have a controller f

Re: isTemporaryID unrecognized selector - how do I debug this?

2010-09-03 Thread Jerry Krinock
On 2010 Sep 03, at 18:43, Gideon King wrote: > Hi, I have a custom NSManagedObject subclass that I am having a problem with. > When I delete the object, I get the "isTemporaryID unrecognized selector sent > to instance" message being sent to the object being deleted I'm not quite sure of that.

Re: isTemporaryID unrecognized selector - how do I debug this?

2010-09-03 Thread Jerry Krinock
-isTemporaryID is implemented in NSManagedObjectID, not NSManagedObject. I presume that your NMTopicMapViewMO inherits from NSManagedObject. If you can't find any place in your code where you might be sending -isTemporaryID to a NMTopicMapViewMO, then of course it might be that when the manage

Register/Function Parm Mapping for 64-bit Was : isTemporaryID unrecognized selector…

2010-09-04 Thread Jerry Krinock
On 2010 Sep 03, at 21:25, Gideon King wrote: > I was able to track it down by going to the > maintainInverseRelationship:forProperty:oldDestination:newDestination: method > call in the stack, and finding the entity in register 12. So did you ever find out the mapping between function parameter

Re: Register/Function Parm Mapping for 64-bit Was: isTemporaryID unrecognized selector…

2010-09-04 Thread Jerry Krinock
On 2010 Sep 04, at 18:48, Chris Parker wrote: > On x86_64: > > $rdi == arg0 (ObjC: self) > $rsi == arg1 (ObjC: op, or _cmd) > $rdx == arg2 (ObjC: first arg of method) > $rcx == arg3 (ObjC: second arg of method) > $r8 == arg4 > etc. > > On armv6/7: > > $r0 == arg0 (ObjC: self) > $r1 == arg1 (O

Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?

2010-09-07 Thread Jerry Krinock
I'm getting an apparently spurious warning when compiling an mapping model (.xcmappingmodel) file: Foo.xcmappingmodel: warning: Relationship Mapping "Starkoid_entityToStarkoid_entity".ixportLog -- NSMigrationManager method destinationInstancesForSourceRelationshipNamed:sourceInstances: not nati

Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?

2010-09-07 Thread Jerry Krinock
On 2010 Sep 07, at 12:15, Quincey Morris wrote: > On Sep 7, 2010, at 11:26, Jerry Krinock wrote: > >> 4. I cannot find the workaround mentioned in the warning in Core Data's >> 10.6 Release Notes. > > Does this describe and/or provide a solution for

Patching implementation in +load. Was: … Mapping Model : Spurious Warning

2010-09-07 Thread Jerry Krinock
The workaround given in the note [1] works. But it recommends that you patch NSMigrationManager "in a method that is guaranteed to be invoked before migration could be attempted—for example, if you have an application delegate, this could be in its init method" Messy. I added a +load method to

Re: Compiling Core Data Mapping Model : Spurious Warning re 10.5 Deployment?

2010-09-07 Thread Jerry Krinock
On 2010 Sep 07, at 15:37, Quincey Morris wrote: > Didn't that document say that this scenario occurs when the entity has a > sub-entity … Ah, indeed this was my first subentity. You are correct as usual, Quincey – thank you! ___ Cocoa-dev mailing

Re: NSEntityMigrationPolicy subclass methods not being called

2010-09-07 Thread Jerry Krinock
On 2010 Sep 06, at 05:31, Ben wrote: > my NSEntityMigrationPolicy subclass methods are not being called so that I > can run further migration code. > > @implementation TestMigrationPolicy > > - (BOOL)beginEntityMapping:(NSEntityMapping *)mapping > manager:(NSMigrationManager

Re: NSEntityMigrationPolicy subclass methods not being called

2010-09-08 Thread Jerry Krinock
On 2010 Sep 08, at 01:43, Ben wrote: > I get the following… > > NSUnderlyingError = Error Domain=NSCocoaErrorDomain Code=256 > UserInfo=0x1ec540 "Operation could not be completed. (Cocoa error 256.)"; > reason = "Failed to save new store after first pass of migration."; Nice-looking error,

Re: core data structure?

2010-09-09 Thread Jerry Krinock
On 2010 Sep 09, at 04:14, Amy Gibbs wrote: > I didn't really want to save the values as attributes, as I'd like the values > to reflect changes to the product prices. I only need to display these in a > label onscreen. > > Is this what transient attributes are for? Yes, but before you use tra

Core Data Migration : Splitting an Entity : Source Fetch ?

2010-09-13 Thread Jerry Krinock
a huge mapping model, I want to reduce uncertainties. The document "Xcode Mapping Tool for Core Data" gives only a trivial example, and NSEntityMigrationPolicy doesn't mention filters or predicates; this feature seems to be an "Xcode exclusive bonus". So I'd app

Re: Interpreting a Crash Log

2010-09-13 Thread Jerry Krinock
On 2010 Sep 13, at 16:15, k...@highrolls.net wrote: > As I understand the entries below from a crash log my app crashed in > objc_msgSend which was called from the method changeAColor:newColor in the > class BMatrix, 1499 bytes into the method. > > How do I find the offending line in the sourc

Re: force garbage collection? (NSAppleScript call from Cocoa app)

2010-09-14 Thread Jerry Krinock
On 2010 Sep 14, at 17:01, Matt Neuburg wrote: > Then it sounds like this is not a Cocoa question, but rather an AppleScript > question. To confirm this, paste your scripts into AppleScript Editor and click "Run". Makes development much easier if you can test your AppleScripts before embedding

Re: Core Data Migration : Splitting an Entity : Source Fetch ?

2010-09-14 Thread Jerry Krinock
On 2010 Sep 13, at 15:38, Jerry Krinock wrote: > …I found that Xcode accepted my input if I set "Source Fetch" to Default and > entered one of these as "Filter Predicate": > >($source.beak != nil) // Bird >($source.beak == nil) // Fish

Core Data : endEntityMapping:manager:error: Sent to different *instance*

2010-09-15 Thread Jerry Krinock
*! Makes it difficult to log a summary based on instance variables. What could be the logic of this? Jerry Krinock Following is an abridged console log when I log the method name, 'self', the 'mapping' parameter and the 'manager' parameter in each of the three m

Re: NSManagedObjectContextDidSaveNotification across MOCs on two threads

2010-09-15 Thread Jerry Krinock
On 2010 Sep 15, at 07:02, Roland King wrote: > Checking the documentation for NSNotificationCenter however I see that the > notifications are processed in the thread in which they were sent, that of > course will be my indexing thread and that's exactly what I was trying to > avoid, updating c

Very Simple Demo: Modal Dialog causes later Modal Session to Crash

2010-09-15 Thread Jerry Krinock
this crash? Thanks, Jerry Krinock @implementation MyAppDelegate - (void)applicationWillFinishLaunching:(NSNotification*)aNotification { NSRunAlertPanel(@"Hello", @"A crash is coming soon.", @"OK", nil,

Re: Very Simple Demo: Modal Dialog causes later Modal Session to Crash

2010-09-15 Thread Jerry Krinock
On 2010 Sep 15, at 18:58, Kyle Sluder wrote: > There's no runloop running yet when -applicationWillFinishLaunching: > is called… Thank you, Kyle. Good explanation. > Among other things, AppKit's automatically-installed autorelease pool hasn't > been installed yet, > Then NSRunAlertPanel is goi

Re: Running Launch Chores, before document open Was: Modal Dialog … Crash

2010-09-16 Thread Jerry Krinock
Agreed; I don't like the idea of having to ensure that no "GUI Things" or "AppKit Stuff" would ever be done in anything I might invoke from -applicationWillFinishLaunching. I could easily forget this, or accidentally invoke someone else's code that might decide to, say, display an error dialog

Re: NSOutlineView auto expand threshold

2010-09-16 Thread Jerry Krinock
On 2010 Sep 16, at 11:46, k...@highrolls.net wrote: > I found a hack in the archives to impose a delay on the auto expand when over > a parent node but was wondering if there is a 'preferred' or 'acceptable' > method of changing the auto expand threshold. If you're looking for a solution to th

Re: Privileged file deletion using BetterAuthSample (factored application) : secure?

2010-09-18 Thread Jerry Krinock
On 2010 Sep 04, at 05:06, Michaël Fortin wrote: > Let me explain my understanding of how BAS works… Please correct me if I'm > wrong. > > My understanding is that the Helper Tool implements a protocol allowing it to > respond to application commands. > In my case I would have a command which t

<    3   4   5   6   7   8   9   10   11   12   >