Open GoogleCodeExporter opened 9 years ago
The root problem here is in gui.py, in the load_args method. This method
naively sets
Control values based on their vartype--in this case, since FlagOpt is a bool
type, it
simply sets the flag and moves on. This is a design flaw that might be better
handled
if Controls were responsible for parsing their own arguments (since they are
responsible for setting them in the first place).
Consider adding a counterpart to get_args, called set_args. Currently, the
Application starts off the chain of get_args, by calling all the Panels'
get_args
methods, which in turn call their Controls' get_args methods. A set_args method
should work in much the same way, starting with a list of args that will be
processed
down the chain, until a Control finds options/arguments it's interested in, and
pops
them off the list. This chain of set_args calls should completely replace the
current
Application.load_args method.
Original comment by wapcaplet88
on 6 Jun 2010 at 4:41
Original comment by wapcaplet88
on 7 Jun 2010 at 3:56
Just a note that a SpacedText "list" will also fail the load_args test.
Example: tovid gui -files 1.mpg 2.mpg -rotate-thumbs 10 12
will produce a:
"1" "0"
in the text area,
and a "Unrecognized argument: 12" in the error output.
Original comment by grepper@gmail.com
on 29 Aug 2010 at 1:52
Original comment by grepper@gmail.com
on 29 Aug 2010 at 1:54
Original issue reported on code.google.com by
wapcaplet88
on 6 Jun 2010 at 3:56