openFrameworks-RaspberryPi / openFrameworks

This repo has migrated into the openFramworks core! Please go to http://github.com/openFrameworks/openFrameworks for the latest!
http://github.com/openFrameworks/openFrameworks
Other
104 stars 11 forks source link

issue with mouseX and ofGetMouseX() #117

Closed kalwalt closed 11 years ago

kalwalt commented 11 years ago

tested the easyCamExample to find the reason of this issue #86 . I did simply this test:

void testApp::mousePressed(int x, int y, int button){ ofLog(OF_LOG_ERROR, "button :" + mouseX); }

and got :

[error] button : [error] LN9gnu_cxx12_Lock_policyE2EEE [error] u_cxx12_Lock_policyE2EEE [error] unted_base_implIP15ofAppBaseWindowSt25pointer_to_unary_functionIS2_vELN9gnu_cxx12_Lock_policyE2EEE [error] EE [error] _Lock_policyE2EEE [error] _unary_functionIS2_vELN9gnu_cxx12_Lock_policyE2EEE [error] _implIP9ofBaseAppNS_11_Sp_deleterIS1_EELN9gnu_cxx12_Lock_policyE2EEE [error] ary_functionIS2_vELN9__gnu_cxx12_Lock_policyE2EEE

this happens also with ofGetMouseX() so i suppose that this is the reason that easyCam is not working. At the moment i have no idea how to fix it . @arturoc @bakercp Maybe something is missed in ofAppEGLWindow.cpp?

damian0815 commented 11 years ago

your log statement should be this: ofLog(OF_LOG_ERROR, "button :" + ofToString(mouseX) ); (this may be too much information, but:) otherwise the compiler thinks you print the string starting at (the memory location of "button" + mouseX bytes) which is some trash.. the trash is what is getting printed.

kalwalt commented 11 years ago

yes i remembered this and i'm writing just this! ouch sorry..

kalwalt commented 11 years ago

anyway,thanks for the quick answer @damiannz ! please, close the issue