我想数据窗口的PBL从(PowerBuilder的库)文件中的内容,并在适当位置编辑。 我们的想法是读取PBL文件,访问个人数据窗口修改源代码。 不知怎的,我已经成功地做到使用IronPython的PblReader .NET库中的第一部分。 它可以让我读PBL文件,以及访问数据窗口的源代码。 但是它不支持修改。 我想知道如果任何人有编辑PBL文件的想法?
Answer 1:
A PowerBuilder application can load a DataWindow from a PBL (doesn't have to be in the library path), modify it, and save it back to the PBL. I've written a couple of tools that do that. PowerBuilder will allow you to modify the DataWindow according to its object model using the modify
method. I don't know why anyone would want to reinvent all of this. I recall seeing Python bindings for PB somewhere. You could get the DW syntax from PB, call out to Python, then save it back in PB. But you'd have to do all the parsing in Python, whereas PB already understands the DW. Finally I'm surprised Terry didn't plug PBL Peeper. You could use PBL Peeper to export the DataWindows, massage them to your hearts's content in Python. then import them back into PB.