Jump to content

GUIListViewEx - BugFix Version 6 Apr 24


Melba23
 Share

Recommended Posts

  • Moderators

pixelsearch,

Hurrah!

And as we in Spain are now virtually confined to our houses for the next 2 weeks (at least) thanks to Covid-19 I will have plenty of time to look at any other nice little bugs you can find.

Over to you!

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Ok, here is one :
1) Select last Row (the 6th one)
2) Click Del button (it deletes the last selected row, 5 still visible)
3) Click Ins button => fatal error :

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GLVEx_Example_6.au3"    
"C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GUIListViewEx.au3" (5336) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
$avArray[$iIndex] = $vInsert
^ ERROR
>Exit code: 1    Time: 6.904

Note: error would not have happened if the selected row wasn't the last one.

Link to comment
Share on other sites

  • Moderators

pixelsearch,

That one was not too difficult! Keep at it!

M23

 

Edited by Melba23
Beta code removed

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

pixelsearch,

Bug from the changes I made to fix the earlier one - so often the case, alas.

M23

 

 

Edited by Melba23
Beta code removed

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Hi Melba23,
Please don't think it makes me happy to find bugs in your UDF ("a pretty complex beast" as you name it in the .rtf help file) . I'm doing it just because you want me to and I'll stop doing it as soon as you ask me to.

Here is one :
1) Click 6 times on the "Del" button (deleting all 6 rows in the listview)
2) Click once on the "Down" button :

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GLVEx_Example_6.au3"    
"C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GUIListViewEx.au3" (5520) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
$vTemp = $avArray[$iIndex1][$i]
$vTemp = ^ ERROR
>Exit code: 1    Time: 8.287

Edited by pixelsearch
typo
Link to comment
Share on other sites

  • Moderators

pixelsearch,

Nice catch - new code attached.

You keep going - I cannot think of all the edge cases myself and I would like the UDF to be as robust as possible!

M23

 

Edited by Melba23
Beta code removed

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

19 minutes ago, Melba23 said:

You keep going...

No problem. Here is another one :
Just run the script and click on the Read "Content" button (or the Read "Colour" button)

The array displayed doesn't fully match the listview, as the 1st visible line in the listview is missing in the array (Item 0-0, SubItem 0-1 etc...)

Link to comment
Share on other sites

  • Moderators

pixelsearch,

Yet another bug introduced by a fix earlier today.

M23

 

 

 

Edited by Melba23
Removed Beta code

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

After the last fix, every button pushed (Up, Down, Ins, Del...) shows automatically the ArrayDisplay (twice). I don't know if it's intentional or not, maybe you'll tell us.

For the record, I'm keeping the last beta's, just to check what changed between them (also to be able to run again the script with an older UDF). But it's a bit "dangerous" in case I mistakenly don't use the last beta before reporting. Maybe it would be better to delete them all.

89310631_melbasscripts.png.a76eb4f033d77ba150e8bdae696bc4d7.png

Ok, let's rest a bit now and we'll keep on tracking tomorrow. Have a great evening :)

Link to comment
Share on other sites

  • Moderators

pixelsearch,

I left some debugging code in place - sorry about that.

Very grateful for all your testing.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

13 hours ago, Melba23 said:

Very grateful for all your testing.

You're welcome. It's the least we can do for a person like you who help us so much :)

Ok, I just commented out the 3 lines used for debug (2 ArrayDisplay + 1 ConsoleWrite) before the next test.

An error will happen if the value of the updown control is higher than the number of rows in the listview. For example, just after launching the script :
1) Click once the down arrow of the updown control (its value will change from 0 to 9)
2) Click once the "Insert Spec" button :

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GLVEx_Example_6.au3"    
"C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GUIListViewEx.au3" (5388) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
$avArray[$iIndex] = $vInsert
^ ERROR
>Exit code: 1    Time: 6.237

