testApp::resized - not working? (win - CB)

Hi all,
I’m having trouble getting a response from the resized() event that has been added to testApp in OF 0.06. A simple printf command doesn’t show up in the console:

  
  
void testApp::resized(int w, int h){  
    printf("resized! %i, %i\n", w, h);  
  

Anyone has a clue…?
btw. I’m trying on windows - codeblocks (on xcode it seems fine though)
cheers,
-Tim

Hey tim

in which example do you have that resized method? in the end we renamed to windowResized instead of resized.

Hey Arturo,

I was working from the allAddonsExample, but from a quick browse through the different examples it seems to me quite a few use the ‘resized’ method instead of ‘windowResized’.

I made a quick list (this is for of_preRelease_v0.06_win32_cb_FAT):

examples\

advancedEventsExample - resized
advancedGraphicsExample - resized
audioInputExample - resized
audioOutputExample - resized
emptyExample - resized
eventsExample - resized
firmataExample - windowResized
fontsExample - resized
fontsShapesExample - no method
graphicsExample - resized
imageLoaderExample - resized
imageSaverExample - resized
movieGrabberExample - resized
moviePlayerExample - resized
polygonExample - resized
serialExample - resized
soundPlayerExample - resized
soundPlayerFFTExample - resized
textureExample - resized
textureScreengrabExample - resized
windowExample - resized

addonsExamples\

3DModelLoaderExample - no method
allAddonsExample - resized
dirListExample - windowResized
networkTcpClientExample - windowResized
networkTcpServerExample - windowResized
networkUdpReceiverExample - windowResized
networkUdpSenderExample - windowResized
opencvExample - windowResized
oscReceiverExample - windowResized
oscSenderExample - windowResized
threadExample - windowResized
vectorGraphicsExample - windowResized
vectorMathExample - windowResized
vectorMathExample - windowResized
xmlSettingsExample - windowResized

HTH

And thanks for pointing out it should be windowResized, works perfect!
:slight_smile:

-tim

hey tim, thanks so much for the list!

Do any examples actually call the WindowResized method and use the arguments(w,h) to resize the window?

windowResized gets called if the window is resized (ie, like how mousePressed() gets called if the mouse is pressed).

to resize the window, use ofSetWindowShape() – there’s an example in examples/utils/windowExample