Ejemplo n.º 1
0
// Include the following version of SetTargetForItems() to eliminate
// hidden polymorphism warning. Should be correct, but is unused and untested.
status_t QueryMenu::SetTargetForItems(BMessenger messenger)
{
	if (messenger.IsTargetLocal()) {
		BLooper* ignore; // don't care what value this gets
		fTargetHandler = messenger.Target(&ignore);
		return BMenu::SetTargetForItems(messenger);
	} else {
		return B_ERROR;
	}
}
Ejemplo n.º 2
0
/*
	bool IsTargetLocal() const
	@case 1			this is uninitialized
	@results		should return false.
 */
void TargetTester::IsTargetLocalTest1()
{
	BMessenger messenger;
	CHK(messenger.IsTargetLocal() == false);
}