Create a property

I have an advanced JavaScript Question! As i learned it is possible to add new Functions to existing objects:
Column.prototype.isEmpty = function() { ... }
but how can i add a new property to a existing object???
For Example i want to add a new "minimumWidth " Property to the InDesign "Column" object. I have tried something like:
Column.prototype.minimumWidth = 0;
// var col = ... Get a real Column object from selection ...
col.minimumWidth = 100;
alert( "Column: " + col.minimumWidth );
This code gives the following Error (in InDesign CS2):
"Error: Object does not support the property or method 'minimumWidth'"
The above Code is valid ECMA JavaScript! Any Help???
Thanks Tilo

You should ask this in the InDesign scripting forum!
Adding a property to a prototype will not work, even though adding a method will.
Meanwhile, with JavaScript you need not bother for properties.
var f = new File();
f.myProp = 12;
that will work. Whether or not a property exists at instantiation is inconsequential. If it's not set, it will return undefined either way.
That said, with my limited experience with ID, adding arbitrary properties does not seem to work in the ID environment. It does in Bridge, PS, and others. I do not know what the differences are in implementation. But were I you, I would ask the folks on the ID forum.
Bob
Adobe Workflow Scripting

Similar Messages

  • Can i create a property node of a property node?

    hello - i made a small vi that im attaching to visiualize what i am wanting to do. i have two modes in my vi - one with automation on and the other off... in manual control mode.
    in automation mode...i am reading a sensor (hall effect) and when the boolean is true, then the property node of a stop motor event is automatically executed.
    if i want to be in manual mode, i don't want that property node to execute whenever the boolean reads true. i only want to be able to press the stop button manually.
    so i tried creating a property node of a property node, and chose the "disabled" property wiring a 1 constant into it which should be "disabled".
    anyway - i don't know if this is even possible cause i am getting an error. can i make this work or how can i turn automation off and therefore turning the property node to the stop motor off too?
    thanks!
    Attachments:
    AUTOMATION CONTROL TESTING.vi ‏85 KB

    Don't overcomplicate things!
    You don't need a property node of a property node, that would make little sense. Simply place the property node inside a case structure so it only executes under certain conditions.
    LabVIEW Champion . Do more with less code and in less time .

  • User availabilty while creating a Property Category

    Hi,
    We have the current system with Authentication mode set as Mixed, while creating a Property Category I can see only the Users with Internal Authentication mode are available for selection as part of Property Category not the one with CSS mode, please suggest.
    Thanks,
    MM

    off cource Yes, but I am curious why the users are not shown for selection while creating/modifying the Property category,
    Murali

  • Can you create a property node automatically when placing an xcontrol

    I have an xcontrol that always has an input and an output.  The xcontrol is always implemented as a control to comply with data flow paradyme, and a property node is used as the input connection.  I was wondering if anyone knows of a way to automatically create the property node when the xcontrol is placed on the front panel. 
    I have noticed that a blank menu item in the xcontrol, will generate a property node.  Is there a way to specify which property node to generate.  And is there a way to insert into the menu for the control on the block diagram instead of the pane.
    Thanks in advance
    Kent

    Ton,
        My "merge-control" is just a merge vi, as attached.  However the trick was to insert it into the controls palette (insert vi,  view all files, select the merged vi instead of the xcontrol). Merge VI's on the controls palatte seem to be automatically set to "explode/un merge" on use.
        To explain the use, this xcontrol is used to allow interuption of logic data flow.  This one is to simulate a switch that is used as an input to a PLC.  Thus standard simulation logic determines the normal (simulated real world) operation and is wired to the "In" parameter.  The xcontrol displays the simulation value on the front panel as the light on the left.  The middle switch is to either pass through the simulation value, or use the value input to the right led button.  The block panel control would then be wired out to connect to the PLC.  The objective of the control is to allow simulated operation, and forced faults to fully test PLC logic.  Hence I needed an xcontrol with both an input and output on the block diagram and a front panel object.  As we may have over 1000 of these in a project, I wanted to eliminate having to click on the block icon, select create, property node, In, and also turn off the label (to minimise space usage).
    Kent
    Attachments:
    example.gif ‏6 KB

  • Error when try to create a property

    Hi,
    I need to create a property (ORDEN) in dimension PPTO_PROMOCION. When I save the following error appear:
    Error modul admin
    Failed to create infoobject BI to atribute
    Someone can hep me? Flavia

    Hi Vigoni,
    I think the dimension in which you are trying to add property is not active. As suggested above, reprocess dimension and if still it is not working: "Run UJS_ACTIVATE_CONTENT in Tcode SE38 and activate that particular dimension." Reprocess dimension once again.
    Hope this helps.
    Regards,
    Poonam

  • Trying to create a property that has a structure to it

    Hello:
    I am trying to create a property that has a structure to it.  Specifically, I am trying to create a multi-valued property called checks.  This property is composed of check number, check date and check amount.
    The data for this should display like the rows in a table, like an Excel spreadsheet.
    I realize this is a tall order.  However, is this possible?  I have tried the composed of feature, but did not find this to work.
    The best I could come up with so far is to have three multi-valued properties each for check number, check date and check amount.  The user would then need to ensure that the first entry for check number applies to the first entry for check date, and then the second entry for check number applies to the second entry for check date, and so on, and so on...
    Any ideas?
    Thanks.
    Bill
    (508) 259-6605

    Hi,
    You have the choice between xml or pdf, in later versions of designer you can choose with a dropdown on the email button Object palette, the "Submit As";
    In earlier version you had to edit the XML Source and change the format from xml to pdf (or vice-versa);
    Regards
    Bruce

  • How can I create a property list inside a property list?

    How can I create a property list inside a property list?
    I have a string(that I pulled from a text member). the string
    is actually a propert list.
    the property list has another property list inside it..
    how can I use this list ? how can I conert the text to a list
    that director will understand?
    thanks.

    Not sure if this is what you're wanting, but to make a list
    from a text
    member you could do something like ...
    myList= []
    -- Fill myList with values --
    repeat with i = 1 to member("YourTextMember").line.count
    add myList, (member("YourTextMember").line.i)
    end repeat
    Haven't checked it, but it should work.
    -Matt

  • Create a property and make it promoted property in decoding stage

    I want to create a new property and make it promoted property in decoding stage.
    Is it possible ?
    If yes,then how it can be possible ?
    Prakash

    Hi Prakash,
    Check Rachit's reference article and code in the referenced website where in the Execute method of the custom decode pipeline you can add/create new property to the message's context. Actual code to do the same is
    inmsg.Context.Promote(_YourPropertyName, _YourPropertyNamespace,_YourPropertyValue);
    But what made you to doubt this functionality in decode stage? Do you have any requirement which made you raise this question?
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Problem create OWNER property in C_GROUP

    Hi All,
    I've an issue while trying to create a new property called OWNER in the C_GROUP dimension.
    Please refer to the screen-captures for the error.
    I've also tried to create OWNER2 just to be sure the OWNER is not a reserved property name that are not allowed.
    I'm using BPC 10 Microsoft version.
    Please advise.
    Thank you.

    Hi Derek,
    as Arnold wrote Owner is a reserved property used by work status and bpf, this means that only one dimension could contain a owner property.
    You can find the dimension that contains the Owner property in admin console->application->work status settings the dim has Owner specified in "work status".
    So if you want to change the dimension owner, you must change this property first, delete the property in the old dimension and add the owner property in the new dimension and after full process all dims again
    But you will loose all previos work status lock previous used.
    Like Arnold a question, before to start, are you using this property for another purpose then work status and bpf? If so better to stop and explain what do you want.
    Regards
         Roberto

  • Create New Property Group in generic-searchbackend-config.xml

    Hi all,
    My requirement is to add a new property group.
    I have added the below code(bold):
    <property-group>SearchCriteria_B2B_Sales</property-group>
    <property-group>SearchCriteria_B2B_Custom</property-group>
    And I have also made the entry..
    <property-group name="SearchCriteria_B2B_Delivery"
                                useSearchRequestMemory="true"
                                bodyInclTop="/b2b/order/GScommon_header.inc.jsp".......
    My question is where do I define the mapping for the property group name and property group..?
    Thanks,
    Pat
    Edited by: Patravi on Feb 13, 2012 6:05 PM

    Hi Patracvi,
    I think the mapping is there in generic-searchbackend-config.xml.
    Basically, SAP has different architechture for standard and custom search criteria or property group.
    If any customer wants to extend or create search criteria, they usually do in crm~isaweb~b2b ->WEBINF -> XCM -> Customer
    While the standard definition is provided in crm~isaweb~b2b ->WEBINF -> XCM -> SAP
    So, if you are looking for mapping of any search criteria which are not extended or custom one, it will in SAP folder.
    Hope this will help you to understand what you are looking for.
    regards
    Prashil

  • Creating KM Property Filter

    Hi,
    I have created a custom property filter  which adds a new custom property to property map.
    I have 2 questions:
    1. Where can I see the custom property and its value? Is it virtual?
    2. Is this custom property (testProperty) indexable? If yes, do I need to follow any additional steps?
    Below is my code in filter() method:
    IPropertyMap map = this.predecessorFilter.filter();
    IPropertyName testProperty = new PropertyName(IWcmConst.SAP_WCM_NAMESPACE, "testProperty");
    if (map.containsProperty(testProperty)) {
                   IMutableProperty mutableProperty = map.get(testProperty).getMutable();
                   mutableProperty.setStringValue("Enforced by Filter");
                   IMutablePropertyMap mutablePropertyMap = map.getMutable();
                   mutablePropertyMap.put(mutableProperty);
                   return mutablePropertyMap;
              } else {
                   IMutableProperty testProp = new Property(testProperty, "TEST_PROPERTY_VALUE").getMutable();     
                   //testProp.setStringValue("HelloUpdated");
                   IMutablePropertyMap mutableMap = map.getMutable();
                   mutableMap.put(testProp);
                   return mutableMap;

    >
    aditya srinivasa wrote:
    > Hi,
    >
    > I have created a custom property filter  which adds a new custom property to property map.
    > I have 2 questions:
    > 1. Where can I see the custom property and its value? Is it virtual?
    > 2. Is this custom property (testProperty) indexable? If yes, do I need to follow any additional steps?
    >
    > Below is my code in filter() method:
    >
    > IPropertyMap map = this.predecessorFilter.filter();
    > IPropertyName testProperty = new PropertyName(IWcmConst.SAP_WCM_NAMESPACE, "testProperty");
    > if (map.containsProperty(testProperty)) {
    >                IMutableProperty mutableProperty = map.get(testProperty).getMutable();
    >                mutableProperty.setStringValue("Enforced by Filter");
    >                IMutablePropertyMap mutablePropertyMap = map.getMutable();
    >                mutablePropertyMap.put(mutableProperty);
    >      
    >                return mutablePropertyMap;
    >           } else {
    >                IMutableProperty testProp = new Property(testProperty, "TEST_PROPERTY_VALUE").getMutable();     
    >                //testProp.setStringValue("HelloUpdated");
    >                IMutablePropertyMap mutableMap = map.getMutable();
    >                mutableMap.put(testProp);
    >      
    >                return mutableMap;
    >           }
    Hi,
    To make a Property indexable you must firstly create it like a "template" in System Administration -> System Configuration -> Knowledge Management -> Content Management -> Global Services -> Property Metadata -> Properties. In here you have to activate the setting "Indexable" for the new created property. Furthermore if you now assign such a property to a resource by code, it will be also visible in standard KM UI.

  • How can be create a property grid for adobe illustrator?

    Hi all,
    Actually i want to create one custom plugin for the adobe illustrator where i can show all the properties of the selected item (exp : path item, text frames, or placed images).  This is very similar look like Visual studio or any other IDE.
    any one have any idea or did similar kind of stuff ?
    please me
    Regards
    Ashish yadav.

    Search for and download the SDK for developing plug-ins.
    JET

  • Creating a property with list values derived from other hierarchy

    Hello Friends,
    Thanks in advance for any help in this regard.
    1)     Can we have a property with list values populated automatically from other hierarchy.
    2)     Can we select multiple items from the list box. Does property allows multiple values.
    The example is like this. There are 2 hierarchies.
    Customer
         Customer 1
         Child Customer
    Industry
         Hightech
         Computers
         TVs
    Manufacturing
         Auto
         Steel
         Healthcare
         Pharma
         HealthInsurance
    The requirement is to add Industry hierarchy as property of Customer Hierarchy and select each customer is what type of Industry they belong as a property value.
    Thanks

    Use property data type ListGroup for multiselect.
    To select values from another hierarchy you can use Node or MultiNode, or an Asscociated Node property, of which there are several types. I'm not fond of the property editors for Node data types and will often just use a string and validate the user input by defaultin prefixes and such with a derived property that is checked by a query based validation. Make sense?

  • How to create a specific property node w/ VI script

    I am writing a VI script to work with some multi column listboxes.  I need it to create a property node that gets a reference to the ItemNames field.  I see that I can create a property node via the invoke node method Create.Property Node, but how to get the ItemNames field specifically I so far can't figure out.  Can anyone help?
    To be clear, I am writing code that looks like this:
    ...and when I run the script, I want it to produce this:
    Right now it produces the MCL as expected, via the New VI Object node...but I don't know how to get the ItemNames created automatcially.  I thought it might be in the PropItems array but so far no luck.
    thank you
    Solved!
    Go to Solution.

    The output of "PropItems[]" will be a one element array.  Index that element and wire the reference to an invoke node.  Select the method "SetProperty".

  • Managed Property in Refinement - why not use the automatically-created site column managed property

    Hi,
    I read that although SharePoint 2013 automatically creates managed property for site column (OWS_Q_TEXT_COLUMNNAME) - in the refinement i should use a managed property and map to the ows_columnname. why?
    what's the difefrence?
    what is best - to create a new managed property (and set it as refinable) or use the OOB Refinementstring0, Refinementstring1 etc.)?
    keren tsur

    You are probably talking about this blog post.
    http://blogs.technet.com/b/tothesharepoint/archive/2013/11/11/how-to-add-refiners-to-your-search-results-page-for-sharepoint-2013.aspx
    The reason you want to use the ows_columnname crawled property is because it is of the correct data type. The other is always text. If the site column is a date or a decimal then using the OWS_Q_TEXT... crawled property,will cause the refiner not to display
    the appropriate control, for example a slider control for a date type refiner.
    http://sharepointfieldnotes.blogspot.com/2013/05/understanding-and-getting-sharepoint.html
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

Maybe you are looking for

  • Error while generating the context node

    Hi , Requirement is to add the marketing attribute field under the Account details overview Page. As the field was not available in the context node i have added a new context node in the Account details. I used the wizard and added the context node

  • How to drag and drop button between two toolbar?

    Hi,everybody :) i hava a problem : if i have two toolbar in a frame , and there are some button in each, how can i use dnd package to drag and drop button between two toolbar,such as drag one button in a toolbar to the other toolbar ,i write some sam

  • Dynpro field has to filled in or not

    Hey guys, I want to controle a field of my dynpro either to be or not to be filled in in my program. For example: IF ..... . dynprofield has to be filled in. else. has not to be filled in. ENDIF. It sounds easily but i dont even find anything in the

  • HT4211 Why after upgrading Awesome Note HD does the app keep asking me to get full version?

    I bought the full version, customized my app the way I want it and each time I open it up it keeps asking me to purchase, sync, then the app will give me my custom file folders, etc?

  • BEWARE BUYING 3G IPAD 2

    Verizon is putting in their ads that there is a $35 activation fee for 3G service. Nor are they telling that you have to activate on the Ipad and can't activate and pay thru your business acct. So now discount. Gonna a lot of mad people after they pa