Hi Hansjoerg (Hansjörg),

_any_ 'with' statement can be rewritten (see my link to the book below)

As an example, your code can should be (re-)written as follows:

<pre class='javascript'>
table.getSelectionModel().setSelectionMode(qx.ui.table.selection.Model.MULTIPLE_INTERVAL_SELECTION);
</pre>
The 'with' *could* have made sense if you use the "table" object more than
once in the scope-block of 'with'...but in your special case it does not make
any sense ;)

In general I would advice anyone:
Do not use 'with' in JavaScript! For the reasons explained in chapter 6.18 of
"JavaScript, The Definitive Guide" book [1].

Regards,
  Peter

[1] http://books.google.de/books?id=vJGlu9t9LNYC&pg=PA98#v=onepage&q&f=false




On 2011-01-12 11:36 Hansjoerg Schock wrote:
> 
> Hello,
> thanks for your help.
> 
>>> Warning: Hint: Unknown global symbol referenced: getSelectionModel
>>> (QXticket.Application:367)
> 
>>> Or are you using the 'with' statement? I'm not sure if the generator can
>>> handle this.
>>> On the other hand I would not use the 'with' statement[1]!
> 
> The code is like this:
> with (table) {
> getSelectionModel().setSelectionMode(qx.ui.table.selection.Model.MULTIPLE_INTERVAL_SELECTION);
> };
> 
> Is this the reoson for the message?
> Is it better to write like this?
> 
> table.getSelectionModel().setSelectionMode(qx.ui.table.selection.Model.MULTIPLE_INTERVAL_SELECTION);
> 

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to