[net.micro.amiga] What does it take to...

mwm%ucbopal@BERKELEY.EDU (03/12/86)

From: Mike (I'll be mellow when I'm dead) Meyer <mwm%ucbopal@BERKELEY.EDU>

I've got a couple of questions for knowledgable developers:

1) I've got an application program that generates menus on the fly,
dynamically changing them as the world changes. Occasionally it
generates an empty menu (no, that isn't a bug). However, the Amiga
crashes when you try to pull that menu down. Is this a bug in the
Amiga? Will it go away after I disable the menu? (And if you want the
answer, ask me...)

2) Second application deals with multiple windows. So far, the only
way I can find to decide which window an event came from is to see if
any of them are active. It looks like the ACTIVEWINDOW message is just
what I want, but which window port do I get the message from? I've
heard rumors about using one port to talk to multiple windows. Anyone
know how?

I haven't made it through the ROM Kernal manual yet (that thing is
*thick*), so a section reference to the answers would be appropriate.

	Thanx,
	mwm@ucbvax
	<mike

james@uw-june (James Synge) (03/13/86)

From: James Synge

In article <1513@caip.RUTGERS.EDU>, mwm%ucbopal@BERKELEY.EDU writes:
> I've
> heard rumors about using one port to talk to multiple windows. Anyone
> know how?
 Chapter 8 of the intuition manual explains how to specify a port that
you've created as the port for intuition to send message to.  I don't have
the manual with me, or I would include the code.

James Synge     ...!uw-beaver!uw-june!james
University of Washington, Seattle

jimm@amiga.UUCP (Jim Mackraz) (03/14/86)

>From: Mike (I'll be mellow when I'm dead) Meyer <mwm%ucbopal@BERKELEY.EDU>
>I've got a couple of questions for knowledgable developers:
>
>1) I've got an application program that generates menus on the fly,
>dynamically changing them as the world changes. Occasionally it
>generates an empty menu (no, that isn't a bug). However, the Amiga
>crashes when you try to pull that menu down. Is this a bug in the
>Amiga? Will it go away after I disable the menu? (And if you want the
>answer, ask me...)
>
>2) Second application deals with multiple windows. So far, the only
>way I can find to decide which window an event came from is to see if
>any of them are active. It looks like the ACTIVEWINDOW message is just
>what I want, but which window port do I get the message from? I've
>heard rumors about using one port to talk to multiple windows. Anyone
>know how?
>
>I haven't made it through the ROM Kernal manual yet (that thing is
>*thick*), so a section reference to the answers would be appropriate.
>
>	Thanx,
>	mwm@ucbvax
>	<mike

    1): Although I can't seem to find it in the Intuition Manual, =RJ Mical=,
    Intuition author, takes a firm stand that menus *must* have at least
    one item.  Please direct philosophical comments to him.  The status of
    this in future intuition releases has not been finalized, but in the
    meantime you must not set a menu strip with a menu having no items.

    2): By popular demand, (i.e., demand including that from the ever-popular
    never-mellow-mike) I'm posting another thing about shared IDCMP ports.
    Because this is thursday, I am throwing in, absolutely free, some
    valuable insight into using MENUVERIFY, SIZEVERIFY, and REQVERIFY.

    Please send me questions/problems regarding this.

    Watch that news, guys/gals, for these valuable things, and as always...

	go wild.
	jimm 	{...!hplabs!pyramid!amiga!jimm}

lbg@gitpyr.UUCP (Lee B Grey) (03/16/86)

In article <852@amiga.amiga.UUCP>, jimm@amiga.UUCP (Jim Mackraz) writes:
>     1): Although I can't seem to find it in the Intuition Manual, =RJ Mical=,
>     Intuition author, takes a firm stand that menus *must* have at least
>     one item.  Please direct philosophical comments to him.  The status of
>     this in future intuition releases has not been finalized, but in the
>     meantime you must not set a menu strip with a menu having no items.

Why not just turn off that menu, through the use of OffMenu() ?  The effect
is the same, without going against your Intuition.  So to speak.

Lee

mwm@ucbopal.berkeley.edu (Mike (I'll be mellow when I'm dead) Meyer) (03/22/86)

In article <1551@gitpyr.UUCP> lbg@gitpyr.UUCP writes:
>In article <852@amiga.amiga.UUCP>, jimm@amiga.UUCP (Jim Mackraz) writes:
>>     1): Although I can't seem to find it in the Intuition Manual, =RJ Mical=,
>>     Intuition author, takes a firm stand that menus *must* have at least
>>     one item.  Please direct philosophical comments to him.  The status of
>>     this in future intuition releases has not been finalized, but in the
>>     meantime you must not set a menu strip with a menu having no items.
>
>Why not just turn off that menu, through the use of OffMenu() ?  The effect
>is the same, without going against your Intuition.  So to speak.

Except that it doesn't work (well, it shouldn't!). I started this discussion
when I found that feature/bug. Shortly after I posted the question, I tried
opening the menu disabled (which is what OffMenu does), and then pulling it
down. The system crashed quite nicely. It appears that intuition is chasing
through the NULL item pointer, trying to find items. I "solved" the problem
by adding a single disabled item to the menu, "EMPTY".

This came up with the browser (recently sent to mod.sources). The version
posted also crashes if you feed it one of the recent Fish disk (#13 or
thereabouts), as that has 106 files in it. 106 menu entries!?! I don't blame
it, I'd crash to. I'd like to fix this in later versions, if someone can
come up with a reasonable way....

	Thanx,
	<mike

san@bubba.UUCP (03/26/86)

> In article <1551@gitpyr.UUCP> lbg@gitpyr.UUCP writes:
> >In article <852@amiga.amiga.UUCP>, jimm@amiga.UUCP (Jim Mackraz) writes:
> >>     1): Although I can't seem to find it in the Intuition Manual, =RJ Mical=,
> >>     Intuition author, takes a firm stand that menus *must* have at least
> >>     one item.  Please direct philosophical comments to him.  The status of
> >>     this in future intuition releases has not been finalized, but in the
> >>     meantime you must not set a menu strip with a menu having no items.
> >
> >Why not just turn off that menu, through the use of OffMenu() ?  The effect
> >is the same, without going against your Intuition.  So to speak.
> 
> Except that it doesn't work (well, it shouldn't!). . . .
> . . . I "solved" the problem
> by adding a single disabled item to the menu, "EMPTY".

I seem to remember that on Version 1.0, the Notepad program had a couple of
Ghosted menu names (such as edit), that didn't crash the system and didn't
havd any entries under them.  Am I mistaken?  If not, how was it done?

Also, when you disable (ghost) a menu item which has sub-menu items attached
can you still get to the sub-items and select them?  Basically, what does it
mean to disable a menu item which has sub-menu items attached?

	Thanks,

	Steve
-- 
Steve Sanderson, COSI Texas
		 4412 Spicewood Springs, Suite 801 Austin, Texas 78759
UUCP:	{ihnp4, seismo, ctvax}!ut-sally!cositex!san, san@cositex.UUCP
AT&T:	(512) 345-2780