Re: Scripting Bugs
Posted: 27 Feb 2014 09:25
What result would you expect?
Forum for XYplorer Users and Developers
https://www.xyplorer.com/xyfc/
[i]Load A;B - Confused > A[/i] wrote:Myself:
Text "Myself:<crlf>" . Self('script') . "<crlf 2>Caller:<crlf>" . Caller('script');
Caller:
Load '*', 'A;B';
[i]Load A;B - Confused > B[/i] wrote:Myself:
B
Caller:
Load A;B - Confused
Hmm... When shall I remind you?admin wrote:I have to postpone this.
Code: Select all
"FormatList Comparisons"
Global $G_SEP, $G_RESULT;
$result = '';
$G_SEP = ';'; Sub '_filter'; $result = $result . GetToken($G_RESULT, 'Count', $G_SEP) . ': ' . $G_RESULT . "<crlf 2>";
$G_SEP = '|'; Sub '_filter'; $result = $result . GetToken($G_RESULT, 'Count', $G_SEP) . ': ' . $G_RESULT . "<crlf 2>";
$G_SEP = '--'; Sub '_filter'; $result = $result . GetToken($G_RESULT, 'Count', $G_SEP) . ': ' . $G_RESULT . "<crlf 2>";
$G_SEP = '++'; Sub '_filter'; $result = $result . GetToken($G_RESULT, 'Count', $G_SEP) . ': ' . $G_RESULT . "<crlf 2>";
$G_SEP = "<crlf>"; Sub '_filter'; $result = $result . GetToken($G_RESULT, 'Count', $G_SEP) . ': ' . $G_RESULT . "<crlf 2>";
Text $result;
"_filter"
Global $G_SEP;
$list = 'a' . $G_SEP . 'ba' . $G_SEP . 'ac' . $G_SEP . 'ed';
$filter = 'a*' . $G_SEP . '*d';
Global $G_RESULT = FormatList($list, 'f', $G_SEP, $filter);Confirmed! True for all separators larger than one character (and the characters bing different). Fix comes.TheQwerty wrote:FormatList only filters by first item when separator is CRLF.
It works here. Did you use full path names?SkyFrontier wrote:report() seems to be accepting 1 or 0 as parameter, but not |-separated lists.
Code: Select all
step;
$inp = folderreport("files:{fullname}", "r", , "", , "|");
$input = trim("$inp", "|");
$input = report("{custom 2} = {fullname}|", "$input"); // custom 2 won't be caught
$a = report("{custom 2} = {fullname}|", 0); // correct
Code: Select all
$src = "*item*item2*";
$src = trim("$src", "*"); //problem happens here
echo "$src";
Indeed! Fixed:SkyFrontier wrote:XY freezes.Code: Select all
$src = "*item*item2*"; $src = trim("$src", "*"); //problem happens here echo "$src";
beta 0113.
Code: Select all
! SC trim: Freeze on passing "*" as charlist. Fixed.
* SC trim: From now on when passing "*" or "?" as charlist they are
automatically treated as verbatim characters, not as wildcards.
Code: Select all
echo gettoken ("<clipboard>", count, "<crlf