Entry widget and -textvariable configuration option.. 
Author Message
 Entry widget and -textvariable configuration option..

I have more or less assembled an "EntryWindow" widget, but I am
experiencing some trouble. Basically, my widget it called with
parameters telling it what kind of entry fields it should put
up in its own window (passed in an array).

Before the window gets shown, I have constructed it so that it
expects an option (-entryvariables) which contains an array of
the variables it should use for each entry field.

-entryvariables is declared as "METHOD" in ConfigSpecs, and when
the entryvariables subroutine gets called after my configure call
(right before calling show) I try to call "-textvariable" for each
entry field in my window and set it to the variable reference that
gets passed in the option to -entryvariables (e.g.
$entrywindow->configure( -entryvariables => [\$vara, \$varb].

For some unknown reason, when I go through all the elements in the
-entryvariables array in the "entryvariables" method, if I call
$entries[$i]->configure( -textvariable => $arg->[$i]) it does not
go through all the elments in my -entryvariables (in my for loop
which loops through all the elements in $arg) - it exits after
the first configure call to the Entry variable. If I comment out
the call to configure for the Entry widget, it goes through all
the parameters ok.

I have read the scarse documentation there is on ConfigSpecs and
configure, but I still have not got the full grasp on how all the
different options can and should be used, and I have not got a clue
to why the call to configure for the Entry widgets should mess up
a loop in my "entryvariables" method in my EntryWindow widget.

Any suggestions on what is going wrong, or other (simpler) ways to
obtain the same stuff? Thanks in advance..


Fri, 16 Apr 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Entry widget -textvariable option

2. Label widget -textvariable option

3. Taking a configuration option in a mega widget

4. Multiple option type entry widget?

5. -textvariable option in NumEntryPlain.pm

6. why dereference and then pass reference again on -textvariable option

7. Options for handling a configuration file

8. change background color on a widget when the textvariable changes

9. Implementing a -textvariable in a custom widget

10. Text Widget configuration

11. Adding new options to an entry

12. Browse entry color option.


Powered by phpBB® Forum Software