Gnozal libraries for PB4.xx

Developed or developing a new product in PureBasic? Tell the world about it.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Konne wrote:So are u working on making the Resizelib threadsave?
Done
PB4 lib updated.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Amundo
Enthusiast
Enthusiast
Posts: 200
Joined: Thu Feb 16, 2006 1:41 am
Location: New Zealand

Post by Amundo »

Dear gnozal,

You seem to just give tirelessly of your talents and time!

Is there no end to your generosity?

Thanks again and again!
Win10, PB6.x, okayish CPU, onboard video card, fuzzy monitor (or is that my eyesight?)
"When the facts change, I change my mind" - John Maynard Keynes
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

Post by DevilDog »

Gnozal or anyone who knows....

Any other place to download this lib?

The link to http://people.freenet.de/gnozal/PureSMTP_.zip is broken. :(

Thanks
When all is said and done, more is said than done.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

@DevilDog
Link works for me
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

AFAIK all links work.
An alternative download place (may not always be the last versions though) : http://www.purearea.net/pb/english/userlibs.php
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

Post by DevilDog »

Thanks, I got it.

There must have been some kind of firewall filter to it from where I was.
When all is said and done, more is said than done.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Updated all PB4.0x / PB4.1x libraries

Changes :
- updated library installer : fixed PB folder detection for PB4.10 beta 4
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
dige
Addict
Addict
Posts: 1391
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post by dige »

@gnozal: could you add an pathrequester please, after the messagebox
"Install in Directory ... C:\..." .. otherwise the cancel button is'nt meaningful
thanks!
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

dige wrote:@gnozal: could you add an pathrequester please, after the messagebox
"Install in Directory ... C:\..." .. otherwise the cancel button is'nt meaningful
thanks!
Will try to remember it for the next version.
In the mean time, please note that the installer is a self-extracting ZIP archive, so you can open it with any archiver.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
dige
Addict
Addict
Posts: 1391
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post by dige »

@Gnozal: I need a temporary deactivation of PureLVSORT for some several reasons like:

PureLVSORT_Enable ( GadgetID.l, status.b )

One reason is to prevent a sort during update of listview items.
And the second is, that AddGadgetItem() is very slow, if PureLVSort
is activated.

Pls try this:

Code: Select all

;- Window Constants
;
Enumeration
  #Window_0
EndEnumeration

;- Gadget Constants
;
Enumeration
  #F_LEFT
  #ListIcon_SORT
  #Frame3D_1
  #ListIcon_STD
  #String_LEFT
  #String_RIGHT
EndEnumeration


