<?php

class HintBox extends ValueReadableView {



	public $hintAction;
    protected $package = 'experimental';



	public function showHints($a) {
		$response = ResponseContext::getInstance();
		$response->HintBox->showHints($this->getId(), json_encode($a));
	}



	public function __toString() {
		if (!$this->hintAction) {
			throw new Exception('hintAction not defined for ' . get_class($this) . ' ' . $this->getId());
		}
		$this->addListener(new KeyPressListener(new Action($this->hintAction, $this->valueReader())));
		return parent::__toString();
	}



} // class HintBox

?>