Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Sun Oct 23, 2011 1:03 am   

[BUG 3.34] Lua Object Properties
 
There seems to be a bug interacting with the properties of objects through Lua, specifically buttons.

For example, you cannot change the caption of a button. The oncol and offcol properties do not exist either. Furthermore, in the help files it states that beginupdate and endupdate is available to all objects. They are not.

Here is an example of what you should be able to do:

Code:

local myButton = zs.getbutton("btnTest")
print(myButton.caption)
myButton.caption = "Hello"
print(myButton.caption)


The caption does not change. If I do myButton.offcaption = "Hello", however, it will actually add a second state and a new caption to that state. I should be able to retrieve and set any of the properties like this with ease. I really can't believe I cannot change the caption!

Please explain? Thanks.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Mon Oct 31, 2011 5:51 am   
 
Anyone have a workaround on this, besides having to create additional zscript variables just for caption purposes and thus cluttering up my code uneccessarily?
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net