[Undocumented Feature] Toggle Button Click

Roger Garstang

Well-Known Member
Licensed User
Longtime User
I needed to get the click event of a Toggle Button and there wasn't an event for it, so out of curiosity I tried selecting a Button Click event instead since I use alternate events in my library for advanced results and missing events.

It worked and I got the Click Event. Toggle buttons appear to use their own wrapper and not a button wrapper, so the event must have been fired from inside of it and not some type of inheritance from a button wrapper. So, is the event missing from the XML?
 
Code: Copy
public static class ToggleButtonWrapper extends CompoundButtonWrapper<ToggleButton>

public class CompoundButtonWrapper<T extends CompoundButton> extends TextViewWrapper<T>

public class TextViewWrapper<T extends TextView> extends ViewWrapper<T>

public class ViewWrapper<T extends View> extends AbsObjectWrapper<T>
{
    ...
    if (ba.subExists(eventName + "_click"))
    ...
}
 
Erel would have to explain why the XML produced at compilation by the BADoclet utility doesn't include the Click and LongClick events inherited from ViewWrapper. I guess it is because the required annotations are missing in the source code - whether by oversight or design I don't know!
 
:( Object Browser doesn't allow events to be modified, so I can't help either.

Should it?

I think not, as that is a very basic "property" of the class, and should be corrected at the source.

Also, not everyone uses the Browser.

What do others think?
 
Back
Top