Why are fnSetFocus and fnCellFromCoords private?

Why are fnSetFocus and fnCellFromCoords private?

koidekoide Posts: 3Questions: 0Answers: 0
edited April 2012 in KeyTable
I have a DataTable with KeyTable (with jEditable plugged in) enabled where the first three columns should not receive focus when navigating the table.

I finally did this by modifying KeyTable.js exposing those two methods and then
[code]
keys.event.focus(0, null, function () {
pos = keys.fnGetCurrentPosition();
keys.fnSetFocus(keys.fnCellFromCoords(3, pos[1]), true);
});
keys.event.focus(1, null, function () {
pos = keys.fnGetCurrentPosition();
keys.fnSetFocus(keys.fnCellFromCoords(3, pos[1]), true);
});
keys.event.focus(2, null, function () {
pos = keys.fnGetCurrentPosition();
keys.fnSetFocus(keys.fnCellFromCoords(3, pos[1]), true);
});
[/code]

Why aren't this methods public in the official release? They offer a lot more flexibility in KeyTable's usage.

Replies

  • allanallan Posts: 61,439Questions: 1Answers: 10,053 Site admin
    fnSetPosition is the public alias of the internal function _fnSetFocus and it abstracts the "node or coordinates" issue out (you can pass in either).

    Allan
  • koidekoide Posts: 3Questions: 0Answers: 0
    In what version? I can't find that function in non minimized 1.1.1
  • allanallan Posts: 61,439Questions: 1Answers: 10,053 Site admin
    KeyTable 1.1.1 is over two years old now :-). The current release is 1.1.7: http://datatables.net/download/ . I think it was around 1.1.4 where that function was added.

    Allan
  • koidekoide Posts: 3Questions: 0Answers: 0
    edited April 2012
    Found the culprit, googling for KeyTable has as first result http://www.sprymedia.co.uk/article/KeyTable which has a link to the direct 1.1.1 download and no direct link that I could see to the right download location. It would be nice of you to edit that page to point to the right download page.

    It certainly seemed strange to me that KeyTable didn't have maintenance releases :)

    Thanks!
  • allanallan Posts: 61,439Questions: 1Answers: 10,053 Site admin
    Ah! Yup - I'll get that page updated. Thanks!

    Allan
This discussion has been closed.