Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Macro definition
- ================
- (defmacro updating (widget &body body)
- "Protect updating widgets."
- `(progn
- (begin-update ,widget)
- (unwind-protect (progn ,@body)
- (end-update ,widget))))
- Example
- =======
- (updating my-combo-box
- (load-data-into my-combo-box)
- (setf (selected-index my-combo-box) 0))
- Macroexpands into:
- ==================
- (progn
- (begin-update my-combo-box)
- (unwind-protect
- (progn
- (load-data-into my-combo-box)
- (setf (selected-index my-combo-box) 0))
- (end-update my-combo-box)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement