Search found 76 matches

by spir
Thu Nov 15, 2012 7:26 pm
Forum: Support and Development
Topic: tutorial on lua tables & data structures
Replies: 6
Views: 4051

collections

Hello, I have completed a very rough version of the section on collections; with arrays, sets, maps. If you like, you can have a look the source (file tabstruct') there ! (Checked the pointer, this time.) If ever I have enough time tomorrow and this week-end (and energy, this job sucks my ch'i !), I...
by spir
Thu Nov 15, 2012 3:07 pm
Forum: Support and Development
Topic: Share your favourite helper functions
Replies: 48
Views: 16397

true escaped quoted string?

I just realised that, apparently, the "%q" string format tag does not truely escaped newlines !!! print (string.format("%q", "XXX\tXXX\nXXX")) --[[ output: "XXX\9XXX\ XXX" ]] Why so? It does escape tab properly, so why not newlines? And what's this backslash r...
by spir
Thu Nov 15, 2012 12:38 pm
Forum: Support and Development
Topic: tutorial on lua tables & data structures
Replies: 6
Views: 4051

Re: tutorial on lua tables & data structures

Hi spir, Very nice and short tutorial, I enjoyed it :nyu: . It was a little bit hard to read, though, as the source file does not have format, but I understand is a raw first version. Let me try to suggest something. One property I find very important and very usefull is that tables are stored by r...
by spir
Wed Nov 14, 2012 9:23 pm
Forum: Support and Development
Topic: Error regarding basic main menu and tables SOLVED
Replies: 11
Views: 3778

Re: Error regarding basic main menu and the management of ta

if (condition) then --[[some code that will be executed if the condition is not false or nil]] end main_menu_buttons[var].Hover can either be equal to true or equal to false, so writing main_menu_buttons[var].Hover means writing true or false. When main_menu_buttons[var].Hover is true, the code &qu...
by spir
Wed Nov 14, 2012 9:09 pm
Forum: Support and Development
Topic: tutorial on lua tables & data structures
Replies: 6
Views: 4051

Re: tutorial on lua tables & data structures

Roland_Yonaba wrote:All the links you gave point to that same thread, and I can't find those said tutorial files.
Or I may have missed something...I didn't have coffee since this morning... :awesome:
It's me missing coffee! Sh*it! Corrected the link to the online repo, thanks for telling,
Denis
by spir
Wed Nov 14, 2012 7:06 pm
Forum: Support and Development
Topic: utf8 support in pure lua
Replies: 3
Views: 7510

Hello spir, Unfortunately my current utf8.lua is a simple approach. I tried to support more advanced stuff like lower/upper cases on Unicode, finally I thought it's too complicated... I think if someone want a true and full support of UTF-8 (or Unicode) he must use a better solution, like : * ICU4l...
by spir
Wed Nov 14, 2012 6:37 pm
Forum: Support and Development
Topic: Error regarding basic main menu and tables SOLVED
Replies: 11
Views: 3778

Re: Error regarding basic main menu and the management of ta

Nixola wrote: P.S: you don't need to declare or create the variable used in a 'for' loop, it's created automatically
You also don't need "== true" in

Code: Select all

if main_menu_buttons[var].Hover == true then
Understand why? (If not, ask).

Denis
by spir
Wed Nov 14, 2012 6:19 pm
Forum: Support and Development
Topic: Tables for Dummies
Replies: 9
Views: 11316

Re: Tables for Dummies

by spir
Wed Nov 14, 2012 6:18 pm
Forum: Support and Development
Topic: tutorial on lua tables & data structures
Replies: 6
Views: 4051

tutorial on lua tables & data structures

Hello, after a short exchange in the thread tables for dummies , I started to write some material for a tutorial intended for the wiki. One chapter out of four planned is completed (however probably the biggest), plus an introduction, all in rough form. It is there (there is a file with the source t...