Search lua-l
This index contains 143,615 documents and
1,774,615 keywords. Last update on
2023-03-09 .
- 101. RE: Using index-event to call external function (score: 166)
- Author: "Nick Trout" <nick@...>
- Date: Tue, 22 Apr 2003 16:01:04 -0700
- The following might work better. You can't quite just put "testObj.Hello" because Lua will think its an assignment. I put a dummy Hello function in your luaNET object. As Riki pointed out, __index ne
- 102. Re: How to check if table index exist (score: 162)
- Author: Oliver Kroth <oliver.kroth@...>
- Date: Mon, 18 Nov 2019 09:47:35 +0100
- Hi, My favourite method is to add to the result a metatable whose __index function returns an empty table with exactly that same metatable attached, which can be the same predefined table for all cas
- 103. Re: Undefined variables returning nil (score: 162)
- Author: William Ahern <william@...>
- Date: Tue, 19 Mar 2013 17:52:27 -0700
- Lua does a fine job of balancing verboseness and simplicity of its API. Some languages have a plethora of C APIs which do complex operations, others have very few operations which require laborious a
- 104. Re: cannot index a table loaded as a chunk (score: 159)
- Author: Ben Sunshine-Hill <sneftel@...>
- Date: Fri, 20 Aug 2004 01:52:04 -0700
- I'm wildly guessing you're executing luaL_loadfile, but never executing the resultant chunk. A chunk is a function. That's all it is. Commonly, it's a function which happens to set a lot of global va
- 105. Re: cannot index a table loaded as a chunk (score: 159)
- Author: "Michael Newberry" <mnewberry@...>
- Date: Fri, 20 Aug 2004 01:33:23 -0700
- Michael "static"
- 106. Using index-event to call external function (score: 159)
- Author: Marco Kögler <marco.koegler@...>
- Date: Tue, 22 Apr 2003 23:20:56 +0200
- Hi! I've been tinkering a bit with Lua and C#. I'm trying to use the __index metatable event to re-route function calls to the C# side. My setup is like this: On the Lua-Side I have a 'handle' to a C
- 107. Re: Index table from string? (score: 159)
- Author: "Milano Carvalho" <milanogc@...>
- Date: Fri, 22 Mar 2002 18:40:14 -0300
- Ok, I was silly in the last post... :) Milano
- 108. Re: How to check if table index exist (score: 155)
- Author: Aidar Kamalov <aidar.kamalov@...>
- Date: Wed, 20 Nov 2019 07:26:10 +0300
- Thank you, Sergey ??, 18 ????. 2019 ?. ? 19:51, Sergey Kovalev <kovserg33@gmail.com>: function ats(a,def) return function(...) for _,v in ipairs(table.pack(...)) do if type(a)
- 109. Re: How to check if table index exist (score: 155)
- Author: Sergey Kovalev <kovserg33@...>
- Date: Mon, 18 Nov 2019 18:51:26 +0200
- function ats(a,def) return function(...) for _,v in ipairs(table.pack(...)) do if type(a)~='table' then return def end a=a[v] end return a end end Code = ats(ent,"201")(1,1,1,1) Status = ats(ent)(1,1
- 110. How to check if table index exist (score: 155)
- Author: Aidar Kamalov <aidar.kamalov@...>
- Date: Mon, 18 Nov 2019 08:42:24 +0300
- Hello, I have a table generated by luasoap. function trackNum(tracknum) local ns, meth, ent = client.call { url = "" href="http://mysite/api/service.asmx">http://mysite/api/service.asmx",
- 111. cannot index a table loaded as a chunk (score: 155)
- Author: "Michael Newberry" <mnewberry@...>
- Date: Fri, 20 Aug 2004 01:29:16 -0700
- I am using lus 5.0 and I have a strange problem with tables being used as classes. I define the class as a table. It has one variable inside.The scripthas a command that calls a Cfunction named Inclu
- 112. Re: Index table from string? (score: 155)
- Author: "J. Perkins" <jason@...>
- Date: Fri, 22 Mar 2002 15:32:23 -0500
- No, I tried that and it gives an "attempt to index nil value" error. 'self' isn't valid inside the dostring block. Jason function Registry:getValue(key) return dostring("return self." .. key) end
- 113. Re: Undefined variables returning nil (score: 152)
- Author: William Sumner <prestonsumner@...>
- Date: Tue, 19 Mar 2013 18:07:05 -0600
- 1.) If you're asking how it would be implemented in Lua, I should have been clear that my suggestion assumes a C function in the built-in table library. 2.) One solution might be to return success or
- 114. Re: Empty? No. Array? No. Has? Yes. (score: 144)
- Author: Andrew Starks <andrew.starks@...>
- Date: Sat, 6 Jul 2013 23:57:46 -0500
- snip I appreciate the explanation and your graciousness. I'm on a particular train of thought that is getting no traction. I'm convinced that the reason is that there is something obvious that I'm mi
- 115. Re: Propsoal: a lua dialect without nil (score: 144)
- Author: joao lobato <btnfdp.lobato@...>
- Date: Wed, 16 Feb 2011 00:41:41 +0000
- May I suggest the definition of a Map type, implemented in pure lua, on tables, implementing whatever interface the first one to submit it Luarocks may choose? (maybe one could even write a tree impl
- 116. Re: Undefined variables returning nil (score: 141)
- Author: Coda Highland <chighland@...>
- Date: Tue, 19 Mar 2013 20:43:24 -0700
- This is exactly the use case for creating your own "null" value distinct from nil. It's easy -- as I mentioned in another post, just create a variable "null = {}" and it'll always compare equal to it
- 117. Uninitialized variable access and nil (score: 134)
- Author: Matthew Comi <matthew.comi@...>
- Date: Wed, 22 Mar 2006 14:38:30 +0800
- Hello... Some Lua behaviour that has bothered me since I started using it was: "It is not an error to access a non-initialized variable; you just get the special value nil as the result" http://www.l
- 118. Re: Luarocks root_dir is nil (score: 127)
- Author: Thijs Koerselman <thijskoerselman@...>
- Date: Tue, 17 Aug 2010 17:49:41 +0200
- Nevermind! I forgot I installed luarocks system wide now so I need to execute every command as a superuser. Thijs
- 119. Luarocks root_dir is nil (score: 127)
- Author: Thijs Koerselman <thijskoerselman@...>
- Date: Tue, 17 Aug 2010 17:16:25 +0200
- I'm getting the following error: $ luarocks list /opt/local/bin/lua: /usr/local/share/lua/5.1//luarocks/command_line.lua:90: attempt to index field 'root_dir' (a nil value) stack traceback: /usr/loca
- 120. ??: How to check if table index exist (score: 124)
- Author: ?? ?? <sumneko@...>
- Date: Fri, 22 Nov 2019 08:11:19 +0000
- When loading a large untrusted table, I would setmetatable of nil, witch saved a lot of code to checking nil. Here is a simple implementation: https://github.com/sumneko/lua-without-check-nil/blob/ma
Search by
Namazu v2.0.21