Mark, This mostly looks good, but I don't understand why you had to use unsignedInt64Value() rather than unsignedNumberValue(). The latter should work (and if it doesn't there's a bug there).
Rick On Tue, Jul 22, 2008 at 1:52 PM, Mark Miesfeld <[EMAIL PROTECTED]> wrote: > Rick, > > I'll try to explain myself well here. I've spent some working through > the code in RexxNativeActivation.cpp, especially as it relates to type > values as return values and arguments. I'm starting to get a feel for > it. > > Here is what I want to work: > > say 'Going to set the background color for the progress bar' > ret = progressBar~backgroundColor(134, 211, 18) > say 'Old background color was:' ret > say 'Going to set the bar color for the progress bar' > ret = progressBar~barColor(.DlgUtil~colorRef("DEFAULT")) > say 'Old bar color was:' ret > > Here is what happens: > > C:\work.ooRexx\other\feature.requests\update.progressBar>oodpbar > Going to set the background color for the progress bar > Old background color was: 4278190080 > Going to set the bar color for the progress bar > 114 *-* ret = progressBar~barColor(.DlgUtil~colorRef("DEFAULT")) > 2637 *-* self~InitDialog > 590 *-* if self~startit(icon, nomodal) \= 0 > 58 *-* rc = MyDialog~Execute("SHOWTOP") > Error 88: Invalid argument > Error 88.903: Argument 1 must be a whole number; found "4278190080" > > Fixing the cast for REXX_VALUE_uint32_t in > RexxNativeActivation::valueToObject() fixed the return value of > progressBar~backgroundColor, which returns uint32_t. But it doesn't > fix the argument value for uint32_t. > > A basic problem is that RexxNativeActivation::unsignedNumberValue() > uses: Numerics::objectToStringSize() which I think you intended to use > the full value range for, but it actually ends up restricting the > value to the max default numeric digits value. > > This breaks many of the cases in > RexxNativeActivation::processArguments() for both 32-bit compiles and > 64-bit compiles, I think. It breaks REXX_VALUE_stringsize_t and > REXX_VALUE_size_t on both 64-bit and 32-bit compiles and > REXX_VALUE_uint32_t for 32-bit compiles. > > The problem is that Numerics::objectToStringSize() uses > source->unsignedNumberValue() which for 4278190080 gets to > RexxNumberString::unsignedNumberValue() which eventually checks that > 4278190080 is less than validMaxWhole[DEFAULT_DIGITS - 1], which it is > not. So the argument is rejected as a bad arg. > > But, of course it is not a bad value for uint32_t. > > I was going to post my fix here, (which works but may not be the best > fix,) for you to review. But, it seems easier to just review the > code. So I just committed it with the caveat that you should change > it if need be. > > -- > Mark Miesfeld > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Oorexx-devel mailing list > Oorexx-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel