[A]nd then it occurred to me that a computer is a stupid machine with the
ability to do incredibly smart things, while computer programmers are smart
people with the ability to do incredibly stupid things. They are, in short, a
perfect match. ~Bill Bryson
On Feb 22, 2011, at 11:42 PM, Quincey
That's a lot of information you posted. :)
Unfortunately, *based on the posted information* there's nothing obviously
wrong except that you've shot yourself in the foot using the debugger. Let's
look, for example, at what one of the backtraces is telling you. You triggered
this by typing 'po s
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 = [[
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 which
On Feb 22, 2011, at 12:21, Brad Stone wrote:
> I'm assuming since I can successfully change the string in category my
> reference to [self note] is OK.
This is an absolutely false assumption. If, as I'm hypothesizing, [self note]
is returning a zombie object (or it becomes a zombie object after
The category gets changed properly:
(gdb) po [self note]
uid:319991742678124
category:HELLO WORLD
isEncrypted:0
(gdb) po thisNote
Then, after I try to set isEncrypted to [NSNumber numberWithBool:YES] I get
this after I po thisNote.
I'm assuming since I can successfully change the string in
On Feb 22, 2011, at 3:19 PM, 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 within an accessor of another property?
Could you post the stack trace? Just for debugging purposed: What happens if
you define
On Feb 22, 2011, at 10:10, Brad Stone wrote:
> 2) I'm using garbage collection
Also, it's worth checking that you really have garbage collection turned on.
It's easy mistake to turn it on in the project build settings and not realize
that the target settings turn it off. The symptoms you've bee
On Feb 22, 2011, at 10:10, Brad Stone wrote:
> 2) I'm using garbage collection
Then my money's on a memory management error with the [self note] object. Can
you show the code for [self note] and/or show the strong reference that keeps
it alive?
___
Quincey,
Thanks for relying. It's good to have another developer to talk this thru with.
1) customer accessors for isEncrypted didn't work (I have a set exactly like
category)
2) I'm using garbage collection
3) I tried [note isEncrypted] same error
4) i tried using a local ivar i..e Note *thisN
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 within an accessor of another property?
>
> this code in main.m
> [[self note] setValue:@"HELLO WORLD" forKey:@"category"];
> NSNumb
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
>> {
>>
On 22.02.2011, at 16:13, Brad Stone wrote:
> FYI - my managedObject is defined as such:
>
> @interface Note : NSManagedObject
> {
> }
That's probably not your problem, but just to eliminate it as a cause: You
should prefix your class names. Apple has been known to create internal private
cla
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)
- (NSS
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]
valu
15 matches
Mail list logo