Re: Strange Core Data problem after upgrade
Hi, Problem A, Yes, all classes are set correctly in the data modeller. Also, regarding problem B, this is getting stranger. If I set the type of the variable to int 32 in the modeller and NSNumber in the class and then assign it a value using [entity value:forKey] it works just fine. But if I add an NSTextField to IB and bind it to that property, it fails with the stringValue error. If, on the other hand, I set the type to string, on the modeller and on the class, IB will work just fine. This makes me think that somewhere IB isn't converting from string to integer, but I don't remember having to set that manually. Rui 2009/10/7 Volker in Lists volker_li...@ecoobs.de Hi, problem A: have you made sure you have set the class in the data modeler correctly for that ManagedObject? When googling for your error message I do receive such problems that were fixed by setting the proper custom class name. Cheers, Volker -- Best regards, Rui Pacheco ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Strange Core Data problem after upgrade
Hi, you need to add a NSNumberFormatter to the text field. Number/String conversion does not happen automatically. Volker Am 08.10.2009 um 13:49 schrieb Rui Pacheco: Hi, Problem A, Yes, all classes are set correctly in the data modeller. Also, regarding problem B, this is getting stranger. If I set the type of the variable to int 32 in the modeller and NSNumber in the class and then assign it a value using [entity value:forKey] it works just fine. But if I add an NSTextField to IB and bind it to that property, it fails with the stringValue error. If, on the other hand, I set the type to string, on the modeller and on the class, IB will work just fine. This makes me think that somewhere IB isn't converting from string to integer, but I don't remember having to set that manually. Rui ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Strange Core Data problem after upgrade
True, that seems to be the problem. Is this new? I've another NSTextField bound to a property of type NSNumber that works perfectly and I'm not doing any conversion. The one that works was added while I was still using 10.5 and the one that doesn't was added while using 10.6. 2009/10/8 Volker in Lists volker_li...@ecoobs.de Hi, you need to add a NSNumberFormatter to the text field. Number/String conversion does not happen automatically. Volker Am 08.10.2009 um 13:49 schrieb Rui Pacheco: Hi, Problem A, Yes, all classes are set correctly in the data modeller. Also, regarding problem B, this is getting stranger. If I set the type of the variable to int 32 in the modeller and NSNumber in the class and then assign it a value using [entity value:forKey] it works just fine. But if I add an NSTextField to IB and bind it to that property, it fails with the stringValue error. If, on the other hand, I set the type to string, on the modeller and on the class, IB will work just fine. This makes me think that somewhere IB isn't converting from string to integer, but I don't remember having to set that manually. Rui -- Best regards, Rui Pacheco ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Strange Core Data problem after upgrade
Hi, I had to do that in 10.5 - I think - but that is vague memory collected by my sieve-brain - it wasn't like that in 10.4. Volker Am 08.10.2009 um 15:07 schrieb Rui Pacheco: True, that seems to be the problem. Is this new? I've another NSTextField bound to a property of type NSNumber that works perfectly and I'm not doing any conversion. The one that works was added while I was still using 10.5 and the one that doesn't was added while using 10.6. ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Strange Core Data problem after upgrade
Hmmm. My model now has one property that needs no conversion to go from NSTextField to NSNumber and one that does. I'll try to do some more research. 2009/10/8 Volker in Lists volker_li...@ecoobs.de Hi, I had to do that in 10.5 - I think - but that is vague memory collected by my sieve-brain - it wasn't like that in 10.4. Volker Am 08.10.2009 um 15:07 schrieb Rui Pacheco: True, that seems to be the problem. Is this new? I've another NSTextField bound to a property of type NSNumber that works perfectly and I'm not doing any conversion. The one that works was added while I was still using 10.5 and the one that doesn't was added while using 10.6. -- Best regards, Rui Pacheco ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Strange Core Data problem after upgrade
Hi, problem A: have you made sure you have set the class in the data modeler correctly for that ManagedObject? When googling for your error message I do receive such problems that were fixed by setting the proper custom class name. Cheers, Volker ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Strange Core Data problem after upgrade
On Wed, Oct 7, 2009 at 9:25 AM, Rui Pacheco rui.pach...@gmail.com wrote: I am now seeing the error Failed to call designated initialiser on NSManagedObject class '' when I created an object on the MOC or when I fetch an object for editing. Step by step debugging showed that what seems to generate the error is when I display the screen that allows the user to interact with the data and not when I interact with the MOC in any way. This is code that worked just fine under 10.5. Have you subclassed NSManagedObject and overridden -initWithEntity:insertIntoManagedObjectContext:? If you have: 1) Do you really need to? 2) If you do, have you called super's implementation? --Kyle Sluder ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Strange Core Data problem after upgrade
On Wed, Oct 7, 2009 at 12:13 PM, Rui Pacheco rui.pach...@gmail.com wrote: Should overrideĀ -initWithEntity:insertIntoManagedObjectContext: ? I would not recommend doing so. I was merely asking because it seemed like that might be what you are doing, and if it was I would advise against it. Also, please keep discussions on-list unless you have a deliberate reason to take it off-list. It's kind of frustrating for everyone following along for the thread to apparently just die. --Kyle Sluder ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com