Still no one understanding "getText()" [Spout]?

Discussion in 'Plugin Development' started by MuisYa, Sep 14, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    MuisYa

    I still got this issue:
    My Button needs to get the text out of a GenericTextField.
    If i press my button, how to "getText()" because that method doesnt work for me.
    If you know hoooow to? Please response here :3 (Skype would be nice)

    Thanks alot!
     
  2. Offline

    sddddgjd

    What doesn't work,exactly? :|
     
  3. Offline

    MuisYa

    @sddddgjd Is it cool to call you on skype after college? (muis.versluis)
    Because i g2g right now...

    Very Very Very good motto: ''Don't use Essentials its old,bloated and why in the world is it listening for pistons?''
     
  4. Offline

    sddddgjd

    How do you know my skype?
    ooh,that's your skype,ok,i'll add you!
     
  5. Offline

    nossr50

    Code:java
    1. public class screenListener extends ScreenListener
    2. //Make sure to have a screen listener so you can monitor changes of the TextField
    3. public void onTextFieldChange(TextFieldChangeEvent event)
    4. {
    5. SpoutPlayer sPlayer = event.getPlayer();
    6. String text = event.getTextField().getText();
    7. //text is now equal to the current text inside the text field
    8. }
    9.  


    Hope this helps, make sure to register custom events!
     
  6. Offline

    MuisYa

    @nossr50 Wheew! Thanks alot, i will try this when im at home again!
     
  7. Offline

    nossr50

    I should mention you will want to make sure that TextField belongs to your plugin, since this event will fire for any screen with a text field.
     
Thread Status:
Not open for further replies.

Share This Page