Page 8 of 8 FirstFirst ... 678
Results 71 to 79 of 79

Thread: DMplugin Controls

  1. #71
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,541

    Default

    In fact it is stored there as the value of the control (self.ccontrol.value) right before you update it (self.ccontrol.hardwareValue = value)
    Ron
    No support through PM

  2. #72
    Join Date
    Mar 2005
    Posts
    724

    Default

    perfect that works I would not have thought that was stored

    Thanks,
    Yonu

  3. #73
    Join Date
    Mar 2005
    Posts
    724

    Default

    Ok one more for you

    If I use control.dtype = Promixis.Control.BUTTON; in the plugin js to create a button. How can I change the value I have tried this but it doen't work

    Code:
    		var control = new Promixis.Control(device);
    		control.name = "Momentary button";
    		control.internalId = "b1";
    		control.value = "MB";
    		control.dtype = Promixis.Control.BUTTON;
    Thanks,
    yonu

  4. #74
    Join Date
    Mar 2005
    Posts
    724

    Default

    in the control.lua of a plugin is it possible to have one device update another I am trying to figure out how to reset the simmer device to 0 when off and 100 when on when controlled from the toggle device but I can't seem to find the dimmer value in the self tables.

    Thanks,
    Yonu

  5. #75
    Join Date
    Mar 2005
    Posts
    724

    Default

    ok I figured I would bring this topic back up rather than start a new one I am trying to add the ability to add new controls to one of my plugins. However I get now new control then I hit ok in the new control.ui

    here is my newcontrol function I am hoping I have missed something

    Code:
    Plugin.prototype.newControl = function ( device, parent, manager ) {
    
            parent.windowTitle = "Add Control";       
            var ui = gir.ui("devices/newControl.ui", parent);  // you have to make this! 
    
            var control = new Promixis.Control(device);
            control.name = "Label";
            control.internalId = "";
            control.dtype = Promixis.Control.LABEL;
    
            ui.widget.cancelButton.clicked.connect( function () {
                ui.close();
            });
            
            ui.widget.okButton.clicked.connect( function () {
    			control.name = control.name + ui.name.text;	
    			control.internalId = control.internalId + ui.name.text;
    			manager.saveDevice(device, "UI");
                ui.close();
            });
            
            return ui;
    Thanks,
    Yonu

  6. #76
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,541

    Default

    Can you zip up that whole plugin and attach it I'd like to see what is going wrong.
    Ron
    No support through PM

  7. #77
    Join Date
    Mar 2005
    Posts
    724

    Default

    sure here is the zip file

    devices.zip


    Thanks,
    Yonu

  8. #78
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,541

    Default

    Alright, found the trouble. I've attached the updated js file. Basically you were creating an child object of device which in this case is not correct ( it's a long story, has to do with the separation of core and UI ).
    Attached Files Attached Files
    Ron
    No support through PM

  9. #79
    Join Date
    Mar 2005
    Posts
    724

    Default

    that worked and once I looked at what you changed I see what I had done wrong

    Thanks,
    Yonu

Page 8 of 8 FirstFirst ... 678

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •