List Info

Thread: Adding a config form to the configuration window




Adding a config form to the configuration window
user name
2007-08-14 03:23:17
I'm trying to get my config dialog to show up in the
configuration
window, and frankly I'm stuck.

Details are on my project blog:
http://sc-avmailbox.blogspot.com/2007
/08/well-it-looks-nice-in-my-head.html

I've got this lurking feeling that there's something really
obvious
that I'm missing because it's getting a little late over
here, but
thanks for any help.

-- 
Ryan Ricard
evilhecubusgmail.com
ryan.ricardstudent.utdallas.edu

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


Re: Adding a config form to the configuration window
user name
2007-08-14 03:26:22
Oh, and I've got the code up in my SVN in case anyone is
inclined to have a look

https://sc-avmailb
ox.dev.java.net/

Thanks again.



On 8/14/07, Ryan Ricard <ryan.ricardstudent.utdallas.edu> wrote:
> I'm trying to get my config dialog to show up in the
configuration
> window, and frankly I'm stuck.
>
> Details are on my project blog:
> http://sc-avmailbox.blogspot.com/2007
/08/well-it-looks-nice-in-my-head.html
>
> I've got this lurking feeling that there's something
really obvious
> that I'm missing because it's getting a little late
over here, but
> thanks for any help.
>
> --
> Ryan Ricard
> evilhecubusgmail.com
> ryan.ricardstudent.utdallas.edu
>


-- 
Ryan Ricard
evilhecubusgmail.com
ryan.ricardstudent.utdallas.edu

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


Re: Re: Adding a config form to the configuration window
user name
2007-08-14 08:31:27
Hi Ryan,

Hope that the following will help you to fix this.

I found several problems.

The first one is that you try to obtain the UIService in the MalboxActivator start method, but actually when you have a look in the felix.client.run.properties file, the mailbox bundle is started before the swing-ui bundle. I saw that you're using the matadata.xml, so maybe (as I'm not very familiar with it) you should just declare there that your bundle requires the UIService, as you've done for the ProtocolProviderService and the ConfigurationService. The other alternative is to implement the org.osgi.framework.ServiceListener (there are several implementations of this listener in the code, you could have a look in MetaContactListServiceImpl or SystrayServiceJdicImpl).

The second thing is that the mailbox.manifest.mf misses all javax libraries used in the MailboxConfigurationForm and Resources classes, you should import them.

And finally you'll notice that the mailbox.jar doesn't contain any resource files, neither the resources.properties file, nor the images and the resources directory. This could be fixed by copying them using the copy target (have a look at the "resource" target in the main build.xml). You could just copy the target, remove the second fileset and change the destination and source dirs.

Ah, just one more thing, it should be a copy paste error, but in the resources.properties file the mailboxIcon points to the installed.png, which does not exist in the resources directory, I should change that to tape.png.

I've made myself these changes to your code and I've successfully seen the mailbox configuration form.

Good luck!
Yana

On 8/14/07, Ryan Ricard < ryan.ricardstudent.utdallas.edu">ryan.ricardstudent.utdallas.edu> wrote:
Oh, and I've got the code up in my SVN in case anyone is inclined to have a look

https://sc-avmailbox.dev.java.net/

Thanks again.



On 8/14/07, Ryan Ricard < ryan.ricardstudent.utdallas.edu">ryan.ricardstudent.utdallas.edu> wrote:
>; I'm trying to get my config dialog to show up in the configuration
> window, and frankly I'm stuck.
&gt;
> Details are on my project blog:
> http://sc-avmailbox.blogspot.com/2007/08/well-it-looks-nice-in-my-head.html
>
>; I've got this lurking feeling that there's something really obvious
&gt; that I'm missing because it's getting a little late over here, but
> thanks for any help.
>
> --
> Ryan Ricard
>; evilhecubusgmail.com">evilhecubusgmail.com
> ryan.ricardstudent.utdallas.edu">ryan.ricardstudent.utdallas.edu
>


--
Ryan Ricard
evilhecubusgmail.com">evilhecubusgmail.com
ryan.ricardstudent.utdallas.edu">ryan.ricardstudent.utdallas.edu

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net">dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net"> dev-helpsip-communicator.dev.java.net


Re: Re: Adding a config form to the configuration window
user name
2007-08-14 21:19:41
Yana, thanks so much! I can see my GUI now!

I really appreciate you picking over all the little details
I forgot.
Thanks again.



On 8/14/07, Yana Stamcheva <yana.stamchevagmail.com> wrote:
> Hi Ryan,
>
> Hope that the following will help you to fix this.
>
> I found several problems.
>
> The first one is that you try to obtain the UIService
in the MalboxActivator
> start method, but actually when you have a look in the
> felix.client.run.properties file, the mailbox bundle is
started before the
> swing-ui bundle. I saw that you're using the
matadata.xml, so maybe (as I'm
> not very familiar with it) you should just declare
there that your bundle
> requires the UIService, as you've done for the
ProtocolProviderService and
> the ConfigurationService. The other alternative is to
implement the
> org.osgi.framework.ServiceListener (there are several
> implementations of this listener in the code, you could
have a look in
> MetaContactListServiceImpl or SystrayServiceJdicImpl).
>
> The second thing is that the mailbox.manifest.mf misses
all javax libraries
> used in the MailboxConfigurationForm and Resources
classes, you should
> import them.
>
> And finally you'll notice that the mailbox.jar doesn't
contain any resource
> files, neither the resources.properties file, nor the
images and the
> resources directory. This could be fixed by copying
them using the copy
> target (have a look at the "resource" target
in the main build.xml). You
> could just copy the target, remove the second fileset
and change the
> destination and source dirs.
>
> Ah, just one more thing, it should be a copy paste
error, but in the
> resources.properties file the mailboxIcon points to the
installed.png, which
> does not exist in the resources directory, I should
change that to tape.png.
>
> I've made myself these changes to your code and I've
successfully seen the
> mailbox configuration form.
>
> Good luck!
> Yana
>
> On 8/14/07, Ryan Ricard <ryan.ricardstudent.utdallas.edu>
> wrote:
> > Oh, and I've got the code up in my SVN in case
anyone is inclined to have
> a look
> >
> > https://sc-avmailb
ox.dev.java.net/
> >
> > Thanks again.
> >
> >
> >
> > On 8/14/07, Ryan Ricard <
> ryan.ricardstudent.utdallas.edu> wrote:
> > > I'm trying to get my config dialog to show up
in the configuration
> > > window, and frankly I'm stuck.
> > >
> > > Details are on my project blog:
> > >
> http://sc-avmailbox.blogspot.com/2007
/08/well-it-looks-nice-in-my-head.html
> > >
> > > I've got this lurking feeling that there's
something really obvious
> > > that I'm missing because it's getting a
little late over here, but
> > > thanks for any help.
> > >
> > > --
> > > Ryan Ricard
> > > evilhecubusgmail.com
> > > ryan.ricardstudent.utdallas.edu
> > >
> >
> >
> > --
> > Ryan Ricard
> > evilhecubusgmail.com
> > ryan.ricardstudent.utdallas.edu
> >
> >
>
------------------------------------------------------------
---------
> > To unsubscribe, e-mail:
> dev-unsubscribesip-communicator.dev.java.net
> > For additional commands, e-mail:
> dev-helpsip-communicator.dev.java.net
> >
> >
>
>


-- 
Ryan Ricard
evilhecubusgmail.com
ryan.ricardstudent.utdallas.edu

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


Bug in MclStorageManager?
user name
2007-08-17 01:23:32
Hi!
I probably found a bug in the MclStorageManager:




In extractContactsForAccount a malformed contact causes,
that the listener
is removed, then an exception raises and the listener is not
added any more.
Then the contact list is never saved again. I attached the
fix below:

++++++++++++++++BUG?+++++++++++++++++
    void extractContactsForAccount(String accountID)
        throws XMLException
    {
        if(!isStarted())
            return;
        try
        {
            //we don't want to receive meta contact events
triggerred by
ourselves
            //so we stop listening. it is possible but very
unlikely that
other
            //events, not triggerred by us are received
while we're off the
channel
            //but that would be a very bizzare case ..... I
guess we got to
live
            //with the risk.
           
this.mclServiceImpl.removeMetaContactListListener(this);

            Element root = findMetaContactGroupNode(
                mclServiceImpl.getRoot().getMetaUID());

            //parse the group node and extract all its child
groups and
contacts
->          processGroupXmlNode(mclServiceImpl,
accountID, root
->Exeption                       , null, null);

            //now save the contact list in case it has
changed
            scheduleContactListStorage();

            //now that we're done updating the contact list
we can start
listening
            //again
           
this.mclServiceImpl.addMetaContactListListener(this);
        }catch(Throwable exc)
        {
            // catch everything because we MUST NOT disturb
the thread
            //initializing the meta CL for a new provider
with null point
            //exceptions or others of the sort
            throw new XMLException("Failed to extract
contacts for account "
                                   +accountID, exc);
        }
    }

