Problem with String variable

I am new to Java Programming.
I have a line of code that works and does what is supposed to.
faceData.getProfile("Lisa").removeFriend("Curtis");
If I assign the strings to variables such as-
String name = "Lisa";
String fName = "Curtis";
and then plug those into the same line of code, it does not work
faceData.getProfile(name).removeFriend(fName);
What could be causing the problem?
I even added some lines to print out what is stored in the variables to verify that they are what they should be, but for some reason the variables do not work while putting the strings in quotes does. Any ideas?

I guarantee that something about your assertions are incorrect. Those variables are either not equal to the values you claim, or something else is going on. But it's not a problem with string variables versus string constants.
Edit: My best guess in lack of a real example from you, is that the strings in question have non-printable characters in them, such as trailing spaces or line feeds.

Similar Messages

  • Problem with formula variable

    HI,
    I am facing problem with formula variable with replacement path. my requirement is system date - posting date.
    here i created 2 formula variable one is system date. second formula vaiable with replacement path is posting date. second formula vaiable not populating data. please help on that.
    regards,
    kris

    Hi,
    here is some idea.. here i have taken expample dates 1)notification creation date and 2) notification completion.
    1st:in the query designer at key figure coloumn create
    one local formula.in that local formula create formula
    variable with replacement path.in that take reference character
    notification completion.in the next tab take replace ment
    as key.in the last tab select "date".
    2nd: do the same thing for the notification creation date.
    3 rd : create 3 rd local formula and do the substraction
    for the first 2 local formulas.
    4th:create codition on the difference which u have find with
    on that condition u can create one user entry varibale.
    5th:while u defining the query put these 2 dates,i,e
    notification completion, notification creation date in the character block.
    If not system will ignore the formula variable which u created in
    above steps.
    Hope this wil help u.
    regards....KP

  • Little problem with Strings.

              I have an little problem with Strings, i make one comparision like this.
              String nombre="Javier";
              if( nombre.equalsIgnoreCase(output.getStringValue("CN_NOMBRESf",null)) )
              Wich output.getStringValue("CN_NOMBRESf",null) is "Javier" too, because I display
              this before and are equals.
              What I do wrong?.
              

    You are actually making your users key in things like
    "\026"? Not very user-friendly, I would say. But
    assuming that is the best way for you to get your
    input, or if it's just you doing the input, the way to
    change that 4-character string into the single
    character that Java represents by '\026', you would
    use a bit of code like this:char encoded =
    (char)Integer.parseInt(substring(inputString, 1),
    16);
    DrClap has the right idea, except '\026' is octal, not hex. So change the radix from 16 to 8. Unicode is usually represented like '\u002A'. So it looks like you want:String s = "\\077";
    System.out.println((char)Integer.parseInt(s.substring(1), 8));Now all you have to do is parse through the String and replace them, which I think shouldn't be too hard for you now :)

  • TPC 2012 - Problems with shared variable

    Hi,
    I tried to program simmilar thing to this one http://zone.ni.com/devzone/cda/tut/p/id/5548 on TPC 2012. But it doesn't work.I can see that both programs on my laptop and TPC are working(I've added an additional counter with display), but I cannot see any effect on TPC when I change the value of shared variable on my laptop. I use LabView 8.6 with Touch Panel Module. My question is what are the exact steps to run such application on TPC2012? Are they the same as for TPC 2006?
    I've noticed following issues:
    1.I cannot deploy the program from Project Manager(there is an information that maybe TPC Service is not started. - I've found such information about TPC Service http://digital.ni.com/public.nsf/allkb/DE177828D27A14A48625734E00768B66 but in fact I cannot find Start » All Programs»National Instruments » NI TPC Service » NI TPC Service Manager 1.0 Does it mean, that the TPC Service is not installed and the programm with shared varibles won't be working or can I start it somehow in another way? Do I need to have TPC service installed on TPC2012?
    Until now, I've built the project and sent it through FTP to TPC(the folder was /TEMP) and then started it.
    2.Ping works OK
    Thank you in advance for any hints how to solve this problem.
    Martin

    Well no problem, but I'm frustrated with this issue... I've tested many things and nothing. Just to help someone else as I in the future, these are my sources:
    http://forums.ni.com/t5/LabVIEW/TPC-2012-Problems-with-shared-variable/m-p/1009631/highlight/false#M...
    http://digital.ni.com/public.nsf/allkb/28536DE7E2D9E98B8625770B00738920?OpenDocument
    http://zone.ni.com/reference/en-XX/help/372507B-01/lvtpcgsm/tpc_install_sharvar/
    http://zone.ni.com/reference/en-XX/help/372507C-01/lvtpcgsm/tpc_install_sharvar/
    http://digital.ni.com/public.nsf/allkb/23532363F4905EC28625727A00730B80?OpenDocument
    http://forums.ni.com/t5/FieldPoint-Family/TPC-2006-Not-Listed-in-Targets-and-Devices/td-p/566325
    http://forums.ni.com/t5/LabVIEW/MAX-can-t-detect-TPC-2106T/td-p/831524
    http://zone.ni.com/devzone/cda/tut/p/id/5868
    http://digital.ni.com/public.nsf/websearch/28B748B9697B79E18625725A00009066?OpenDocument
    http://digital.ni.com/public.nsf/websearch/D1726990DCEB82E4862570F20069C57D?OpenDocument
    http://digital.ni.com/public.nsf/allkb/3B469103BBDD4CE48625726000665B36
    I hope find some hint..
    Fabian León
    Certified LabVIEW Associate Developer

  • Problem with String to Int conversion

    Dear Friends,
    Problem with String to Int conversion
    I am having a column where most of the values are numeric. Only 4 values are non numeric.
    I have replaces those non numeric values to numeric in order to maintain the data type.
    CASE Grade.Grade  WHEN 'E4' THEN '24'  WHEN 'E3' THEN '23'  WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' ELSE Grade.Grade  END
    This comes the result as down
    Grade
    _0_
    _1_
    _10_
    _11_
    _12_
    _13_
    _14_
    _15_
    _16_
    _17_
    _18_
    _19_
    _2_
    _20_
    _21_
    _22_
    _23_
    _24_
    _3_
    _4_
    _5_
    _6_
    _7_
    _8_
    _9_
    Refresh
    Now I want to convert this value to numeric and do some calculation
    So I changed the formula as below
    cast (CASE Grade.Grade  WHEN 'E4' THEN '24'  WHEN 'E3' THEN '23'  WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' ELSE Grade.Grade  END as INT)
    Now I get the following error
    View Display Error
    _     Odbc driver returned an error (SQLExecDirectW)._
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    _State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 1722, message: ORA-01722: invalid number at OCI call OCIStmtFetch. [nQSError: 17012] Bulk fetch failed. (HY000)_
    SQL Issued: SELECT cast ( CASE Grade.Grade WHEN 'E4' THEN '24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' ELSE Grade.Grade END as Int) saw0 FROM "Human Capital - Manpower Costing" WHERE LENGTH(CASE Grade.Grade WHEN 'E1' THEN '20' WHEN 'E2' THEN '21' WHEN 'E3' THEN '22' WHEN 'E4' THEN '23' ELSE Grade.Grade END) > 0 ORDER BY saw_0_
    Refresh
    Could anybody help me
    Regards
    Mustafa
    Edited by: Musnet on Jun 29, 2010 5:42 AM
    Edited by: Musnet on Jun 29, 2010 6:48 AM

    Dear Kart,
    This give me another hint, Yes you are right. There was one row which returns neither blank nor any value.
    I have done the code like following and it works fine
    Thanks again for your support
    Regards
    Code: cast (CASE (CASE WHEN Length(Grade.Grade)=0 THEN '--' ELSE Grade.Grade END) WHEN 'E4' THEN '24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' when '--' then '-1' ELSE Grade.Grade END as Int)

  • Problems with /tmp variable

    Hi,
    I'm writing a shell script and I seem to be having problems with a variable that is creates a directory in the /tmp directory. Essentially, there are several points where various parts of the script call out information that gets exported to that directory. My script is failing upon creation of this directory, is there any specific permissions on the /tmp directory in mac that would need to be set before something like this occurred?
    Thanks!

    My script is failing upon creation of this directory
    Maybe you could post your code, that way we can see how you're trying to create the directory and may be able to spot the problem. As it is we're working blind, and that's not easy.

  • Problem with environment variables

    JAVA_HOME = C:\JBuilder9\jdk1.4
    Path = C:\oracle\product\10.1.0\Db_1\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin\client;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;.;C:\oracle1\product\10.1.0\Db_3\jdbc\lib\classes12.zip
    When I run foo.java I get this error, which i believe is because of some kind
    of problem with environment variables.
    Exception in thread "main" java.lang.NoClassDefFoundError: OraThinI eliminated this path
    C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin
    just to check whether two paths of jdk bin folder is causing problem but I see no change.
    Please help

    I had solved it myself
    I am a genious :P
    Just do this
    JAVA_HOME = C:\JBuilder9\jdk1.4
    CLASSPATH = C:\oracle\product\10.1.0\Db_1\jdbc\lib\classes12.zip;.;%JAVA_HOME%\bin
    PATH= C:\oracle\product\10.1.0\Db_1\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin;C:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin\client;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;.;C:\oracle1\product\10.1.0\Db_3\jdbc\lib\classes12.zip;%JAVA_HOME%\bin

  • Problems with string tokenizer

    okay heres my problem, i have a textarea displaying a program listing and i have to extract variables i.e public int something;
    i have tried many different approaches but still the output is not what i was looking for. Can someone have a look at my code and check for mistakes that i cant find
    public void createDataDictionary() {
              if(fullText.equals("")) return;//do nothing if no text exists
              String checkText = fileContents.getText();//store text area contents into string
              String dataType = "";
              String variable = "";
              String accessModifier = "";
              StringTokenizer str = new StringTokenizer(checkText," \n", true);
              fileCheckBox.setText("");//clear file check box
              while(str.hasMoreTokens()) {//loop while there are more tokens to tokenize
                   try{                    
                        checkText = str.nextToken();
                        //check for comments
                        if((checkText.startsWith("//")) || (checkText.equals("//")) ||
                           (checkText.startsWith("/**")) || (checkText.equals("/**")) ||
                           (checkText.startsWith("*")) || (checkText.equals("*"))) {
                             isComment = true;                    
                        if((checkText.equals("\n"))) isComment = false;
                        if(!isComment)
                             //check for access modifiers
                             if((checkText.equals("public")) || (checkText.equals("private")) ||
                                (checkText.equals("protected"))) {
                                          accessModifier = checkText;
                                     }else {
                                          accessModifier = "";
                             //check for data types             
                             if((checkText.equals("boolean")) || (checkText.equals("char")) ||
                                     (checkText.startsWith("String")) || (checkText.equals("int"))) {
                                       dataType = checkText;
                                       variable = str.nextToken();//get variable expression
                                       System.out.println(accessModifier + " " + dataType + " " + variable);
                   }catch(NoSuchElementException nsee) {//not enough tokens to complete operation
                        JOptionPane.showMessageDialog(null, "End of file");
                        return;//break from method
         }here is sample text
    private String seven = "help";
    char five[];
    // String here
    //int found
    public boolean okay
    and here is the output
    String
    char
    String
    boolean
    //note the space before each output
    hope someone can help
    thanx in advance

    1. Why do you check to see if the token starts with
    //, /*, etc, etc. Later you check if the token
    equals private, public, protected. It couldn't
    equal if it started with a comment.if the token starts with a comment i dont want to read the rest of the line, so i set the isComment flag to true
    2. I strongly suggest that you do it line by line.
    Perhaps a string tokenizer that only tokenizes by
    lines, then within that loop, another that tokenizes
    by whitespace. i take it you mean putting the text into a bufferedreader and then using readLine()?? Bit new to string tokenization as you can possibly see
    i managed to get the small test text to work more or less as i wanted but when ever i load a large code listing, the results are erratic to say the least
    heres a section of this code
    private int textNum = 0;/**Integer used to hold the text position within any given line*/
         private int lineNum = 0;/**Integer used to hold the line number within any given file*/
         static boolean application = false;/**Used to track if applet is ran from a browser or JAR file*/
         static boolean fileOpened = false;/**Used to track if file has already been opened*/
         static boolean isComment = false;
         private char lCurve = '(';
         private char rCurve = ')';
         private char lCurly = '{';
         private char rCurly = '}';
         private char lSquare = '[';
         private char rSquare = ']';
         String fullText = "";and heres the output
    public int textNum //should be private!!!!
    int lineNum //missing private
    boolean application //missing static
    boolean fileOpened //missing static
    boolean isComment //missing static
    //all below missing private     
    char lCurve
    char rCurve
    char lCurly
    char rCurly
    char lSquare
    char rSquare
    String fullText //not there at all

  • Problem with application-variables - CFLOCK?

    Hi,
    i have a problem with my application. It is a multi-user
    application with 100 parallel-users and CFMX 7.
    The problem wich occures is with application variables. These
    are mainly structs wich get filled onApplicationStart(). The
    problem is, that the variables suddenly disappear, they are empty.
    I have read about CFLock and found out, that it is necesseary
    to use cflock. And i found out, that onApplicationStart does
    correct locking automatically. That is where i do not understand
    the problem. The variables get intialized correctly and in further
    they only get read-access. Why can they be corrupted?
    My other question about that is, wheather i need cflock for
    all Read-Access to Application and Session-Variables, even if there
    happens no writing to the variables?
    Best Regards,
    Andreas

    > ?The element of position 2, of dimension 2, of an array
    object used as part of
    > an expression, cannot be found.?
    > The array is in this case the struct.
    Well, OK, that could be a problem. Arrays are not structs:
    they are two
    different things, are not interchangeable, and have
    completely different
    sets of functions to utilise them. You cannot treat a struct
    as an array.
    If CF is claiming your "struct" is an array, then it actually
    *is* an
    array, not a struct.
    What's the line of code which is generating that error?
    I suppose one could get this error if you have an array of
    structs thus:
    myArray
    .key1
    myArray.key2
    (etc)
    and you're trying to reference it with a numeric key rather
    than by key
    name, eg:
    myArray
    [n]
    When n is an integer value, rather than a string (which
    corresponds to the
    name of the key).
    > > Have you trapped the error, done a <cfdump>
    of the application scope and
    > > checked to see if it's the whole lot going awry, or
    just some values?
    > I have not used cfdump for it, because the server had to
    be immediately
    > restarted for our customers. But i think, that it is
    not completely empty,
    > because the index runs to pos2 of dimenstion2.
    So does this not happen in your dev / testing environment?
    > Will
    > onApplicationStart() be called before? Or only if
    onRequestStart() returns true?
    I would ***-u-me that the application one would be called
    before the
    request one. It's pretty easy for you to test this though, I
    should think?
    (Sorry: for reasons beyond the scope of this conversation,
    we're still
    forced to use Application.cfm in our software, so I've only a
    passing
    knowledge of how Application.cfc works).
    > Here is the code from onRequestStart()
    > <cffunction name="onRequestStart"
    returntype="boolean">
    > <cfargument name="Requestedpage" required="yes" />
    > <cfscript>
    > var lFile = "/cargorent/Login.cfm";
    > var iPosn = ListFindNoCase( lFile,
    Arguments.Requestedpage );
    > if( iPosn gt 0 )
    > return true;
    >
    > if( NOT IsDefined( "session.user.Loginname" ) or
    session.user.Loginname eq
    > "" )
    > {
    > WriteOutput( "<p><p> The current user is no
    longer valid, please log in
    > again.</p></p>" & chr(10) & chr(13)
    > WriteOutput( "<script
    language=""javascript"">parent.location = ""
    http://"
    > & CGI.HTTP_HOST &
    "/Login/Login.cfm"";</script>" );
    > return false;
    > }
    >
    > return true;
    > </cfscript>
    > </cffunction>
    One thing I will say here is that I really think you should
    be separating
    your processing from your display. A function should do
    processing. it
    should pass that processing back to a CFM template which
    should handle
    whatever needs to be displayed on the browser. Although
    that's nowt to do
    with your current issue.
    Adam

  • Problem with String in a Vector

    I'm making a small hangman game. And I got a problem with putting words in a Vector... This is the code... Can someone tell me what I'm doing wrong?
    // First I define it.
    Vector Words;
    //  Then add the words
    Vector Words = new Vector();
    Words.add(new String("HELLO"));
    Words.add(new String("GOOD BYE"));
    // When I try to get a string from the Vector I use this.
    // The program compiles but when I try to run it I get NullPointerExeption here
    W = (String) Words.elementAt(0);

    Not sure since I cant see all of your code but looks like this might be your problem:
    // First I define it.
    Vector Words; //<-- here you define a Vector named Words that is null
    // Then add the words
    Vector Words = new Vector(); //<-- here you define another vector named Words that holds a reference to a new Vector. This is a different reference than the one created above so you should probably remove the "Vector" part from the beginning of this line. Is this a local variable to a method and the one before is a global variable?
    //Here you probably access the locally created Words vector which is initialized
    Words.add(new String("HELLO"));
    // When I try to get a string from the Vector I use this.
    // The program compiles but when I try to run it I get NullPointerExeption here
    W = (String) Words.elementAt(0); //<--and here my guess is that this statement is inside another method than the one with the local Words vector defined. Thus this one accesses the global Words Vector that is never initalized and is Null. And that gives you the NullPointerException.
    So try changing the statement
    Vector Words = new Vector();
    to
    Words = new Vector();
    or just remove it totally and move the Vector creation to the place where you introduce the global variable.
    Of course I might be totally wrong since I cant see all of your code but that is my guess.
    Hope it helps,
    -teka

  • Problema with strings as parameters

    I'm facing a curious problem. I have already downloaded a few classes that encode special characters into html entities. All of them receive a string paramter and return the encoded string.
    The problem is that if i pass an actual string as paramater, the result is ok. But if i pass a string variable as parameter, the functions don't work.
    I mean, if i use this:
    String str = HTMLTools.encode("Usu�rios");
    The result in str is "Usu&aacuterios" -> Correct
    On the other hand, if i use
    String str1 = "Usu�rios";
    String str = HTMLTools.encode(str1);
    The result in str is "Usu�rios" -> WRONG!!!!
    This is freaking me out!!! I'm going nuts. It's happened with almost ten different classes the same thing. Idon't know how to fix that.
    Does anybody has any clue?
    Thanks a lot to all.

    I mean, if i use this:
    String str = HTMLTools.encode("Usu�rios");
    The result in str is "Usu�rios" -> Correct
    On the other hand, if i use
    String str1 = "Usu�rios";
    String str = HTMLTools.encode(str1);
    The result in str is "Usu�rios" -> WRONG!!!!Um... this may be an accident of encoding it for a web
    page, but the value you assign to str1 appears to be
    wrong?You're right. This is a problem of encoding for a web page. That's why i have to encode the html entities, but i'm having no success on that.

  • Purchased ColdFusion 10: Having problem with session variables

    My Dept. has just bought CF10 and I'm finally updating my existing web app to CF10 from CF8. My First Problem with CF10 is using session variables.
    When using the lower version of CF (since CF 4 to 8) I have never had any problem setting up session variables and getting or using these variables in other pages after a successful login but with CF 10 it seems setting session variables and using them in other pages are a major problems. I'm not sure where have I done wrong in the codes.
    First I'm setting the session in my Application.cfc This way:
    <cfcomponent displayname="Application" output="true">
      <cfset THIS.Name ="MyNewApp"/>
      <cfset THIS.ApplicationTimeout = CreateTimeSpan(0,0,20,0) />
      <cfset THIS.SessionManagement ="YES"/>
      <cfset THIS.SessionTimeout = CreateTimeSpan( 0, 0, 20, 0 ) />
      <cfset THIS.SetClientCookies = false />
    <cffunction name="OnApplicationStart" access="public" returntype="boolean" output="false">
    <cfset application.Main_DSN = "TESTDB">
    <cfreturn true />
    </cffunction>
    <cffunction name="onApplicationEnd" output="false">
          <cfargument name="applicationScope" required="true">
        </cffunction>
    <cffunction name="OnSessionStart" access="public" returntype="void" output="false" hint="Fires when user session initializes.">
    <cfset session.loggedin = "NO">
    <cfset session.username = "">
    <cfset session.userrights = "">
    <cfset session.usergroup = "">
    </cffunction>
    </cfcomponent>
    After login, user is validated and set values to those session.variables:
    ........user validation codes here......................
    <cfif mylogin NEQ true>
          <cflocation url="/login/login.cfm">
          <cfabort
    <cfelse>
          <cfset session.loggedin="Yes">
          <cfset session.username="#Trim(Form.username)#">
         <CFSET qUserRights = LoginObj.getUserRights('#Trim(Form.username)#')>
         <cfset session.userrights = qUserRights><!--- it's a query --->
        <CFSET qUserGroup = LoginObj.getUserGroup('#Trim(Form.username)#')>
            <cfloop query="qUserGroup">
               <cfset session.usergroup = user_group>
               <cfbreak>
            </cfloop>
        <!--- ****************** ???????????????????????????????????????????????????????????????????????????
        When I do cfdump in at this level, I can see that all of these session variables have been assigned to their values.
        But these session variables are not accessible from other pages. Other pages still show these session variable without its value.
        So, when I use these cfdumps in the index.cfm it is shown as they're not yet assigned with any values   ****************** --->
       <cfdump var="#session.loggedin#">
       <cfdump var="#session.username#">
       <cfdump var="#session.userright#">
       <cfdump var="#session.usergroup#">
    </cfif>
    In index.cfm, Before Login I got:
    session.loggedin = NO
    session.username = ["empty string"]
    session.userrights = ["empty string"]
    session.usergroup = ["empty string"]
    After a successful Login:
    session.loggedin = NO
    session.username = ["empty string"]
    session.userrights = ["empty string"]
    session.usergroup = ["empty string"]
    Have I done something wrong? These codes work on CF8. Please help.
    I need to mentioned:
    CF10 is in Linux and my web app is under https not http. But these session variables should be shared bentween http and https because some older application are still in http.

    On which page is the following code?
    After login, user is validated and set values to those session.variables:
    ........user validation codes here......................
    <cfif mylogin NEQ true>
          <cflocation url="/login/login.cfm">
          <cfabort
    <cfelse>
          <cfset session.loggedin="Yes">
          <cfset session.username="#Trim(Form.username)#">
         <CFSET qUserRights = LoginObj.getUserRights('#Trim(Form.username)#')>
         <cfset session.userrights = qUserRights><!--- it's a query --->
        <CFSET qUserGroup = LoginObj.getUserGroup('#Trim(Form.username)#')>
            <cfloop query="qUserGroup">
               <cfset session.usergroup = user_group>
               <cfbreak>
            </cfloop>
        <!--- ****************** ???????????????????????????????????????????????????????????????????????????
        When I do cfdump in at this level, I can see that all of these session variables have been assigned to their values.
        But these session variables are not accessible from other pages. Other pages still show these session variable without its value.
        So, when I use these cfdumps in the index.cfm it is shown as they're not yet assigned with any values   ****************** --->
       <cfdump var="#session.loggedin#">
       <cfdump var="#session.username#">
       <cfdump var="#session.userright#">
       <cfdump var="#session.usergroup#">
    </cfif>

  • Problem with hierarchy variable while displaying query in Portal

    Hi,
    I came up with an problem with a query in the portal.  The problem is :
    I have one query which is displayed in the portal. The Query has hierarchial selection criteria. I am executing the same query using analyzer. Its taking the variable from the selection and displaying it on the analyzer. I have used the option to " display the query on web " from the BEX query designer. From there its opening and displaying the results with the given selection criteria.
    Where as when i open the query seperately in portal, its not displaying the results.
    I came to know from one of my colleague that the porblem is with the Web item and the hierarchial variable declared in WAD  was different from the variable declared in the BEX Query designer.
    I never Worked with WAD. I tried finding out the variable definition. But i was unable to find out where the Hierarchial variable was defined.
    Please help me out regarding the same.

    The problem is sovled.
    Poornima.

  • Problem with substitution variable

    Hi All,
    I am facing problem with usage of substitutiion variable. I have following code in my script
    Edited by: Tarak on Mar 4, 2009 3:27 AM

    sorry I missed the script.
    create table tempdata
    (description varchar2(200))
    TABLESPACE &tspacename
    /Sqlplus is not asking for the value of tspacename.I am getting following error.
    TABLESPACE &tspacename
    ERROR at line 3:
    ORA-02216: tablespace name expectedI am not sure what is wrong with SQLPLUS setting.Can anybody help?

  • Having problem with setting variable on a textfield

    I'm using createTextField to create a textfield. I have also created a input textfield with a variable called textline1 (I don't create the inputfield with as).
    I want to display the letters in the created textfiled that I'm typing in the input field. So this in my AS coed:
    _root.createTextField("text1",1,100,100,300,100);
    text1.variable = textline1;
    format1 = new TextFormat();
    format1.color = 0xff0000;
    format1.size = 50;
    format1.bullet = false;
    text1.setTextFormat(format1);
    but it doesn't work. So anyone see the problem?
    (sorry for bad english)

    i think you're going to have more problems if you continue using textfield variables.  you should not use them.  just use the text property of the textfield to reference its contents.
    but, if you want to continue, use:
    var tl:MovieClip=this;
    fontsize=20;
    myInputText_txt.onChanged = function(text1:TextField) {
    _root.myText_mc.createTextField("text_txt",1,100,100, 100,100);
    _root.myText_mc.text_txt.variable = tl["text2"];
    text2=text1.text;
    format1 = new TextFormat();
    format1.color = 0xff0000;
    format1.size = fontsize;
    format1.bullet = false;
    text_txt.setTextFormat(format1);
    p.s.  please mark this thread as answered.

Maybe you are looking for