Results 1 to 5 of 5
  1.    #1  
    Hey guys,
    I have a editable text field that is being loaded with data (a username) once the scene is loaded. I'm finding that the text field stops being editable once data is loaded into it. I'm using the update function like so:

    ('TextField').update("new value");

    The text field gets loaded, but I can't do anything with it afterward. Is there something I'm missing? Thanks for any tips you can throw my way.
  2. #2  
    Quote Originally Posted by germboy View Post
    Hey guys,
    I have a editable text field that is being loaded with data (a username) once the scene is loaded. I'm finding that the text field stops being editable once data is loaded into it. I'm using the update function like so:

    ('TextField').update("new value");

    The text field gets loaded, but I can't do anything with it afterward. Is there something I'm missing? Thanks for any tips you can throw my way.
    You putting a '$' in front of that?
  3.    #3  
    Quote Originally Posted by mattbrad2 View Post
    You putting a '$' in front of that?
    Thanks for the reply. Yes, I'm using "$" as my path ... I just omitted it above.

    What I'm doing is going to a scene with a username text field. I'm then checking the HTML5 depot for a stored username. If it's found, then I am populating that text field with that username, otherwise the text field remains blank. As long as it is blank, I can edit it. Once the username is loaded, I cannot tap/click the field anymore. Ha, it's driving me crazy. Any ideas?
  4. #4  
    Quote Originally Posted by germboy View Post
    Thanks for the reply. Yes, I'm using "$" as my path ... I just omitted it above.

    What I'm doing is going to a scene with a username text field. I'm then checking the HTML5 depot for a stored username. If it's found, then I am populating that text field with that username, otherwise the text field remains blank. As long as it is blank, I can edit it. Once the username is loaded, I cannot tap/click the field anymore. Ha, it's driving me crazy. Any ideas?
    I don't have any references in front of me right now but I believe the TextField widget has to be updated using it's model attribute and then calling modelChanged().
  5.    #5  
    Thank you!!!
    I did a quick search on modelChanged and found my answer. I just had to add:

    this.userModel.originalValue = "new value";
    this.controller.modelChanged(this.userModel);

    Thank you so much!

Posting Permissions