• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
undo prepareWithInvocationTarget KVC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

undo prepareWithInvocationTarget KVC


  • Subject: undo prepareWithInvocationTarget KVC
  • From: Steven Spencer <email@hidden>
  • Date: Sun, 3 Jul 2005 01:18:20 +0100

Hello,

In my project, the following line of code works :

[[[self undoManager] prepareWithInvocationTarget:[myArray objectAtIndex:0]] setTarget:@"Hello"];

   myArray is an NSArray containing instances of class myObj.
   Class myObj has two methods :

   - (void)setTarget:(NSString *)aString;
   - (NSString *)target;

   myArray is bound to a tableview column.


When I replace the line with :

[[[self undoManager] prepareWithInvocationTarget:[myArray objectAtIndex:0]] setValue:@"Hello" forKey:@"target"];

the following errors can occur :

sigsev,
sigbus,
[<NSCFString 0x33d950> valueForUndefinedKey:]: this class is not key value coding-compliant for the key target.


Does anyone know why it's looking for the key "target" in a string instead of a myObj instance ?


The error occurs after the prepareWithInvocationTarget code has run, when a new row is selected in the tableview.


Thanks for any insight.

  - Steve Spencer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: undo prepareWithInvocationTarget KVC
      • From: Steven Spencer <email@hidden>
  • Prev by Date: Re: NSTableView & different columns
  • Next by Date: Core Data & Bindings & dynamic contents - newbie question
  • Previous by thread: Re: gcc2 on 10.4.1 with Xcode 2.1 installed
  • Next by thread: Re: undo prepareWithInvocationTarget KVC
  • Index(es):
    • Date
    • Thread