2009-10-26 36 views
0

我在我的Cocoa项目的sdef文件中有一个<property>,我可以让我的Applescripts正确地读取属性,但我无法让它们设置它(我在Applescript Editor中出现错误)。Applescript属性设置器不能正常工作 - howto?

我的sdef粘贴在下面。有没有特殊的财产公约?我原以为它只是- (void) setLength:(NSNumber *)len;。不是吗?

`

<xi:include href="file:///System/Library/ScriptingDefinitions/CocoaStandard.sdef" 
      xpointer="xpointer(/dictionary/suite)"/> 


<suite name="Timer Scripting" code="StTs" 
     description="Commands and classes for Timer"> 

    <command name="createtimer" code="sttscret" description="Create a new timer"> 
    </command> 

    <class name="application" code="smgT" 
      description="Timer application"> 

     <cocoa class="NSApplication"/> 

     <property name="length" 
        code="tlen" 
        type="integer" 
        access="rw" 
        description="length of timer in seconds"/> 

     <responds-to name="createtimer"> 
      <cocoa method="createTimer:"/> 
     </responds-to> 
    </class> 
</suite> 

`

谢谢!

+1

你会得到什么错误? – 2009-10-26 03:29:09

回答

0

也许这是释放/保留问题?

如果您只是使用@synthesize length,会发生什么情况;而不是客户二传手?