Scope of the WML variables


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Scope of the WML variables

  1. #1
    Chandra Guest

    Scope of the WML variables

    Hi,

    What is the scope of the variables in wml pages, spans only card?, deck?,
    digest? or global to entire site?
    How does Function WMLBrowser.getVar("variable name") works? where it looks
    for specified variable?

    Thanks,

    -Chandrashekar




  2. #2
    Gypsy Guest

    Re: Scope of the WML variables


    The scope of wml vars is global to the wml browser environment.
    What this means is that the vars are visible accross not only
    cards but decks.Not only can those vars be read from anywhere,
    they can also be written from anywhere.
    Practically,this means that you can declare a var in any deck,and the other
    decks & cards can access it,as does your wmlscript with getVar..
    The flip side of this is that any wml deck, even one written by another programer
    can override your var in your deck ,if that developer uses the same var name...
    Actually, any card can destroy all variables and the entire browser history,
    using the 'newcontext' attribute of the
    <card> tag.
    Hope this helps.

    Gypsy.



    "Chandra" <aithal_chandrashekar@hotmail.com> wrote:
    >Hi,
    >
    > What is the scope of the variables in wml pages, spans only card?, deck?,
    >digest? or global to entire site?
    >How does Function WMLBrowser.getVar("variable name") works? where it looks
    >for specified variable?
    >
    >Thanks,
    >
    >-Chandrashekar
    >
    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center