[tcltk-perl] RE: scalar($w->getOpenFile)
Brought to you by:
hobbs
From: Jeff H. <je...@ac...> - 2004-04-21 18:14:40
|
> > The thing is that there is a difference, it's just very, very subtle. > > The problem is that the subtle distinctions are very important. > > So tell me what breaks if we do it like this. With your changes, it all remains correct, but you have to make those changes only to work around a bug IMO. You cannot generally make the statement that all Tcl lists should be scalar-ized, as that will ruin performance without purpose. > > Looking into the Tk code ... I'm suspecting bug, as I see that the > > variable returned is specifically set to "" (empty string, not empty > > list) when cancel is hit. > > So why was it returning a reference to an empty array then? > Some bug in the Tcl.pm interface code? Haven't delved into it yet ... > > The important thing in getOpenFile is in making sure whatever changes > > you do correctly handle files with spaces and multiple files (in case > > you pass -multiple 1 to the dialog). > > If you call $mw->getOpenFile in list context it should all > work. And if you provide -multiple 1 you probably know that > you must do that. Yes, that is correct. I just want to understand the bug that we are hitting to see that it's clearly a bug, and not a subtle difference that we have to consider. Jeff |