pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aanjaneya Shukla <aanjan...@vmware.com>
Subject RE: TextArea loading from a file
Date Fri, 28 Jan 2011 07:04:11 GMT
What I was trying to achieve was that my bxml pulls that text written in json and since it
has '@' symbol so convert it to URL.
For example,
JSON:
{
Image:"@image.bmp"
}
BXML:
<ImageView image="%Image"/>

So in the above case the image is displayed. But when I try this,
JSON:
{
Text:"@sample.txt"
}
BXML:
<TextArea text="%Text"/>
In this, only '@sample.txt' is displayed. But the aim was to display the text in sample.txt
file. 
So can the latter case be modified in such a way that I have the contents in the file as the
text in my textarea. I don't want to declare the file location in my bxml as the file name
to be loaded may change during runtime.

-----Original Message-----
From: Greg Brown [mailto:gk_brown@verizon.net] 
Sent: Friday, January 28, 2011 12:49 AM
To: user@pivot.apache.org
Subject: Re: TextArea loading from a file

The @ symbol is only converted to a URL when reading a BXML file. It doesn't work in a JSON
file. You'll need to put your localized text in the JSON file itself.
G

On Jan 27, 2011, at 1:49 PM, Aanjaneya Shukla wrote:

> Hi,
> I am trying to load a text file from json into the window as
> JSON:
> {
> Text:"@sample.txt"
> }
> BXML:
> <TextArea text="%Text"/>
> 
> So instead of loading the text into the TextArea from the file sample.txt, it only it
shows '@sample.txt' as the text in the TextArea. 
> 
> Same logic works fine for images.
> 
> Thanks


Mime
View raw message