Hi im trying to move a part of my code to another window this part draw a list of songs that you can change by pressing key down
but i was wondering do i have to add a listener in the main.h like this ofAddListener(guiWindow->events().keyPressed,mainApp.get(),&ofApp::keyPressed);
and if i do this i get another err
to listen to keystrokes ??
I wonder this because when i run the program it works i see two windows but if i try to select some song i get a crass::
on the if that says ::Thread 1 :EXEC_BAD_MEmory_Acceses(code=1 ,address=0x5fff)
void ofApp::keyPressed(int key){
switch (key){
case OF_KEY_DOWN:
if (dir.size() > 0 && sounds[current].isLoaded()){ <<<Thread 1 :EXEC_BAD_MEmory_Acceses(code=1 ,address=0x5fff)
sounds[current].stop();
current++;
current %= dir.size();
}
break;
@cyrstem that is a good option to save fps in your app, if you create another windows the fps of your app will be lower. On the other hand, if you have two windows you will be able to have the control panel in a window and the visual in another window, I usually do that for live performances
Yeah that was my idea too, i just didn’t knew how to put a list of files into a GUI, i was just drawing them into the sketch as texts, now i have a lot of Guis in another window