ScriptApplication is simply a shortcut to implementing the Application 
interface. Most "real-world" applications will probably implement Application. 
The tutorial contains several examples that demonstrate how to do this, 
including the introductory "Hello World" example. You just need to set the font 
before you create any UI elements.

And, as Sandro noted, you can also do this dynamically via a custom theme 
descriptor.

G

On Apr 27, 2011, at 8:25 AM, Le Zhou wrote:

> Hi, Greg, 
> 
> I'm not sure i understand your reply above right...
> 
> Do i have to change my app to "extends Application" instead of "extends 
> Window implements Bindable"
> 
> As most examples in the tutorial, if my app extends Window implements 
> Bindable, I start my app by the ScriptApplication class, and i can use the 
> get(bxml:id) method of the argument "Map<String, Object>" of the initialize 
> method to get instance of each component, and add Listner to it
> 
> i haven't use the "extends Application" approach yet, would you please how to 
> get component instance in this approach?
> 
> Thanks a lot!
> 
> On Wed, Apr 27, 2011 at 7:30 PM, Greg Brown <[email protected]> wrote:
> > "宋体" is one Chinese font, i guess it might be too late to set font in the 
> > initialize method, but i can not figure out how to do this. Any suggestions?
> 
> Yes, initialize() is too late. You need to set it in Application#startup().
> 
> 

Reply via email to