Re: Invalidated managed objects

2010-04-03 Thread Gideon King
Ah, so when it says "the method must derive the reference object from the managed object’s values" it is talking about the managed object's persisted values. So I could get rid of my extra attribute in my managed object class and just set my UUID using a method similar to what you define below,

Re: Invalidated managed objects

2010-04-03 Thread Ben Trumbull
On Apr 3, 2010, at 9:44 PM, Gideon King wrote: > Excellent, thanks for that. I thought that once a managed object ID had been > assigned, that newReferenceObjectForManagedObject: should always return the > same value, so I was regenerating it from the previous data instead of > generating a ne

Re: Two text fields, one outlet?

2010-04-03 Thread Charles Srstka
On Apr 3, 2010, at 6:22 PM, Jenny M wrote: > Is it possible to link multiple NSTextFields to one outlet? I have > three views - one of A items, one of B items, and one of both A and B > items. So the text boxes in the A view also exists in the A&B view, > and the value needs to be able to appear i

Re: Invalidated managed objects

2010-04-03 Thread Gideon King
Excellent, thanks for that. I thought that once a managed object ID had been assigned, that newReferenceObjectForManagedObject: should always return the same value, so I was regenerating it from the previous data instead of generating a new one if it either had a temporary object id or no object

Re: Invalidated managed objects

2010-04-03 Thread Ben Trumbull
On Apr 3, 2010, at 6:25 PM, Gideon King wrote: > Phew, that's a relief. I'll look forward to hearing what I'm doing wrong in > my sample project then. > > Regards > > Gideon > > On 04/04/2010, at 11:22 AM, Ben Trumbull wrote: > >> >> On Apr 3, 2010, at 5:07 PM, Gideon King wrote: >> >>> W

Re: Two text fields, one outlet?

