SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Dec 2001
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to use variable & string in a tag?

    I'm trying to modify our include file in oder to do I18N testing.
    In a .inc file, the declaration of a object looks like this:
    HtmlTextField Username1
    [+] multitag "User Name: John Doe"
    [ ] "#1"

    I want to be able to do some thing like this:
    const string k1000="User Name"

    HtmlTextField Username1
    [+] multitag k1000 + ": John Doe"
    [ ] "#1"

    I have a file that keep all the variables and the labels. I would find the label ("User Name" in this case) from the file and substitude it with the appropriate varialbe. This file is being translate for I18N purposes. The problem is our include file have lots of the mix case where I only want to replace the first part with the variable and keep the rest. I try the above and it doesn't work at runtime. Does any one know of a way to make this work?

    Thanks in advance for your help.

  2. #2
    Member
    Join Date
    Jan 2001
    Location
    Westborough, mA, USa
    Posts
    91
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to use variable & string in a tag?

    Do u get any runtime errors? What is the error u get.


    ------------------

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to use variable & string in a tag?

    I would try the following:

    - Dave


    ------------------
    Amelior Technology
    dreed@ameliortech.com
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  4. #4
    Junior Member
    Join Date
    Dec 2001
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to use variable & string in a tag?

    Thanks dcreed. I try
    [] tag "{k1000}: John Doe"

    but that doesn't work. I still get the following error:
    *** Error: Window '[HtmlTextField](k1000) : John Doe' was not found

    Correction: I have this problem only when we're only using Caption as tag and not multitag.

    Does any one have any other ideas?

    Thanks.

  5. #5
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to use variable & string in a tag?

    Okay, I'm confused. In an earlier post you had the string k1000 defined as "User Name", right?

    The reason it probably works as a MultiTag is that the second tag you have defined SilkTest can find and object matching that. (In your example, #1).

    Anyway, spelling and spaces are very important. For example, if the caption of your HtmlText field is, specifically, "User Name: John Doe"....

    SilkTest is incredibly anal about accuracy. If you have an extra space in there, SilkTest won't be able to find the object.

    Likewise, with the error you posted (*** Error: Window '[HtmlTextField](k1000) : John Doe' was not found), I'm wondering if you put real parenthesis around k1000 rather than curly braces as they need to be.

    - Dave


    ------------------
    Amelior Technology
    dreed@ameliortech.com
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  6. #6
    Junior Member
    Join Date
    Dec 2001
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to use variable & string in a tag?

    dcreed,
    You're right. My mistake, I'm using "(" instead of "{". Using "{}" around the key works.

    Thank you very much.

    ------------------

  7. #7
    Junior Member
    Join Date
    Nov 2001
    Location
    Shafi@Pixion.com
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to use variable & string in a tag?

    What's the use of using variable in tag ?

    After spenting long time, I don't understand.

    ------------------
    Any help will be appreciated, Thank you.

    Shafi@Pixion.com
    Any help will be appreciated, Thank you.
    Shafi@Pixion.com

  8. #8
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to use variable & string in a tag?

    Dunno how it's being used here, but I suspect it's for a multi-lingual application seeing as how the variable is being used on the left side of the colon.

    It's a great way to setup your frame file (without using multitags) for a multi-lingual application. Change all the constants (or the file of constants) to the French words, and voila.

    Kinda like using a string table in application development rather than hard-coding the captions of objects. Turn the string table over to your translators to get a new version.

    - Dave


    ------------------
    Amelior Technology
    dreed@ameliortech.com
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  9. #9
    Junior Member
    Join Date
    Dec 2001
    Location
    Windsor, ON, Canada
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to use variable & string in a tag?

    Hi,

    Using coded constants such as those can at times prove to be beneficial, however it does limit the translation benefits. I am working for a company that tries to provide bilingual software (French and English) to our clients. I do much of the translating myself, and I have found that it can actually be easier to modify the (multi)tags for the objects requiring translation. It isn't often several fields will all share the same title.

    Also, can anyone tell me how to test the text of screen labels in a Delphi app? Silktest doesn't see them at all, and they are the only items left that I have not found a way to validate.

    Regards,

    Patrick Briand

    ------------------

 

 

Posting Permissions

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

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:11 AM.

Copyright BetaSoft Inc.