Re: getItem() and getLVSelectedText bug!!!!
- Posted by Derek Parnell <ddparnell at bigpond.com> May 12, 2002
- 371 views
----- Original Message ----- From: "jordah ferguson" <jorfergie03 at yahoo.com> To: "EUforum" <EUforum at topica.com> Subject: getItem() and getLVSelectedText bug!!!! > > > Hi Derek, > > I have had a tough time with the routines above in your new win32lib. > Every time i select an item > from a listview and i call getItem or getLVSelectedText(). I get a > windows Application error > message box saying...."The Instructions at 00415105 referenced memory at > ffffffff. The memory > could not be read from" > > Please check for a fix on this as the above routines are very vital. Yep, this was a bug. I'd assumed that the sendMessage() call to get the text from a column would return a Zero if the column didn't exist. However it doesn't. Instead it sets the text address to -1 (#FFFFFFFF) so I was trying to read from that non-existant address. The fix is actually in tk_mem.e where I now check if I can read the address before extracting the text there. There were a couple of other subtle ones with listviews too. Hopefully I've fixed these now. ------------- Derek.