[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] loading tinyclos class definition into an executable
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] loading tinyclos class definition into an executable - howto? |
Date: |
Mon, 13 Aug 2007 07:47:39 +0200 |
On 8/11/07, Matthew Welland <address@hidden> wrote:
> Why can't I use (load "bar.scm"), where bar.scm contains class definitions,
> in a compiled block? I'm writing a cgi based web app (a chicken based,
> primitive RoR) and I'd like to be able to compile most of my app but keep
> parts of it definable on the fly. I.e. the views and controllers and models
> are loaded on the fly but the bulk of the app is compiled. Is there a
> better way to do this?
>
The define-class/define-method syntax is by default not available for
code evaluated at runtime (since bar.scm is evaluated). Generally,
there aren't many non-standard macros available at code evaluated
explicitly. You should evaluate this once in your compiled file (with eval,
for example):
(require-extension chicken-more-macros)
(require-extension tinyclos)
Also, use get the newest tinyclos egg (1.3). I removed a call to
"register-feature!" that might give a problem in this context.
cheers,
felix