adriweb
Editor
LV9 Veteran (Next: 1337)
Offline
Gender: 
Last Login: 23 May, 2013, 12:02:44
Date Registered: 13 April, 2011, 18:42:59
Location: South of France
Posts: 1197
Topic starter
Total Post Ratings: +185
|
 |
« on: 25 August, 2011, 16:22:06 » |
0
|
Hey guys ! As you may or may not know, Inspired Lua had a nice tutorial about Classes and OOP in Lua for the Nspire, but it was not translated into English (only French was available). This time is over and I'm proud to announce a complete tutorial in English  Here's the link : http://www.inspired-lua.org/2011/05/5-object-classes/Please comment so we can improve the tutorial even more ! Thanks !
|
|
|
|
« Last Edit: 25 August, 2011, 16:23:09 by adriweb »
|
Logged
|
|
|
|
ExtendeD
Coder Of Tomorrow
LV8 Addict (Next: 1000)
Offline
Gender: 
Last Login: Yesterday at 13:07:49
Date Registered: 02 January, 2010, 13:03:41
Location: France
Posts: 766
Total Post Ratings: +151
|
 |
« Reply #1 on: 25 August, 2011, 16:41:47 » |
0
|
Nice adriweb, this should help beginners.
Just two remarks: - I fear that the introduction and the "myTable.A.C.D.var" example may lose the reader, since this syntax will never be used, and is just a symbolic representation which doesn't really support inheritance anyway. - Could you provide examples of inheritance with the TI-Nspire class API?
|
|
|
|
« Last Edit: 25 August, 2011, 16:57:58 by ExtendeD »
|
Logged
|
|
|
|
adriweb
Editor
LV9 Veteran (Next: 1337)
Offline
Gender: 
Last Login: 23 May, 2013, 12:02:44
Date Registered: 13 April, 2011, 18:42:59
Location: South of France
Posts: 1197
Topic starter
Total Post Ratings: +185
|
 |
« Reply #2 on: 25 August, 2011, 16:44:31 » |
0
|
Thanks Extended.
I will try to make something up for the 2nd point.
About that 1st point, I understand your concern since I myself was not sure how to introduce it correctly. (the original tutorial was made by Levak, and I translated it). I might make chapters and a Table of contents saying that some introductory points can be skipped.
|
|
|
|
|
Logged
|
|
|
|
|
Levak
|
 |
« Reply #3 on: 25 August, 2011, 16:52:30 » |
0
|
- I fear that the introduction and the "myTable.A.C.D.var" example may lose the reader, since this syntax will never be used, and is just a symbolic representation which doesn't really support inheritence anyway.
Well ... I have no words to answer you on that point. I felt it was important to show the flexibility of Lua tables, that it can handle multi-type elements, such as tables, functions and "objects" (tables indeed).
|
|
|
|
« Last Edit: 25 August, 2011, 16:53:36 by Levak »
|
Logged
|
|
|
|
ExtendeD
Coder Of Tomorrow
LV8 Addict (Next: 1000)
Offline
Gender: 
Last Login: Yesterday at 13:07:49
Date Registered: 02 January, 2010, 13:03:41
Location: France
Posts: 766
Total Post Ratings: +151
|
 |
« Reply #4 on: 25 August, 2011, 16:57:17 » |
0
|
I see.
Maybe this introduction could be modify by: - Removing inheritance here that doesn't really make sense - Showing that this standard syntax can be used to define object-oriented singletons with a example similar to the existing one - Explaining that a more advanced syntax is needed to define real usable classes: either Lua's metatable or the TI-Nspire's class() function
|
|
|
|
« Last Edit: 25 August, 2011, 16:57:41 by ExtendeD »
|
Logged
|
|
|
|
|
Levak
|
 |
« Reply #5 on: 25 August, 2011, 17:16:33 » |
0
|
Yeah, thanks you for feedback. We will work on that =)
|
|
|
|
|
Logged
|
|
|
|
|
|
|