Mercurial > MadButterfly
diff tools/svg2code.py @ 296:2e97e8082d83
* Fix the symbol definition code which does not assume the id is the same as the mbname.
* Add appleTV style list demo. We need to add animation latter. It is staic for now.
author | wycc |
---|---|
date | Sun, 01 Feb 2009 16:28:28 +0800 |
parents | 5c066380a84e |
children | 1b69da2494e9 |
line wrap: on
line diff
--- a/tools/svg2code.py Sun Feb 01 15:10:18 2009 +0800 +++ b/tools/svg2code.py Sun Feb 01 16:28:28 2009 +0800 @@ -362,7 +362,8 @@ ## \note mbname declare that this node should be in the # symbol table. mbname = obj.getAttribute('mbname') - print >> codefo, 'ADD_SYMBOL([%s])dnl' % (mbname) + id = obj.getAttribute('id') + print >> codefo, 'ADD_SYMBOL([%s],[%s])dnl' % (id,mbname) pass func(obj, coord_id, codefo, doc) pass @@ -572,7 +573,8 @@ ## \note mbname declare that this node should be in the # symbol table. mbname = text.getAttribute('mbname') - print >> codefo, 'ADD_SYMBOL([%s])dnl' % (mbname) + id = text.getAttribute('id') + print >> codefo, 'ADD_SYMBOL([%s],[%s])dnl' % (id,mbname) pass pass