BasicOView.onRouteKeyPress Member
Syntax
object.onRouteKeyPress(event);
Arguments
Argument | Summary |
---|---|
event |
Returns
Remarks
See Also
Source Code
function bov_rkeypress (event)
{
var rec;
var rowIndex;
if ("onRowCommand" in this && (event.keyCode == 13 || event.charCode == 32))
{
if (!this.selection)
return;
rowIndex = this.tree.view.selection.currentIndex;
if (rowIndex == -1 || rowIndex > this.rowCount)
return;
rec = this.childData.locateChildByVisualRow(rowIndex);
if (!rec)
{
ASSERT (0, "bogus row index " + rowIndex);
return;
}
this.onRowCommand(rec, event);
}
else if ("onKeyPress" in this)
{
rowIndex = this.tree.view.selection.currentIndex;
if (rowIndex != -1 && rowIndex < this.rowCount)
{
rec = this.childData.locateChildByVisualRow(rowIndex);
if (!rec)
{
ASSERT (0, "bogus row index " + rowIndex);
return;
}
}
else
{
rec = null;
}
this.onKeyPress(rec, event);
}
}