то ли это баг у меня в плагине, то ли фича Фара. Надеюсь, кто-то из фартима
может помочь разобраться.
Плагин FarNet\PowerShellFar, и вот его скрипты. Запускать командой:
Code: Select all
ps: .\<имя скрипта>
Code: Select all
# Expected, the panel is opened with the current item "dots"
$Explorer = New-Object PowerShellFar.ObjectExplorer -Property @{
AsGetData = {
[PSCustomObject]@{_id = 1; name = 'name1'}
[PSCustomObject]@{_id = 2; name = 'name2'}
[PSCustomObject]@{_id = 3; name = 'name3'}
}
}
$Explorer.OpenPanel()
Code: Select all
# Unexpected, the panel opened with the current item 3
$Explorer = New-Object PowerShellFar.ObjectExplorer -Property @{
AsGetData = {
[PSCustomObject]@{_id = 1; name = 'name1'}
[PSCustomObject]@{_id = 2; name = 'name2'}
[PSCustomObject]@{_id = 3}
}
}
$Explorer.OpenPanel()
помещаются данные "name", другая "Description", туда помещаются данные "_id".
Порядок колонок не имеет значения. Режим панели "Unsorted".
Подозреваю, что это как-то связано с пустым именем файла "3". Но почему?