[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] sequence input editor -- how to get accepted keywords
From: |
Vaclav Slavik |
Subject: |
[lmi] sequence input editor -- how to get accepted keywords |
Date: |
Wed, 12 May 2010 18:11:27 +0200 |
Hi,
I finally have the input sequences editor in a state when it's able to
parse string expression, edit it in the GUI and then write the modified
sequence back into the text field.
What is missing, aside from some cosmetics, are:
1. Good edit window's title. I use "Edit Sequence" now, it should be
something more specific like "Edit payment sequence". This can be
specified manually in XRC file as an extra attribute, so unless you
disagree with that route, there's no problem.
2. I need a way to associate a sequence field with the list of accepted
keywords (and if there are keywords-only values, a way to know that).
This would be good for input completion and in-line validation, but
most pressingly now, it's required by InputSequence ctor to parse
the expression. Right now, I fail to parse "Individual payment" value
of "corridor;0" because of this.
2a) One solution would be to refactor InputSequence into two classes,
one of which would do only parsing, with no checking. But this
would complicate errors reporting in there and we would loose the
UI goodies listed above.
2b) We could put this information into the XRC file, but I suspect
it must be somewhere there in the sources already, so I'd rather
not.
Can you think of anything else?
Also, I use a gross hack to get the Input instance InputSequence needs:
I find the toplevel window, cast it to MvcController, get MvcModel from
it and cast it to Input (assuming that InputSequenceEntry control cannot
occur elsewhere). Any better suggestion would be appreciated; this is
the best I could untangle the MVC code on my own. Note that this would
be needed even with 2a), for the automagic duration number change when
you change duration mode, as proposed before.
Thanks,
Vaclav
- [lmi] sequence input editor -- how to get accepted keywords,
Vaclav Slavik <=