added get-button-label method to switchable-button%

original commit: 65579793afbebb705080267a37580ec0b94e1e97
This commit is contained in:
Robby Findler 2011-01-13 09:32:22 -06:00
parent 6cab7dec39
commit b77f73f013
2 changed files with 36 additions and 32 deletions

View File

@ -35,8 +35,10 @@ as little as possible vertical space.
}
@defmethod[(command) void?]{
Calls the button's callback function.}
Calls the button's callback function.
}
@defmethod[(get-button-label) string?]{
Returns the label of this button.
}
}

View File

@ -56,6 +56,8 @@
[alternate-bitmap bitmap]
[vertical-tight? #f])
(define/public (get-button-label) label)
(when (and (is-a? label bitmap%)
(not (send label ok?)))
(error 'switchable-button% "label bitmap is not ok?"))