Why don't built-in commands use UIFactory?
Hi everyone,
I've been working on a wrapper library for Bazaar so it can be called from C, C++ or C# (or any dot-net language), which I plan to push up to Launchpad when it's working reasonably. I've got some of it working, including the ability to call built-in commands such as cmd_branch or cmd_commit. I have my own UIFactory which calls a Python object I built in a Python extension DLL that passes all of the UI callbacks to a function pointer, that can be set to your own class, so you can for example map get_boolean with a call to Windows MessageBox with YES/NO buttons, or the command line, or anything you wanted.
The problem is when I run some commands, for example cmd_uncommit, they don't do their UI via the UIFactory. They use print and raw_input and so forth, so I can't override them and do a GUI. My only way around it would be to duplicate the command using UIFactory for output, or else not use the command with my GUI as cmd_uncommit would just hang on raw_input not running in a console application (stdout ignored, stdin unreachable).
Is this by design? Is there any reason some commands don't use the UIFactory? Is there a plan to change this? Any recommendations?
Thanks much!
-Ed
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Bazaar Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Martin Pool
- Solved:
- Last query:
- Last reply: