Dynamically create (and reference) dialog groups

I am installing a dialog window that can be easily added to via a CSV file.  The only problem I encountered is; I'm not sure how to create groups dynamically.  Basically, script upward configurations a bunch of texture features and then gives the possibility to save or delete this feature.  Here's the basic idea of what I'm trying to do, but the groups are not able to be created in the way that they are presented:

featArray = [];
featArray[0] = new Array("Feature Display Name","feature sub-group",'texture',"feature action",'feature type');
featArray[1] = new Array("Feature2 Display Name","feature2 sub-group",'texture',"feature2 action",'feature2 type'); //etc.

for(var z in featArray) {
    if(featArray[z][2] == 'texture') {
        w.p1.sp1.add('statictext',undefined,featArray[z][0]);
        w.p1.sp1.g[z] = w.p1.sp1.add('group');
        w.p1.sp1.g[z].orientation = 'row';
        w.p1.sp1.g[z].add('checkbox',undefined,'Save');
        w.p1.sp1.g[z].add('checkbox',undefined,'Strip');
        w.p1.sp1.g[z].children[0].id = featArray[z][0].toLowerCase() + "-save";
        w.p1.sp1.g[z].children[1].id = featArray[z][0].toLowerCase() + "-strip";
    }
}

If you change the [z] g in g1, it will create each field correctly (visually), but has no way to good reference check boxes to see which are checked.  Any ideas how, or even if, it is possible to dynamically create a different group for each line of the featArray?  And if so, how then referencing the boxes in these groups later?  Thanks in advance for any help!

You must store the locations in a table IE: -.