Procedure Open_Window_0()
  If OpenWindow(#Window_0, 216, 0, 737, 447, "BUG DEMO",  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )
    If CreateGadgetList(WindowID(#Window_0))
      Frame3DGadget(#F_LEFT, 10, 10, 350, 395, "PURE LV Sort")
      
      ;-
      ListIconGadget(#ListIcon_SORT, 20, 30, 330, 370, "Column0", 100)
      AddGadgetColumn(#ListIcon_SORT, 1, "Column1", 100)
      AddGadgetColumn(#ListIcon_SORT, 2, "Column2", 100)
      Frame3DGadget(#Frame3D_1, 375, 15, 350, 395, "PURE LV Sort")
      
      ;-
      ListIconGadget(#ListIcon_STD, 385, 30, 330, 370, "Column0", 100)
      AddGadgetColumn(#ListIcon_STD, 1, "Column1", 100)
      AddGadgetColumn(#ListIcon_STD, 2, "Column2", 100)
      StringGadget(#String_LEFT, 10, 415, 350, 20, "")
      StringGadget(#String_RIGHT, 375, 415, 350, 20, "")
      
    EndIf
  EndIf
EndProcedure

Open_Window_0()
PureLVSORT_SelectGadgetToSort(#ListIcon_SORT, #PureLVSORT_ShowClickedHeader_IconLeft) 
PureLVSORT_SetColumnType(#ListIcon_SORT, 0, #PureLVSORT_Numeric)
PureLVSORT_SetColumnType(#ListIcon_SORT, 1, #PureLVSORT_String_CaseSensitive)
PureLVSORT_SetColumnType(#ListIcon_SORT, 2, #PureLVSORT_DateDDMMYYYYHHMMSS)

time = ElapsedMilliseconds()
For n = 1 To 2000
  AddGadgetItem( #ListIcon_STD, -1, Str(n) + Chr(10) + "Speed Test" + Chr(10) + FormatDate( "%dd.%mm.%yyyy %hh:%ii%:%ss", Random( Date())))
Next
SetGadgetText(#String_RIGHT, "Duration: " + Str(ElapsedMilliseconds() - time) + "ms")

time = ElapsedMilliseconds()
For n = 1 To 2000
  AddGadgetItem( #ListIcon_SORT, -1, Str(n) + Chr(10) + "Speed Test" + Chr(10) + FormatDate( "%dd.%mm.%yyyy %hh:%ii%:%ss", Random( Date())))
Next
SetGadgetText(#String_LEFT, "Duration: " + Str(ElapsedMilliseconds() - time) + "ms")

Repeat
  
  
Until WaitWindowEvent() = #PB_Event_CloseWindow

Thank you for your support :D
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

dige wrote:@Gnozal: I need a temporary deactivation of PureLVSORT for some several reasons like:
PureLVSORT_Enable ( GadgetID.l, status.b )
The reason of the 'slowness' : since PB4, PureLVSORT is monitoring the #LVM_INSERTITEM / #LVM_DELETEITEM messages to reset the lParam for the LVM_SORTITEMS message (to avoid possibles crashes).
What you can do about it :
1. Enable PureLVSORT *after* having populated the listicon

Code: Select all

  ;- Window Constants
  ;
Enumeration
  #Window_0
EndEnumeration
  
  ;- Gadget Constants
  ;
Enumeration
  #F_LEFT
  #ListIcon_SORT
  #Frame3D_1
  #ListIcon_STD
  #String_LEFT
  #String_RIGHT
EndEnumeration
  
  
Procedure Open_Window_0()
  If OpenWindow(#Window_0, 216, 0, 737, 447, "BUG DEMO",  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )
    If CreateGadgetList(WindowID(#Window_0))
      Frame3DGadget(#F_LEFT, 10, 10, 350, 395, "PURE LV Sort")
      
      ;-
      ListIconGadget(#ListIcon_SORT, 20, 30, 330, 370, "Column0", 100)
      AddGadgetColumn(#ListIcon_SORT, 1, "Column1", 100)
      AddGadgetColumn(#ListIcon_SORT, 2, "Column2", 100)
      Frame3DGadget(#Frame3D_1, 375, 15, 350, 395, "PURE LV Sort")
      
      ;-
      ListIconGadget(#ListIcon_STD, 385, 30, 330, 370, "Column0", 100)
      AddGadgetColumn(#ListIcon_STD, 1, "Column1", 100)
      AddGadgetColumn(#ListIcon_STD, 2, "Column2", 100)
      StringGadget(#String_LEFT, 10, 415, 350, 20, "")
      StringGadget(#String_RIGHT, 375, 415, 350, 20, "")
      
    EndIf
  EndIf
EndProcedure
  
Open_Window_0()
  
time = ElapsedMilliseconds()
For n = 1 To 2000
  AddGadgetItem( #ListIcon_STD, -1, Str(n) + Chr(10) + "Speed Test" + Chr(10) + FormatDate( "%dd.%mm.%yyyy %hh:%ii%:%ss", Random( Date())))
Next
SetGadgetText(#String_RIGHT, "Duration: " + Str(ElapsedMilliseconds() - time) + "ms")
  
time = ElapsedMilliseconds()
For n = 1 To 2000
  AddGadgetItem( #ListIcon_SORT, -1, Str(n) + Chr(10) + "Speed Test" + Chr(10) + FormatDate( "%dd.%mm.%yyyy %hh:%ii%:%ss", Random( Date())))
Next
SetGadgetText(#String_LEFT, "Duration: " + Str(ElapsedMilliseconds() - time) + "ms")

  
PureLVSORT_SelectGadgetToSort(#ListIcon_SORT, #PureLVSORT_ShowClickedHeader_IconLeft) 
PureLVSORT_SetColumnType(#ListIcon_SORT, 0, #PureLVSORT_Numeric)
PureLVSORT_SetColumnType(#ListIcon_SORT, 1, #PureLVSORT_String_CaseSensitive)
PureLVSORT_SetColumnType(#ListIcon_SORT, 2, #PureLVSORT_DateDDMMYYYYHHMMSS)
  
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
2. If you can't use solution 1, use PureLVSORT_ClearGadget() to disable the library and the use PureLVSORT_SelectGadgetToSort() again.

Code: Select all

  ;- Window Constants
  ;
Enumeration
  #Window_0
EndEnumeration
  
  ;- Gadget Constants
  ;
Enumeration
  #F_LEFT
  #ListIcon_SORT
  #Frame3D_1
  #ListIcon_STD
  #String_LEFT
  #String_RIGHT
EndEnumeration
  
  
Procedure Open_Window_0()
  If OpenWindow(#Window_0, 216, 0, 737, 447, "BUG DEMO",  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )
    If CreateGadgetList(WindowID(#Window_0))
      Frame3DGadget(#F_LEFT, 10, 10, 350, 395, "PURE LV Sort")
      
      ;-
      ListIconGadget(#ListIcon_SORT, 20, 30, 330, 370, "Column0", 100)
      AddGadgetColumn(#ListIcon_SORT, 1, "Column1", 100)
      AddGadgetColumn(#ListIcon_SORT, 2, "Column2", 100)
      Frame3DGadget(#Frame3D_1, 375, 15, 350, 395, "PURE LV Sort")
      
      ;-
      ListIconGadget(#ListIcon_STD, 385, 30, 330, 370, "Column0", 100)
      AddGadgetColumn(#ListIcon_STD, 1, "Column1", 100)
      AddGadgetColumn(#ListIcon_STD, 2, "Column2", 100)
      StringGadget(#String_LEFT, 10, 415, 350, 20, "")
      StringGadget(#String_RIGHT, 375, 415, 350, 20, "")
      
    EndIf
  EndIf
EndProcedure
  
Open_Window_0()
  
  
  
PureLVSORT_SelectGadgetToSort(#ListIcon_SORT, #PureLVSORT_ShowClickedHeader_IconLeft) 
PureLVSORT_SetColumnType(#ListIcon_SORT, 0, #PureLVSORT_Numeric)
PureLVSORT_SetColumnType(#ListIcon_SORT, 1, #PureLVSORT_String_CaseSensitive)
PureLVSORT_SetColumnType(#ListIcon_SORT, 2, #PureLVSORT_DateDDMMYYYYHHMMSS)
  
  
time = ElapsedMilliseconds()
For n = 1 To 2000
  AddGadgetItem( #ListIcon_STD, -1, Str(n) + Chr(10) + "Speed Test" + Chr(10) + FormatDate( "%dd.%mm.%yyyy %hh:%ii%:%ss", Random( Date())))
Next
SetGadgetText(#String_RIGHT, "Duration: " + Str(ElapsedMilliseconds() - time) + "ms")
  
  
PureLVSORT_ClearGadget(#ListIcon_SORT)
  
time = ElapsedMilliseconds()
For n = 1 To 2000
  AddGadgetItem( #ListIcon_SORT, -1, Str(n) + Chr(10) + "Speed Test" + Chr(10) + FormatDate( "%dd.%mm.%yyyy %hh:%ii%:%ss", Random( Date())))
Next
SetGadgetText(#String_LEFT, "Duration: " + Str(ElapsedMilliseconds() - time) + "ms")
  
  
PureLVSORT_SelectGadgetToSort(#ListIcon_SORT, #PureLVSORT_ShowClickedHeader_IconLeft) 
PureLVSORT_SetColumnType(#ListIcon_SORT, 0, #PureLVSORT_Numeric)
PureLVSORT_SetColumnType(#ListIcon_SORT, 1, #PureLVSORT_String_CaseSensitive)
PureLVSORT_SetColumnType(#ListIcon_SORT, 2, #PureLVSORT_DateDDMMYYYYHHMMSS)
  
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
I hope this helps.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
dige
Addict
Addict
Posts: 1391
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post by dige »

Thank you Gnozal. The second solution is what I currently use as workaround.
Do you think a temporary en / disableing is not possible, is it?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

dige wrote:Thank you Gnozal. The second solution is what I currently use as workaround.
Do you think a temporary en / disableing is not possible, is it?
Could you please try http://freenet-homepage.de/gnozal/PureLVSORT_BETA.zip ? [ANSI PB4.02 LIBRARY]
New function : PureLVSORT_Disabled(#True/#False)
It's almost as fast as PureLVSORT_ClearGadget().

Code: Select all

Enumeration 
  #Window_0 
EndEnumeration 
Enumeration 
  #F_LEFT 
  #ListIcon_SORT 
  #Frame3D_1 
  #ListIcon_STD 
  #String_LEFT 
  #String_RIGHT 
EndEnumeration 
Procedure Open_Window_0() 
  If OpenWindow(#Window_0, 216, 0, 737, 447, "PureLVSORT demo",  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar ) 
    If CreateGadgetList(WindowID(#Window_0)) 
      Frame3DGadget(#F_LEFT, 10, 10, 350, 395, "PURE LV Sort") 
      ListIconGadget(#ListIcon_SORT, 20, 30, 330, 370, "Column0", 100) 
      AddGadgetColumn(#ListIcon_SORT, 1, "Column1", 100) 
      AddGadgetColumn(#ListIcon_SORT, 2, "Column2", 100) 
      Frame3DGadget(#Frame3D_1, 375, 15, 350, 395, "PURE LV Sort") 
      ListIconGadget(#ListIcon_STD, 385, 30, 330, 370, "Column0", 100) 
      AddGadgetColumn(#ListIcon_STD, 1, "Column1", 100) 
      AddGadgetColumn(#ListIcon_STD, 2, "Column2", 100) 
      StringGadget(#String_LEFT, 10, 415, 350, 20, "") 
      StringGadget(#String_RIGHT, 375, 415, 350, 20, "") 
    EndIf 
  EndIf 
EndProcedure 
Open_Window_0() 
;
PureLVSORT_SelectGadgetToSort(#ListIcon_SORT, #PureLVSORT_ShowClickedHeader_IconLeft) 
PureLVSORT_SetColumnType(#ListIcon_SORT, 0, #PureLVSORT_Numeric) 
PureLVSORT_SetColumnType(#ListIcon_SORT, 1, #PureLVSORT_String_CaseSensitive) 
PureLVSORT_SetColumnType(#ListIcon_SORT, 2, #PureLVSORT_DateDDMMYYYYHHMMSS) 
;
time = ElapsedMilliseconds() 
For n = 1 To 2000 
  AddGadgetItem(#ListIcon_STD, -1, Str(n) + Chr(10) + "Speed Test" + Chr(10) + FormatDate( "%dd.%mm.%yyyy %hh:%ii%:%ss", Random( Date()))) 
Next 
SetGadgetText(#String_RIGHT, "Duration: " + Str(ElapsedMilliseconds() - time) + "ms") 
;
PureLVSORT_Disabled(#True) ; Try with this line and without ...
;
time = ElapsedMilliseconds() 
SendMessage_(GadgetID(#ListIcon_SORT), #WM_SETREDRAW, #False, 0) ; even faster ... ;-)
For n = 1 To 2000 
  AddGadgetItem(#ListIcon_SORT, -1, Str(n) + Chr(10) + "Speed Test" + Chr(10) + FormatDate( "%dd.%mm.%yyyy %hh:%ii%:%ss", Random( Date()))) 
Next 
SendMessage_(GadgetID(#ListIcon_SORT), #WM_SETREDRAW, #True, 0)
SetGadgetText(#String_LEFT, "Duration: " + Str(ElapsedMilliseconds() - time) + "ms") 
;
PureLVSORT_Disabled(#False)
;
Repeat 
Until WaitWindowEvent() = #PB_Event_CloseWindow
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
dige
Addict
Addict
Posts: 1391
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post by dige »

@Gnozal: Is the library the threadsafe one or standard?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

dige wrote:@Gnozal: Is the library the threadsafe one or standard?
The test library is ANSI - STANDARD - PB4.02
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Post Reply