void AddressDrop::KeyUp(const char* pzString, const char* pzRawString,uint32 nKeyCode) { if (pzString[0] == VK_ENTER) { Looper* pcParentLooper = pcParentView->GetLooper(); pcParentLooper->PostMessage(M_SELECTION,pcParentView); } }
int main() { Looper *looper = new Looper(); Handler *handler = new Handler(); looper->AddHandler(new Handler()); looper->AddHandler(new Handler()); looper->AddHandler(handler); looper->AddHandler(new Handler()); looper->AddHandler(new Handler()); looper->Run(); looper->PostMessage(new BMessage(kMessage), handler); snooze(1000000); looper->Lock(); looper->Quit(); }