A Widget Library
View Ticket
Not logged in
Ticket UUID: 1651842
Title: notebook: -raisecmd should be able to forbid raising
Type: RFE Version: None
Submitter: nobody Created on: 2007-02-04 17:49:00
Subsystem: bwidget Assigned To: nobody
Priority: 5 Medium Severity:
Status: Deleted Last Modified: 2013-07-04 17:57:21
Resolution: Not Applicable Here Closed By:
    Closed on:
Description:
if the command associated with -leavecmd returns 0, the page is not left. (BTW, there's a spelling mistake in the docs :)) Thus I can make some checks whether I want to allow the user to move on..


The same should be true for the -raisecmd.. if it returns 0, don't raise the page, but stay where you are instead..


I had a brief look at noteboo.tcl (bwidget 1.8) and simply copied the code used at -leavecmd

% diff notebook.tcl.ori notebook.tcl
697c697,700
<           uplevel \#0 $cmd
---
>             set code [catch {uplevel \#0 $cmd} res]
>             if { $code == 1 || $res == 0 } {
>                 return -code $code $res
>             }


this kinda works.. if the command returns 0 the tab is not raised, however, the tab I was at before now does not appear selected anymore..



Just an idea :)