-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define constants for Tool onCancel reasons #552
Comments
Yes! I'm always defining these in my extensions! |
We should do a "Constant all the Magic" cleanup sweep. |
Since these are relative to tool objects, ... I'd prefer ... TOOL_CANCEL_ESC = 0
TOOL_CANCEL_RESELECT = 1
TOOL_CANCEL_UNDO = 2 ... or ... TOOL_REASON_ESC = 0
TOOL_REASON_RESELECT = 1
TOOL_REASON_UNDO = 2 |
A few remarks
|
Just a thought that if class Sketchup::Tool
CANCEL_REASON_ESC = 0
CANCEL_REASON_RESELECT = 1
CANCEL_REASON_UNDO = 2
CANCEL_REASON_REDO = 3
end ... then any explicit subclassing would inherit the constants. This still gives programmers the option of subclassing or not. Backstory: I dislike so many top level constants. The list of them is already too long. |
Currently we need to check for hardcoded integer values, or define these somewhere in our extensions. Ideally these should be defined by the SketchUp Ruby API.
The text was updated successfully, but these errors were encountered: