This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Non-global KRL template variables?


Howdy,

I have a function that parses a KRL template. I'm wondering if it's
possible to pass in parameters to this function that I can use as
the variables in the KRL template.

No matter how I word that it sounds crappy. Here's an abbreviated
version or what I want to do (more or less):

-------------
test-attr.scm
-------------
(define (make-attr desc type name)
  (krl-template "attr.krl" desc type name))
(make-attr "First name" "String" "firstName")

--------
attr.krl
--------
    /** [desc]. */
    protected [type] _[name];

Right now I can only do this if I define globals vars of the appropriate
name and I've just started playing with this to see if I can get it to
do
what I want. I don't want to set globals but I'm not sure how to inject
what I want into the KRL namespace (or whatever it's called in Scheme).

Searching the archives didn't immediately help (although I was able to
have
the KRL in a string rather than in a file, which was cool, but didn't
really
address this issue ;)

Oh, on an unrelated note: is there a "describe" function in scheme for 
extracting documentation strings from a method? Are there method
documentation 
strings? Bah, my lisp/scheme is old and rusty. 

Sorry for the no-brainers!

Thanks,
Dave 
--------------------------------------------------------
 
NOTICE: If received in error, please destroy and notify sender.  Sender does not waive confidentiality or privilege, and use is prohibited. 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]