Settings dialog messed up (help and editing fail)
This is already fixed but I am concerned about the way I fixed it so I am logging a ticket.
Here's the fix:
http://trac-hg.assembla.com/openrpg_dev/changeset/506%3Aafeaa94e4efc
The help was broken due to the self.settings having been altered (probably around the time the ElementTree code was added) to simply settings which is now the global name of the settings object. Reverting to the 1.8.0 code here.
The other bug prevented any edit of the settings. I traced it to the fact that suddenly the cell values returned by the Grid were unicode strings. It turns out that if you search a ElementTree with a tag name in unicode it will always fail due to a line in the Path object's __init__ that checks for type str not unicode. Actually it checks that the string is the same type as "".
So why did the Grid suddenly start reporting its cell contents as unicode strings? I have no idea. The fix simply casts the value it gets from the cell into a string before doing the ElementTree tag search.
Here's the fix:
http://trac-hg.assembla.com/openrpg_dev/changeset/506%3Aafeaa94e4efc
The help was broken due to the self.settings having been altered (probably around the time the ElementTree code was added) to simply settings which is now the global name of the settings object. Reverting to the 1.8.0 code here.
The other bug prevented any edit of the settings. I traced it to the fact that suddenly the cell values returned by the Grid were unicode strings. It turns out that if you search a ElementTree with a tag name in unicode it will always fail due to a line in the Path object's __init__ that checks for type str not unicode. Actually it checks that the string is the same type as "".
So why did the Grid suddenly start reporting its cell contents as unicode strings? I have no idea. The fix simply casts the value it gets from the cell into a string before doing the ElementTree tag search.
Leave a comment
fixed
on 2009-11-29 15:16 *
By Digitalxero
I would change the old setting local to temp_settings or something so it does not conflict instead of self.settings. That way the data is garbage collected after that method is finished instead of hanging around till OpenRPG closes.