Why am I getting these errors in the console when debugging in Xcode?

I am creating an application and when I run it, I check the Debug pane, I get these errors. Inside the console:

2009-05-27 07: 18: 03.852 Spark [1228: 10b] [valueForUndefinedKey:]: Projects object is not key to coding for keynotes.

2009-05-27 07: 18: 09.029 Spark [1228: 10b] The value of the error parameter for selecting the key pathIndexPaths of the [entity: Projects] entity (from the associated entity with entity id 726 in the Nib named MainMenu.nib): [valueForUndefinedKey:] : Projects object is not key to coding for keynotes.

This only happens when I bind the textbox value to the NSTreeController selection and to the Notes controller keys, I also notice that when I try to edit the textbox in the app, the Outline View freezes (this happens when the above error shows in the console ). How can I fix this I didn't bind the textbox correctly, here is the picture of the bindings for the textbox: http://snapplr.com/840y

Entity diagram

http://snapplr.com/vqc9

NEW error

**2009-05-27 18:37:41.661 Spark[3957:10b] Unacceptable type of value for attribute: property = "notes"; desired type = NSString; given type = NSConcreteAttributedString; value = Alpha Nine Zeta{
    NSColor = NSNamedColorSpace System textColor;
    NSFont = "MarkerFelt-Thin 16.00 pt. P [] (0x001a7190) fobj=0x00146ef0, spc=4.00";
    NSOriginalFont = "MarkerFelt-Thin 16.00 pt. P [] (0x001a7190) fobj=0x00146ef0, spc=4.00";
    NSParagraphStyle = Alignment 3, LineSpacing 0, ParagraphSpacing 0, ParagraphSpacingBefore 0, HeadIndent 0, TailIndent 0, FirstLineHeadIndent 0, LineHeight 0/0, LineHeightMultiple 0, LineBreakMode 0, Tabs (
    28L,
    56L,
    84L,
    112L,
    140L,
    168L,
    196L,
    224L,
    252L,
    280L,
    308L,
    336L
), DefaultTabInterval 0, Blocks (null), Lists (null), BaseWritingDirection -1, HyphenationFactor 0, TighteningFactor 0.05, HeaderLevel 0;
}.**

      

0


a source to share


3 answers


If a project is selected in your outline view, the text box tries to get value notes from the "selected" item of the treecontroller, which is a project. Since the Project object has no annotations attribute, KVO throws an exception.



Deselect the "Promotes for Invalid Keys" binding option in the "Value" binding of the text box.

+1


a source


You have bound a text box to project notes, but in your model only Taskses have notes. If you want Projectses to have notes, you need to add this property to the Projects object; if you want to bind with Taskses you need to change the path to the key part of the model, possibly before children.notes

.

(Related: These object names must be unique.)



As for the new bug: Text boxes cannot display styled text, only plain text. Create a text view instead.

+1


a source


Second error:

In the textbox attributes, do you have a Rich Text option? it looks like it is sending an NSAttributedString to the Notes property that the NSString is expecting.

Disable this option if installed.

0


a source







All Articles