|
Re: Deleting widgets: msg#00058java.netbeans.modules.graph.user
Hi Chris, The issue is in the your label widgets are in mainLayer and not directly under the Scene. Therefore you have an issue in KeyEventLoggerAction.keyPressed method, where you should change: widget.getScene().removeChild(widget); with: widget.remoreFromParent(); There is an "assert" in the Widget.removeChild method but you probably had assertion disabled in runtime. In the future I am going to convert assertions to exceptions, so you will notify the problem immediately. After the change, it works correctly. The key-events are processed for all widgets. It is because: 1) you have assigned the KeyEventLoggerAction to all widgets, 2) you are using FOCUSED_WIDGET_AND_ITS_CHILDREN event processing type, 3) by default the Scene itself is set as the focused widget. BTW: for this test you would not need to use ObjectScene at all. Scene would be enough, also you would not need interractionLayer widget as well as LabelEditor class. Regards, David David Kaspar wrote: > Hi, > > This may be caused by: > 1) you have an widget with move-action assigned (or any other which is > locking the event processing) > 2) you are pressing delete key while the mouse button is still pressed. > > Also key-events are processed using a logic specified by > Scene.setKeyEventProcessingType - see documentation of possible options. > > Also you can use Scene.getPriorActions ().addAction > (myKeyEventLoggerAction). These actions are processing an event prior to > any other action. > > Let me know, if none of the options help you. Please, could you also > attach an example where I could reproduce your problem? > > Thanks, > David > > > Chris Palmer wrote: > >> Friends! >> >> It could be my overall implementation. >> >> I have a problem with my KeyEventLoggerAction I am trying to delete >> the widget from the scene...but it seems my KeyEvenLoggerAction >> doesn't always fire..... I was wondering if perhaps anyone else has >> had a problem with this? >> >> It does work occasionally.....if I click the widget quite a bit..... >> >> Chris >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: >> users-unsubscribe-Hi7mZnf3vbIkiw2pgZvNdR2eb7JE58TQ@xxxxxxxxxxxxxxxx >> For additional commands, e-mail: >> users-help-Hi7mZnf3vbIkiw2pgZvNdR2eb7JE58TQ@xxxxxxxxxxxxxxxx >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > users-unsubscribe-Hi7mZnf3vbIkiw2pgZvNdR2eb7JE58TQ@xxxxxxxxxxxxxxxx > For additional commands, e-mail: > users-help-Hi7mZnf3vbIkiw2pgZvNdR2eb7JE58TQ@xxxxxxxxxxxxxxxx > >
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Delete Not working still, Chris Palmer |
|---|---|
| Next by Date: | Re: Delete Not working still, David Kaspar |
| Previous by Thread: | Re: Deleting widgets, David Kaspar |
| Next by Thread: | Delete Not working still, Chris Palmer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |