Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Unregistering listeners using CyServiceRegistrar
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Omar Wagih  
View profile  
 More options Sep 15 2012, 7:28 pm
From: Omar Wagih <omarwa...@gmail.com>
Date: Sat, 15 Sep 2012 16:28:37 -0700 (PDT)
Local: Sat, Sep 15 2012 7:28 pm
Subject: Unregistering listeners using CyServiceRegistrar

I have my custom event class which implements several listeners
The handleEvent methods of the class depends on a JTree which is created
after files are loaded through a custom JFrame. Thus, I can't register the
listeners in CyActivator.
I instantiated the class, and passed references of the class + a reference
of CyServiceRegistrar through to where my JFrame is being created.
After my files are loaded and my JTree is created, I set the JTree in my
custom event listener class like this: myListeners.setTree(myJTree) and
register the listeners.

However, I run into this issue:
In the case that someone loads JFrame file loader from the app menu to load
the the files a *second* time, the listeners are registered again and thus
my handleEvent methods are called more than once.

I tried unregistering all services when my custom file loader JFrame is
opened like this: serviceRegistrar.unregisterAllServices(myListeners);, but
it fails

Any idea what's going on?

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.