Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

How do I handle events in Cocoa?

Name: Anonymous 2011-05-21 4:57

Yeah....

http://pastebin.com/EkSf2Cf5

Basically makes a window with a text field in it and uses a while loop to keep it alive until I need it to stop, then frees all the pointers. Unfortunately, every time I hover over the window with my mouse, it has the pinwheel of death and the window can't accept events, such as for example, clicking the x button to destroy it. Not sure how to implement this if it's not being handled by the window server.

Name: Anonymous 2011-05-21 5:30

>>1
I have no experience with Objective-C or Cocoa, but using a while loop there seems rather messy, and it might be what's causing the problem.
Are you sure you're not supposed to call a method on the window to make it start accepting events, or that there's no function like NSApplicationStartAndWaitUntilAllWindowsAreClosedOrSomething()?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List