On Sun, Feb 09, 2003 at 02:14:19PM +0100, Jens-Uwe Morawski wrote:
what are you doing here? Do you read the parameter as suffix and convert it with 'str' in a string?
I am working with strings only. If I have an option like "dx(1cm)", somewhere there is an assignment ...dx=1cm, and if I have an option like "treemode(U)", then somewhere I do ...treemode="U". I am not using str in this case. For each option, I have a way to know what is its expected type.
But the question i had was to write a keyval package that implements an interface the users know or are familiar with.
I understand.
nothing specific, but for example the treemode-thing you gave above; here treemode is a macro and i believe that it does more than assigning the parameter "U" to an internal variable.
treemode is not really a macro, only the name of an option. There is a variable corresponding to this option, but since it is local to a class, it has a name such as Tree_treemode (I am simplifying, but that's the idea.) Actually, there is a default value, and then it can be overriden.
So you have to rewrite many parts of metaobj.
I am actually not sure of that. When I setup options or when I create an object, I am parsing the options and making a number of assignments. That's basically it. I think that the changes would be very much isolated. It would be worth having a look, but I am a bit busy these days. I could take out of metaobj what has to be changed. There is very little, I think. Denis