You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Luiz Gustavo <lu...@gmail.com> on 2010/12/08 10:43:28 UTC
Missing Cast?
Hi!
in an example, on the BXMLPrimer I noticed that a casting is missing when
getting reference to a Label.
public void startup(Display display, Map<String, String> properties)
throws Exception {
BXMLSerializer bxmlSerializer = new BXMLSerializer();
Window window =
(Window)bxmlSerializer.readObject(getClass().getResource(
"window.bxml"));
* **Label label = bxmlSerializer.getNamespace().get("label");*
label.setText("Welcome to Pivot!");
window.open(display);
}
Cheers,
Luiz Gustavo S. de Souza
http://luizgustavoss.wordpress.com
http://luizgustavoss.blogspot.com
http://twitter.com/lugustso
Re: Missing Cast?
Posted by Greg Brown <gk...@verizon.net>.
You are correct, a cast is necessary there. Thank you for catching that.
On Dec 8, 2010, at 4:43 AM, Luiz Gustavo wrote:
> Hi!
>
> in an example, on the BXMLPrimer I noticed that a casting is missing when
> getting reference to a Label.
>
> public void startup(Display display, Map<String, String> properties)
> throws Exception {
> BXMLSerializer bxmlSerializer = new BXMLSerializer();
> Window window =
> (Window)bxmlSerializer.readObject(getClass().getResource(
> "window.bxml"));
>
> * **Label label = bxmlSerializer.getNamespace().get("label");*
> label.setText("Welcome to Pivot!");
>
> window.open(display);
> }
>
>
> Cheers,
> Luiz Gustavo S. de Souza
>
> http://luizgustavoss.wordpress.com
> http://luizgustavoss.blogspot.com
> http://twitter.com/lugustso