Page 27 of 41

Re: Scripting Bugs

Posted: 05 Aug 2014 20:08
by TheQwerty

Code: Select all

::Echo Report('{Name}');Echo Report('{Name}',1);Echo Report('{Name}','C:\');Echo Report('{Name}','C:');Echo Report('{Name}',"<xydrive>");
The itemlist parameter was introduced in v9.30.0022 which I do not have, but in v9.30.0023 it was combined with the onlyselected parameter and we have that archive.

Since then the behavior has changed 3 times:
Versions					0 - List		1 - Selection	'C:\'			'C:'		"<xydrive>"
v09.30.0023 - v13.70.0122		Label (Letter:)	Label (Letter:)	<Drive: C:\>	<Drive: C:>	<Drive: C:>
v13.70.0123 - v13.80.0101		Label (Letter:)	Label (Letter:)	Crash		Crash		Crash
v13.80.0102 - v14.20.0308		Label (Letter:)	Label (Letter:)	Blank		Blank		Blank
v14.20.0309 - Present		Label		Label		Crash		Crash		Crash

:veryconfused:
And then as Sammay has shown the behavior seems to even differ more from this if other templates are used. Sorry I'm not going to collate that data. :P

Good luck Don! :wink: :cup:

Re: Scripting Bugs

Posted: 12 Aug 2014 10:01
by admin
TheQwerty wrote:
SammaySarkar wrote:First thing I tried. This only occurs in XY.
Also happens in fresh, and in a different copy of XY.
Not just you... I can reproduce on an 8.1 system here.
Me too. But cannot explain. This is a system dialog after all. I cannot fix it. Weird. :veryconfused:

Re: Scripting Bugs

Posted: 12 Aug 2014 10:07
by bdeshi
As I said, it's a "WEight". :)
But still, it only seems to happen in XY.

Re: Scripting Bugs

Posted: 12 Aug 2014 10:11
by admin
TheQwerty wrote:Passing SC Report an itemlist containing a drive causes XY to crash.

Code: Select all

Echo Report('{Name}',"<xydrive>");
Introduced in v13.70.0123 when report gained support for extra tags.
This never crashes here.

And this never worked in any version AFAIK:

Code: Select all

text report("{#}, {Name}, {Type}, {Total Size}, {Used Space}, {Free Space}, {Free %}, {Per Cluster}, {Vol Serial}, {File System}","<xydrive>");
:?

Re: Scripting Bugs

Posted: 12 Aug 2014 11:02
by bdeshi
admin wrote:And this never worked in any version AFAIK:

Code: Select all

...

Code: Select all

::help "idh_scripting_comref.htm#idh_sc_report";
Subheading "Using the template" -> Drives Mode
says they're useable. :?

And they work indeed, if the active pane is in drives mode (This PC). The bug causes a crash if a drive letter is explictly passed as the second parameter.

Re: Scripting Bugs

Posted: 12 Aug 2014 13:08
by admin
OK, I got and fixed the crash.

Drive properties are usable in report, but not with "itemlist" parameter. Only with current drives listing. Will add that info to help.

Re: Scripting Bugs

Posted: 12 Aug 2014 13:13
by TheQwerty
Also, was there a reason the drive letter was removed from the {Name}?

Re: Scripting Bugs

Posted: 12 Aug 2014 13:39
by admin
TheQwerty wrote:Also, was there a reason the drive letter was removed from the {Name}?
Bug. :bug:

Re: Scripting Bugs

Posted: 16 Sep 2014 20:10
by TheQwerty
Tag and TagItems make it too easy to create orphan entries by accepting paths with trailing backslashes.

Code: Select all

"test"
  $d = "<xydata>\Catalogs";
  goto "$d\..";
  SetColumns('Name,Tags');
  Tag 'A',"$d\", 1, 0; // Note the trailing backslash.
  Tag 'B',$d, 1, 0;
I expected:

Code: Select all

?:\XYplorer-Test\Data\Catalogs|0|A, B||||||
But instead got:

Code: Select all

?:\XYplorer-Test\Data\Catalogs|0|B||||||
?:\XYplorer-Test\Data\Catalogs\|0|A||||||
Even more "fun" put either SC in a Custom Column in hopes of automatically tagging '<cc_path>' and watch XY get stuck in a tagging frenzy that ends with a crash.

Snippet:

Code: Select all

Snip: CustomColumn 1
  XYplorer 14.40.0318, 9/16/2014 2:06:23 PM
Action
  ConfigureColumn
Caption
  Crash
Type
  3
Definition
  Tag 'Bye-Bye', <cc_path>, 1, 0;
Format
  0
Trigger
  1
Item Type
  2
Item Filter
  
[/size]


EDIT: Similar crash can be caused by updating the ColorFilters in each item with List Trigger - Browser trigger is fine.
Snippet:

Code: Select all

Snip: CustomColumn 1
  XYplorer 14.40.0318, 9/16/2014 3:47:23 PM
Action
  ConfigureColumn
Caption
  
Type
  3
Definition
  ColorFilter(ColorFilter() . "||*<cc_item>>FF0000");
Format
  0
Trigger
  1
Item Type
  2
Item Filter
  
[/size]

Re: Scripting Bugs

Posted: 17 Sep 2014 16:44
by admin
Both fixed in next beta. Thanks!

Re: Scripting Bugs

Posted: 18 Sep 2014 15:12
by nerdweed
Oops. I posted it as new thread instead of here (which should be deleted)

1. MoveTo - It allows moving files with a wildcard pattern. Great.
If there are tagged items, it doesn't move the tags resulting in orphaned tags - Bad.

2. MoveAs (It should be impacting CopyAs as well)
MoveAs Pattern, TargetPath, itemlist
e.g.; MoveAs "Funky", "D:\Fun", "D:\ReadMe.txt|D:\Error.txt|D:\Fun.txt"

If there are no files like Funky.txt in the folder D:\Fun - it should move the files as Funky.txt, Funky (2).txt, Funky (3).txt - instead it starts with Funky (2).txt and ends at Funky (4).txt

3. Tags are also lost on using the SC rename. RenameItem preserves it fine.

Re: Scripting Bugs

Posted: 18 Sep 2014 16:23
by bdeshi
^that^ reminds me.
There is some amount of discrepancy between file ops SCs regarding usage of system variables.
Here's a snippet from my notes: (Y/N: works correctly/not)

Code: Select all

 /*backupto|moveto|*/copyto "%desktop%"; Y
 /*moveas|*/copyas '*', %tmp%; Y
 /*moveas|*/copyas '*', %desktop%; N, can't create folder
 copyitem , "%tmp%\test.copy"; Y
 copyitem , "%desktop%\test.copy"; N, creates desktop\ folder in curpath
 new("%desktop%\test.file",file); N, creates desktop\ folder in curpath

Re: Scripting Bugs

Posted: 25 Sep 2014 09:13
by admin
nerdweed wrote:Oops. I posted it as new thread instead of here (which should be deleted)

1. MoveTo - It allows moving files with a wildcard pattern. Great.
If there are tagged items, it doesn't move the tags resulting in orphaned tags - Bad.

2. MoveAs (It should be impacting CopyAs as well)
MoveAs Pattern, TargetPath, itemlist
e.g.; MoveAs "Funky", "D:\Fun", "D:\ReadMe.txt|D:\Error.txt|D:\Fun.txt"

If there are no files like Funky.txt in the folder D:\Fun - it should move the files as Funky.txt, Funky (2).txt, Funky (3).txt - instead it starts with Funky (2).txt and ends at Funky (4).txt

3. Tags are also lost on using the SC rename. RenameItem preserves it fine.
1. That's impossible to do. I added a note to Help.
2. Cannot confirm.
3. Cannot confirm.

Re: Scripting Bugs

Posted: 25 Sep 2014 09:48
by admin
SammaySarkar wrote:^that^ reminds me.
There is some amount of discrepancy between file ops SCs regarding usage of system variables.
Here's a snippet from my notes: (Y/N: works correctly/not)

Code: Select all

 /*backupto|moveto|*/copyto "%desktop%"; Y
 /*moveas|*/copyas '*', %tmp%; Y
 /*moveas|*/copyas '*', %desktop%; N, can't create folder
 copyitem , "%tmp%\test.copy"; Y
 copyitem , "%desktop%\test.copy"; N, creates desktop\ folder in curpath
 new("%desktop%\test.file",file); N, creates desktop\ folder in curpath
Thanks, all confirmed and fixed.

Re: Scripting Bugs

Posted: 25 Sep 2014 13:37
by nerdweed
admin wrote:
nerdweed wrote:Oops. I posted it as new thread instead of here (which should be deleted)

1. MoveTo - It allows moving files with a wildcard pattern. Great.
If there are tagged items, it doesn't move the tags resulting in orphaned tags - Bad.

2. MoveAs (It should be impacting CopyAs as well)
MoveAs Pattern, TargetPath, itemlist
e.g.; MoveAs "Funky", "D:\Fun", "D:\ReadMe.txt|D:\Error.txt|D:\Fun.txt"

If there are no files like Funky.txt in the folder D:\Fun - it should move the files as Funky.txt, Funky (2).txt, Funky (3).txt - instead it starts with Funky (2).txt and ends at Funky (4).txt

3. Tags are also lost on using the SC rename. RenameItem preserves it fine.
1. That's impossible to do. I added a note to Help.
2. Cannot confirm.
3. Cannot confirm.
1. OK
2. Please see the GIF on fresh. Easily reproducible. Only setting changed was template
3. I was doing a move on rename and the latest version disallows batch move and rename. So no point discussing this.
CopyAs.gif
CopyAs.gif (39.23 KiB) Viewed 1777 times