This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: some questions using callbacks to java
- To: Per Bothner <per at bothner dot com>
- Subject: Re: some questions using callbacks to java
- From: "Paul R. Potts" <potts at umich dot edu>
- Date: Tue, 25 Jul 2000 15:25:50 -0400
- CC: <kawa at sourceware dot cygnus dot com>
>> <string>:1:332: warning - no method `print' in java.lang.Object
>> <string>:1:381: warning - no method `test_bind' in java.lang.Object
>> <string>:1:427: warning - no method `print' in java.lang.Object
>>
>> is there a way to avoid these warnings going to stdout?
>
> I could disable these warning with some switch, I suppose. However, the
> warning means that the compiler is forced to generate code to look up
> the method at run-time. I haven't timed it, but I would not be surprised
> is doing that is *100 times* slower than if the compiler can find the
> method.
>
> The prferred ay to avoid the warnings is to use declarations, assuming
> debug-callbacks etc are lexicall bound. If not you can put in an
> explicit cast:
per, can you give me an example of declaring these? also, i am not sure what
you mean by lexically bound. after executing the environment . put on these
objects in the java side, they are bindings available in kawa, do you mean
something else?
> (invoke (as <java.util.Date> my-date) 'setDate cur-date)
>
> I don't know how well this would work with inner classes.
i think you're right since inner classes are basically a name-mangling hack,
so i took them out; i had just put them there for reading convenience, they
were not really needing to access outer class members.
>> the first callback works, then the test_bind fires. it appears to execute
>> ok, but then when executing the next callback i get
>>
>> Unbound Symbol exception: Unbound symbol patient
>
> "patient" does not evaluate to a Java String - it's a Scheme string.
> Use 'patient instead.
thanks, this fixed that problem. not sure why doing the put() on a string
rather than symbol failed silently w/o generating a runtime exception
thanks, p
--
Paul R. Potts * Technology Group Leader * Health Media Research Lab
Comprehensive Cancer Center * University of Michigan Medical Center
734.936.0096 * potts@umich.edu
"Umm, I want to play ill-bent tech-noodle avant-core, gritty house,
with maybe a bit of speed garage and an occasional chill-out terminal
acidosis-bath pseudo-jazz funkified accelerando con troppo allegro
innuendo pornucopia of sample stampede combining cowpunk with filter
sweeps, bleep-and-brass, and maybe a waltz."