Page 1 of 2

Problem with property()

Posted: 04 Apr 2024 22:58
by PeterH
Hi there - I'm back after quite a long timeout...

...and starting with a bug. That's me. :whistle:

OK: working with the property() function for some objects. That is: selecting some object in pane1, then executing

Code: Select all

 $prop	= Property("#$i n");
for $i = 1 to 333, dropping each empty result, and formatting it a bit.

If c: is selected, I often get no return at all. (Sometimes the same as for d:)

If d: is selected:
1 .................................. Größe = 'Lokaler Datenträger'
2 ............................. Elementtyp = '60,6 GB'
3 ......................... Änderungsdatum = '58,2 GB'
4 ........................... Erstelldatum = 'NTFS'
7 .......................... Offlinestatus = '4%'
8 .......................... Verfügbarkeit = '58,2 GB frei von 60,6 GB'
(Looks like garbage, doesn't it?)

Next is d:\Data (seems to be dependent of sequence? See below!): no return.

Next d:\Data\Progs:
2 ............................. Elementtyp = 'Dateiordner'
3 ......................... Änderungsdatum = '27.12.2023 19:59'
4 ........................... Erstelldatum = '27.12.2023 19:59'
5 ........................ Letzter Zugriff = '04.04.2024 22:22'
6 .............................. Attribute = 'DI'
9 .......................... Erkannter Typ = 'Unbekannt'
10 ............................... Besitzer = 'PCC\Peter'
11 .................................... Art = 'Ordner'
19 .............................. Bewertung = 'Nicht bewertet'
57 ............................ Gesamtgröße = '60,6 GB'
61 ............................... Computer = 'PCC (dieser PC)'
165 .............................. Dateiname = 'Progs'
169 ................... Freier Speicherplatz = '58,2 GB'
187 ............................ Freigegeben = 'Nein'
190 ............................. Ordnername = 'Data'
191 ....................... Dateispeicherort = 'D:\Data'
192 ................................. Ordner = 'Data (D:)'
194 ................................... Pfad = 'D:\Data\Progs'
196 .................................... Typ = 'Dateiordner'
202 ..................... Verknüpfungsstatus = 'Nicht aufgelöst'
254 .............. Verwendeter Speicherplatz = '3%'
295 ......................... Freigabestatus = 'Nicht freigegeben'
THIS LOOKS GOOD, doesn't it? :party:

Via "back" to d:\Data:
2 ............................. Elementtyp = 'Dateiordner'
3 ......................... Änderungsdatum = '29.03.2024 23:55'
4 ........................... Erstelldatum = '27.12.2023 19:59'
5 ........................ Letzter Zugriff = '04.04.2024 22:22'
6 .............................. Attribute = 'DI'
9 .......................... Erkannter Typ = 'Unbekannt'
10 ............................... Besitzer = 'PCC\Peter'
11 .................................... Art = 'Ordner'
19 .............................. Bewertung = 'Nicht bewertet'
57 ............................ Gesamtgröße = '60,6 GB'
61 ............................... Computer = 'PCC (dieser PC)'
165 .............................. Dateiname = 'Data'
169 ................... Freier Speicherplatz = '58,2 GB'
187 ............................ Freigegeben = 'Nein'
190 ............................. Ordnername = 'D:\'
191 ....................... Dateispeicherort = 'D:\'
192 ................................. Ordner = 'D:\'
194 ................................... Pfad = 'D:\Data'
196 .................................... Typ = 'Dateiordner'
202 ..................... Verknüpfungsstatus = 'Nicht aufgelöst'
254 .............. Verwendeter Speicherplatz = '3%'
295 ......................... Freigabestatus = 'Nicht freigegeben'
NOW IT'S GOOD, too?????

In the end:
each folder of level 2 or deeper: OK
Folder level 1: some so, some so
Local disk (or remote on NAS): never OK, sometimes empty, sometimes garbage.

What's going on???

Just to say: the return
Größe = 'Lokaler Datenträger'
is one single return to

Code: Select all

 $prop	= Property("#1 n");  // Returns Value and Name
i.e. it's directly returned garbled this way.

Note: Win11, XY 25.80 (Must still change that info)
(First tested with several older XY-Versions: same.)

Re: Problem with property()

Posted: 06 Apr 2024 09:26
by admin
Is this a long way of telling me that property() does not support drives? I know that. :)

Re: Problem with property()

Posted: 06 Apr 2024 12:26
by PeterH
Oh - I didn't expect it doesn't, and found it strange, i.e. a bug.
And I didn't expect you know it's so.

And sometimes it doesn't support first-level folders.
(Maybe, if you directly first try a drive, then that folder?)
When I have some time I'll test to see if there's a pattern...