This error can be reproduced if (for example) you start by deleting 4 rows (keeping 2 visible), then change the value of the updown control from 0 to 3, finally click once the "Insert Spec" button => error.

Note that (strangely) if you start by deleting all rows, then change the value of the updown control to 1, you won't have any error even if you click several times the "Insert Spec" button.

To generate an error after deleting all rows, then the value of the updown control will have to be set to 2 (or higher) and the 2nd push on the "Insert Spec" button will generate the error.

Link to comment
Share on other sites

  • Moderators

pixelsearch,

Another easy fix for a bug that has been there since I wrote the function!

M23

 

Edited by Melba23
Removed beta code

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Great! Now I understand better the purpose of the updown control, that's a good functionality :)
Another error can be generated just after the script was launched :

1) Click 6 times the "Del" (or "Delete Spec") button to delete all rows in the LV
2) Click the "Col" radio button
3) Click 4 times the "Del" (or "Delete Spec") button to delete all columns in the LV
4) Updown control : set it to 1
5) Click once the "Insert Spec" button :

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GLVEx_Example_6.au3"    
"C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GUIListViewEx.au3" (1696) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
$aEditable[$i][$iCol] = ""
^ ERROR
>Exit code: 1    Time: 12.28

 

Link to comment
Share on other sites

  • Moderators

pixelsearch,

 

Oops - did my sums wrong this morning. This should work better.

M23

 

Edited by Melba23
Beta code removed

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Yes, that solved it ($iMax_Col instead of $iMax_Col + 1 in line 1653) :thumbsup:
Here is another one : launch the script, right-click inside the listview (at an empty place, with no row selected)
The context menu will appear ("White text"  ... "Default both")
Choose one of these 2 options in the context menu ("Default text" or "Default field")

If you choose "Default text", an error happens in GLVEx_Example_6.au3 (line 339)

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GLVEx_Example_6.au3"    
"C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GLVEx_Example_6.au3" (339) : ==> Variable subscript badly formatted.:
$aSplit = StringSplit($aColArray[$aContext[1]][$aContext[2]], ";")
$aSplit = StringSplit($aColArray[^ ERROR
>Exit code: 1    Time: 6.863

If you choose "Default field", an error happens in GLVEx_Example_6.au3 (line 346)

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GLVEx_Example_6.au3"    
"C:\Documents and Settings\Administrateur\Mes documents\Nouveau dossier\GLVEx_Example_6.au3" (346) : ==> Variable subscript badly formatted.:
$aSplit = StringSplit($aColArray[$aContext[1]][$aContext[2]], ";")
$aSplit = StringSplit($aColArray[^ ERROR
>Exit code: 1    Time: 7.241

Please note that no error happens if you choose "Default both"

Something minor : concerning the right part of the GUI (the 2nd listview on the right), I notice that if you click the "Select colour" button, it correctly displays Windows colour selector, waiting for you to pick a colour. But if you don't pick any colour and Cancel that Windows colour selector (by clicking its Cancel button, its red cross, or Esc key) then the colour value displayed in the GUI will be "-1" (it was "0x000000"). It may be not important, just wanted to let you know.

Edited by pixelsearch
typo
Link to comment
Share on other sites

It appears that I can't add an empty row like this: _GUIListViewEx_InsertSpec($idListView, -1, "|") with the most recent testing version, but it fixed all my other issues! :)

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Link to comment
Share on other sites

  • Moderators

seadoggie01,

Try this.

pixelsearch,,

Keeping those for tomorrow - still 12 days of restrictions to go!

M23

 

Edited by Melba23
Beta code removed

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

pixelsearch,

The problems were in the example script which was not correctly checking for a valid return from the UDF.  I have added suitable error-checking in this new example script which solves them.

M23

GUIListViewEx_Test_Script.au3

Edited by Melba23
Typos

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Thanks Melba, it works perfectly now :)

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Link to comment
Share on other sites

  • Melba23 changed the title to GUIListViewEx - BugFix Version 6 Apr 24

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...