Success! Looks like we've fixed this one. According to our records the fix was applied for a bug in our system in a recent build.
  1. #1
    Sencha User
    Join Date
    Jan 2009
    Posts
    46
    Vote Rating
    0
    Konstantin.Scheglov is on a distinguished road

      0  

    Default Rename field ToolButton.style

    Rename field ToolButton.style


    ...or make it private.

    Problem is that in UiBinder it is usual to use code like this:

    Code:
    <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui'>
        <ui:style>
            .panel {
                background-color: ivory;
            }
        </ui:style>
    
    
        <g:FlowPanel styleName="{style.panel}"/>
    </ui:UiBinder>
    ...which generates field with name "style" if you don't specify "field" attribute for <style>.
    As you understand, almost nobody does this, so people will get cryptic GWT error message.
    Konstantin Scheglov

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,732
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    I'm not sure I understand - are you extending ToolButton? Your UiBinder doesn't list a ToolButton instance, so I'm not sure how that comes into the picture here.

    Neither ToolButton (nor its superclass IconButton) have a field called style, just a constructor with an argument named style - and that isn't a constructor that is called from UiBinder.

    It does have a static field called style, but that would only possibly be an issue if you are using uibinder to extend ToolButton instead of using an appearance, as should be done. Is that the use case you are after?

  3. #3
    Sencha User
    Join Date
    Jan 2009
    Posts
    46
    Vote Rating
    0
    Konstantin.Scheglov is on a distinguished road

      0  

    Default


    I've posted example of code which uses <ui:style>, and by default GWT generates for it field with name "style". And static field with same name exists in ToolButton. So, if you do

    <ui:importfield='com....ToolButton.*'>

    ...GWT UiBinder will try to import also "style" from ToolButton and you will have ugly error.
    Konstantin Scheglov

  4. #4
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,732
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    Thanks, I understand now (and was previously unaware of the ui:importfield element). From the looks of things, ToolButton.style should be private anyway - that should deal with this issue, yes?

  5. #5
    Sencha User
    Join Date
    Jan 2009
    Posts
    46
    Vote Rating
    0
    Konstantin.Scheglov is on a distinguished road

      0  

    Default


    Yes, making "style" field private looks as good solution.
    Konstantin Scheglov

  6. #6
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,732
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    This change has been made in SVN, you can get it from there, or in the next release.

  7. #7
    Sencha User WesleyMoy's Avatar
    Join Date
    Oct 2009
    Location
    Redwood City, California
    Posts
    402
    Vote Rating
    2
    WesleyMoy is on a distinguished road

      0  

    Default


    Thanks for tracking this issue down. This change should be reflected in beta 4. Try your code again and post a reply if you still notice problems with visibility.

Thread Participants: 2