> Hi,
>
[quoted text clipped - 6 lines]
> is captured by a hypothetical enablelistener registered in
> every menu item ?
I use Action and ActionListener things. If a menu item [A]
enablement status is dependent only on another menu item [B],
then I also listen for property change events on the
Action item for [B] and set the enablement of [A].
The individual Action items for [A] and [B] have
actionPerformed(ActionEvent) methods that are
called whenever the corresponding menu item [A]
or [B] is selected. You can also have PropertyChangeListener
methods listening for property changes (like enablement)
for the Action items.
Abs - 29 Apr 2004 20:58 GMT
>>Hi,
>>
[quoted text clipped - 18 lines]
> methods listening for property changes (like enablement)
> for the Action items.
I'm not sure I've really understood you. I know the basics behind
Actions. What I'm trying to do in my app, a sound file player, is to
enable the "play file" menuitem AFTER the user has successfully opened a
sound file, not when he clicks the "open file" menuitem. The problem I
have is that I don't know how to reach that menuitem without having a
direct or global pointer to it in my app. That's why I thought in firing
some kind of event that this menuitem would be listening to.
Can you help me, please?