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

This commit is contained in:
Robby Findler 2011-01-13 09:32:22 -06:00
parent ead6c2003e
commit 65579793af
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?"))