Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Tree Key problem

I have a tree that was shoing strange behaviour, and I have traced it to the record Keys being used.

I have a structure such as
01
01.01
01.01.01
02
02.01
02.01.01
...
08
08.01
08.01.01
08.02.02
etc

All the above have dots swapped with '^' as dots are invalid, and this is fine.
Keys such as '05' when asked toget their 'ItemChildren' fail with a null result
Keys such as '08' are OK, and return the 08.01, 08.02 etc child keys.
I thought the leading zero might be the cause, so I prefixed the keys with "K-" and all works fine.
Even in a test changing the '08' to '05' causes this key to fail.

My guess is that binary 7 = 111, and binary 8 = 1000, so anything with less than 4 bits are problems.
But thats me, I guessed, so could be something totally different.
As it stands I can get by with the 'K-' prefix, to ensure it is OK.

Colin

Comments

  • My apologies for the massive delay in responding to this. Now that I am back from the Revelation Conference, I am catching up on all my correspondence.

    It appears you have exposed an OI bug. When I place a breakpoint within the C++ code of the SRP Tree control, I only get "5". So, it appears that OI is treating the "05" as an integer and therefore stripping leading zeroes. This is confirmed by the fact that prefixing it with "K" makes the problem go away.

    I also confirmed the "08" works fine. It seems to be an issue with "07" and below. Your theory is an interesting one, and I'll pass it along to Revelation.
  • This one caught me out again.
    Seems it is still there.

    Trying to set an ItemExpanded property for a key of "01" through "07" fails
  • I wanted to let you know that I passed this issue along to Revelation and they confirmed the bug on their end. They've fixed it, so this will no longer be a pain in the neck in OI 10.
Sign In or Register to comment.