Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't compile in Visual Studio 0.9.3 | ofxTextInputField | getCocoaWindow ERRORS #135

Open
moebiussurfing opened this issue Jun 29, 2016 · 3 comments

Comments

@moebiussurfing
Copy link

Error 'getCocoaWindow': is not a member of 'ofAppBaseWindow' example-multiTimeline
Severity Code Description Project File Line Suppression State
Error 'ofxTextInputField::isEditing': cannot access protected member declared in class 'ofxTextInputField' example-multiTimeline C:\Users\manu\Documents\of_v0.9.3_vs_release\addons\ofxTimeline\src\ofxTLFlags.cpp 104
etc..

there's any way to solve this and use the addon on Windows?

@bensnell
Copy link

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)

@oneandonlyoddo
Copy link

oneandonlyoddo commented Sep 15, 2016

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.

@oneandonlyoddo
Copy link

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);
    }    
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants