Passsing parameters to a program run by the customization ed

Posted by tbergman on 25-Jan-2009 08:43

10.2A

I'm trying to run a program from the customization editor that requires parameters.

Here's some code that illustrates.

def input parameter foo as char.

message foo.

If I run the above program and list the parameter as "Hello World" it will run correctly.

If I change the program to:

def input parameter foo as char.

def input parameter bar as char.

message foo bar.

And list parameters as "Hello","World" the program complains about mismatched number of parameters.

What's the proper syntax for listing more than one parameter in the customization editor?

Thanks,

Tom

All Replies

Posted by Matt Baker on 25-Jan-2009 16:09

The customization editor will call your program with a single character parameter or no parameters. It does not split the character string into multiple pieces and treat them as separate parameters.

You can still pass anything as a string, but you would need to split the parameters yourself in your program using whatever delimiter you would like.

Could you provide more detail on what you are trying to accomplish. Perhaps there is an alternate way to get to what you need?

Posted by tbergman on 25-Jan-2009 20:40

Hi,

Thanks for the prompt answer.

I'm running an existing program that I don't want to change. In this case the parameters don't really matter and can be blank so I'll just write a small program that calls the other now that I know this can't be done.

BTW, the label for this field is "Parameters" (note the plural) and the help documentation for this field is "(Optional) The parameters, if any, with which the program is to run.".

It might be nice if Progress corrected this to reflect the true capability. Even better, make it work with multiple parameters.

Thanks,

Tom

Posted by jmls on 26-Jan-2009 09:07

can't be done.

It might be nice if Progress corrected this to

reflect the true capability.

>

Awwww, Tom, now you've given them an excuse to "fix" the documentation, rather than the problem !

>Even better, make it

work with multiple parameters.

Too late They will go for the first option !

Posted by Thomas Mercer-Hursh on 26-Jan-2009 11:23

While admittedly tacky, you could call an existing program with multiple parameters by writing a wrapper program that accepted a single, multi-part string parameter, parsed it, did type conversions, supplied defaults, etc. and than called the original program. Not very elegant, but a way to get the job done without a lot of work.

Posted by tbergman on 26-Jan-2009 12:13

While we're on this subject, does anyone know where these (customization Editor) settings are stored? I copied an entire workspace to another PC and these settings did not come along.

Is there an Export choice somewhere that I missed?

Thanks,

Tom

Posted by Matt Baker on 26-Jan-2009 13:26

The customization editor rewrites the plugin.xml and manifest.mf files for the com.openedge.pdt.extensibility.user plug-in. You would need to copy the plug-in itself into an alternate installation.

There is a whitepaper on psdn that discusses some of the more advanced stuff you can do with it if you're not afraid of getting your hands dirty. The whitepaper talks about sharing your changes with other installations.

This thread is closed