On Wed, 23 Apr 2014, Hans Hagen wrote:

On 4/22/2014 8:10 PM, Stéphane Goujet wrote:
    Please have a look at my example (it is a bit long because it shows
 various possibilities) and its result.
     When I have not yet done a \defineattribute[myattr],
 node.has_attribute
 returns 0 when I thought it should return nil.
    When I do \defineattribute[...], every attribute seems to get the
 same number (1024), but now node.has_attribute returns nil ...

change this is syst-ini.mkiv:

\normalprotected\def\newattribute{\syst_basics_allocate\c_syst_last_allocated_attribute\attribute\attributedef\c_syst_max_allocated_register}

  Thank you, it seems to work much better !

There is still the problem that "node.has_attribute" does not return "nil" when I expect it should, but that is luatex problem (a check that a parameter is really an integer should be performed before calling lua_tointeger), so I will change mailing-list in order to report it.


Faithfully yours,
  Stéphane Goujet.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to