On Oct 31, 2008, at 2:57 PM, Norman Palardy wrote:
On 31-Oct-08, at 12:11 PM, Charles Yeomans wrote:
On Oct 31, 2008, at 12:53 PM, Keith DeLong wrote:
Both of these bugs are consistently reproducible in Mac OS X10.4
but not
10.5:
1. If a sheet is open on a window, attempting to modally open a
subsequent
dialog as a sheet silently fails.
In our case we are confirming save changes when closing the sheet.
No
problem in 10.5 or Win32 builds. OS X 10.4 builds silently miss
the dialog,
allowing the code to continues and result in a NOE when testing
the results
of the dialog.
2. Looking up an Integer keys in dictionaries using Int64 values
fail on OS
x 10.4:
Dim i as integer = 2
myDictionary.Value( i ) = someString
Later on...
MyString = myDictionary.lookup( myField.text.Clong, "" )
In 10.4 myString = ""
On 10.5 and Win32 myString = someString
However, this works on all 3 platforms:
Dim i as Integer = myField.text.CLong
MyString = myDictionary.lookup( i, "" )
Hope this saves someone else some hassles,
I reported a feedback like this in July.
*********
Dictionary lookup of 32-bit integer keys using a 64-bit integer
returns different result in PPC v. Intel.
Steps to Reproduce:
dim X as Int32 = 43
dim Y as Int64 = 43
dim d as new Dictionary
d.Value(X) = true
dim b as Boolean = d.Lookup(Y, false)
b is true in Intel builds, but false in PPC builds.
*********
Actually this is not a bug. The internal hash of the two values is
different.
Not unlike trying to use strings with different encodings fails for
the same reason.
So the hash of "Hello" in US ASCII is different than "Hello" in UTF16.
Int32 hashes and int64 hashes are not the same even if they hold the
same value
I think that the fact that the value returned by d.Lookup depends on
Intel v. PPC is a bug. That CType(43, Int32) and CType(43, Int64) may
have different hash values means that the correct return value should
be false.
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|