You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Greg Brown (JIRA)" <ji...@apache.org> on 2009/10/09 15:08:31 UTC

[jira] Updated: (PIVOT-324) WTKXSerializer get method enhancement

     [ https://issues.apache.org/jira/browse/PIVOT-324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Brown updated PIVOT-324:
-----------------------------

             Priority: Minor  (was: Major)
    Affects Version/s:     (was: 1.3)
        Fix Version/s: 1.4

> WTKXSerializer get method enhancement
> -------------------------------------
>
>                 Key: PIVOT-324
>                 URL: https://issues.apache.org/jira/browse/PIVOT-324
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk-wtkx
>            Reporter: Dmitry Mamonov
>            Assignee: Greg Brown
>            Priority: Minor
>             Fix For: 1.4
>
>
> Method get() of class WTKXSerializer returns value of type Object, you see:
> http://incubator.apache.org/pivot/1.3/docs/api/org/apache/pivot/wtkx/WTKXSerializer.html#get(java.lang.String)
> As demostrated in documentation it cause code like this: (http://incubator.apache.org/pivot/1.3/tutorials/push_buttons.html)
>   private PushButton pushButton = null;
>    ...
>   pushButton = (PushButton)wtkxSerializer.get("pushButton");
> In an alternative way, get() method may be declared as:
>   <T> T get(String key){
>      //implementation
>   }
> This way client code will be just:
>   pushButton = wtkxSerializer.get("pushButton");
> so the type-case will be implicit. This feature is widely used in HtmlUnit framework and I find it quite neat.
> May be it coult be adopted to pivot project :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.