From: Keats K. <ke...@xa...> - 2005-10-19 23:47:14
|
Lane Sharman wrote: > Bummer, keats, about the laptop. Thanks. :-{ > #setprops $p { > #include as text "myprops.ini" > } > > so, this will actually work if myprops.ini is a valid property file of > name=value. Yep. You can also use the newer colon syntax. Even cooler is that you can put expression in your prop file -- it's a template. So you can do stuff like: #set $resource = "/usr/local/wm/resource" FontDir: $resource/fonts TemplateDir: $resource/templates #set timeoutMins = 5 #set $timeoutMS = $timeoutMins * 60 * 1000 TimeOut: $timeoutMS etc ... Of course you need to beware of comments, since they might look like directives to WM. Just make sure you have a non-alpha char after your # and it should be fine. Also, if you want to use the trailing backslash for line continuation, you'll need to escape it with another backslash. In Java code you actually need to double-escape, so you need four backslashes! (There's a unit test for this.) Keats |