[cells-gtk-devel] setting parent

Peter Denno peter.denno at nist.gov
Wed Feb 16 23:06:33 UTC 2005


On Wednesday 16 February 2005 10:43, ktilton at nyc.rr.com wrote:

> Two possible tricks. First, always make kids a rule: (c? ....)

Do you really mean "always" here? I haven't done it before. I don't see it 
used in Vasilis's demo either.

>
> If you make the pop-up a c? rule, you always have "self" to link you into 
the hierarchy:
>    :pop-up (c? (make-menu :owner self....))
>
> Note that self would be the event-box in this context, and that I just
> invented the owner slot (tho I usually use "owner" in cases like this,
> which I have encountered before.

This worked, thanks.  Is self being bound to the containing mk-<widget> 
something we can count on?

>
> > I actually have another example where the strict 1-1 mapping
> > between widget
> > hierarchy and kids hierarchy doesn't work: user-specified stock
> > icons. But I
> > think I have a solution to that one. (clos object aren't really
> > needed here,
> > but getting the stock icons defined before the model build happens
> > has been a
> > challenge.).
>
> We can look at that, too, if you give me more specifics. Mind you, to a
> degree we have to blind-lead-blind since I do not know Gtk. But I reckon we
> can muddle thru.

This turns out to be something that can, and probably should be, done without 
using the clos objects, it is all gtk calls. I added an 
initialize-instance :after method to gtk-app that you can see in the cvs 
repository, cells-gtk/gtk-app.lisp.

Thanks for the help.

-- 
Best Regards,
 - Peter



More information about the cells-gtk-devel mailing list