From: Bret C. <bre...@ya...> - 2005-05-25 20:29:31
|
Christoph, If you remember our conversations of last November, I've now created abstractors that result in the hypergraphs creating the views of my data that I want! I'm happy with the results(and so is my professor -- who now wants to apply for a grant to keep on as a research assistent to explore new applications for the topic map hypergraph!). Thanks so much for the help you have provided me. I am now trying to add another feature to trap the event for when a user clicks on an activity (Topic) node so that I can create a new hypergraph to show the sub-activities for this activity. I see that there is an event type EV_TMO_SELECTED, and that the EventDispatcherImpl has a method, sendTMOSelected(), for sending notification of such an event. My question is: HOW CAN I TRAP WHEN THE USER CLICKS ON THE TOPIC NODE, SO THAT CAN THEN CALL THE ABOVE METHOD? Do I need to trap a low-level mouse-click event, or does TMNav provide for trapping such an event? Also, I found and fixed (within my copy of the source code) a bug in the tmnav-0.2.9pre1-src version of EventDispatchImpl. (I don't know if you have fixed the bug since then): The dispatcher wasn't sending events to the registered listeners. When I debugged, I noticed that the dispatcher's send() method wasn't able to access the changes to the listeners HashMap created when a new listener was added. I fixed the problem (within my copy of the code) by making the HashMap a static final variable as follows: // private HashMap listeners = new HashMap(); private static final HashMap listeners = new HashMap(); I've also written a monograph that explains how I used TM4J and TMNav to develop my application. I don't know if it would be useful for other developers, or to include parts within the TMNav documentation. Bret Cohen __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |