void
WizChatShortcutMenu::Receive
	(
	JBroadcaster*	sender,
	const Message&	message
	)
{
	Wiz2War* connMgr = WizGetConnectionManager();

	if (sender == connMgr && message.Is(Wiz2War::kConnectionAccepted))
		{
		const Wiz2War::ConnectionAccepted* info =
			dynamic_cast<const Wiz2War::ConnectionAccepted*>(&message);
		assert( info != NULL );
		InitMenu(info->GetPlayerIndex());
		}

	else
		{
		if (sender == this && message.Is(JXMenu::kItemSelected))
			{
			const JXMenu::ItemSelected* info =
				dynamic_cast<const JXMenu::ItemSelected*>(&message);
			assert( info != NULL );
			itsMessage->SetText(GetItemText(info->GetIndex()));
			itsMessage->SetCaretLocation(itsMessage->GetTextLength()+1);
			}

		JXTextMenu::Receive(sender, message);
		}
}
void
WizChatDirector::WizChatDirectorX()
{
	itsDoubleSpaceFlag = kJFalse;

	ListenTo(WizGetConnectionManager());
}
void
WizChatDirector::Receive
	(
	JBroadcaster*	sender,
	const Message&	message
	)
{
	Wiz2War* connMgr = WizGetConnectionManager();

	if (sender == connMgr && message.Is(Wiz2War::kChatMessage))
		{
		const Wiz2War::ChatMessage* info =
			dynamic_cast(const Wiz2War::ChatMessage*, &message);
		assert( info != NULL );
		AppendMessage(info->GetSenderIndex(), info->GetMessage());
		(GetWindow())->Deiconify();
		}

	else if (sender == connMgr && message.Is(Wiz2War::kPlayerJoined))
WizChatShortcutMenu::WizChatShortcutMenu
	(
	JXInputField*		message,
	JXContainer*		enclosure,
	const HSizingOption	hSizing,
	const VSizingOption	vSizing,
	const JCoordinate	x,
	const JCoordinate	y,
	const JCoordinate	w,
	const JCoordinate	h
	)
	:
	JXTextMenu("", enclosure, hSizing, vSizing, x,y, w,h)
{
	itsMessage = message;

	SetUpdateAction(kDisableNone);
	ListenTo(this);
	ListenTo(WizGetConnectionManager());
}