Re: [NTG-context] Frozen callback.

2012-10-10 Thread Andre Caldas
>>> Why is "document.MyCharacterMess" a string? >> >> The sequencers use loadstring() internally (util-seq.lua), so you >> need to supply the namespace as a string. This happens all over >> the place with action/callbacks. > > more flexible this way (one can redefine, nil or whatever such functions

Re: [NTG-context] Frozen callback.

2012-10-02 Thread Hans Hagen
On 2-10-2012 14:13, Philipp Gesang wrote: Why is "document.MyCharacterMess" a string? The sequencers use loadstring() internally (util-seq.lua), so you need to supply the namespace as a string. This happens all over the place with action/callbacks. more flexible this way (one can redefine, n

Re: [NTG-context] Frozen callback.

2012-10-02 Thread Hans Hagen
On 2-10-2012 13:41, Andre Caldas wrote: I am trying to redefine the ’open_read_file’ callback. [...] utilities.sequencers.appendaction(textfileactions, "system","document.MyCharacterMess") All I want is to get the full path (or path relative to lfs.currentdir()). Is "textfileactions" the act

Re: [NTG-context] Frozen callback.

2012-10-02 Thread Philipp Gesang
· > > function document.MyCharacterMess(str,filename) > > What is this "str"? The raw file content as a Lua string. You can examine the arguments you get like so: ··· \startluacode document.arg_test = function (s,

Re: [NTG-context] Frozen callback.

2012-10-02 Thread Sietse Brouwer
Hello, Andre! Andre Caldas wrote: >> function document.MyCharacterMess(str,filename) > > What is this "str"? This is a function that takes two variables; the first one it calls 'str', the second one 'filename'. Example: function f(a, b) return a/b end function(8,2) --> 4, not 0.25 I do no

Re: [NTG-context] Frozen callback.

2012-10-02 Thread Wolfgang Schuster
Am 02.10.2012 um 13:41 schrieb Andre Caldas : > I am trying to redefine the ’open_read_file’ callback. > >> [...] >> utilities.sequencers.appendaction(textfileactions, >> "system","document.MyCharacterMess") > > All I want is to get the full path (or path relative to > lfs.currentdir()). Is

Re: [NTG-context] Frozen callback.

2012-10-02 Thread Andre Caldas
I am trying to redefine the ’open_read_file’ callback. > [...] > utilities.sequencers.appendaction(textfileactions, > "system","document.MyCharacterMess") All I want is to get the full path (or path relative to lfs.currentdir()). Is "textfileactions" the action I should trap? Also, shall I

Re: [NTG-context] Frozen callback.

2012-10-02 Thread Andre Caldas
Hello, Hans! >> Shall I simply do something like this? >> >> [...] > > this is not the recommended way .. better do somethign like this: > [...] > function document.MyCharacterMess(str,filename) Loved your function naming! :-) What is this "str"? > if file.nameonly(filename) == "war

Re: [NTG-context] Frozen callback.

2012-10-02 Thread Hans Hagen
On 2-10-2012 02:30, Andre Caldas wrote: I am trying to redefine the ’open_read_file’ callback. [...] direct callback access is disabled. There are usually some layers of abstraction on top of them, different ones for different callbacks. Mapping them all is a huge effort, so best refer to the s

Re: [NTG-context] Frozen callback.

2012-10-01 Thread Andre Caldas
>> I am trying to redefine the ’open_read_file’ callback. > > [...] > direct callback access is disabled. There are usually some layers > of abstraction on top of them, different ones for different > callbacks. Mapping them all is a huge effort, so best refer to > the source. > > In your case the f

Re: [NTG-context] Frozen callback.

2012-10-01 Thread Hans Hagen
On 1-10-2012 21:11, Andre Caldas wrote: Hello! I am trying to redefine the ’open_read_file’ callback. I am getting this error: callback ’open_read_file’ is frozen Why is it "frozen"? Can I "unfreeze it"? because it's the only way we can guarantee some features working well (but one can plug

Re: [NTG-context] Frozen callback.

2012-10-01 Thread Philipp Gesang
· > I am trying to redefine the ’open_read_file’ callback. Hi André, direct callback access is disabled. There are usually some layers of abstraction on top of them, different ones for different callbacks. Mapping them all is a huge effort, so best refer to the source. In your case the

[NTG-context] Frozen callback.

2012-10-01 Thread Andre Caldas
Hello! I am trying to redefine the ’open_read_file’ callback. I am getting this error: callback ’open_read_file’ is frozen Why is it "frozen"? Can I "unfreeze it"? André Caldas. ___ If your question is of interest