Page 21 of 30
Re: PureLVSORT library : sorting ListIconGadgets (and more)
Posted: Tue Apr 27, 2010 9:25 am
by gnozal
QuimV wrote:This is the result in debug screen, with the word "test".
t
te
tes
test
tes
te
t
C
Thanks, I think I found the problem (maybe...)
Could you test again
http://freenet-homepage.de/gnozal/PureLVSORT_TEST.zip ?
(No warning anymore, use your own debug command)
Re: PureLVSORT library : sorting ListIconGadgets (and more)
Posted: Tue Apr 27, 2010 10:50 am
by QuimV
Output Debug:
t
te
tes
test
tes
te
t
C
Re: PureLVSORT library : sorting ListIconGadgets (and more)
Posted: Tue Apr 27, 2010 11:02 am
by gnozal
QuimV wrote:Output Debug:
t
te
tes
test
tes
te
t
C
Is this the result with the latest test library (PureLVSORT 21972 bytes 27/04/2010 10:19) ?
I don't understand .... I am checking the value returned by the HDM_GETITEM message and if it is #False, I set the string to "".
Code: Select all
GetItemOk = SendMessage_(hHeader, #HDM_GETITEM, *pNMHdr\iItem, @hHDItem)
If GetItemOk
FilterText = PeekS(TFilter\pszText, TFilter\cchTextMax)
Else
FilterText = ""
EndIf
Re: PureLVSORT library : sorting ListIconGadgets (and more)
Posted: Tue Apr 27, 2010 11:15 am
by QuimV
Yes, this is the result with the latest test library (PureLVSORT 21972 bytes 27/04/2010 10:19)
Re: PureLVSORT library : sorting ListIconGadgets (and more)
Posted: Tue Apr 27, 2010 11:31 am
by gnozal
QuimV wrote:Yes, this is the result with the latest test library (PureLVSORT 21972 bytes 27/04/2010 10:19)

I am out of ideas ...
Re: PureLVSORT library : sorting ListIconGadgets (and more)
Posted: Tue Apr 27, 2010 11:40 am
by QuimV
Could you send me, by PM, source files (no libraries) that i could debug directly on W7 and then I report you back?
You have my honored word and my total discretion about to destroy the files after the problem is solved.
Re: PureLVSORT library : sorting ListIconGadgets (and more)
Posted: Tue Apr 27, 2010 12:34 pm
by gnozal
QuimV wrote:Could you send me, by PM, source files (no libraries) that i could debug directly on W7 and then I report you back?
You have my honored word and my total discretion about to destroy the files after the problem is solved.
Sure, no problem.
Check your PM.
Re: PureLVSORT library : sorting ListIconGadgets (and more)
Posted: Wed Apr 28, 2010 7:45 am
by gnozal
We got some information about the Se7en issue:
QuimV wrote:The problem is located in the function:
GetItemOk = SendMessage_(hHeader, #HDM_GETITEM, *pNMHdr\iItem, @hHDItem)
In Windows XP-SP3:
When len(userfiltertext)>0 the function returns 1 (GetItemOk = 1)
When len(userfiltertext)=0 the function returns 0 (GetItemOk = 0)
In Windows W7-x32:
When len(userfiltertext)>0 the function returns 1 (GetItemOk = 1)
When len(userfiltertext)=0 the function returns 1 (GetItemOk = 1)
According to MSDN, HDM_GETITEM returns 0 if failed.
If anyone has some idea ...
Re: PureLVSORT library : sorting ListIconGadgets (and more)
Posted: Sat May 01, 2010 8:41 pm
by QuimV
Hi,
Compiled in Unicode it runs fine!
Is PB or Se7en bug?
Re: PureLVSORT library : sorting ListIconGadgets (and more)
Posted: Sat May 08, 2010 7:59 am
by dige
with pb4.50 b4 I've got an Illegal memory access with PureLVSORT_SelectGadgetToSort(). May be recompiling the source
with b4 helps?
Re: PureLVSORT library : sorting ListIconGadgets (and more)
Posted: Sat May 08, 2010 12:53 pm
by QuimV
Hi,
SetGadgetItemData and GetGadgetItemData doesn't run properly in the LisIcon when I use it with PureLVSORT library (PureLVSORT_SelectGadgetToSort).
Look at the next piece of code. Comment and uncomment the marked lines and look at the effect.
Code: Select all
#CONTIS = 1
#LI0 = 2
#BTN = 3
; This code uses SetGadgetItemData to store the user data
; of each item to later know it, even if the items index changed.
;
If OpenWindow(0, 0, 0, 280, 350, "SetGadgetItemData", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget(#BTN, 190, 10, 80, 20, "Test")
ContainerGadget(#CONTIS, 0, 100, 280, 350, #PB_Container_Raised)
;- ListIcon de Usuarios
ListIconGadget(#LI0, 0, 0, 280, 250, "Name", 150,#PB_ListIcon_CheckBoxes|#PB_ListIcon_GridLines|#PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
CloseGadgetList()
;****** Comment and Uncomment the next two lines in order to show the effect ****
If PureLVSORT_SelectGadgetToSort(#LI0, #PureLVSORT_ShowClickedHeader_IconLeft) = #PureLVSORT_Ok
EndIf
;********************************************************************************
;-- Add row
AddGadgetItem(#LI0, CountGadgetItems(#LI0),"1")
SetGadgetItemData(#LI0,CountGadgetItems(#LI0)-1,100)
;-- Add row
AddGadgetItem(#LI0, CountGadgetItems(#LI0),"2")
SetGadgetItemData(#LI0,CountGadgetItems(#LI0)-1,200)
;-- Add row
AddGadgetItem(#LI0, CountGadgetItems(#LI0),"3")
SetGadgetItemData(#LI0,CountGadgetItems(#LI0)-1,300)
;-- Add row
AddGadgetItem(#LI0, CountGadgetItems(#LI0),"4")
SetGadgetItemData(#LI0,CountGadgetItems(#LI0)-1,400)
;-- Add row
AddGadgetItem(#LI0, CountGadgetItems(#LI0),"5")
SetGadgetItemData(#LI0,CountGadgetItems(#LI0)-1,500)
;-- Add row
AddGadgetItem(#LI0, CountGadgetItems(#LI0),"6")
SetGadgetItemData(#LI0,CountGadgetItems(#LI0)-1,600)
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Gadget
If EventGadget() = #BTN
Debug GetGadgetItemData(#LI0, GetGadgetState(#LI0))
EndIf
EndIf
Until Event = #PB_Event_CloseWindow
EndIf
Regards
Re: PureLVSORT library : sorting ListIconGadgets (and more)
Posted: Sat May 08, 2010 9:45 pm
by PBUser
I have the same problem in my project. I´m currently using PureBasic 4.50 Beta 4
It worked with the old beta-versions (Beta 1 to Beta 3), but not with the latest.
Re: PureLVSORT library : sorting ListIconGadgets (and more)
Posted: Tue May 11, 2010 10:33 am
by gnozal
QuimV wrote:SetGadgetItemData and GetGadgetItemData doesn't run properly in the LisIcon when I use it with PureLVSORT library (PureLVSORT_SelectGadgetToSort).
Yes, and it's documented in the help file.
Re: PureLVSORT library : sorting ListIconGadgets (and more)
Posted: Tue May 11, 2010 12:01 pm
by gnozal
I have have just recompiled the library for PB 4.50 beta 4
Re: PureLVSORT library : sorting ListIconGadgets (and more)
Posted: Tue May 11, 2010 1:49 pm
by dige
Thx gnozal. Unfortunately all my programs crashing now at the end...
Pls PM me, if I can do some tests with the source for you...
EDIT:
After some more tests, I've find out it depends on PureCOLOR.
Could you recompile the lib too? thx!