pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: Bindable not working?
Date Sun, 03 Jan 2010 13:52:33 GMT
Bindable applies only to root elements. Try putting SymbolPane in an include - that should
work.
G

On Jan 3, 2010, at 1:17 AM, Michael Bushe wrote:

> I'm using the new Bindable interface and it doesn't seem to call my initialize method,
maybe I've got something not write.  The class is a refactoring of the StockTracker tutorial,
so it should look familiar:
> 
> public class SymbolPane extends BoxPane implements Bindable {
>     @WTKX private TextInput symbolTextInput;
>     @WTKX private Button addSymbolButton;
>     @WTKX private Button removeSymbolsButton;
>     ArrayList<SymbolListChangeEventListener> listenerList = new ArrayList<SymbolListChangeEventListener>();
>     private String lastSymbol;
> 
>     public SymbolPane() {
>         System.out.println("SymbolPane constructed");
>     }
> 
>     @Override
>     public void initialize() {
>         System.out.println("SymbolPane initializing, a.k.a. bound");
> ...
>     }
> 
> "SymbolPane constructed" is output when I run, but "SymbolPane initializing, a.k.a. bound"
is not.  The WTKX is similar to the StockTracker, but with this change to call my class:
>                 <TablePane.Row height="-1">
>                     <stocktracker:SymbolPane
>                         styles="{horizontalAlignment:'left', verticalAlignment:'center'}">
>                         <Label text="%symbol" styles="{font:{bold:true}}" />
>                         <TextInput wtkx:id="symbolTextInput" textSize="10"
>                             maximumLength="8" />
>   ...
>                   </stocktracker:SymbolPane>
>                 </TablePane.Row>
>   
> Michael Bushe
> Software Architect/Developer
> michael@bushe.com
> www.bushe.com


Mime
View raw message