From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/87095 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Attributes Date: Wed, 23 Apr 2014 19:08:57 +0200 Message-ID: <5357F3A9.7060609@wxs.nl> References: <20140420131459.7c23b8af@cuisine.seix> <53565AFF.4070304@wxs.nl> <5357812B.7010605@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1398272963 25789 80.91.229.3 (23 Apr 2014 17:09:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Apr 2014 17:09:23 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Wed Apr 23 19:09:18 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wd0fd-00028y-QU for gctc-ntg-context-518@m.gmane.org; Wed, 23 Apr 2014 19:09:17 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3976710249 for ; Wed, 23 Apr 2014 19:09:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xYd0whTjMLgs for ; Wed, 23 Apr 2014 19:09:17 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 07BDC1024B for ; Wed, 23 Apr 2014 19:09:13 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8290E101E8 for ; Wed, 23 Apr 2014 19:09:09 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ZfkSdr2VV+xN for ; Wed, 23 Apr 2014 19:09:07 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id C58A3101E6 for ; Wed, 23 Apr 2014 19:09:07 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s3NHTFau021372 for ; Wed, 23 Apr 2014 19:29:20 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.103; Original-Received: from [10.100.1.103] (unverified [10.100.1.103]) by pragma-net.nl (SurgeMail 6.5a2) with ESMTP id 2008-1713362 for ; Wed, 23 Apr 2014 19:08:59 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=Provincie Overijssel; city=Zwolle; latitude=52.5058; longitude=6.0858; http://maps.google.com/maps?q=52.5058,6.0858&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01LRttfqb - 4db096826700 - 20140423 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:87095 Archived-At: On 4/23/2014 3:07 PM, St=E9phane Goujet wrote: > > > On Wed, 23 Apr 2014, Hans Hagen wrote: > >> On 4/22/2014 8:10 PM, St=E9phane 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_allo= cated_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. that interface is unlikely to change (e.g. because of performance = reasons) ... you'd better check at your end btw, you can try: mynode[123] which is more efficient ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________