The Bitter Coder Tutorial, Binsor Style V - Configuration Parameters

Mon, Jul 28, 2008 One-minute read

(Sorry about the delay in the tutorials, but I took a week of vacation and my wife wouldn’t let me near the computer…)

Previous posts in the series:

Boo/Binsor allows you to include files, but there is seemingly an issue.  Any variables defined in the included file are ignored, which I found odd (scope issue?)  Anyway, I then found this post from Ayende and knew I had to get a bit creative.  My inspiration was yet another post from Ayende.  My solution was to create 2 files (live and debug, like Alex) and import them (like Alex.)   In each file is a function called DefineProperties() that returns a hash of property values.

Here is propertiesLive.boo

It’s not incredibly elegant, and I am betting Ayende or one of the other big brains could do it cleaner/better/stronger, but this works.

Next time….lifestyles.