title: iOS create object
body: <p>I want to create an object called Note . Then I want to assign some values to it's fields and display them in the console to verify that all of this works properly.</p>
  
  <pre><code>       Note.h
  #import &lt;Foundation/Foundation.h&gt;
  
  @interface Note : NSObject
  {
      NSNumber *position;
      NSString *syllable;
  }
  @property(nonatomic, retain)NSNumber *position;
  @property(nonatomic, retain)NSString *syllable;
  @end
  
      Note.m
  
  #import "Note.h"
  
  @implementation Note
  @dynamic position;
  @dynamic syllable;
  @end
  </code></pre>
  
  <p>After this , in another class I want to assign some values to the fields .</p>
  
  <pre><code>-(void) configNote:(Note*)not
  {
      not = [Note alloc];
      [not setPosition:[NSNumber numberWithInt:2]];
      [not setSyllable:@"Twin-"];
  }
  
  
  .....
   Note *note;
  
   [self configNote:note];
  
   NSLog(@" pos : %d syl : %@ ",[[note position] integerValue],[note syllable]); 
  </code></pre>
  
  <p>I tried to use <code>@synthesize</code> instead of <code>@dynamic</code> but still nothing changes . The reason of the error is : <code>-[Note setPosition:]: unrecognized selector sent to instance 0x733d060</code></p>