On approximately 6/26/2004 1:30 PM, came the following characters from
the keyboard of Glenn Linderman:
It seems like the development version of GUI has a bug.
The released versions of ->Text() without a parameter return the current
value from the object, without resetting it first.
The development version of ->Text() without a parameter seems to reset
the object, before returning the value. This eliminates the ability to
"read" values.
This problem manifested itself to me when attempting to use ->Text() on
a Label, I haven't yet investigated to see how many objects might be
affected, or looked at the source to see how complex the fix might be...
I just happened to use an old program that hadn't been "ported" to the
new GUI, with the new GUI, and this symptom cropped up. Using the old
GUI "cured" the problem.
This is somewhat a false alarm... but not completely. I can't reproduce
it in the "obvious" test case, and the source code for the gui.xs Text
function, which is the only place Text is defined in either version of
GUI, is identical.
On the other hand, I do have an application that works fine with the old
GUI and fails with the new one... same application, and same Perl.
And the symptom is that data returned from Text() is different. So I'm
presently quite confused, but I'll be working on figuring it out.
This is an application that uses 2 threads, via the Win32 Perl fork
emulation.
In adding a bunch of print statements, I see that with the older
Win32::GUI, both the parent and child report the same HASH(address) for
the Label object of concern, whereas the current development version
reports different HASH(address) values for the Label object of concern.
Yet with the new GUI, the parent starts reporting the different value
prior to the child thread being created!
One would think that it might be a different sort of scoping or
different rules for closures, if I weren't using the same version of
Perl, and just switching GUI versions.
Sort of makes me wonder if there is something about the compilation of
Win32::GUI that affects the scoping of variables defined later, which
isn't supposed to happen, of course. But I'm really grasping at straws
here.
I've tried to make a small test case, but the small test cases so far
work identically under the old and new GUI versions.
--
Glenn -- http://nevcal.com/
===========================
The best part about procrastination is that you are never bored,
because you have all kinds of things that you should be doing.