Miyako,

You’re quite right: the documentation is clear. However, it was every bit as 
clear in v14, and what I am doing worked.

I’m not being quite as naughty as you might think. My main host database 
handles my practice (I’m a lawyer). It has a self-contained unit within it 
which displays a dialog and does various semi-complex calculations that people 
like me find useful. It doesn’t interact in any way with any other part of the 
database and doesn’t use any of its tables. 

Colleagues saw it and thought it would be useful for them, so I hived it off 
into a component. I can build that component into a very simple shell, which 
offers just the calculator, and give it to them; and I can continue to include 
it as a module in my main application. I can develop it in only one place, 
which is handy.

It doesn’t need any of the host menus to be available. It’s just desirable that 
all the host menus are in fact available.

As John DeSoi has pointed out, it is in fact still possible to do what I want 
to do in the way he suggests: get the host to install the menu bar via a 
callback and make sure that any method identified in the menu editor is flagged 
as shared. Thanks, John!

Jeremy


Jeremy Roussak
[email protected]



> On 18 Dec 2017, at 00:44, Keisuke Miyako via 4D_Tech <[email protected]> 
> wrote:
> 
>> The form was set in v14 to have an active menu bar, called “Main”. The 
>> component doesn’t have a menu bar “Main” but each parent application does.
> 
> I am surprised that this even worked.
> 
> the documentation is quite clear that menu bars created vis the Tool Box Menu 
> Editor are not shared,
> so the activate menu bar of a component form can only be loaded from its own 
> stock of menu bars.
> 
> if I needed a generic component dialog that "inherits" the host's menu bar,
> I would call SET MENU BAR in the host context before calling the component's 
> dialog method,
> or else Get/SET the menu bar in the form's On Load event.
> 
> it simply feels wrong for a component to expect a specific menu bar name in 
> its property list.
> such implicit linkage, even if it worked, should be discouraged.
> the active menu bar of a component should be a menu available locally, or 
> else undefined.
> 
> if it "stopped working" then it sounds like a bug fix.

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to