Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.Settable.validate()


                // NOTE: We used to catch exceptions here and issue
                // a warning only, but this has the side effect of blocking
                // the mechanism in PtolemyQuery that carefully prompts
                // the user for corrected parameter values.
                try {
                    param.validate();

                    // Also validate derived objects.
                    Iterator derivedParams = ((NamedObj) param)
                            .getDerivedList().iterator();
View Full Code Here


                    Iterator derivedParams = ((NamedObj) param)
                            .getDerivedList().iterator();

                    while (derivedParams.hasNext()) {
                        Settable derivedParam = (Settable) derivedParams.next();
                        derivedParam.validate();
                        parametersValidated.add(derivedParam);
                    }

                    if (param instanceof SharedParameter) {
                        parametersValidated.addAll(((SharedParameter) param)
View Full Code Here

        // validate all settable attributes.
        Iterator attributes = attributeList(Settable.class).iterator();
        while (attributes.hasNext()) {
            Settable attribute = (Settable) attributes.next();
            attribute.validate();
        }
        // preinitialize protected variables.
        _currentTime = getModelStartTime();
        _stopRequested = false;
        // preinitialize all the contained actors.
View Full Code Here

                        // are not notified.  Since the original
                        // value was invalid, it is not acceptable
                        // to skip notification in this case.  So
                        // we force it.
                        try {
                            attribute.validate();
                        } catch (IllegalActionException ex) {
                            change.setErrorReported(false);
                            changeFailed(change, ex);
                        }
                    }
View Full Code Here

                // is not represented in a string.
                request = new ChangeRequest(this, name) {
                    protected void _execute() throws IllegalActionException {
                        char[] password = getCharArrayValue(name);
                        ((PasswordAttribute) attribute).setPassword(password);
                        attribute.validate();

                        Iterator derived = ((PasswordAttribute) attribute)
                                .getDerivedList().iterator();

                        while (derived.hasNext()) {
View Full Code Here

                // set its value directly.
                request = new ChangeRequest(this, name) {
                    protected void _execute() throws IllegalActionException {
                        attribute.setExpression(getStringValue(name));

                        attribute.validate();

                        /* NOTE: Earlier version:
                         // Here, we need to handle instances of Variable
                         // specially.  This is too bad...
                         if (attribute instanceof Variable) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.