×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    19

    RSS file problem or...?

    Hi!

    I'm a real newbie on Symbian programming, and I'm just doing it for the fun of it. I'm programming for Symbian OS v6.0 and my target device is Nokia 9210.

    I'm currently making a chemistry-related application, which gets the user input (the chemical's name) from a dialog and searches for its number from a resource file. I'm using resource files because I didn't find info about searching a text file on Symbian v6.0. I'm using the project ReadText (C:\Symbian\6.0\NokiaCPP\Epoc32Ex\System\ResourceFiles\ReadText) as the skeleton of my program.

    Well, now I'm having a problem with the resource file. There are 6446 lines in it and 1597 chemicals. The data inside it goes like this:


    Code:
    // The structure
    
    STRUCT STRING
    {
    	LTEXT text;
    }
    
    
    // define resources
    
    RESOURCE STRING N-BENZYLDIMETHYLAMINE
    {
    	text="1";
    }
    RESOURCE STRING PHOSPHORIC ACID, > 25 %
    {
    	text="2";
    }
    
    ...
    
    RESOURCE STRING ETHANOL
    {
    	text="1597";
    }
    You can view or download the whole RSS file from
    http://www.symbioosi.net/things/ReadText.rss

    Well, when I try to compile the project, the command line gives me this output:

    :568: unterminated character constant
    :680: unterminated character constant
    :1444: unterminated character constant
    :1448: unterminated character constant
    :2184: unterminated character constant
    :2272: unterminated character constant
    :3196: unterminated character constant
    :3264: unterminated character constant
    :3396: unterminated character constant
    :3600: unterminated character constant
    :3620: unterminated character constant
    :3688: unterminated character constant
    :3720: unterminated character constant
    :4096: unterminated character constant
    :4180: unterminated character constant
    :4364: unterminated character constant
    :4368: unterminated character constant
    :4768: unterminated character constant
    :4836: unterminated character constant
    :5408: unterminated character constant
    :6184: unterminated character constant
    :6188: unterminated character constant
    :6240: unterminated character constant
    :6256: unterminated character constant


    You can, again, download the whole command output here:
    http://www.symbioosi.net/things/commandoutput.txt

    So those lines mentioned in the output contain some material for errors to pop up. But I can't figure out what is wrong with them. Let me tell you that the original SDK project ReadText compiled without errors. In my program I have only touched the RSS file, nothing else. Shouldn't RSS file be capable of storing up to 4095 resources? I only have 1597.


    BTW. I'm pretty sure I know what you are thinking of developing onto Symbian OS v6.0

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: RSS file problem or...?

    please re-check the lines where the error is coming, for exmaple try removing "RESOURCE STRING BENTSYYLIALKOHOLI", in a place you have two lines written like this:

    RESOURCE STRING BENTSYYLIALKOHOLI
    RESOURCE STRING DIETYLEENITRIAMIINIPENTAETIKKAHAPPO

  3. #3
    Registered User
    Join Date
    Mar 2005
    Posts
    19

    Re: RSS file problem or...?

    symbianyucca, nicely spotted! Thank you.
    I found the thing it's complaining - the RSS file can't presumably contain the character ', as in the line 1444 in the word N,N'-METYLEENIDIAKRYYLIAMIDI. Hmmh... That must be replaced with something or maybe there is a workaround for reading the character after all?


    EDIT: I don't think this is going to work with resource files... :/ It gives me a syntax error at the first chemical name which is N-BENTSYYLIDIMETYYLIAMIINI. It needs to be renamed to N_BENTSYYLIDIMETYYLIAMIINI, which is no good for the user who has to search with that specific term.

    But if the user writes n-bentsyylidimetyyliamiini into the search field, I could convert it into something a resource file understands, which is in this case the N_BENTSYYLIDIMETYYLIAMIINI. After the conversion the program searches the resource file.

    But how that'd be done, that's another (rather big) question.
    Last edited by Sambon5; 2008-08-05 at 12:32.

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: RSS file problem or...?

    have you tried with notmal escape thingi, i.e. have it as \'

  5. #5
    Registered User
    Join Date
    Mar 2005
    Posts
    19

    Re: RSS file problem or...?

    Good question, but unfortunately it doesn't work. I see the resource file bitches for any non-letter or non-number except the underscore _

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: RSS file problem or...?

    Remember that the .rss file is actually parsed by a program, and it has a syntax, which is documented in the SDK Help
    As long as your code contains
    Quote Originally Posted by Sambon5 View Post
    RESOURCE STRING N-BENZYLDIMETHYLAMINE
    {
    text="1";
    }
    RESOURCE STRING PHOSPHORIC ACID, > 25 %
    {
    text="2";
    }
    do not expect anything. The red things are supposed to be identifiers, later referred from your C++ code.

    Search for "Resource file source format" in the SDK Help.

  7. #7
    Registered User
    Join Date
    Mar 2005
    Posts
    19

    Re: RSS file problem or...?

    Thanks for the info, wizard_hu_. I think this isn't gonna work with resource files. I'll have to come up with a different method.
    Last edited by Sambon5; 2008-08-13 at 20:59.

Similar Threads

  1. Problem with ensymble_python2.5-0.26.py in linux
    By tansualpcan in forum Symbian
    Replies: 2
    Last Post: 2008-04-15, 10:12
  2. Problem to install sis file
    By aamitgupta in forum Symbian
    Replies: 13
    Last Post: 2008-02-15, 17:59
  3. read string from text file problem
    By sim.sim in forum Symbian
    Replies: 9
    Last Post: 2006-05-24, 07:41
  4. problem installing sis file
    By lucidness in forum Symbian
    Replies: 8
    Last Post: 2006-04-20, 17:51

Posting Permissions

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