Here my corrected version. Shall I file a bug? See the
finally section!
Best regards.


    void extractContactsForAccount(String accountID)
        throws XMLException
    {
        if(!isStarted())
            return;
        try
        {
            //we don't want to receive meta contact events
triggerred by
ourselves
            //so we stop listening. it is possible but very
unlikely that
other
            //events, not triggerred by us are received
while we're off the
channel
            //but that would be a very bizzare case ..... I
guess we got to
live
            //with the risk.
           
this.mclServiceImpl.removeMetaContactListListener(this);

            Element root = findMetaContactGroupNode(
                mclServiceImpl.getRoot().getMetaUID());

            //parse the group node and extract all its child
groups and
contacts
            processGroupXmlNode(mclServiceImpl, accountID,
root
                                , null, null);

            //now save the contact list in case it has
changed
            scheduleContactListStorage();

        }catch(Throwable exc)
        {
            // catch everything because we MUST NOT disturb
the thread
            //initializing the meta CL for a new provider
with null point
            //exceptions or others of the sort
            throw new XMLException("Failed to extract
contacts for account "
                                   +accountID, exc);
        } finally {
            //now that we're done updating the contact list
we can start
listening
            //again
           
this.mclServiceImpl.addMetaContactListListener(this);
        }

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


Re: Bug in MclStorageManager?
user name
2007-10-16 04:21:28
Hey Thomas,

I was going back through uncommitted patches, and saw that
there were
quite a few coming from you. Just wanted to let you know
that the only
reason for this has been lack of time and if you want you
may have a
look at them and commit these that are still relevant.

Cheers
Emil

Thomas Hofer wrote:
> Hi!
> I probably found a bug in the MclStorageManager:
> 
> 
> 
> 
> In extractContactsForAccount a malformed contact
causes, that the listener
> is removed, then an exception raises and the listener
is not added any more.
> Then the contact list is never saved again. I attached
the fix below:
> 
> ++++++++++++++++BUG?+++++++++++++++++
>     void extractContactsForAccount(String accountID)
>         throws XMLException
>     {
>         if(!isStarted())
>             return;
>         try
>         {
>             //we don't want to receive meta contact
events triggerred by
> ourselves
>             //so we stop listening. it is possible but
very unlikely that
> other
>             //events, not triggerred by us are received
while we're off the
> channel
>             //but that would be a very bizzare case
..... I guess we got to
> live
>             //with the risk.
>            
this.mclServiceImpl.removeMetaContactListListener(this);
> 
>             Element root = findMetaContactGroupNode(
>                
mclServiceImpl.getRoot().getMetaUID());
> 
>             //parse the group node and extract all its
child groups and
> contacts
> ->          processGroupXmlNode(mclServiceImpl,
accountID, root
> ->Exeption                       , null, null);
> 
>             //now save the contact list in case it has
changed
>             scheduleContactListStorage();
> 
>             //now that we're done updating the contact
list we can start
> listening
>             //again
>            
this.mclServiceImpl.addMetaContactListListener(this);
>         }catch(Throwable exc)
>         {
>             // catch everything because we MUST NOT
disturb the thread
>             //initializing the meta CL for a new
provider with null point
>             //exceptions or others of the sort
>             throw new XMLException("Failed to
extract contacts for account "
>                                    +accountID, exc);
>         }
>     }
> 
> Here my corrected version. Shall I file a bug? See the
finally section!
> Best regards.
> 
> 
>     void extractContactsForAccount(String accountID)
>         throws XMLException
>     {
>         if(!isStarted())
>             return;
>         try
>         {
>             //we don't want to receive meta contact
events triggerred by
> ourselves
>             //so we stop listening. it is possible but
very unlikely that
> other
>             //events, not triggerred by us are received
while we're off the
> channel
>             //but that would be a very bizzare case
..... I guess we got to
> live
>             //with the risk.
>            
this.mclServiceImpl.removeMetaContactListListener(this);
> 
>             Element root = findMetaContactGroupNode(
>                
mclServiceImpl.getRoot().getMetaUID());
> 
>             //parse the group node and extract all its
child groups and
> contacts
>             processGroupXmlNode(mclServiceImpl,
accountID, root
>                                 , null, null);
> 
>             //now save the contact list in case it has
changed
>             scheduleContactListStorage();
> 
>         }catch(Throwable exc)
>         {
>             // catch everything because we MUST NOT
disturb the thread
>             //initializing the meta CL for a new
provider with null point
>             //exceptions or others of the sort
>             throw new XMLException("Failed to
extract contacts for account "
>                                    +accountID, exc);
>         } finally {
>             //now that we're done updating the contact
list we can start
> listening
>             //again
>            
this.mclServiceImpl.addMetaContactListListener(this);
>         }
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
> 
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )