×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    30

    Any simple example for read/write file from/to server/local from widget?

    The example RSSReader in C:\Widget\S60_3rd_FP2_SDK\S60WidgetExamples can read news from server. But the code is not so simple for beginner to understand.

    Any simple example to show how to read/write the server plain text or XML file?

    Any simple example to show how to read/write local txt file or XML file in the wgz, not phone memory?

    By the way, is the WRTKit folder a standard folder serving as a "library"
    for generating stadard UI in widget?

    Your helps would be very much appreciated!

    Ms. Zhu

  2. #2
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    60

    Re: Any simple example for read/write file from/to server/local from widget?

    Quote Originally Posted by zhubc123 View Post
    Any simple example to show how to read/write the server plain text or XML file?
    Any simple example to show how to read/write local txt file or XML file in the wgz, not phone memory?
    You can't read and write files from JavaScript in the way you would with e.g. C/C++. In other words you can't "open" a file, read and write from it and then "close" it. The application model is very different for a web or widget application. While the code is running on the client (=the mobile phone), all data access is using HTTP and thus any data you want to write would have to be written on a server by responding to the HTTP requests from the widget. And any data you want to read from the server would be served over HTTP requests.

    It sounds to me like topics you might want to study are those of "AJAX", "XHR" (XmlHttpRequest), "XML" and "JSON". XmlHttpRequest is the key to all input and output of data from a widget and XML and JSON are the two most common (by far) data formats used for encoding the data you want to read and write. AJAX is the general term for this type of programming.

    The WRTKit is one way you can use to implement your user interface but it is by no means a requirement. You must include it (the WRTKit directory) in your widget if you want to use it for the UI.

    Peppe

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    5

    Smile Re: Any simple example for read/write file from/to server/local from widget?

    Hi, would like to ask for advice in this area also. I am new to widgets and had come across a project that used the Nokia WRT with aptana studio. I would like to ask if there are any methods we can read the processed content from a servlet?

    I am working on a RSS feeder which actually display out news through the servlet instead of getting news directly from the URL.

    The content that is processed out from the servlet are plain text.

    So, how could i actually get the plain text from the servlet via the RSS in Nokia WRT?

    Thank You.

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: Any simple example for read/write file from/to server/local from widget?

    Hi jerzelleLim2009,

    please don't post your questions twice, since it'll be harder to follow the discussion, and to help you as well:

    http://discussion.forum.nokia.com/fo...d.php?t=166647

    Pit

Similar Threads

  1. Obfuscate python code
    By bercobeute in forum Symbian
    Replies: 20
    Last Post: 2008-02-26, 20:06
  2. [announce] PyUIQ. Python for UIQ 2.1 and 3.x
    By OscarBernabeu in forum Symbian
    Replies: 35
    Last Post: 2008-01-17, 09:12
  3. Replies: 1
    Last Post: 2005-05-26, 14:22
  4. Simple file push, without OBEX?
    By grimep in forum Mobile Java General
    Replies: 1
    Last Post: 2004-07-14, 08:30
  5. Replies: 0
    Last Post: 2002-06-10, 12:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •