Can't use ExecuteCommandLineOperation with button from css sylesheet

<oXygen/> general issues.
Doug
Posts: 28
Joined: Sat Jun 15, 2013 1:34 am

Can't use ExecuteCommandLineOperation with button from css sylesheet

Post by Doug » Mon Mar 13, 2017 7:52 pm

I am trying to use the ExecuteCommandLineOperation operation from a css stylesheet and the css validator doesn't recognize the cmdLine, workingDirectory of showconsole arguments. I am using the description at https://www.oxygenxml.com/doc/versions/ ... tions.html to get the names of the arguments. If I leave these argurments off the vaidation errors go away and the button shows, but isn't functional, in the styled document. If I use any one of the arguments I get validation errors and the button doesn't show. I am using Oxygen 18.1 build 2017020917. Should this work?

My style looks like below, though the command I wish to run is somewhat different.


info {
content:
oxy_button(color, 'blue',
action, oxy_action(
name, 'Checkout',
operation, ExecuteCommandLineOperation,
cmdLine, 'svn ls http://server/svn/etc',
workingDirectory, '.',
showconsole, true
));
}


And the error message is as below:

Severity: error
Description: Context : info in property : content
Unknown arguments: [cmdLine, showconsole, workingDirectory] : oxy_button(color,'blue',action,oxy_action(name,'Checkout',operation,ExecuteCommandLineOperation,cmdLine,'svn ls http://192.168.10.196/svn/ehraf_collect ... nsole,true))

Thanks,
Doug

Doug
Posts: 28
Joined: Sat Jun 15, 2013 1:34 am

Re: Can't use ExecuteCommandLineOperation with button from css sylesheet

Post by Doug » Mon Mar 13, 2017 9:50 pm

Never mind. I forgot to prefix the arguments with "arg-" From Oxygen Help > Custom CSS Functions > oxy_action () Function:
arg-<string> - All arguments with the arg- prefix are passed to the operation (the string that follows the arg- prefix is passed).

Doug

Doug
Posts: 28
Joined: Sat Jun 15, 2013 1:34 am

Re: Can't use ExecuteCommandLineOperation with button from css sylesheet

Post by Doug » Tue Mar 14, 2017 12:54 am

Well, I do have something maybe helpful to add. The correct name for one of the arguments for the ExecuteCommandLineOperation is the camel cased "showConsole", consistent with the other camel-cased arugments, not "showconsole" as mistakenly described in the documentation at https://www.oxygenxml.com/doc/versions/ ... tions.html . So in my case of passing arguments from oxy_action(), "arg-showConsole, true" is what I needed, "arg-showconsole, true" didn't work.

sorin_carbunaru
Site Admin
Posts: 248
Joined: Mon May 09, 2016 9:37 am

Re: Can't use ExecuteCommandLineOperation with button from css sylesheet

Post by sorin_carbunaru » Tue Mar 14, 2017 12:25 pm

Hi Doug,

Thank you for pointing out the mistake in the user guide. We will make sure to correct it.

All the best wishes,
Sorin Carbunaru
oXygen XML

Post Reply