So I figured if I include this generic line in my menu-script
Code: Select all
"Edit|:udc" open self(file);But it does not work. Why?
Code: Select all
"Edit|:udc" open self(file);Code: Select all
/* my generic entries at bottom */
$bottom = <<<BOTT
-
"Edit|:udc" open self(file);
BOTT;Code: Select all
load "$top<crlf>$image<crlf>$bottom", ,s; end(1)Code: Select all
"Edit|:udc" open "self(xyscripts>\mystuff\WhiteSpaceClick.xys)";Yes, exactly.klownboy wrote:Stef123 are you using it within one the heredocs contained in WhiteSpaceCtxMenu script?
Over my head. What else would "file" refer to but the very file that contains this line? It's not sitting in some include function, mind you. That I could understand. Or if I had called it self("script") or self("subscript") or anything like this.klownboy wrote:that makes sense it's only a script not the full script resource file
It boils down to the fact that where you are using self(file) is in the running of the variable "$bottom" via the load command. At that point, as far as XY is concerned it's only running a internal script not a file. That's why if you use $file = self(file) at the very top of the script XY will have the proper "file" and if you use open "$file"; end(1); it will work.Stef123 wrote: What else would "file" refer to but the very file that contains this line? It's not sitting in some include function, mind you. That I could understand. Or if I had called it self("script") or self("subscript") or anything like this.