In weblocks stable.

According to the ANSI standard, defparameter, defvar (Macro), need not
bind a variable at compile time.

     If a ‘defvar’ or ‘defparameter’ form appears as a top level form,
     the compiler must recognize that the NAME has been proclaimed
     ‘special’.  However, it must neither evaluate the INITIAL-VALUE
     form nor assign the dynamic variable named NAME at compile time.

Unfortunately Allegro 8 takes this seriously

Attempt to take the value of the unbound variable
`WEBLOCKS::*REGISTERED-WEBAPPS*'.
   [Condition of type UNBOUND-VARIABLE]

  5: (ERROR #<UNBOUND-VARIABLE @ #x738f01ba>)
  6: ((METHOD SHARED-INITIALIZE :AFTER (WEBLOCKS:WEBAPP-CLASS T)) 
#<WEBLOCKS:WEBAPP-CLASS WEBLOCKS::WEBLOCKS-WEBAPP @ #x738ec7b2> T :NAME 
WEBLOCKS::WEBLOCKS-WEBAPP :DIRECT-SLOTS ...)
  7: ((:INTERNAL (:EFFECTIVE-METHOD 2 T NIL NIL NIL) 0) #<WEBLOCKS:WEBAPP-CLASS 
WEBLOCKS::WEBLOCKS-WEBAPP @ #x738ec7b2> T . #<non-lisp object @ #xa>)
  8: ((METHOD INITIALIZE-INSTANCE (STANDARD-OBJECT)) #<WEBLOCKS:WEBAPP-CLASS 
WEBLOCKS::WEBLOCKS-WEBAPP @ #x738ec7b2> :NAME WEBLOCKS::WEBLOCKS-WEBAPP 
:DIRECT-SLOTS ..)
  9: ((METHOD MAKE-INSTANCE (CLASS)) #<CLOSER-MOP:STANDARD-CLASS 
WEBLOCKS:WEBAPP-CLASS> :NAME WEBLOCKS::WEBLOCKS-WEBAPP :DIRECT-SLOTS ..)
 10: ((METHOD ACLMOP:ENSURE-CLASS-USING-CLASS (NULL T)) NIL 
WEBLOCKS::WEBLOCKS-WEBAPP :ENVIRONMENT #<Augmentable COMPILER environment> 
:GIVEN-ENV-ONLY ...)
 11: (ACLMOP:ENSURE-CLASS WEBLOCKS::WEBLOCKS-WEBAPP :ENVIRONMENT #<Augmentable 
COMPILER environment> :GIVEN-ENV-ONLY T)
 12: (COMPILER::EVAL-FROM-COMPILER-ENVIRONMENT (PROGN (ACLMOP:ENSURE-CLASS 
'WEBLOCKS::WEBLOCKS-WEBAPP :ENVIRONMENT #<#> :GIVEN-ENV-ONLY T ...)))
 13: (COMPILER::PA-EVAL-WHEN ((COMPILE) (ACLMOP:ENSURE-CLASS 
'WEBLOCKS::WEBLOCKS-WEBAPP :ENVIRONMENT #<#> :GIVEN-ENV-ONLY T ...)))
 14: (COMPILER::PA-COMPILE (EVAL-WHEN (COMPILE) (ACLMOP:ENSURE-CLASS 
'WEBLOCKS::WEBLOCKS-WEBAPP :ENVIRONMENT #<#> :GIVEN-ENV-ONLY T ...)) NIL)
 15: (COMPILER::COMPILE-PROCESS-FORM ..)

One solution is to move the *registered-webapps* variable to another
file, which will be compiled and loaded, and the value set, before it is used.

Why not put it in weblocks.lisp as there are plenty of variables there?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

diff --git a/src/application.lisp b/src/application.lisp
index ad3ea0d..49ad074 100644
--- a/src/application.lisp
+++ b/src/application.lisp
@@ -16,8 +16,6 @@
 	  compute-webapp-public-files-uri-prefix-util
           current-webapp))
 
-(defvar *registered-webapps* nil
-  "A list of applications that the system knows about")
 
 (defclass weblocks-webapp ()
   ((name :accessor weblocks-webapp-name :initarg :name
diff --git a/src/weblocks.lisp b/src/weblocks.lisp
index 892cb39..ab6dc94 100644
--- a/src/weblocks.lisp
+++ b/src/weblocks.lisp
@@ -73,6 +73,9 @@ variable. All html should be rendered to this stream.")
 (defvar *autostarting-webapps* nil
   "A list of webapps to start when start-weblocks is called")
 
+(defvar *registered-webapps* nil
+  "A list of applications that the system knows about")
+
 (defvar *active-webapps* nil
   "A list of running applications.  Applications are only available
    after they have been started.")

Reply via email to