Re: Dynamic Menus


Subject: Re: Dynamic Menus
From: Mike Nordell (tamlin@algonet.se)
Date: Thu Sep 13 2001 - 16:59:25 CDT


Joaquin Cuenca Abela wrote:
[Menus an their methods/actions...]
>
> A Frame carries information about the layout and about the labelset, but
not
> about the actions (who are carried in the App object).

This is something that struck me as ... perhaps not optimal? Even if the App
owns the Frame, it's surely the Frame that is to know about its gfx elements
(including menu), no? In (my) perfect world the frame should be able to tell
its menu it wants to add a new menu item (possibly relative an exisiting
menu- or sub-menu item) that should perform "this action", where "this
action" could be either a "named" (scriptable) callback, or just a plain
C/C++ callback (I think it would be wrong to limit ourselves to just
scriptable items for menus).

As such, if actions carried out by the frame, by using callbacks or
whatever, is to be handled by the App, shouldn't the App (like any DLL
requesting a menu inserted into the frame) tell the frame "insert this menu"
and by that be decoupled from the frame?

As I'm jumping into this discussion after not reading AW-dev for a while it
might be that I'm way off, and in that case I suggest you just dismiss my
comments. :-)

But, would it be bad if we created (at least) two types of menu callbacks:

1) By "name" (which thereby is scriptable)
2) By callback ("this" pointer + member function pointer).

I don't know if a third type would ever be needed,

/Mike



This archive was generated by hypermail 2b25 : Thu Sep 13 2001 - 17:00:00 CDT