Using 'variables.instance' structure and implicit getters/setters

I am adopting the use of creating a variables.instance (I use 'variables.my') structure to separate instance data from the object, however I have a question when it comes to ColdFusion creating implicit getters and setters based on that object's defined properties.
BEFORE, if I had a Name property, CF would create getName() and setName() for me, and it would update the variables.Name private variable accordingly in each.  But now that my variables are being stored in 'variables.my.Name', does this mean I can no longer use ColdFusion's implicit getters and setters? (because it would improperly be attempting to execute getName and be looking for variables.Name, when that data now exists in variables.my.Name?
Are there any methodologies around that allow me to utilize CF's implicit getters/setters while using this 'my' instance variable and have them work with one another?

Thanks for the confirmation Carl.
How cool, then, would it be if ColdFusion 11 supported something like:
<cfcomponent
     accessors="true"
     implicitpropertyprefix="my."
That way I could specify "my." as the property prefix and when it goes to create those implicit getters and settings, it will concatenate that into 'variables.my.' as the prefix when it alters property values or returns them.

Similar Messages

  • Using variables in Dashboards and Requests

    Hi Freinz,
    I am trying to use a dashboard prompt and based on the selection in the prompts the data shud be populated.
    I used the option request variable in Dashboard prompt and then created the static repository variables in administration.
    I have created variable 'vert' and in the requests for the column 'VERTICAL' i am setting the variable as 'vert'.
    This is the same value i have given in the dashboard prompt set variable-->request variable.
    Guyz pls help me...
    Pls let me knw the steps to be followed.
    How shud i pass teh values from the dashboard prompt to the requests??/
    Thanks,
    Veena

    In the Report, Create a filter fro VERTICAL. In the Filter Creation Click On Add - Variable - Presentation, Now in the variable Expr give your variable name, In the default value give any value for this VERTICAL.
    Now put your prompt and report in dashboard, test it.

  • Calculate maximum value of subarray while creating it using a case structure and shift registers

    I have two 1D arrays that contain cyclical information (kind of like a sine wave).  One that contains information on position in degrees and another that contains torque.  I would like to calculate the maximum torque value each time the position is within a certain range (e.g. from 30-80 degrees).  The ranges are repeated - that's why it is cyclical.   I use the "in range" function, a case structure and shift registers to build a new array with values that fall within the range I specify - this was the easy part (see VI attached).  I'm struggling with a way to calculate a maximum value for each subarray formed when values are "in range".   Your help is much appreciated.
    Solved!
    Go to Solution.
    Attachments:
    Simple Calculate between anatomical position range.vi ‏16 KB

    It's not really noise - it's more inconsistency.  So a position output can run: 20, 30, 40, 50, 60 etc.  OR, it could run: 21, 24, 32, 41, 44, 51, 59 etc. But, it is always cyclical. 
    Attached you will find a .csv file with the data arrays - I'm using POS (ANAT) degrees column (column D if you open in excel).  There you also see torque in ft-lbs along with some other information.
    Attachments:
    025C.csv ‏224 KB

  • Having trouble with using variables in functions and after functions..

    Morning,
    I have simplified this, as it represents the core of what’s I obviously don't know how to do. 
    Problem:
    Say I populate that variable by reading in a list if IP addresses from file, finding the line that matches the hostname and place that string into the $IPAddress variable for use later throughout the script.   I did not run into a significant problem
    until I decided to convert the routine of looking up the IP address and populating the variable into a function.   As soon as I made it a function, and called that function, the $IPAddress variable only had the data in it until the function completed. 
    Once the function had done its work, and had placed the data into the variable, I expected that “new” data to be available after the function had completed..in that variable.  But it’s like the $IPAddress variable in the main script is a totally
    different data then the variable with the same name that’s used within the function. 
    So I think this demonstrates some of what’s kicking my butt.. 
    $IPAddress = "This is the wrong data”
    Function TestFunction () 
    $IPAddress  #call to display the contents of the variable at the start of the function. 
    $IPAddress = Read-Host -Prompt "Please enter the text ‘Goober’" 
    $IPAddress   #call to display the contents of the variable at the end of the function. 
    TestFunction
    $IPAddress ​
    The output I get is: 
    This is the wrong data
    "Please enter ‘Goober’"  : where I enter Goober
    Goober
    This is the wrong data
    Huh? 
    I had expected:
    This is the wrong data
    "Please enter ‘Goober’"  : where I enter Goober
    Goober
    Goober
    What good is the repeatability of a function if it’s output is lost? 

    THis seems to work.. IS there any reason NOT to do this?
    $Global:IPAddress= "This is the wrong data” #"
    Function TestFunction{
        Write-Host $IPAddress-fore green
          $host.ui.RawUI.FlushInputBuffer()
         $Global:IPAddress =
    Read-Host -Prompt
    "Please enter the text ‘Goober’"
        return$Global:IPAddress
    TestFunction
    return$Global:IPAddress

  • Additional Results Custom Step using Variables in Name and Value to Log expressions?

    I am trying to create a Custom Step Type for logging additional results - requiring a single Name and Value data pair included in the step.
    I want to pass the name and value data in using two specific variables.
    This functionality can of course be explicitly coded on a test step without problem, but I can't find a way to create a custom test step which inserts such a step i.e. automatically inserting the correct variable names into Name and Value to Log fields.
    Any ideas how to accomplish this? I don't want the custom step users to have to type in the variable names every time they use it.
    I am using TestStand 4.1.1
    Message Edited by CIM1 on 04-20-2009 07:26 AM

    Hi CIM1,
    There are a few ways of doing this.
    The simplest one would be to configure the expression in the Pre-Expression or Post-Expression (depending on whether you would like the Step Type to use the value in the variables or write the value to the variables) and then from here you can lock away the expressions from being edited. The caveat with this method is that you are obviously restricing the Pre/Post-Expressions for the step type. 
    Another Method would be to code some code modules to Write to/Read from the Variables and then calling these in the Steps Pre-Step SubStep or Post-Step Substep. The advantages of this method would be that you can search for the Variable, and if the variable is not present, you could create it before writing to it.
    Hope this Helps.
    Best Regards,
    Steve H 

  • Using variables in Form and in BR

    I need to pass the members that has been selected in the user variable in the Form to the BR. How do I do that without prompting the user (using a Variable) ?

    Hi,
    you can only pass a member to a business rule that is in the POV.
    This can be defined on the web form. Here you can tell Planning to take the members and do not prompt for the variable.
    I hope this answers your question.
    Regards,
    Philip

  • SRM-MDM Dynamic catalog call structure and implicit search criteria

    Hi experts,
    We need to define the catalog call criteria for the SRM-MDM.
    Our client requires content visualitzation restrictions but there is not any logic indentified to determine the records that must be viewed for every user.
    Now, in their Non-SAP catalog, they are using users lists to which they assign the catalog records.
    There are more than 150 users lists and is posible too to assign some catalog records to only 1 or 2 users, by user id.
    We want to reproduce this scenario in SRM-MDM.
    We are analysing two alternatives:
    First alternative: badi BBP_CAT_CALL_ENRICH implementation for mask dynamic determination and custom z.
    We've though in creating one mask for every user list.
    Then, in SRM create a custom table with the userid and the user list id (mask equivalent). A user can belong to more than one user list.
    Finally implement the BBP_CAT_CALL_ENRICH, searching in the z table the users id and obtaining the specific masks for this users and pass these masks as catalog call parameters dynamicly.
    Is posible to use the BBP_CAT_CALL_ENRICH badi to pass dynamic parameters?
    (in this case, maybe we could use a new org.est. attibute to assign user id and mask, instead of the custom table).
    Second aternative: implicit search criteria based on a new org. est. atribute for mask
    Is posible to create new implicit search criteria for org. est. atributes?
    We could assign to every user the masks in the org. est. and then, create a new parameter which could look for the mask value in the org.est.
    Thanks in advance

    Hi Silvia,
    I am not sure of the answer to the second part of the query but as for the usage of the BBP_CAT_CALL_ENRICH catalog in combination with various masks for the users to access catalog subsets, this should work quite well, best to try it out in a DEV environment and see how it goes.
    Regards,
    Jason

  • Using variables to add and subtract a number in a text field?

    The adding bit works fine:
    // get this pconn count
    var this_p_conn:Number = Object(this).parent.p_conn;
    // get current pconn total
    var c_this_p_conn:Number = Object(root).part_count.p_conn_count.text    
    // add this pconn count to total pconn
    var v_this_p_conn:Number = Number(this_p_conn+c_this_p_conn);
    // Update total pconn with new value
    Object(root).part_count.p_conn_count.text = String(v_this_p_conn)
    Removing a value from the total is another story, this looks like it should work but it does not:
    // get this pconn count
    var count_p_conn:Number = Object(this).parent.p_conn;
    // get current pconn total
    var total_p_conn:Number = Object(root).part_count.p_conn_count.text;
    // subtract this pconn count from total pconn
    var new_p_conn:Number = Number(total_p_conn-count_p_conn);
    // Update total pconn with new value
    Object(root).part_count.p_conn_count.text = String(new_p_conn);
    Any ideas or suggestions? My eyes are a bit blurry from looking at code, maybe I missed something obvious. Thanks in advance!

    Never mind, I got it worked out now.
    I had the subtraction code firing AFTER my remove self code, so the player never got to fire the subtract code:
    var b:MovieClip = Object(this).parent;
    Object(this).parent.parent.removeChild(b);
    I placed the subtract code before the above code and now it works fine... I think I need powernap...
    The lesson here is that apparently code fires from the top to the bottom, mind the order of how your code is stacked.
    Sorry for the fuss! Carry on.

  • How to use variables in scriptlogic

    Hi BPC gurus,
    I'd like to make a condition in my scriptlogic for an allocation of a planned value on year base to the months values. If there is reference data in the past year, I would like to allocate according to the reference. If not, I would just like to make an even distribution. Unfortunately I didn't find a way to use variables in scriptlogic and assign values to them. Here's my coding:
    *LOOKUP Vertrieb
    *DIM MEASURES="PERIODIC"
    *DIM CATEGORY="ACTUAL"
    *DIM P_DATASRC="UPLOAD"
    *DIM PREVYEAR:TIME="2009.TOTAL"
    *DIM PREVJAN:TIME="2009.JAN"
    *DIM PREVFEB:TIME="2009.FEB"
    *ENDLOOKUP
    *WHEN TIME
    *IS "2010_INPUT"
    *WHEN CATEGORY
    *IS "PLAN"
    *WHEN P_DATASRC
    *IS "MANUAL"
    //here I would like to add a condition if the value for the past year is not 0
    *REC(FACTOR=LOOKUP(PREVJAN)/LOOKUP(PREVYEAR),TIME="2010.JAN")
    *REC(FACTOR=LOOKUP(PREVFEB)/LOOKUP(PREVYEAR),TIME="2010.FEB")
    //or here I would like to add a condition if the value for the past year = 0
    *REC(FACTOR=1/12,TIME="2010.JAN")
    *REC(FACTOR=1/12,TIME="2010.FEB")
    *ENDWHEN
    Thanks for your assistance.
    Regards,
    Ulrike

    Hi,
    If you would like to add a condition if the value for the past year is not 0, then you can try
    *WHEN TIME
    *IS 2009.TOTAL
       *WHEN SIGNEDDATA
       *IS (put is not equal to sign, as I am not able to put it) 0
          *REC(......)
       *ENDWHEN
    *ENDWHEN
    *COMMIT
    Hope this helps.

  • Syntax to export 18 months of data at any given time using variables?

    I have written a calculation script for exporting data from an application using DATAEXPORT. I want to get 18 months of data in my exported text files at any point of time. So, I want to specify the range using variables for Period and Year but I am kind of stuck on how should I be writing it in my script.
    Please let me know the correct syntax using variables or if you could share some link that would help me know that would be a help.
    Can I use @XRANGE Function???
    Thanks !

    Srinivas --> Thanks for clarifying that. After I read your post I did go through the @XRANGE again and noticed that they had use cross dimensional operators so it put me in a confusion. But you cleared it by being more specific this time. Thanks a lot !
    If I follow what Robb suggested then like you mentioned when 3 years will be involved its going to be difficult I guess. Not sure at this point which way would be the best to get this work.
    I agree with CL - 18 months rolling forecast can be annoying seriously.
    Can one of you please suggest me a permanent and most efficient solution for this out of all the ideas that would not require manual work and can be automated completely?
    Thank you all for your inputs. I really appreciate it.
    Edited by: 892254 on Nov 3, 2011 6:30 AM

  • In a RT motion and data system, what is the best variable handling structure(s)?

    I built a system that applies motion control to two axes and also takes data from a third axis encoder. 
    The program structure is parallel timed loops (one motion control loop, one data collection loop, one host communication loop) with front panel.
    This is targeted to a RT target; there is no host program.
    Now I am using global variables to pass information between the loops and for exchanging information with the front panel indicators and controls.  I think this is a suboptimal solution.  I am considering the following changes:
    1) For communicating variable values (such as commanded velocity and position) to the motion loop, I will replace the global variable structures with onboard variables in the motion card memory.
    2) For saving the data collected from the third axis, I will use an RT-FIFO structure in the RT controller memory.
    3) I will eliminate the front panel from the RT program and create a separate user interface program targeted to the host PC.  Communication between these programs will be accomplished using the Simple TCP/IP Messaging Protocol as described in this document:
    http://zone.ni.com/devzone/conceptd.nsf/webmain/0986799C984500F886256F170079411E
    Global variables will be replaced with Motion onboard variables.
    Before I start this chore, am I following the best practice?  Any advice on improving any aspect of this plan?
    My System:
    Windows XP on P4 PC ethernet to
    PXI-8187 RT Controller
    PXI-7350 Motion Control board
    (2) servo axes with quadrature feedback
    (1) additional quadrature encoder used as measuring probe
    I do not have a DAQ card in this system.
    Thank you!
    Laine

    Thanks Kristi.  I understand your recommendation.
    Some of my variable instances are 4 or 5 SubVIs deep.  For instance, the main high priority loop calls MOVE.vi which calls CALC_ANGLE.vi, which calls CALC_MOVETIME.vi which calls CALC_VELOCITY.vi which uses the variable Initial_velocity.  If Initial_velocity is received from the host in the main program, passed to the high-priority loop using an RTFIFO, then bundled and kept in a shift register, what is the best way to get that information down where I need it?
    Not only will I have to redeclare the RT-FIFO in each subVI, but I will also need to pass the reference value cluster down the chain as well?  This sounds messy and computationally expensive to me.  So my choices might be
    1) Eliminate subVIs and bring everything to the top.  This is a rather large program, so could make quite an extensive top vi if all code is in one place.
    2) Use onboard variables to store and pass values.  Are these less deterministic than RTFIFOs?  What is their primary purpose if not to pass data, or are they just to be used with motion card onboard programming?
    3) Use global variables, but I think these are not deterministic.
    4) Bite the bullet and pass the variable cluster down through the SubVI chain.  Is there an easier way to do this than what I describe above?
    Have I made any bad assumptions or overcomplications?
    Thanks.
    Laine

  • Creating and using variables in LabView

    Hello. Apologies in advance for what probably is a trivial task, but I'm having problems grasping the concept of variables in the LabView environment.
    I'm using Motion to track the steps that a motor has traversed. I have an inkjet that I want to apply a quick burst only once for a pixel (which I defined the size). The problem is that the motor has to travel at such a slow speed that the inkjet is over the pixel for a while. With my current code, it will keep firing while over the pixel. So I want to store the last pixel number that the printer fired on so I can perform a compare to ensure that the inkjet will only fire once the current pixel is greater than the last-fired pixel.
    In a regular text-based coding environment, it's as easy as assigning a variable to store the pixel that the inkjet fired on, then constantly compare the current pixel location to that variable to know if it's still over the same pixel. I'm a bit of a loss trying to accomplish the same task using the graphical coding of LabView.
    How do I extract this value and store it for later comparison?
    Thank you and sorry again for a dumb question.

    I assume that you are doing this firing of inkjet at a particular pixel, using a loop ( more appropriately, while loop)
    One way to achieve this would be to use shift registers and case structure
    Insert a shift register for that loop
    initialize a pixel value (numeric) to that shift register
    On every iteration, perform comparison for 'greater than' with current pixel value/position  to value/position stored in shift register
    If the result of this comparison is true, use a case structur. In true case of case structure , fire your inkjet at that particular pixel and update your shift register to replace and store the current value
    If the result of comparison was false, do not perform any operation, just pass the shift register through false case without any modification
    A labVIEW code built on these lines would work fine for your application
    Showing a code snippet would have been a simpler and effective  way to explain this. but currently no LabVIEW installed on my system

  • Use event structure and while loop in parallel

    Hello, I would like to use an event structure in parallel with a while loop. I have a camera that needs to constantly take pictures and I have that setup in the while loop. I also however need to do other functions in conjunction with the picture taking. I have about 50 or so events that need to have access to while the pictures are taken. Is there any way to do this? If not is there any way to have a global stop variable that is attached to all 50 of the events. I know I can do this the hard way and have each boolean event in the event structure be attached to the while loop stop control. This is however very inefficient. I would also like to know if I can simply use a mouse click as the stop of the while loop. Am I able to have a variable that goes from false to true on mouse click without using the event structure to do this? Thanks.

    Yes, just place the event structure in a second while loop.
    Add a stop button to the other while loop and add an event for the stop button to stop both loops. For a simple example, see my VI posted here:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=176367&jump=true
    Simply add more event cases as needed.
    LabVIEW Champion . Do more with less code and in less time .

  • How to instanciate and use the instance of a symbol with JSFL

    Hi,
    I'm a noobie with Flash Pro / JSFL.
    I'm looking for a way to instanciate UILoader and use them with JSFL.
    I tried to create an empty FLA that contain a UILoader symbol in its library.
    With JSFL I open it and add it to the stage.
    It works, I have a UILoader instance at 200;200 but I cannot do anything with it. How can I set a size, a new position, a source... ?
    fl.openDocument("file:///C|/uiloader.fla");
    var loaderIndex = fl.getDocumentDOM().library.findItemIndex("UILoader");
    if (loaderIndex != "")
              var loader = fl.getDocumentDOM().library.items[loaderIndex];
              fl.documents[0].addItem({x:200,y:200}, loader);
    I would like to create with JSFL a SWF that contain a UILoader placed somewhere with a specific size and specific source. And to inject in the swf some ActionScript to find this added UILoader to dynamically change the source of the image. This source will be finally given from the url. http://myswf.swf?imageSource=xxxxxx.jpg
    Is it possible ?
    Thank you.

    It's a pity !
    My problem is I tryed to save a FXG file containing images into a swf that will be able to change images sources dynamically.
    To do that, I create an empty FLA document (using JSFL), I import the FXG file into the scene.
    If I export my file into SWF in which I have injected this ActionSctipt :
    for (var x = 0; x < numChildren; x++)
      var e = getChildAt(x);
      trace(e + " " + e.name +" is "+getQualifiedClassName(e));
    I have this trace : [object MovieClip] _IMG_ is flash.display::MovieClip
    I think I cannot change the source of a MovieClip using ActionScript. Maybe I'm wrong ?
    So I would like to replace these objects (using JSFL) with UILoaders and setting the same x,y,width,height,source and then I will be able to change their sources using ActionScript.

  • What are the entities that can be re-used in different servers, SI App, SI instance? And how?

    Greetings,
    What are the entities that can be re-used in different servers, SI App, SI instance? And how?
    e.g. can I use a deployed IQStreamable@app1  into app2?
    can I use a deployed observable/app1/siInstance1/Server1 into another query/app3/siInstance3/server2?
    On the presentation titled "04 – Installing, Deploying and Maintaining the SQL Server 2008 R2 StreamInsight Runtime Engine" with file name SQL10R2UPD05-DECK-04.pptx on ecn.channel9.msdn.com/o9/learn/SQL2008R2TrainingKit/Presentations/SQL10R2UPD05-DECK-04/SQL10R2UPD05-DECK-04.pptx
    It is mentioned one of the deployment option is "Deployment: Standalone Server"
    and it mention the following:
    "Use this option for the following scenarios:
    - Metadata objects need to be shared between applications
      - Event Types
      - Adapter Types
      - Query Templates
    - A data source registered with the server provides an event stream for another existing application"
    Could you please provide good example that explain the above statement?
    Cheers, Muhammad

    First, that statement - and those materials - refer to the "legacy" StreamInsight query/adapter model. They do not refer to how things work with the Reactive model introduced in version 2.1. Specifically, it talks about Dynamic Query Composition (DQC).
    You cannot use a deployed Observable in another instance of StreamInsight. You may be able to use them across applications in the same instance - off the top of my head, I'm not sure. I'm getting ready to get on a plane but will take a look at it later.
    Typically, however, applications act as containers (comparable to .NET AppDomains) so I don't think that you'd be able to do this easily. That said, the code and assemblies
    can be reused across multiple instances/applications. You would have separate instances of the classes involved but you would be able to reuse the query logic. That's a common use case.
    Can you be more specific about your use case and what you are trying to accomplish here? It's possible that there are alternative ways to do what you are trying to do.
    DevBiker (aka J Sawyer)
    Microsoft MVP - Sql Server (StreamInsight)
    If I answered your question, please mark as answer.
    If my post was helpful, please mark as helpful.

Maybe you are looking for