NestedSlot is not 'removable'

79 views
Skip to first unread message

peter...@freshcode.biz

unread,
Oct 13, 2015, 2:07:29 AM10/13/15
to GWTP
Hi,

Can anyone tell me why NestedSlot does not implement RemovableSlot please?  My workaround is basically to copy NestedSlot and add the RemovableSlot marker, IE: RemovableNestedSlot.

Also, it seems that only NestedSlot is useful because nothing else extends GwtEvent.Type and cannot be used for Presenter implementations.  Am I missing something?

Thanks in advance,
Pete

peter...@freshcode.biz

unread,
Oct 20, 2015, 1:37:19 AM10/20/15
to GWTP
Be advised, I am having problems using my RemoveableSlot.  The reason is unknown right now but nothing shows on the screen and no console message is displayed:

My implementation so far:
public class RemovableNestedSlot extends NestedSlot implements RemovableSlot<Presenter<?, ?>> {
}

Regards,
Pete

Renaud Lainé

unread,
Oct 21, 2015, 9:25:30 AM10/21/15
to GWTP
NestedSlot does implement RemovableSlot:

public class NestedSlot extends GwtEvent.Type<RevealContentHandler<?>>
   
implements IsSingleSlot<Presenter<?,?>>, RemovableSlot<Presenter<?,?>> {
...
}

Which version of GWTP are you using?

Christopher Viel

unread,
Oct 21, 2015, 9:33:01 AM10/21/15
to GWTP
AFAICT the generators will only look for NestedSlot itself. Since NestedSlot has special handling inside GWTP, this is made so to prevent unexpected behavior when people override buiil-in slot. The GwtEvent.Type is also extended because of how GWTP handles nested presenters internally (Note that I'm not talking about Presenter_Widget_s here: those can be added to any type.

RemovableSlot has been added to NestedSlot in 1.6-snapshot, so you can update to that version.

peter...@freshcode.biz

unread,
Oct 23, 2015, 1:15:52 AM10/23/15
to GWTP
Forgive me, I must have only searched in 'open' issues and didn't check the source code.

As for extending GwtEvent.Type, it seems that only NestedSlot can be used to construct presenters.  Is that right?  IE: MultiSlot, SingleSlot, PermanentSlot are only for assigning PresenterWidgets to slots via 'setInSlot()'?



On Tuesday, October 13, 2015 at 4:07:29 PM UTC+10, peter...@freshcode.biz wrote:
Reply all
Reply to author
Forward
0 new messages