CLIM mail archive


a display goodie...

#+ACL 4.2

here's something I fixed up just recently that's QUITE useful. ever
notice that an app-pane pointer is almost indecipherable? this should
fix that...

where you used to get

#<application-pane @ x54839257>

you can now get

#<application-pane YOUR-PANE-NAME>

!! now your error messages will tell you exactly which pane had a
problem !!

 -- clint

someone who knows more clim details than I should look at this and see
whether or not I've guessed correctly about the hierarchy of panes...

;;;here's something really cool, which makes error-messages considerably more valuable.
;;;it's probably pretty fragile, tho...

(defmethod print-object ((myself clim::application-pane) stream)
  (princ " #<APPLICATION-PANE " stream)
  (dolist (top-pane (slot-value (slot-value myself 'clim-silica::frame)
    (when (eq myself (get-app-pane (cadr top-pane)))
      (prin1 (car top-pane)
  (princ "> " stream))

;;;this will lose if it never gets an actual app-pane. I don't know the cutoff point.

(defun get-app-pane (thing)
  (when (null thing) (return-from get-app-pane 'OOPS))
  (if (typep thing 'application-pane)
    (get-app-pane (cadr (member :contents 


Main Index | Thread Index