Have a fine (and warm :biggrin: ) weekend!

Re: Problem with property()

Posted: 06 Apr 2024 13:15
by admin
PeterH wrote: 06 Apr 2024 12:26 And sometimes it doesn't support first-level folders.
Not here.

Re: Problem with property()

Posted: 06 Apr 2024 13:32
by admin
Now I could fix the discrepancy between fieldname and value! So thanks for complaining! Enjoy the summer! :)

Re: Problem with property()

Posted: 07 Apr 2024 00:37
by PeterH
Edit -- happens on fresh, too -- /Edit

Just tested:
- new start XY
- select c:
- test properties: garbled
- double click c:, select Users
- test properties: no reply for any number !!!
- repeat both (0 to any times) no change
- double click users, sel your userid
- properties: all corrrect
- back to Users
- all replies OK now!!

Same for d:

All reproducible

Glad if 1 problem is (will be) gone :tup:

Re: Problem with property()

Posted: 07 Apr 2024 10:09
by admin
Just weird. You select them in the tree?

Re: Problem with property()

Posted: 07 Apr 2024 11:28
by PeterH
:shock: No - as long as I'm navigating just 1 up/down I usually do (and did it here) in pane!
Just tried it in tree - and the 1st level problem doesn't appear! :shock:

Didn't expect something like that. (And it seems vice versa.)

Re: Problem with property()

Posted: 07 Apr 2024 11:34
by admin
Probably some misunderstanding. Can you show a screenshot?

Re: Problem with property()

Posted: 07 Apr 2024 12:28
by PeterH
OK: I'll try

Sequence as before, from XY start, *all* actions in pane1

start | select c: | call properties | doubleclick c: | select Users | properties
hardcopy: t1.jpg
doubleclick Users | select Peter | properties
Mousebutton back (to c:) | select Users | properties
hardcopy t2.jpg

Is it what you wanted?

Re: Problem with property()

Posted: 07 Apr 2024 12:32
by admin
"doubleclick", "hardcopy", "properties"? No no no. Try again. Be exact. doubleclick where? hardcopy??? properties???

Re: Problem with property()

Posted: 07 Apr 2024 13:39
by PeterH
OK, I'll try better:

"hardcopy"=screencopy: create the attached pictures

"properties": as mentioned in the very first post:
a script, (named prop#), looping $i from 1 to 333, and for each executing
$prop = Property("#$i n");
then skipping each "" return
print each result as a (somehow formated) line
called by Scripting / Load Script File... / -select it-
(to be more exact I'll attach it. It doesn't change anything, only read properties and print them.)

"doubleclick"
OK, first: when I start XY my tree always is on "Dieser PC", each pane shows c:
>>>>> EDIT: Isn't this typical for "fresh"? \EDIT <<<<<
As said: each following action is done in pane1. (1 tab only)
Be it the pane, or if necessary the breadcrumb.
So, e.g. in the attached picture, a double click on "Users" has only one location.
I'd think this is true for every mentioned action - or did I miss something?

Without writing a book (I wouldn't dare to) this seems the best explanation?

So: soon I'll be out - no more response for quite some time.

Re: Problem with property()

Posted: 07 Apr 2024 14:12
by admin
It's probably a case of implicit selection, where the selected item is NOT the current item. SC property() without an explicit item parameter defaults to current path/item. You can tell the current item by looking at the status bar.

Re: Problem with property()

Posted: 08 Apr 2024 12:48
by PeterH
First: your fix is fine: properties of c: look OK - no scrambling any more :tup:

But: your last info didn't help!
E.g. can't find out how to control current item, and how to interpret status (bar) display.
In general in status I see the name of the folder I've selected, but *sometimes* there's "something like a symbol" left above the beginning of the name. Maybe only pixel dirt?
- Just happened to see it in status: above the icon of C:\ - looks like a small square, built of 4 tiny blue squares.

To ensure about curr status I added display of 3 variables to top of my script: <curname>, <focitem> and <selitem>
focitem and selitem *always* show the folder I've clicked on, while curname sometimes is empty. BUT: this doesn't correlate to the problems of the property display!

Before the fix (*very* seldom, and non-reproducible) c: appeared with no properties. Didn't test now often enough to happen.
(In between the time it happened once on d: - direct after XY-start. Restarted, retried: properties ARE shown, but CurrItem is empty :whistle: )

The prev description for c: - c:\Users - c:\Users\Peter - c:\Users - c: in general is like before.

Re: Problem with property()

Posted: 08 Apr 2024 13:23
by admin
Well, I cannot make it happen.