By just looking at the code, it makes me think it won't work properly if I were to actually use it. The library treats windows as any other control, with a window_id and a control_id. It should just take an 'id'.
Also, other controls could take a /Window object as a window_id. It might look nicer even though it'll still be converted to a text string in the end.
ID:839641
Jun 28 2012, 2:27 am
|
|
Jun 28 2012, 2:28 am
|
|
I guess I should change that then. I don't think I've ever used windows really :-)
|
Every control uses the same base class and the same method to call winset and winget. I updated this base class to allow you to only specify a window_id and have it only use that if no control_id is specified. There's really no change to how you'd use it - the constructor for every control takes two strings and a mob or client. It assumes the first string is the window_id and the second is the control_id, so for making /Window objects you just pass it one string.
I also added support for passing hashtables between JavaScript and DM. It relies on needing to be able to tell the difference between a plain list and associative list - have you ever needed to do this? The only way I've found to do this relies on causing a runtime error when the list isn't associative. It works, but I'd rather avoid the error if it's possible. |