mostafa slama wrote:
> 
> can any one please , tell me how to make a parameter
> appear as a drop down list in an actor
> as in round actor
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/
> 
> ----------------------------------------------------------------------------
> Posted to the ptolemy-hackers mailing list.  Please send administrative
> mail for this list to: [EMAIL PROTECTED]

The easierst  way is to do this in the MoML code using the Style
classes.

See as an example the MathFunction

ptII/ptolemy/actor/lib/test/auto/MathFunction.xml

Here a list is assigned to parameter function.using the ChoiceStyle

Basically you only need to add the part of the Choice and the available
choices.

        <property name="function"
class="ptolemy.kernel.util.StringAttribute" value="log">
            <property name="style"
class="ptolemy.actor.gui.style.ChoiceStyle">
                <property name="exp"
class="ptolemy.kernel.util.StringAttribute" value="exp">
                </property>
                <property name="log"
class="ptolemy.kernel.util.StringAttribute" value="log">
                </property>
                <property name="square"
class="ptolemy.kernel.util.StringAttribute" value="square">
                </property>
                <property name="sqrt"
class="ptolemy.kernel.util.StringAttribute" value="sqrt">
                </property>
                <property name="modulo"
class="ptolemy.kernel.util.StringAttribute" value="modulo">
                </property>
            </property>
        </property>

Regards,

        Bart Kienhuis

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to