incepator Posted May 21, 2013 Author Share Posted May 21, 2013 I solved my problem, but I found a small bug in the script, if you want to fix to improve this header. GUIListViewEx_Mod.au3 (1907) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $aGLVEx_SrcArray[$aLocation[0] + 1][$aLocation[1]] = $sItemNewText ^ ERROR Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 21, 2013 Moderators Share Posted May 21, 2013 incepator, You have been here long enough to know that just posting single line is no help at all! All I can tell is that it came when editing an item in the ListView - but what did you do to get that error? That is the important information I need. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
incepator Posted May 21, 2013 Author Share Posted May 21, 2013 I discovered what the problem is.If you already GUICtrlCreateListViewItem("1|myke|test", $ListView1) then it works properly.But if it creates GUICtrlCreateListViewItem is created dynamically, then give that error. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 21, 2013 Moderators Share Posted May 21, 2013 incepator, If you use the UDF then you need to use the UDF to add any additional items using _GUIListViewEx_Insert - that way the UDF knows what is in the ListView. As you have found out, if you add the items without using the UDF it gets confused as the ListView contents do not match its internal shadow array. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
incepator Posted May 21, 2013 Author Share Posted May 21, 2013 (edited) $SOKET = TCPAccept($Listen) If $SOKET <> -1 Then Do $string = TCPRecv($SOKET, 2048) Until StringRight($string, 7) = "INFO_OK" $Connection[$Coun][0] = $SOKET $Connection[$Coun][1] = GUICtrlCreateListViewItem($Coun & "|" & $SOKET & "|" & $Chat, $ListView1) $Coun += 1 EndIf This is my dynamically part of function. you have any suggestions for me? PS: Some people are never satisfied! Edited May 22, 2013 by incepator Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 22, 2013 Moderators Share Posted May 22, 2013 incepator, As before, my suggestion is that you use the UDF functions to add and delete items to your ListView so that the UDF knows what is in the ListView and can deal correctly with later functions. Why do you store the ControlID of the ListView item when you create it? The UDF does not give you that value, but you could get it by a very simple workaround. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now