ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Any ConTeXt-Lua changes
@ 2013-01-14 14:08 Rogers, Michael K
  2013-01-14 14:21 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Rogers, Michael K @ 2013-01-14 14:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

I wrote Lua routines a while back that parse a string representation of a weekly schedule to create a table representation of the schedule.  It worked last fall.  Certainly in August, 2012 and I think at least as late October.  I just tried it again, but it failed; and it failed on the same file it worked on before.

Before I roll up my sleeves and starting digging through the code, I was wondering if something had changed in the last two or three months that I should know about.  No MWE for you, but here's the ConTeXt command that sends an ID (#1) and a parameters (#2) to Lua

\def\defineschedule{\dodoubleempty\dodefineschedule}
\def\dodefineschedule[#1][#2]{\ctxlua{userdata.schedule.new("#1","#2")}}

Thanks for any tips,

Michael

________________________________

This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Any ConTeXt-Lua changes
  2013-01-14 14:08 Any ConTeXt-Lua changes Rogers, Michael K
@ 2013-01-14 14:21 ` Wolfgang Schuster
  2013-01-14 14:48   ` Rogers, Michael K
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2013-01-14 14:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 14.01.2013 um 15:08 schrieb "Rogers, Michael K" <mroge02@emory.edu>:

> Hi,
> 
> I wrote Lua routines a while back that parse a string representation of a weekly schedule to create a table representation of the schedule.  It worked last fall.  Certainly in August, 2012 and I think at least as late October.  I just tried it again, but it failed; and it failed on the same file it worked on before.
> 
> Before I roll up my sleeves and starting digging through the code, I was wondering if something had changed in the last two or three months that I should know about.  No MWE for you, but here's the ConTeXt command that sends an ID (#1) and a parameters (#2) to Lua
> 
> \def\defineschedule{\dodoubleempty\dodefineschedule}
> \def\dodefineschedule[#1][#2]{\ctxlua{userdata.schedule.new("#1","#2")}}

What’s the error message, there is no way to tell what’s wrong with only these two code lines.

Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Any ConTeXt-Lua changes
  2013-01-14 14:21 ` Wolfgang Schuster
@ 2013-01-14 14:48   ` Rogers, Michael K
  2013-01-14 15:10     ` Peter Münster
  2013-01-14 17:33     ` Hans Hagen
  0 siblings, 2 replies; 5+ messages in thread
From: Rogers, Michael K @ 2013-01-14 14:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

The error is basically that a variable is 'nil'.  I figure it's my job to track down why -- the code is long and boring and sometimes complicated.  I just thought if there's been some change in how parameters are passed or strings handled.  A typical use would be

\defineschedule[test][sched={M--Th 8.05a--9:20,1:45--2:30}]

The 'sched' is parsed to {day, interval = {start, stop}} pairs and stored in a table.  It seems the interval table is nil now, but it used to work.  Here's the actual error:

! LuaTeX error [string "\directlua "]:529: attempt to index field '?' (a nil value)
stack traceback:
        [string "\directlua "]:529: in function 'dotablerow'
        [string "\directlua "]:658: in function 'tablefromschedule'
        [string "\directlua "]:1: in main chunk.

system          > tex > error on line 58 in file Syllabus112.tex: LuaTeX error  …

I thought something must have changed, since nothing has changed in the syllabus file or the module file, since a couple of months ago.  If nothing occurs to anyone, I'll just have to trace it down.  Thanks in any case, whether you can think of something or not.


On Jan 14, 2013, at 9:21 AM, Wolfgang Schuster <wolfgang.schuster@gmail.com>
 wrote:

>
> Am 14.01.2013 um 15:08 schrieb "Rogers, Michael K" <mroge02@emory.edu>:
>
>> Hi,
>>
>> I wrote Lua routines a while back that parse a string representation of a weekly schedule to create a table representation of the schedule.  It worked last fall.  Certainly in August, 2012 and I think at least as late October.  I just tried it again, but it failed; and it failed on the same file it worked on before.
>>
>> Before I roll up my sleeves and starting digging through the code, I was wondering if something had changed in the last two or three months that I should know about.  No MWE for you, but here's the ConTeXt command that sends an ID (#1) and a parameters (#2) to Lua
>>
>> \def\defineschedule{\dodoubleempty\dodefineschedule}
>> \def\dodefineschedule[#1][#2]{\ctxlua{userdata.schedule.new("#1","#2")}}
>
> What’s the error message, there is no way to tell what’s wrong with only these two code lines.
>
> Wolfgang
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________


________________________________

This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Any ConTeXt-Lua changes
  2013-01-14 14:48   ` Rogers, Michael K
@ 2013-01-14 15:10     ` Peter Münster
  2013-01-14 17:33     ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Münster @ 2013-01-14 15:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Jan 14 2013, Rogers, Michael K wrote:

> I thought something must have changed,

Perhaps the lua-version: 5.1 -> 5.2

-- 
           Peter
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Any ConTeXt-Lua changes
  2013-01-14 14:48   ` Rogers, Michael K
  2013-01-14 15:10     ` Peter Münster
@ 2013-01-14 17:33     ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2013-01-14 17:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 1/14/2013 3:48 PM, Rogers, Michael K wrote:
> The error is basically that a variable is 'nil'.  I figure it's my job to track down why -- the code is long and boring and sometimes complicated.  I just thought if there's been some change in how parameters are passed or strings handled.  A typical use would be
>
> \defineschedule[test][sched={M--Th 8.05a--9:20,1:45--2:30}]
>
> The 'sched' is parsed to {day, interval = {start, stop}} pairs and stored in a table.  It seems the interval table is nil now, but it used to work.  Here's the actual error:
>
> ! LuaTeX error [string "\directlua "]:529: attempt to index field '?' (a nil value)
> stack traceback:
>          [string "\directlua "]:529: in function 'dotablerow'
>          [string "\directlua "]:658: in function 'tablefromschedule'
>          [string "\directlua "]:1: in main chunk.
>
> system          > tex > error on line 58 in file Syllabus112.tex: LuaTeX error  …
>
> I thought something must have changed, since nothing has changed in the syllabus file or the module file, since a couple of months ago.  If nothing occurs to anyone, I'll just have to trace it down.  Thanks in any case, whether you can think of something or not.

we moved from lua 5.1 to lua 5.2 so maybe you do something very 5.1-ish


-----------------------------------------------------------------
                                           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 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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-14 17:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-14 14:08 Any ConTeXt-Lua changes Rogers, Michael K
2013-01-14 14:21 ` Wolfgang Schuster
2013-01-14 14:48   ` Rogers, Michael K
2013-01-14 15:10     ` Peter Münster
2013-01-14 17:33     ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).