Freddy Sonnemans wrote:
Sanka,
Thanks for your mail.
I implemented your guidelines, which confirmed the route I had taken on Sunday.
It looks now that the corrrect EventListener is activated (at least I do
not have any crashes anymore.
The next hurdle now is that BSF does not seem to know which
eventlisteners have been activated, because nothing is intercepted by
BSF.
Is it possible that the way 'CALLBACKS' are handled are fundamentally
different between AWT and SWT ?
Hmmm.. I'm afraid I can not give you a definite answer since I've no
knowledge on how event handling mechanism works in SWT. But I suspect
that there are no fundamental differences between how the 'CALLBACKS'
are handled in AWT and SWT.
One thing you could do is to check whether the correct adapter is
registered as an event listener in the source object . (Just put a
breakpoint at the last line of the ReflectionUtil.addEventLister(...)
method and check whether the arguments which
addListenerMethod.invoke(..) takes are correct.
If it works fine, in the event of an occurance of an event, the
appropriate event processor should be called and the piece of script
which is bound to the event.should be executed ..
Hope this will help !!
--Sanka
Is it worth doing a test to activate SWING as an intermediate test ??
Regards and thanks again,
Freddy
On Thu, 2005-09-08 at 11:42 +0600, Sanka Samaranayake wrote:
Freddy Sonnemans wrote:
When trying to set up an EventListener for an SWT Object, BSF creates
the wrong class : Exception in thread "main"
java.lang.NoClassDefFoundError: IllegalName:
org/apache/bsf/util/event/adapters/org_eclipse_swt_events_SelectionAdapter
BSF uses a set of standard event adapters which is used in the process
of event handling. Those Event Adapters are named using the relavent
event listener type.
For instance the adapter which is to be used to process window events is
named as java_awt_event_WindowAdapter (replacing "." with "_" and
replacing "Listener" with "Adapter").
In your case it seems that org.eclipse.swt.events.SelectionListener is
the name of the interface which handle the event. BSF tries to find an
adapter which is named as org_eclipse_swt_events_SelectionAdapter
following the above convention. The application crashes since there is
no a such adapter.
rather than addressing org.eclipse..............
I am using BSF apache 2.3, with JDK 1.5.0_4.
Anyone any ideas ??
If you really want to resolve this what you can do is to implement
necessary adapters for event processing with "org_eclipse_swt_events"
prefixes and recompile the code. It should not be that difficult and the
existing adapters should provide you quite a guideline.
Hope this will help ..
--Sanka
Regards,
Freddy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]