This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
dot notation question
- From: Li Lin <guru dot lin at gmail dot com>
- To: kawa at sourceware dot org
- Date: Sat, 8 Apr 2006 23:03:00 -0700
- Subject: dot notation question
Hi all,
I'm a newbie to Kawa, so excuse me if I'm asking the obvious. here is
my code:
(define (get-initial-context class-name url username password)
(let ((props (java.util.Properties:new)))
(begin
(*:put props
(javax.naming.InitialContext:.INITIAL_CONTEXT_FACTORY) (->jstring
class-name))
;; snip...
(javax.naming.InitialContext:new props)))
returns error message:
<unknown>: no slot `INITIAL_CONTEXT_FACTORY' in
javax.naming.InitialContext (i'm using kawa-1.8.jar)
but if I modify the code below it worked.
(define *initial-context*
(javax.naming.InitialContext:.INITIAL_CONTEXT_FACTORY))
(define (get-initial-context class-name url username password)
(let ((props (java.util.Properties:new)))
(begin
(*:put props *initial-context* (->jstring class-name))
;snip
(javax.naming.InitialContext:new props)))
so, what's the real difference between the two? and why dot notation
didn't work in the 1st scenario?
Thanks.
--Li Lin