[pywin32-bugs] [ pywin32-Bugs-1953828 ] win32rcparser: stringTable error in GenerateFrozenResource
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2008-07-04 01:55:55
|
Bugs item #1953828, was opened at 2008-04-29 12:26 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1953828&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: win32 Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Hugh Emberson (hugh_emberson) Assigned to: Mark Hammond (mhammond) Summary: win32rcparser: stringTable error in GenerateFrozenResource Initial Comment: Version: 210 win32rcparser.GenerateFrozenResource() does not write the string table correctly. This snippet shows the string table generated by running win32rcparser.GenerateFrozenResource("test.rc", "testres.py", "test.h"): ------------------------------------------------------- stringTable = \ {'IDS_TEST_STRING1': <win32rcparser.StringDef instance at 0x00C538C8>, 'IDS_TEST_STRING2': <win32rcparser.StringDef instance at 0x00C53918>, 'IDS_TEST_STRING3': <win32rcparser.StringDef instance at 0x00C539E0>, 'IDS_TEST_STRING4': <win32rcparser.StringDef instance at 0x00C53A30>} ------------------------------------------------------- where test.rc and test.h come from site-packages\win32\test\win32rcparser I've attached the complete file below. I believe that fix is to add a __repr__ method to StringDef and to output a class definition of StringDef in the generated source. ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2008-07-04 11:56 Message: Logged In: YES user_id=14198 Originator: NO Thanks - I finally got back to this and added tests. Checking in lib/win32rcparser.py; new revision: 1.5; previous revision: 1.4 Checking in test/test_win32rcparser.py; new revision: 1.3; previous revision: 1.2 ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2008-05-04 21:04 Message: Logged In: YES user_id=14198 Originator: NO Thanks - but is there any chance you could change win32\test\test_win32rcparser.py to demonstrate the problem and the fix? It already loads a test.rc file that includes string resource, so it shouldn't be hard. I'm afraid I'm out of time to do it in the next couple of weeks - if you can add such tests it could still make it for build 211. Thanks! ---------------------------------------------------------------------- Comment By: Hugh Emberson (hugh_emberson) Date: 2008-04-29 12:52 Message: Logged In: YES user_id=1984762 Originator: YES Here is a patch which fixes the problem. File Added: win32rcparser.py.patch ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1953828&group_id=78018 |