Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » widgetWithId(String) -> widgetWithId(Object)
widgetWithId(String) -> widgetWithId(Object) [message #17701] Tue, 27 January 2009 15:35
Hans Schwaebli is currently offline Hans SchwaebliFriend
Messages: 70
Registered: July 2009
Member
What do you think about using Object parameter type instead of String for
the "withId" methods?

The setData method in the Widget class uses Object too. String narrows it.

I would have no problems with it normally, but I was told to use a custom
Object for the ID.

Of course it makes sense to use String for the ID, but what when someone
wants it to be type safe? Thats why I shall use a custom object (see below
a code example).

What do you think about using Object type instead of String for the
"withId" methods of SWTBot in order to reflect the capabilities of the
setData method in the Widget class 1:1?


public final class UiTestId
implements Serializable, org.jcoderz.commons.EnumType
{
public static final UiTestId WEIGHT_TEXT_ID
= new UiTestId("weightTextId");
Previous Topic:CONSECUTIVES TEST
Next Topic:SWTBot and inputs from file
Goto Forum:
  


Current Time: Sat Apr 20 03:49:34 GMT 2024

Powered by FUDForum. Page generated in 0.03232 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top