[Prev][Next][Index][Thread]

Re: define frame q?



Hi,

You can have slots in the frame - have you tried that?

define frame <template-frame> (<simple-frame>)
    slot %headings, init-keyword headings:, init-value whatever;
    etc...

you should be able to access these in the make(<table-control>) within the
frame definition

Regards
Gareth Baker
G.J.Baker@dl.ac.uk

"Scott Ribe" <sribe@miqs.com> wrote in message
384C476C.C7F7ACFB@miqs.com">news:384C476C.C7F7ACFB@miqs.com...
> Suppose I have a define frame with a table, like:
>
> define frame <template-frame> (<simple-frame>)
>   pane main-pane (frame)
>   make (<table-control>, ...);
>
> What I want to do is provide keyword arguments for the table via the
> frame instantiation, like:
>
> start-frame (make (<template-frame>,
>                                      headings: my-headings,
>                                      generators: my-generators,
>                                      items: my-items));
>
> and have the passed in arguments be used for the headings:, generators:,
> and items: arguments to make (<table-control>). But I can't figure out a
> straightforward syntax for this.
>
> The 3 alternatives I have thought of:
>
> 1) stuff the values into global variables that are referenced in the
> define frame (YUCK!)
>
> 2) don't use define frame; build the frame using nested calls to make
> and passing the values to make (<table-control>) where appropriate (kind
> of complicated)
>
> 3) create my own macro???
>
> Part of my problem is that I haven't worked through the multiple levels
> of macro expansion kicked off by define frame. So I don't understand the
> underlying classes/methods generated and how they fit together.





References: