Lostgallifreyan <z.c...@...> writes:

> 
> Small syntactic question...
> Andre's code in another thread used a dot, the results are neater than the 
colon I learned to use....
> 
> ST:SetLabel(SC:GetValue()
> ST.Label=SC.Value
> 
> I imagine this is an old issue so I'll keep this short:
> Is one of these methods to be deprecated (made obsolete), and if so, which?
> 
> Ok, one more question:
> Is there a case where the two methods are NOT equivalent, and if so, what?

The . is valid but a trick within wxlua. 
Get..., Set... are supported.

Set/GetValue become var.Value = or Foo = var.value
als note that Is is magic so 
ww = wx.wxTopLevelWindow ...
then ww.IsActive  works 
Ok and Eof are also magic, sor var.Ok is useful

Now var.Value is resolved in 2 steps (only the first time).

resolution...
The index fail within the meta (either index/newindex)

Now the argument must be single for the following to happen.
The index is added to the object, the code is rerun and now works. 
In all subsequent call the index allready exist and this all works.
There is a small cost time and space.

This is syntactic sugar like 
function Foo(arg) etc     in lua
is 
Foo = Function(arg) etc 

Most language and system supports these type of things.
I find it more readable and I like it, other may not. 

Its a free world (sometime).

Andre

PS: I have rewritten the Lua editor to suggest all these variances by using 
the dynamic binding support. So to me it is easy to use otherwise you have to 
remember all the rules.


------------------------------------------------------------------------------
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

Reply via email to