Page 31 of 41
Re: Scripting Bugs
Posted: 14 Apr 2015 15:29
by bdeshi
admin wrote:Next version you can report those columns via their captions.

this still only for the first five?
Re: Scripting Bugs
Posted: 14 Apr 2015 15:42
by admin
SammaySarkar wrote:admin wrote:Next version you can report those columns via their captions.

this still only for the first five?
No, for all (as long as they are shown in the current list).
Re: Scripting Bugs
Posted: 14 Apr 2015 16:34
by bdeshi
okay, it doesn't seem to work when report()'s itemlist param is filled.
Code: Select all
::text report("{SomeCCCaption}<crlf>"); // return == expectation
::text report("{SomeCCCaption}<crlf>",<curitem>); // return != expectation
also how to choose between two CCs both of which happen to have the same caption? Now CCs are prioritized based on when they were added to list.
Re: Scripting Bugs
Posted: 14 Apr 2015 16:37
by admin
Yes, it only works for the list.
Improvements later.
Re: Scripting Bugs
Posted: 18 Apr 2015 08:29
by bdeshi
sc savethumb() doesn't add default/defined extension to created thumbfile if source item name has extra
.'s .
Code: Select all
echo savethumb("E:\Test.pdf" , , 400, 500, "png"); //creates E:\Test_thumb.png
echo savethumb("E:\Test.source.pdf", , 400, 500, "png"); //creates E:\Test.source_thumb
Re: Scripting Bugs
Posted: 18 Apr 2015 09:39
by admin
Thanks, confirmed and fixed.
Re: Scripting Bugs
Posted: 29 Apr 2015 15:31
by bdeshi
default values of function parameter variables are not
processed like elsewhere.
[code] text f1(),,,'f1() out';text f2(),,,'f2() out';text f3(),,,'f3() out';
text 'start'.'<crlf>'.<crlf>."<crlf>".'end',,,'regular out';
function f1($lf1 = '<crlf>', $lf2 = <crlf>, $lf3 = "<crlf>"){
return 'start' . $lf1. $lf2 . $lf3 . 'end';
}
function f2($lf1 = '<crlf>', $lf2 = <crlf>, $lf3 = "<crlf>"){
$lf1 = $lf1;$lf2 = $lf2;$lf3 = $lf3;
return 'start' . $lf1. $lf2 . $lf3 . 'end';
}
function f3($lf1 = '<crlf>', $lf2 = <crlf>, $lf3 = "<crlf>"){
$lf1 = $lf1,r;$lf2 = $lf2,r;$lf3 = $lf3,r; //silly workaround
return 'start' . $lf1. $lf2 . $lf3 . 'end';
}[/code]$lf1/'<crlf>' should stay literal, but the other two should not.
Re: Scripting Bugs
Posted: 30 Apr 2015 07:25
by admin
Default parameters are not evaluated at all. They are taken as literals. You cannot even use permanent variables as default parameters (and have them resolved). Nor constantss (and have them resolved).
Re: Scripting Bugs
Posted: 30 Apr 2015 08:05
by bdeshi
so the silly workaround will have to remain in use.
I suppose you have your reasons... but the situation is inconvenient.
Here's hoping a better way reveal itself.

Re: Scripting Bugs
Posted: 30 Apr 2015 08:34
by bdeshi
Eh, sorry, but I don't like it.
If it's not a bug then it's at least a noticeable bump in the road to UDF perfection.
Constants/native variables should not suddenly become literal strings; it diverts from silently divert from regular scripting rules.
It's counter-intuitive : when I want a literal <crlf> string I use '<crlf>', else it must be processed.
So again, here's hoping you find a quick fix!

Re: Scripting Bugs
Posted: 30 Apr 2015 08:36
by admin
Just rechecked with PHP: Constants *are* resolved! But only if unquoted. Single and double quoted constants are not resolved.
In accordance to usage elsewhere in XY I will allow unquoted and double-quoted default parameters to be resolved (XY native vars and environment vars)
So I will make this work (resolve):
Code: Select all
..., $lf2 = <crlf>, $lf2 = "<crlf>", ...
Re: Scripting Bugs
Posted: 30 Apr 2015 08:52
by bdeshi
Re: Scripting Bugs
Posted: 30 Apr 2015 09:15
by highend
v15.00.0517
Something's wrong with writefile()...
Use this from the address bar:
"No such argument" script error appears.
Re: Scripting Bugs
Posted: 30 Apr 2015 09:25
by admin
Whoops, fix soon.
Re: Scripting Bugs
Posted: 30 Apr 2015 17:00
by bdeshi
a little thing: changelog speaks of the mysterious aingle-quotes.
