Changeset main,83 for main


Ignore:
Timestamp:
01/18/2008 06:49:28 PM (18 years ago)
Author:
David Owen <dsowen@…>
branch-nick:
tui
revision id:
dsowen@fugue88.ws-20080118184928-4csk30od8tdj1x9u
Message:

SELECTED-ROW now returns NIL when the index is out-of-bounds (usually no rows).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/simple-table.lisp

    r77 r83  
    3131
    3232(defmethod selected-row ((tbl simple-table))
    33   (elt (data tbl) (selected-row (model tbl))))
     33  "Returns NIL if no rows are present."
     34  (let ((data (data tbl))
     35        (idx (selected-row (model tbl))))
     36    (handler-case (elt data idx)
     37      (t () nil))))
    3438
    3539(defmethod scroll-percent ((tbl simple-table))
Note: See TracChangeset for help on using the changeset viewer.