2010-04-03 Thread Jens Alfke
No, an outlet is a single variable that can point to only one object at a time. (You can't use NSArrays as outlet values.) you'll need multiple outlets, or one view you move between two superviews. --Jens {via iPad} On Apr 3, 2010, at 4:22 PM, Jenny M wrote: > Is it possible to link multiple

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

2010-04-03 Thread Jens Alfke
Ken, he asked for a reference that wouldn't break if the file were moved or renamed. Neither FSrefs nor URLs have that property. Brad, what you want is a bookmark (in 10.6) or an alias reference. Aliases didn't have a Cocoa API until 10.6, but the procedural API isn't hard to use. --Jens {via

Re: Invalidated managed objects

2010-04-03 Thread Gideon King
Phew, that's a relief. I'll look forward to hearing what I'm doing wrong in my sample project then. Regards Gideon On 04/04/2010, at 11:22 AM, Ben Trumbull wrote: > > On Apr 3, 2010, at 5:07 PM, Gideon King wrote: > >> Wow, this is huge! Obviously the user doesn't expect the document to >>

Re: Invalidated managed objects

2010-04-03 Thread Ben Trumbull
On Apr 3, 2010, at 5:07 PM, Gideon King wrote: > Wow, this is huge! Obviously the user doesn't expect the document to > disappear and a new one open up just because they did a Save As operation I have I'm afraid led you astray. The invalidated objects are not coming from the Save As operation

Re: Invalidated managed objects

2010-04-03 Thread Gideon King
Wow, this is huge! Obviously the user doesn't expect the document to disappear and a new one open up just because they did a Save As operation, so I would have to go through every single part of the application, work out every reference to a managed object, and either throw them away or fetch ne

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

2010-04-03 Thread Brad Stone
Very interesting. According to the documentation if I want to store the reference and want it to persist after a reboot I need to do a bookmark. You should not store or archive file reference URLs. A file’s ID may be different for different boots of the operating system. If you need to store

Two text fields, one outlet?

2010-04-03 Thread Jenny M
Is it possible to link multiple NSTextFields to one outlet? I have three views - one of A items, one of B items, and one of both A and B items. So the text boxes in the A view also exists in the A&B view, and the value needs to be able to appear in both, though not at the same time. I have a method

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

2010-04-03 Thread Ken Thomases
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 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 fi

Re: What is the runtime context of an event tap?

2010-04-03 Thread Ken Thomases
On Apr 3, 2010, at 5:16 PM, Pat Wilson wrote: > When an event tap is created using CGEventTapCreate, which process, or thread > actually runs the callback function? The one which created the tap, the first > responder, ...? The first responder isn't a thread, process, or runtime/execution conte

Re: Invalidated managed objects

2010-04-03 Thread Quincey Morris
On Apr 3, 2010, at 12:05, Ben Trumbull wrote: > The canonical solution is to tell your controller objects like > NSArrayController to refetch from the new document. It sounds like you're > fighting the document based Save As behavior. It's "close the existing > document, save the current sta

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 ma

What is the runtime context of an event tap?

2010-04-03 Thread Pat Wilson
When an event tap is created using CGEventTapCreate, which process, or thread actually runs the callback function? The one which created the tap, the first responder, ...? Thanks in advance, Pat. -- Pat Wilson mailto:p...@ieee.org ___ Cocoa-dev

Re: NSPredicate/NSExpression - can they solve this Core Data problem?

2010-04-03 Thread Ben Trumbull
They are noted in the NSExpression.h header with API to create them and a comment to their functionality. - Ben > Is the use of SUBQUERY() documented anywhere? The only mention I've seen of > it is in the reserved keywords section of the Predicate Format String Syntax > guide. > > Dave > >

re: Invalidated managed objects

2010-04-03 Thread Ben Trumbull
> When I create a document, save it, then save as, then save as again, it > duplicates the persistent store, so the managed objects I have been using in > my application are all invalidated. > > Now there are a whole lot of places in my application where I have KVO set up > on properties of th

re: iPhone CoreData TableView not updating

2010-04-03 Thread Ben Trumbull
> I did the first 7 chapters of "More iPhone 3 Development, tackling iPhone > SDK3" from Apress regarding the use of CoreData. In these 7 chapters a lot is > explained and finally a series of classes and categories are being build that > one can use as a Generic Controller for editing data store

Re: CGPoint and KVO

2010-04-03 Thread Clark S. Cox III
The main issue with the original code is that it assumes that the value is a CGPoint. If it were anything smaller, you'd get garbage values in your point, and if it were any larger, you'd be stomping on memory as you ran off the end of your CGPoint variable. Any time you use -[NSValue getValue:

Re: CGPoint and KVO

2010-04-03 Thread Roland King
Thanks pointValue didn't work on iPhone OS but CGPointValue did, luckily, as that's the one I needed. That seems to be a UIKit extension. I've switched to that. was my original method (apart from being clunky) wrong? It did work. On 03-Apr-2010, at 10:43 PM, Kiel Gillard wrote: > On 04/04/2

Re: CGPoint and KVO

2010-04-03 Thread Kiel Gillard
On 04/04/2010, at 1:40 AM, Roland King wrote: > I have a property which is a CGPoint and I'm observing it. I didn't really > know what to expect in the change dictionary (I have NSKeyValueObservingOld > as the observation flags) so I stuck in a breakpoint and went looking. After > messing about

CGPoint and KVO

2010-04-03 Thread Roland King
I have a property which is a CGPoint and I'm observing it. I didn't really know what to expect in the change dictionary (I have NSKeyValueObservingOld as the observation flags) so I stuck in a breakpoint and went looking. After messing about in the debugger when the property was changed I found

Re: iPhone CoreData TableView not updating (solved)

2010-04-03 Thread Arnold Nefkens
I found it: The .h was @interface AdresViewController : UITableViewController. I changed this to @interface AdresViewController : UIViewController and it now does work... ;-) On 3 apr 2010, at 06:08, Arnold Nefkens wrote: > Hello List, > > I'm a newbie on iPhone Programming, so please bear

Re: Terminating subtasks reliably

2010-04-03 Thread Dave Keck
> Call getppid, set up the kevent listener, then before you actually > block in kevent, call getppid *again*. If the answer matches the first > call, then you can go ahead and call kevent. If the answer doesn't > match, you've hit the race condition you outline here, your parent is > dead, and you

NSXMLElement and namespaces

2010-04-03 Thread Nathan Day
Can anybody help me understand how namespaces works with NSXMLNode etc. There is the method + [NSXMLNode elementWithName:(NSString *)name URI:(NSString *)URI] Which takes an namespace URI, but doesn't seem to use it. I have seems an example from google where they pass the namespace URI and th