Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Difficulty setting up an enumeration



Hi-

I am beginning to implement scripting support on the cocoa application I am building with Xcode 2.5 on 10.4.

I have some properties working, but now I am horribly stuck for hours on what should be so basic a feature--a custom enumeration in my sdef file for a property.

Here is my code for the property:

<enumeration name="mystates" code="SHPS">
<enumerator name="on time" code="ONTM" description="On time."/>
<enumerator name="almost late" code="ALLT" description="Almost late."/>
<enumerator name="late" code="LATE" description="Late."/>
<enumerator name="on time promised" code="OTPR" description="On time (promised)."/>
<enumerator name="late promised" code="LTPR" description="Late Promised."/>
</enumeration>


<property name="shippingstatus" code="STAT" type="mystates"
	description="The shipping status of an order.">
	<cocoa key="shippingStatus"/>
</property>


When I run it, my run log shows this error:

.sdef warning for attribute 'shippingStatus' of class 'order' in suite 'Scheduler Suite': 'mystates' is not a valid type name.

I notice that if I view the sdef as an applescript dictionary and look at the shippingstatus property, instead of showing the enumerated names, it just says
"shippingstatus (mystates) : The shipping status of an order."


Any ideas why I can't make this simple enumeration in my sdef?

I humbly thank you
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-implementors/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.