> 1. In application.js, there is coding like this :
> 
>     selectFeed : function(url)
>     {
>       var value = this._feeds[url];
>       value ? this.setSelectedFeed(value) : 
> this.resetSelectedFeed();
>     }
> 
> what is the meaning of this code ===> value ? 
> this.setSelectedFeed(value) : this.resetSelectedFeed();  ?

It's the Javascript Conditional (or Ternary) operator. That function
could be written:

     selectFeed : function(url)
     {
       var value = this._feeds[url];
       if (value)
       {
         this.setSelectedFeed(value);
       }
       else
       {
         this.resetSelectedFeed();
       }
     }

The operator can also be used in expressions which is where its real
value lies.

Hugh

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to