Code Monkey home page Code Monkey logo

Comments (3)

oneandonlyoddo avatar oneandonlyoddo commented on August 18, 2024 3

Reason why the TextInputField doesn't work is because it doesn't get keypressed events. You can set up the event listeners for TextInputField by calling setup() or setUseListeners(true) on it upon creation in ofxTLFlags.cpp 185-189. However this leads to problems in deleting flags as the TextInputField in the just deleted flag sometimes reacts to the delete key even if you disable the listeners again upon deletion. I ended up fixing it by simply passing the keypressed args of the flag to the TextInputField when editing.

ofxTLFlags.cpp 168-184

void ofxTLFlags::keyPressed(ofKeyEventArgs& args){
    if(enteringText){
        //enter key submits the values
        //This could be done be responding to the event from the text field itself...
        if(args.key == OF_KEY_RETURN){
            enteringText = false;
            timeline->dismissedModalContent();
            timeline->flagTrackModified(this);
        }
        clickedTextField->textField.keyPressed(args); // <-- Line I added to pass the key args to the TextInputField
    }
    //normal behavior for nudging and deleting and stuff
    else{
        ofxTLBangs::keyPressed(args);
    }    
}

from ofxtimeline.

bensnell avatar bensnell commented on August 18, 2024

I've been having problems getting it to build with openAL32.dll, but two problems you mentioned I seemed to fix by

  • changing getCocoaWindow() to getWin32Window()
  • using a past version of ofxTimeline (before it was changed 5 mo ago to accommodate changes in ofxTextInputField)

from ofxtimeline.

oneandonlyoddo avatar oneandonlyoddo commented on August 18, 2024

Where would I get this "latest" version of ofxTextInputField? Can't seem to find it anywhere.
//Edit: I actually have it. However I can't type in text for Flags. Tried ofxTextInputField on its own and it works. I looked a the commits for updating ofxTimeline towards the latest version of ofxTextInputField and I can't see why it wouldn't work.

from ofxtimeline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.