featArray = [];
featArray[0] = new Array("Feature Display Name","feature sub-group",'texture','feature group','feature type');
featArray[1] = new Array("Feature Display Name2","feature sub-group2",'texture','feature group2','feature type2'); //etc.
var w = new Window('dialog','test');
w.p1= w.add("panel", undefined, undefined, {borderStyle:"black"});
var x = new Array();
var count =0;
for(var z in featArray) {
    if(featArray[z][2] == 'texture') {
        w.p1.add('statictext',undefined,featArray[z][0]);
w.p1.g = w.p1.add('group');
w.p1.g.orientation = 'row';
x[count] = w.p1.g.add('checkbox',undefined,'Save');
count++;
x[count] = w.p1.g.add('checkbox',undefined,'Strip');
count++
    }
}
w.test = w.add('button',undefined,'Press to Test');
w.add('button',undefined,'Cancel');
w.test.onClick=function(){
for(var w =0;w 

Tags: Photoshop

Similar Questions

  • dynamically create and addEventListener on the mouse, click

    Hi, I have 9 buttons on the main stage and each has an incremented instance P0001, P0002, P0003 name...

    I'm trying to dynamically create and addEventListener on mouse click for each call, then the function appropriate when the button is clicked, it is I who does not work, I go about it the wrong way? Thank you

    for (var i: int = 1; i < 10; i ++) {}

    var btn1:String="P000"+i.toString();

    var btn11:Object = btn1;

    var ClickBtn:String="Func"+i.toString();

    btn11.addEventListener (MouseEvent.CLICK, ClickBtn);

    i = i + 1;

    }

    function ClickBtn1(event:MouseEvent):void

    {

    trace ("in it1");

    }

    function ClickBtn2(event:MouseEvent):void

    {

    trace ("in it2");

    }

    ......

    Use:

    for (var i: int = 1; i<10; i++)="">

    This ["P000" + String (i)] .addEventListener (MouseEvent.CLICK, this ["ClickBtn" + String (i)]);

    }

  • dynamically create and destroy the custom menu item

    I have a standard TestStand platform that I use on multiple systems.  On some systems, I have a few sequences of calibration and I would like to have the Update menu to have the RunSequence of these sequences of calibration.  I know how to manually create these menu items, but they are no longer valid for some sequence files.  I would use the sequence SequenceFileLoad to dynamically create menu items and the SequenceFileUnload to destroy these menu items.

    I've played around with the API, but cannot determine the correct path to get to the create and destroy the custom menu items.  Does anyone know how this can be done?

    Thank you

    Matthew

    Yes, see the online help for the members of the following APIs:

    Engine.GetEditTimeToolMenuItems

    EditTimeMenuItems

    EditTimeMenuItem

    Basically, you get a collection of tool using Engine.GetEditTimeToolMenuItems () menu items and then call EditTimeMenuItems.Insert () or EditTimeMenuItems.Remove (). If you insert a you get returns an EditTimeMenuItem object on which you can change the settings.

    In addition, since it has an expression to hide items in menu tool, you need not necessarily to destroy, you can hide them instead.

    Hope this helps,

    -Doug

  • dynamically create and bind datamodel and listview

    Hello

    I looked through forums and examples, but in all the listview/datamodel example are linked since the start of the application only. I need to create and link dynamically. Because my data listview will depend on the selection of the previous shape. Need to do using qml. Can someone help me?

    I have not seen that your souce code can only guess the possibility.

    You have set the query, like "query:" / xxx/yyy "? You can add the journal to your custom data source to check the loop iteration of data?

    If you can show your brief source code, it willl be quick analysis.

  • The dynamic Types and Inventory Item Grouping

    Hello

    I'm provisioning different types of objects using dynamic Types and vCAC 6.1. In the tab "Items" vCAC, all objects of type dynamic are grouped under a kind of left, "Dynamic Types".

    For an example, I'm provisioning two dynamic types:

    -Volumes of block Vipr

    -View horizon 6 workstations

    If I set one of each of these types, they are both grouped under "Dynamic Types" in the agenda of the inventory tab. Is it possible to have all of these types under different groups? So, the volumes of vipr go "block Volumes; and work stations go under 'VDI Desktops'?

    I have attached a screenshot, and you can see that the volume 'Test vCO DT' block and the Office of vdi "Win7vCAC-v012" are both under the group "Dynamic Types" on the left. I want to separate these is easier for a user to view their items commissioned by type.

    I have custom resources defined for each of these dynamic types, but it still doesn't seem properly the group.

    Thank you

    Well, for someone who wants to know... you can do this via the DB unit.

    You need to add a new type of parent to the cat_resourcetype table, and then associate your custom and dynamic type in this same table with the parent in the parent_id field.

  • Dynamically create and assess controls.

    I have an ArrayCollection collection in my application that I use to dynamically create controls for.  Each row of the table must create four controls.  The following code is what I used to create the items.  Problem is that I don't know how to evaluate when the time comes to deal with the values entered in each control.

    for (i = 0; i < model.) BudgetDetails.length; i++){
    If (i > 0) {}
    offset = offset + 25;
    }

    var TmpName1:Label = new Sun;
    TmpName1.text = modΦle. BudgetDetails [i]. BudgetCategory;
    TmpName1.name = "Label" + i;
    TmpName1.x = 5;
    TmpName1.y = offset + 6;
    TmpName1.width = 200;
    TmpName1.styleName = "LabelRightAlign";
    addElement (TmpName1);

    var TmpName2:TextInput = new TextInput();
    TmpName2.text = modΦle. BudgetDetails [i]. BudDesc;
    TmpName2.name = "Input_BudDesc" + i;
    TmpName2.x = 215;
    TmpName2.y = offset;
    TmpName2.width = 200;
    TmpName2.styleName = "TextInput_Desc";
    addElement (TmpName2);

    etc...

    }

    It works very well to create the controls, but I don't know how to loop through the controls to find the values entered into the TextInput controls.  I have to either assign names to controls before I create or I need to know how a loop on all of the items on my page.

    Well, it is not the most elegant solution out there, but it does not work...

    Code to delete the dynamically created controls *.

    var MyNumElements:int = numElements;          numElements decreases every time you delete an element

    var x: Object;

    var CurrentElement:int = 0;                              elements becomes the they are deleted

    for (i = 0; i< mynumelements;="">

    x = getElementAt (CurrentElement);

    TMPNAME = x.name;

    TMPNAME = tmpname.substring (0, 5);

    If (tmpname == 'Label' | tmpname == "Input") {}

    removeElementAt (CurrentElement);

    } else {}

    CurrentElement = CurrentElement + 1;

    }

    }

    Enter code to inspect the text controls *.

    for (i = 0; i< numelements;="">

    x = getElementAt (i);

    TMPNAME = x.name;

    TMPNAME = tmpname.substring (0, 5);

    If (tmpname == "Input") {}

    DoMyStuffHere

    }

    }

    Deletion of items was a little complicated numElements declines because by one whenever you remove an item that mess up your loop counter.  Also items get becomes the they are deleted.  Please also make sure that all THE OTHER ELEMENTS on your form are not named with the same string as the most dynamic. In my case, I named everything with Labelxxx or Input_xxx if all the other names had ti be assigned.  For example, I had a few other labels in my module so I had to name them.  Oh... an id is not the same as a name either!  (learned that the hard way...)

    If you have any suggestions on how to make code that dynamically adds, removes or inspects more elegant controls, please let me know!

  • Can I dynamically create and disseminate a JAD file?

    I have not tried yet but wanted to know if it is possible:

    I want to create a JAD file on the fly, but do not want to store on my web server, so I was wondering if I could create the JAD on the fly and at the same time send to the client requesting it:

    .. out.println( "RIM-COD-URL-1: MyApp.cod");out.println( "RIM-COD-Size-1: 15000");
    out.close();..
    

    Also, I have a full path as the location of the .cod?

    .. out.println( "RIM-COD-URL-1: /blackberryapplication/cods/MyApp.cod");out.println( "RIM-COD-Size-1: 15000");
    out.close();..
    

    No, you must be able to reach the URL in jad for cod.

    but you can go further and make COD links in the generated jad ALSO go through a servelet that writes binary data.  You need to set the MIME types and all well thought.

  • Create the reference coordinate system

    ? Need help to dynamically create a reference guide.  Use the Vision Assistant these constant reference of basic places are created automatically. I can't find any real documentation of the code examples on how to do it dynamically.  See picture attached and the ZIP file for more details.  Thanks in advance!

    Label08.PNG must be perfect

    Label10.PNG will show flaws

    Locations of base generated by the Vision Assistant

    Run the sample code Label_GoldenTemplate_L8.vi

    This code illustrates the configuration and the use of the Golden dynamic reference coordinate system model inspection.  Template_L8.PNG was created from Label08.png.

    Update of the coordinate system: Location of Template_L8.png suitable for any image of the label. It's dynamic to each new image.

    Get the coordinate system: Location of the model when the patterns matched with Label08, png (reference). It is static for each image of the future label.

    Code is a bit "messy" because it was generated using NI Vision.

  • When dynamically created variables are emptied in the sequential process template?

    I have a sequence TestStand 2014 in which I dynamically create and fill many FileGlobal variables in the installation section of my main sequence.  I have it using the TestStand API to read the data in an Excel file (the data consists mainly of thresholds, limits, etc.).  The methodology itself works flawlessy.

    However, there are differences in behavior when using entry points both execution of the sequential process model.  When you use the entry point of execution 'Single Pass', he has no problem in test a DUT after another.  However, when you use the entry point for execution "Test DUT", I encounter the following error after completing of DUT1 and DUT2 testing:

    An error occurred the call 'InsertSubProperty' in 'PropertyObject' of 'NI TestStand 2014 API.

    The name of the element "VariableName" is not valid because it is already in use.

    I interpret this error message means that the variable I am trying to dynamically create the DUT2 track is already present race of DUT1.  I have a few questions about this:

    1. at what point in the sequential process template are dynamically created variables flushed, such as run a further by using 'Single Pass' starts with a clean slate?

    2. is there a reminder that I can substitute such as variables to rinse after each HAD run, allowing me to dynamically create variables on each HAD, during execution using "Test UUT?

    3. better yet, is there a counter of TestStand I can query to determine if I already ran DUT1 when using "Test DUT", such as DUT2 uses the variables that were created dynamically on trail of DUT1?

    Or you can simply use the PropertyExists function as a precondition.

    PropertyExists ("Locals.Foo")

  • Dynamically create a single charger

    Hello

    I have a table of external images that I'm loading and the number of external images is variable, so I want to be able to create loaders to load them into the neeeded.  Is it possible to dynamically create and name in a unique way a charger running?  for example

    var 'imageLoade' + i: Loader = new Loader;

    If not is there a way to transmit image content out of so that it will remain loaded if the loader is used to load other images?

    I would appreciate any advice you may have on the subject.

    Best regards

    Chris McLaughlin

    :

    var tl:MovieClip =;

    TL ["imageLoade" + i] = new Loader();

  • Time of design and of the dynamically created controls

    I have a project written in VC6 as a project of the MFC dialog box. In a particular area, I dynamically create several (the exact number depends on user input) CNiGraphs. There is also a two CNiButtons that were created at design time using the resource editor. The problem I have is that when this dialog box is open, a message appears saying it is an eval version and the control will go off after 5 minutes. After 5 minutes of waiting, the CNiButtons 2 go inactive (black tower), but the continuous CNiGraphs of work. I have a valid license of MStudio 8.1.6, version but it seems that these 2 buttons do not recognize the license. There are also other buttons from the moment of conception of the project, but these have no problem at all. When you create the dynamic creation of the CNiGraphs, give them a valid license string, and I was wondering if there is a problem with the time created and dynamically controls created in the same dialog box to design. Anyone know?

    I don't remember, but I can have created these 2 CNiButtons when I was with only an eval license. (All others were undoubtedly create when I got a full license) Could have an impact on them? I have a vague memory of reading somewhere that DTC create controls to check the license when they are created in the designer and store that info in them license. If this is the case does anyone know an easy way to update the license stored in control? I rather not just delete it and Add again because I would avoid having to redo the tab order (unless someone knows how to easily insert something in the middle of the order of tab instead of having to click through all the controls in the correct order)?

    In addition, I don't know if this would affect anything, but the project was originally built with ComponentWorks 1.0, we were forced to move to MStudio when we met a few bugs in CW, so all controls were originally CW controls which have been converted into control of CNi. I doubt that this is so like everywhere else, we changed during controls is not a problem, but I'm ready to try the suggestions.

    Hi JC,.

    I hope you had a good weekend!  I'm glad to hear that you're back running.  Add the extra button was, in fact, causing update the licensing information for the other buttons, as you can imagine.  After further research, I found that the license information are stored only the form of the control, and if this control doesn't change in any way (or in your case, adding a new project), he sees no reason when compiling to recreate a link to the license.  However, after the change of control and a new, it updates the link between the license information, which solved this problem in your case.

    I hope this helps, JC.  Have a great day!

  • How to reference a dynamically created MovieClip from an another MovieClip?

    Hello

    I would be grateful for the pointers to the following problem:

    I can't reference dynamically created MovieClips (links in a panel side on a Flash site, created from a XML file) from the current MovieClip (the selected link).

    I want to freeze the MovieClip/link to the mouseOver State, once it has been clicked - this part works. When a new MovieClip/link is clicked on, I would like to release the previously clicked on the link to the mouseOver State, which is what I have so far been unable to do.

    My problem seems to refer to the previous link/MoveClip. I used the statement (MovieClip (this) .name) route trace to determine that the clips are named item0, item1, item2 and so on. However, I was unable so far to reference the previous item so far. I tried to follow the route to the MovieClip on the stage and also essaye.item0.gotoandstop MovieClip (parent) and a lot of other different permutations, but nothing helped. It's the fact that they seem to be in a container called "panel", which is defeat me.

    Here's a live version that I downloaded, what could explain the problem better. Click on "UBER EACH" in the menu bar to access the page in question. It is the links on the left side (history, team Unser, etc.) who are the problem. You will see that once they were clicked, they stay in their mouseOver State.

    This is the code in question on the fla file, which is a file that I did not create myself. The parts in black work very well; It's the Red pieces there the rub:

    ***********************************

    import flash.display.MovieClip;

    panel.buttonMode = true;

    var: lang: uint = 1;

    var url_Link:String = MovieClip (root).program.websiteXML .language [lang] [MovieClip (root).program.linkPage].pages.titlePage.texts.pageList.txt [XT].@link numT;

    var urlPage:Number = number (MovieClip (root).program.webs iteXML.language [lang].pages.titlePage [MovieClip (root).program.linkPage].texts.pageList.tx t[numTXT].@linkPage);

    var request: URLRequest;

    var linkIndex:uint;

    var lastClickedLink:MovieClip; //This is supposed to store the last link that has been clicked - it does not work  

    panel.addEventListener (MouseEvent.CLICK, clicLink);

    panel.addEventListener (MouseEvent.ROLL_OVER, mouseOverLink);

    panel.addEventListener (MouseEvent.ROLL_OUT, mouseOutLink);

    function mouseOverLink(event:MouseEvent):void {}

    MovieClip (this) .gotoAndPlay ('s1');

    }

    function mouseOutLink(event:MouseEvent):void {}

    if(numTXT!== (linkIndex-1)/5) { State mouseOver of //freezes so this is the link for the current page

    MovieClip (this) .gotoAndPlay ('s2');

    }

    }

    function clicLink(event:MouseEvent):void {}

    var linkpage:uint =. MovieClip program.linkPage (root);

    If {(url_Link)

    request = new URLRequest (url_Link);

    navigateToURL (request);

    } else {}

    linkIndex = numTXT * 5 + 1;

    if(linkpage == 1) {}

    MovieClip (root).chPages.cont.page_about_mc.page3Tu rner_mc.gotoAndStop ([linkIndex]);

    } ElseIf (linkpage == 2) {}

    MovieClip (root).chPages.cont.page3_mc.page3Turner_ mc.gotoAndStop ([linkIndex]);

    }

    lastClickedLink.gotoAndPlay('s2'); / / This is supposed to release the clicked the link previous it is State mouseOver - does not work 

    lastClickedLink = MovieClip (this) .name; //this is supposed to set the new link as the last link clicked after that was released of her is State mouseOver - does not work   

    }

    }

    ***********************************

    If anyone can help, that would be great.

    What you might be after for this line is to use:

    lastClickedLink = MovieClip (event.currentTarget);

    For what you show, the name property of an object is a string, so I expect get you an error regarding trying to get a string to act as a MovieClip when you try to say to gotoAndPlay ('s2').

  • I do my job to the computer on a MAC computer. I want to create a document using Pages and then convert the document to PDF and send a group email. I want to send the PDF using the pdf for each receiver icon must click the icon to open t

    I do my job to the computer on a MAC book PRO. I want to create a document using Pages and then convert the document to PDF and send a group email. I want to send the PDF using the pdf for each receiver icon must click the icon to open the document. My problem is the document does not show the icon, but rather the document is already open. I spoke with 2 Apple. 'Experts' care and can help me. Can someone tell me what to do?

    It's a question of how the recipients e-mail programs deal with attachments. Many e-mail programs will open all the files they can handle, including files jpg and PDF, by default, and if the recipient has not changed that there is nothing you can do about it. The only solution is to the compress first, then it will be delivered as an attachment, allowing the recipient to decompress and open it.

  • IWindows Mail buttons to create a new Contact and create a new Contact Group

    I lost my toolbar buttons to create a new Contact and to create a new Contact Group...

    I found EM.

    Missing the Windows Contacts toolbar buttons
    http://www.vista4beginners.com/missing-buttons-from-Windows-contacts-toolbar

    Vista - "New Contact" and "Contact Group on new" button missing
    http://www.Vistax64.com/tutorials/186477-new-contact-new-contact-group-button-missing.html

    Bruce Hagen MS - MVP [Mail]

  • Creating and linking to data in a dynamic way

    Hello world

    I have created a form that is available in different languages. That's why I created a radiobutton by language and when you click on one of these buttons, I have dynamiccally bind the XML fragment with a knot existing (javascript code):

    xfa.data.node.loadXML (xml, true, true)

    It works, because I view the XML code in a separate text field to check.

    Later, I want to dynamically bind the elements of my text to the data. Therefore, I have already created links to the XML nodes to be generated later (such as xfa.data.node.tag1.tag2).

    However, I never see the content of the nodes, not even if I create and link the XML file on the initialization of the root element event (so without choosing a language, but certainly before the limit elements are loaded).

    I can see the text when I change a text field calculate event as follows.

    XFA. Data.Node.tag1.tag2.Value

    I am able to access the XML nodes, but for one reason or the other link does not work.

    Someone knows how to fix this? Any help would be greatly appreciated!

    Kind regards

    Tim

    Unfortunately dyna, TR ic data binding not supported in the current version. That is to say that once the form is rendered set binding is not editable. You can read the property, but you cannot change it.

    Paul

Maybe you are looking for