Brian J. Murrell wrote:

+    def test_func(self, word=None):
+        if word:
+           # test "word" to what's in self.dir+'/.password' and somehow
+           # signal whether the input matched the file contents


+       if os.path.isfile(self.dir+'/.password'):
+           print 'password protected dir'
+           pb = InputBox('Password Protected Folder', self.test_func)
+           osd.focused_app.add_child(pb)
+           osd.focused_app = pb
+           pb.show()
+           # how do I get signalled from test_func as to whether the
+           # user got it correct or not, without using yucky global vars?

So I have the InputBox popping up, but as you can see by the comments
in both the added sections, how do I pass values back and forth
between InputBox()'s caller and InputBox()'s callback?  I think in
most situations, InputBox()'s caller wants to know the value that was
entered.

This is something that I have struggled with also. The problem is that when you create the InputBox that block of code is not going to wait on the results / callback. If someone would like to impliment a way to wait for the callback I would be all for it. :)


However, if you just think about things a little differently there isn't much of a need to actually wait for the callback function to be called. Anything that relies on the callback can simply be continued in that block of code. Part 1: display the InputBox, Part 2: deal with the results.

The second issue I have with InputBox is that there is no way to allow
the input of a password without everybody sitting there watching
seeing it as well.  Instead of displaying the character inputted, an
ansterisk (or something generic) should be displayed.

This is certainly a problem for inputting passwords, which are supposed to be secret aren't they! :)


Third issue: the use of repeating the numeric keys to input alphas
like a telephone dial pad is neat, but inputting numbers is not so
intuitive.  IMHO, the phoneChars matrix should look like this:

{
    1 : ["1"],
    2 : ["2", "A", "B", "C"],
    3 : ["3", "D", "E", "F"],
    4 : ["4", "G", "H", "I"],
    5 : ["5", "J", "K", "L"],
    6 : ["6", "M", "N", "O"],
    7 : ["7", "P", "Q", "R", "S"],
    8 : ["8", "T", "U", "V"],
    9 : ["9", "W", "X", "Y", "Z"],
    0 : ["0", "-", " "],
}

So that the first press of a numeric key produces that digit and
subsequent presses start to cycle through the alphas back to the
digit.

Yes, I agree. I actually thought about doing that from the beginning. I guess I was waiting for someone to use this and give feedback as you have done.


It may be that a new subclass of InputBox should be created, say
PasswordInput(), which displays asterisks, and as well, only allows
the input of numerics, because if you are displaying asterisks, it's
not really practical to have multiple presses of a key mean something
different.

I will certainly make a password dialog based on your feedback. I will only have it use numeric characters as well... it is good enough for the bank machine so it should be good enough for us.


I would also propose since there is only one value for a key, that the
cursor be moved along to the next digit automatically on the entering
of a value rather than with the LEFT/RIGHT events.  Those events
should still move the cursor back and forth, but it should move from
one input digit to the next automatically.

Most certainly.


I will have some time tomorrow to work on freevo so I will add this to my todo list, it shouldn't take me very long. I am also going to do some work which will result in it being easier to use a GUIObject (fewer lines of code).

-Rob




------------------------------------------------------- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to