Open randy3k opened 7 years ago
Good point. I'll see what I can do.
_create_application
creates a bunch of objects. I think it would be better to have a _create_...
for each object. In other words, _create_application
should only create the Application
(https://github.com/randy3k/Rice/blob/62e6518e248b3d9ba90c6da468b9a438ef8efc5c/rice/deps/prompt_toolkit/shortcuts/prompt.py#L468), and call other methods (or take in arguments) to create the other objects, like _create_layout
, _create_buffer
, and so on.
At the 2.0 branch, I found that the
Prompt
is very difficult to be subclassed because the whole app and layout are computed in one big function_create_application
. It would be nice to dissect this function into smaller pieces to allow more customizability. For instance, I really want to customize the layout in some way, but it is currently quite impossible.