Idupe windows
![idupe windows idupe windows](https://mac-cdn.softpedia.com/screenshots/TunesTEXT_4.png)
Noone tells us that user wants a sort on col #1 or on any other column, so it's just "wasting time" to prepare index(es) that won't be used at all. It may not be the place to discuss it (again) but you choosed to sort on column #1 in all cases, when I would have avoided it totally. I choosed to sort on rightmost column (#6 in the pic) to show that no error occurs.
![idupe windows idupe windows](http://images.ifun.de/wp-content/uploads/2012/12/dupin.jpg)
* In the preceding pic, if the Array had been 1D, then the display would have been like this (tested, no matter the row number was displayed or not) : _DebugArrayDisplay ( $_g_ArrayDisplay_aIndexes, "$_g_ArrayDisplay_aIndexes" ) A debug line placed at the very end of Func _ArrayDisplay_SortIndexes() shows exactly which index was just added and its position in the array : Here is a test based on a 2D array (LarsJ's 6 cols), showing that no script error occurs when using the precedent line, no matter the row number is displayed or not. * So in the end (and if I'm not mistaken) what we simply need is this :ĭim $_g_ArrayDisplay_aIndexes Now $_g_ArrayDisplay_nCols reflect exactly how many columns exist in the array (no matter the array is 1D or 2D) I like the fact that you "forced" $_g_ArrayDisplay_nCols = 1 in case of a 1D array, it makes things easier. $_g_ArrayDisplay_nCols = ( $_g_ArrayDisplay_iDims = 2 ) ? UBound ( $_g_ArrayDisplay_aArray, $UBOUND_COLUMNS ) : 1 * Column numbers : here is what we found in the script This is because index is required during the _ArrayDisplay_NotifyHandler() function to display the initial rows. * The "row number" is mandatory in the array $_g_ArrayDisplay_aIndexes, you always add its index as (no matter the column will be displayed or not +++). "1 is wrong as an extra entry is needed when displaying the row number, it should be :"ĭim $_g_ArrayDisplay_aIndexesĭisplaying the row number (or not) doesn't have an impact on the number of rows in this array, because : I'm not convinced by your answer in this post and the change done in the last version : Is this exactly the way you want it to be ? * a blank LV with actual 3 (this seems normal) One last thing that requires your confirmation :Įxample _perso2 ( ) Func Example _perso2 ( ) Local $iRows = 1, $iFlags = 0 * $ARRAYDISPLAY_NOROW + $ARRAYDISPLAY_COLALIGNRIGHT + 0 * $ARRAYDISPLAY_TRANSPOSE Local $sRange = "1:" Local $sHeader = "String|Integers|Floats|Dates|Times|R/C" Local $bDebug = True Generate array Local $hTimer = TimerInit ( ) Local $aArray = FAS _Random2DArrayAu3 ( $iRows, "sifdtr", "abcdefghijklmnopqrstuvwxyz" ) ConsoleWrite ( "Generating array = " & TimerDiff ( $hTimer ) & " $iRows = " & $iRows & " $iCols = " & UBound ( $aArray, $UBOUND_COLUMNS ) & ) _DebugArrayDisplay ( $aArray, Default, $sRange, $iFlags, Default, $sHeader, Default, Default ) $g_hArrayDisplay_Share ( $aArray, Default, $sRange, $iFlags, Default, $sHeader, Default, Default, $bDebug ) EndFunc =>Example_perso2 Local Static $tText = DllStructCreate ( "wchar" ), $pText = DllStructGetPtr ( $tText )īravo Jpm, now long captions aren't truncated anymore when using Virtual Listviews What would be the problem if you change ("wchar") to ("wchar") or ("wchar") in the Virtual LV version, without modifying anything else ? Here is the example I used to display the preceding pic (code placed in 3)Įxample _perso ( ) Func Example _perso ( ) Local $sRange = "" Local $iFlags = "" Local $sHeader = "" Local $bDebug = True Local $sPath = "C:\This is a 1st subfolder" Local $sCommand = " /c dir /a-d /b /od /s " Local $iPid = Run ( & $sCommand, $sPath, , $STDOUT_CHILD ) ProcessWaitClose ( $iPid ) Local $sList = StdoutRead ( $iPid ) $sList = StringTrimRight ( $sList, 2 ) delete last Local $aArray = StringSplit ( $sList, , BitOr ( $STR_ENTIRESPLIT, $STR_NOCOUNT ) ) _DebugArrayDisplay ( $aArray, "Sorted by date", $sRange, $iFlags, Default, $sHeader, Default, Default ) $g_hArrayDisplay_Share ( $aArray, "Sorted by date", $sRange, $iFlags, Default, $sHeader, Default, Default, $bDebug ) EndFunc =>Example_perso This will result in many Forums complains concerning these truncated captions. On the right of the pic is the Virtual Listview UDF (3) and its buffer of 50 characters ("wchar") which will constantly truncate captions longer than 50 characters (not hide, truncate). On the left of the pic is the actual ArrayDisplay (used by everybody) and its buffer of 4096 characters (259 char visibles in regular LV), as found in _ArrayDisplay_GetItemText(), so far so good.
![idupe windows idupe windows](https://img.informer.com/screenshots_mac/347/347979_2_3.png)
I was reviewing some comments in this thread and maybe (Jpm) we didn't understand each other concerning this issue :