Sorry, no. I presume you mean Australia. Although I'd love to visit, I haven't yet had the opportunity. Also, thanks for the feedback. I've been lurking on the list for several years now and it's been so quiet lately that I was wondering if there were many people still subscribed. I guess Christian and Damon have vTcl in such good shape it speaks for itself.
Best regards,
-Chris.
At 08:10 AM 4/4/2003 +1000, you wrote:
Chris,
Thanks, the silent listeners do appreciate the full explanation !
Hey, you're not a Chris Bennett who went to Sydney Uni are you ?
Greg Edwards
On Fri, 2003-04-04 at 06:13, Chris Bennett wrote:
Ok, FYI:
I finally found out why I was getting stuck with the vtcl combobox. My command-to-be-called was expecting only one argument (as supplied by the -command option), but the ::combobox2::CallCommand proc sends more than you would expect if you didn't know to look. The biggest problem was simply that I wasn't being informed of the specified command's failure, so I didn't know where to start looking for the problem.
With vTcl 1.5.2 (and 1.6.x I believe), adding the vTcl Combobox widget inserts all the requisite TCL code into your project encapsulated within the ::combobox2 namespace. The key line of code is
uplevel #0 $options(-command) $args
within ::combobox2::CallCommand. I'd recommend that it be replaced (in the vTcl distribution) with something like
catch { uplevel #0 $options(-command) $args } r
if {[regexp {called with too many arguments} $r]} {
bgerror $r
}
This is a bit tricky because $r will be the result of the last command in the called proc if successful, and possibly something else if not. In my case, I populate another listbox's list variable depending on the combobox selection, which can result in a quite lengthy return value and thus a bizarre bgerror dialog. But at least the above hack would let the first-time user know their command needs an 'args' argument to suck up the extra (and probably undesired) stuff.
Anyway, just thought this might be helpful to someone someday.
Cheers,
-Chris.
~~~~~~~~~~~~~~~~
Chris Bennett
[EMAIL PROTECTED]
------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ vtcl-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/vtcl-user
-- Greg Edwards Port Jackson Consulting & Turramurra Community Bank www.southernx.com.au/turramurrabank 0404 226 987
------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ vtcl-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/vtcl-user
