Andre Arpin <ar...@kingston.net> wrote: (02/01/2011 13:24) >X-Apparently-To: z.c...@btinternet.com via 87.248.115.227; Sun, 02 Jan 2011 >13:25:29 +0000 >Received-SPF: pass (mta1014.bt.mail.ird.yahoo.com: domain of >wxlua-users-boun...@lists.sourceforge.net designates 216.34.181.88 as >permitted sender) >X-YMailISG: kvhquv0cZAoRueHQc2qeRf0WQ9XZ1n7sym3sZMnrzKFyT2M0 > iDYqvMxPYhcPWNProLJyMq_yjHcXO00yhJ68usUlSDPOeLSd_eIqygIWpxH5 > U2oFf4nQG9_6MhZfqGp2tJ4ZcXLfLF6CqfL7khulPfnFg9CmOtt1tyq1wyge > 187OPtvef.2lGtzRctFAWyGNsd1L5RPi5YWcxHEKMNV8Sm809sA7firGN8kd > iRlpNMWJE4dqlBOXB5veozMy4oRxP_.12olIMsiyW148qO3vJ7621WeYWP39 > u6tkfKXrnx37aaIgg2VvXr1TScmx_7dATtNT26UKN852RVP8WxogSq4.9O7l > N4Nz0Lp1wgmouxrVCPwSWSFcanSWLgWDXnPBScvBj55ScdhgU5qlrSLl.wAE > iEQhK7RWR4SomTMC9A707q53ZQXRNvrbUA0CtUcI63M5IT7iX_BQjd9qbrXw > _sBZg0Gahdhqs9qPw6JJmmI3dKw9t7YiAskrJz6F3UsVAnfGQrESzH8NCmD1 > 8gs_1LnytdAClTvtqJnR1fMWcxyqrMSrQomTx3iT8VfNeaDx >X-Originating-IP: [216.34.181.88] >Authentication-Results: mta1014.bt.mail.ird.yahoo.com from=kingston.net; >domainkeys=neutral (no sig); from=kingston.net; dkim=neutral (no sig) >Received: from 216.34.181.88 (EHLO lists.sourceforge.net) (216.34.181.88) > by mta1014.bt.mail.ird.yahoo.com with SMTP; Sun, 02 Jan 2011 13:25:29 +0000 >Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) > by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) > (envelope-from <wxlua-users-boun...@lists.sourceforge.net>) > id 1PZNw3-0003wI-Ey; Sun, 02 Jan 2011 13:25:23 +0000 >Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] > helo=mx.sourceforge.net) > by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) > (envelope-from <gclwwu-wxlua-us...@m.gmane.org>) id 1PZNw2-0003wC-Ky > for wxlua-users@lists.sourceforge.net; Sun, 02 Jan 2011 13:25:22 +0000 >Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of m.gmane.org > designates 80.91.229.12 as permitted sender) > client-ip=80.91.229.12; > envelope-from=gclwwu-wxlua-us...@m.gmane.org; helo=lo.gmane.org; >Received: from lo.gmane.org ([80.91.229.12]) > by sog-mx-2.v43.ch3.sourceforge.com with esmtp (Exim 4.72) > id 1PZNw1-0004Gs-6o > for wxlua-users@lists.sourceforge.net; Sun, 02 Jan 2011 13:25:22 +0000 >Received: from list by lo.gmane.org with local (Exim 4.69) > (envelope-from <gclwwu-wxlua-us...@m.gmane.org>) id 1PZNvo-000154-PM > for wxlua-users@lists.sourceforge.net; Sun, 02 Jan 2011 14:25:09 +0100 >Received: from dsl-rb-64-118-22-48.wtccommunications.ca ([64.118.22.48]) > by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) > id 1AlnuQ-0007hv-00 > for <wxlua-users@lists.sourceforge.net>; Sun, 02 Jan 2011 14:25:08 +0100 >Received: from arpin by dsl-rb-64-118-22-48.wtccommunications.ca with local > (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 > for <wxlua-users@lists.sourceforge.net>; Sun, 02 Jan 2011 14:25:08 +0100 >X-Injected-Via-Gmane: http://gmane.org/ >To: wxlua-users@lists.sourceforge.net >From: Andre Arpin <ar...@kingston.net> >Date: Sun, 2 Jan 2011 13:24:54 +0000 (UTC) >Lines: 62 >Message-ID: <loom.20110102t135645...@post.gmane.org> >References: <loom.20110101t192233-...@post.gmane.org> > <20110101192037.97dd93e0.z.c...@btinternet.com> > <20110101194248.ab4ebd80.z.c...@btinternet.com> >Mime-Version: 1.0 >X-Complaints-To: use...@dough.gmane.org >X-Gmane-NNTP-Posting-Host: sea.gmane.org >User-Agent: Loom/3.14 (http://gmane.org/) >X-Loom-IP: 64.118.22.48 (Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; > WOW64; Trident/4.0; GTB6.6; SLCC2; .NET CLR 2.0.50727; > .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; > InfoPath.2; .NET4.0C)) >X-Spam-Score: -0.9 (/) >X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. > See http://spamassassin.org/tag/ for more details. > -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for > sender-domain > 0.6 HK_RANDOM_ENVFROM Envelope sender username looks random > -0.0 SPF_HELO_PASS SPF: HELO matches SPF record > -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay > domain > -0.0 SPF_PASS SPF: sender matches SPF record >X-Headers-End: 1PZNw1-0004Gs-6o >Subject: Re: [wxlua-users] A simple general spin control >X-BeenThere: wxlua-users@lists.sourceforge.net >X-Mailman-Version: 2.1.9 >Precedence: list >Reply-To: wxlua-users@lists.sourceforge.net >List-Id: <wxlua-users.lists.sourceforge.net> >List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/wxlua-users>, > <mailto:wxlua-users-requ...@lists.sourceforge.net?subject=unsubscribe> >List-Archive: ><http://sourceforge.net/mailarchive/forum.php?forum_name=wxlua-users> >List-Post: <mailto:wxlua-users@lists.sourceforge.net> >List-Help: <mailto:wxlua-users-requ...@lists.sourceforge.net?subject=help> >List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/wxlua-users>, > <mailto:wxlua-users-requ...@lists.sourceforge.net?subject=subscribe> >Content-Type: text/plain; charset="utf-8" >Content-Transfer-Encoding: base64 >Errors-To: wxlua-users-boun...@lists.sourceforge.net > >Lostgallifreyan <z.c...@...> writes: > >> >> I added the final call to FeedBack to correctly fill the text fields when it >loads, and I thought it looked >> cool speaking German this time. :) >> >> ----------------------------------------------------------------------------- > >Cool is also one of the favorite words of my grand children. >I am pleased to see that you got it working and I now appreciate the >usefulness of the spinCntlr. >
Kewl is also cool, if used in *strict* moderation. :) I think it applies to the SpinCtrl. >NT={[0] = 'Null', "Eins","Zwei","Drei","Vier","Fünf", >Is valid and give the same result. > Nice. Either I forgot it or didn't know it, but I suspected a neater way existed. >I recommend that use strict while testing and only use necessary global >variables. You will be amazed at the number of time it will shorten your >coding cycle. Unless you are like this Australian I worked with once. He wrote >an editor on the development machine. I tried to enter a program ask him how >you make correction on the line. He said I do not make typing errors. > I used to make very few, but many more now. Aging eyesight, mostly... >This is a slightly modified version of the original. > Thankyou. I'll use it. I'm usually strict in their use anyway, always creating them in Main() or using locals, but I have made exceptions it seems I shouldn't, like using _ as a temp in any case where I know its content is meaningless once its current use is done. I can always create that in Main too though. I got into the habit of creating globals there because I like to know at a glance what global variables I'm using. I also program in OPL (Psion language), and in that it's impossible to do otherwise. :) They have to be the first thing created in any procedure. I think OPL might let me make globals in the first line of a sub-procedure, but it makes no sense to me to do this, it would make it harder to keep track of them. In theory it might seem efficient to do that so no space is allocated beyond need, but there are better kinds of efficiency. I like to re-use variables a lot, so long as it makes sense to do so. >-- >-- strict.lua >-- checks uses of undeclared global variables >-- All global variables must be 'declared' through a regular assignment >-- (even assigning nil will do) in a main chunk before being used >-- anywhere or assigned to inside a function. >-- > >local mt = getmetatable(_G) >if mt == nil then > mt = {} > setmetatable(_G, mt) >end > >mt.__declared = {} > >mt.__newindex = function (t, n, v) >--"_" is special > if n~= '_' and not mt.__declared[n] then > local w = debug.getinfo(2, "S").what > if w ~= "main" and w ~= "C" then > error("assign to undeclared variable '"..n.."'", 2) > end > mt.__declared[n] = true > end > rawset(t, n, v) >end > >mt.__index = function (t, n) > if not mt.__declared[n] and debug.getinfo(2, "S").what ~= "C" then > error("variable '"..n.."' is not declared", 2) > end > return rawget(t, n) >end > >Good luck > >Andre > > >------------------------------------------------------------------------------ >Learn how Oracle Real Application Clusters (RAC) One Node allows customers >to consolidate database storage, standardize their database environment, and, >should the need arise, upgrade to a full multi-node Oracle RAC database >without downtime or disruption >http://p.sf.net/sfu/oracle-sfdevnl >_______________________________________________ >wxlua-users mailing list >wxlua-users@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/wxlua-users ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users