[armedbear-devel] DEFUN (SETF ...)s

dmiles at users.sourceforge.net dmiles at users.sourceforge.net
Mon Nov 23 20:50:09 UTC 2009


Ah, look at this:  (offline Erik suggested something)

Armed Bear Common Lisp 0.18.0-dev (built Mon Nov 23 2009 12:07:35 PST)
Java 1.6.0_10 Sun Microsystems Inc.
Java HotSpot(TM) 64-Bit Server VM
Low-level initialization completed in 0.766 seconds.
Startup completed in 1.642 seconds.
Type ":help" for a list of available commands.
CL-USER(1):  (require "JAVA")
("CLOS" "JAVA-EXTENSIONS")
CL-USER(2): (setf (jfield "dmiles.TestClass" "StaticField") "stuff")
"stuff"
CL-USER(3): 


If my app calls (require "JAVA")  first that's not a bad thing
When I use Allegro Lisp I gotta call a few forms before #'jfield works :)

(require :jlinker)
(use-package "javatools.jlinker")
(jlinker-init)

It is kinda a hard call to know when we have to require the user to (require ..something..) ? 
so much in ABCL happens by magic.. I get spoiled



> 
> ----- Original Message ----- 
> From: "Alessio Stalla" <alessiostalla at gmail.com>
> To: <dmiles at users.sourceforge.net>
> Cc: "Armed Bear" <armedbear-devel at common-lisp.net>
> Sent: Monday, November 23, 2009 12:38 PM
> Subject: Re: [armedbear-devel] DEFUN (SETF ...)s
> 
> 
> It might be related to autoloading: java.lisp is not autoloaded by
> (setf jfield), but it is by the debugger, so after the error it works.
> If that is the problem, I don't have the solution... other than
> calling some function defined in java.lisp before (setf jfield), but
> that's not pretty.
> 
> hth,
> Alessio
> 
> On Mon, Nov 23, 2009 at 9:30 PM,  <logicmoo at gmail.com> wrote:
>> It looks to be a loadtime thing (offline Erik thought maybe it was so)
>> See this output:
>>
>> Armed Bear Common Lisp 0.18.0-dev (built Mon Nov 23 2009 12:07:35 PST)
>> Java 1.6.0_10 Sun Microsystems Inc.
>> Java HotSpot(TM) 64-Bit Server VM
>> Low-level initialization completed in 0.658 seconds.
>> Startup completed in 1.516 seconds.
>> Type ":help" for a list of available commands.
>> CL-USER(1): (jfield "dmiles.TestClass" "StaticField")
>> "fresh"
>> CL-USER(2): (setf (jfield "dmiles.TestClass" "StaticField") "stuff")
>> Debugger invoked on condition of type UNDEFINED-FUNCTION:
>> The function (SETF JFIELD) is undefined.
>> Restarts:
>> 0: TOP-LEVEL Return to top level.
>> [1] CL-USER(3): 0
>> CL-USER(4): (setf (jfield "dmiles.TestClass" "StaticField") "stuff")
>> Debugger invoked on condition of type UNDEFINED-FUNCTION:
>> The function (SETF JFIELD) is undefined.
>> Restarts:
>> 0: TOP-LEVEL Return to top level.
>> [1] CL-USER(5): :bt
>> 0: (SYSTEM:BACKTRACE)
>> 1: (INVOKE-DEBUGGER #<UNDEFINED-FUNCTION {27F40B69}>)
>> 2: org.armedbear.lisp.Lisp.error(Lisp.java:365)
>> 3: org.armedbear.lisp.SpecialOperators$14.execute(SpecialOperators.java:493)
>> 4: org.armedbear.lisp.Lisp.eval(Lisp.java:461)
>> 5: org.armedbear.lisp.Lisp.evalCall(Lisp.java:501)
>> 6: org.armedbear.lisp.Lisp.eval(Lisp.java:471)
>> 7: org.armedbear.lisp.Lisp.progn(Lisp.java:640)
>> [1] CL-USER(6): 0
>> CL-USER(7): (setf (jfield "dmiles.TestClass" "StaticField") "stuff")
>> "stuff"
>> CL-USER(8):
>>
>> _______________________________________________
>> armedbear-devel mailing list
>> armedbear-devel at common-lisp.net
>> http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
>>




More information about the armedbear-devel mailing list