[mcclim-devel] issues (bug?) with with-tab-layout in beirc
I was trying to debug a space requirement issue in beirc, so I wanted to grab hold of its tab-layout-pane (which is named 'query). Oddly, I find that (get-frame-pane <frame> 'query) returns nil. I managed to use a back door to find the pane, and it *does* have a name: BEIRC(31): (slot-value tab-pane 'climi::name) QUERY It was defined as follows: (:layouts (default (vertically () (with-tab-layout ('receiver-pane :name 'query) ("*Not Connected*" server 'receiver-pane)) ;; (68 io) ;; no drop-shadow prompt (make-pane 'clim-extensions:box-adjuster-gadget) io (20 pointer-doc) (20 ;<-- Sigh! Bitrot! status-bar)))) The with-tab-layout does have the :name option, and it invokes make-pane. AFAICT, make-pane should stuff *application-frame* into an arglist and invoke make-pane-1, which should stash this pane away in the named-panes slot of the *application-frame*. But this is evidently not happening (or, I suppose, that slot could be overwritten). Alternatively, I suppose that *application-frame* might be unbound at the time this with-tab-layout gets evaluated? I'm pretty sure that this is a bug, and that the tab-layout pane IS intended to be exposed to get-frame-pane. But I'm not sure how to fix it, myself. Thanks, R
"It's not a bug, it's a feature." You want to use 'find-pane-named' rather than 'get-frame-pane'. Per the CLIM spec, get-frame-pane only searches for stream panes, whereas find-pane-named will search all panes, including gadgets. (I personally disagree with this design, but I didn't write the spec.) I took a quick look at how the tab-layout-pane is implemented. It is comprised of two pieces: a stream pane implementing the tabs themselves (the 'tab-bar-pane'), and a layout pane derived from vrack-pane (a gadget) containing the tab-bar-pane and the panes being managed. The with-tab-layout macro assigns the name to the layout pane rather than the tab-bar-pane (rightly, since we want to name the highest member of the hierarchy), so get-frame-pane ignores it. This is certainly the correct behavior, but the behavior of get-frame-pane is unfortunate. On 4/4/06, rpgoldman@real-time.com <rpgoldman@real-time.com> wrote:
I'm pretty sure that this is a bug, and that the tab-layout pane IS intended to be exposed to get-frame-pane. But I'm not sure how to fix it, myself.
Hello On Tue, Apr 04, 2006 at 04:44:13PM -0400, Andy Hefner wrote:
The with-tab-layout macro assigns the name to the layout pane rather than the tab-bar-pane (rightly, since we want to name the highest member of the hierarchy), so get-frame-pane ignores it.
There's the accessor tab-layout::tab-bar-pane-of-tab-layout to get the tab-bar-pane of a tab-layout-pane (hey, who would have thought?), but it's not exported as I can't think why one would want to mess around with this internal stuff from the outside. Bye, Max -- Max-Gerd Retzlaff <m.retzlaff@gmx.net> http://blog.matroid.org For your amusement: Shah, shah! Ayatollah you so!
| I'm pretty sure that this is a bug, and that the tab-layout pane IS | intended to be exposed to get-frame-pane. But I'm not sure how to fix | it, myself. Nope, Check out the difference between GET-FRAME-PANE and FIND-PANE-NAMED. Paul
"PW" == Paul Werkowski <pw@snoopy.mv.com> writes:
PW> | I'm pretty sure that this is a bug, and that the tab-layout PW> pane IS | intended to be exposed to get-frame-pane. But I'm PW> not sure how to fix | it, myself. PW> Nope, PW> Check out the difference between GET-FRAME-PANE and PW> FIND-PANE-NAMED. OK, I'm quite willing to believe I'm wrong about this, but would it be possible to amplify on your response a little? Is it because the tab-layout-pane is not a clim-stream-pane? R
| | PW> Check out the difference between GET-FRAME-PANE and | PW> FIND-PANE-NAMED. | | OK, I'm quite willing to believe I'm wrong about this, but would it be | possible to amplify on your response a little? Is it because the | tab-layout-pane is not a clim-stream-pane? | I don't know what the tab-layout-pane is, not part of CLIM AFAIK, but it is most likely not. You probably can find out by using find-class and inspect to find out. Paul
Hello On Tue, Apr 04, 2006 at 08:10:21PM -0400, Paul Werkowski wrote:
I don't know what the tab-layout-pane is, not part of CLIM AFAIK, but it is most likely not.
You're right. I've written it, and it's based on my radio-layout-pane that again bases on the stack-layout-pane that's originally been written by Gilbert Baumann (see http://bauhh.dyndns.org:8000/flux/stack-layout.lisp). All the necessary files---including asdf-files and examples---can be found in this archive: http://matroid.org/flux/tab-layout_2005-09-19_17-19+0200.tar.bz2 (Or extracted at http://matroid.org/flux/tab-layout_2005-09-19_17-19+0200/ ) I hope to be soon able to merge antifuchs' drag and drop translator, and finally add it to the mcclim repository as an Extension (probably after some additional changes). The whole things looks like this: http://matroid.org/flux/tabbed-radio-pane-presentation.png Or used by Beirc (probably not the most recent version of Beirc): http://common-lisp.net/project/beirc/images/beirc.png Hmm, it seems that I haven't mentioned it on this list before. I've thought I had.. Bye, Max -- Max-Gerd Retzlaff <m.retzlaff@gmx.net> http://blog.matroid.org For your amusement: When I woke up this morning, my girlfriend asked if I had slept well. I said, "No, I made a few mistakes." -- Steven Wright
participants (4)
-
Andy Hefner
-
Max-Gerd Retzlaff
-
Paul Werkowski
-
rpgoldman@real-time.com