comparison website/src/manual.html.luan @ 428:df95199ca4c0

rename __newindex to __new_index
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 02 May 2015 20:10:31 -0600
parents 455784e2227d
children e3a6d9dbd694
comparison
equal deleted inserted replaced
427:dae264ad6a7b 428:df95199ca4c0
455 the final result is the result of indexing this table with <tt>key</tt>. 455 the final result is the result of indexing this table with <tt>key</tt>.
456 (This indexing is regular, not raw, 456 (This indexing is regular, not raw,
457 and therefore can trigger another metamethod.) 457 and therefore can trigger another metamethod.)
458 </li> 458 </li>
459 459
460 <li><b>"newindex": </b> 460 <li><b>"new_index": </b>
461 The indexing assignment <tt>table[key] = value</tt>. 461 The indexing assignment <tt>table[key] = value</tt>.
462 462
463 Like the index event, 463 Like the index event,
464 this event happens when 464 this event happens when
465 when <tt>key</tt> is not present in <tt>table</tt>. 465 when <tt>key</tt> is not present in <tt>table</tt>.
476 (This assignment is regular, not raw, 476 (This assignment is regular, not raw,
477 and therefore can trigger another metamethod.) 477 and therefore can trigger another metamethod.)
478 478
479 479
480 <p> 480 <p>
481 Whenever there is a "newindex" metamethod, 481 Whenever there is a "new_index" metamethod,
482 Luan does not perform the primitive assignment. 482 Luan does not perform the primitive assignment.
483 (If necessary, 483 (If necessary,
484 the metamethod itself can call <a href="#pdf-rawset"><tt>raw_set</tt></a> 484 the metamethod itself can call <a href="#pdf-rawset"><tt>raw_set</tt></a>
485 to do the assignment.) 485 to do the assignment.)
486 </li> 486 </li>