2009-10-26 38 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,會發生什麼情況;而不是客戶二傳手?