Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to pass my context object to my View constructor
How to pass my context object to my View constructor [message #448795] Tue, 02 May 2006 13:57 Go to next message
Eclipse UserFriend
A question about constructing and initializing Views:

I need to pass to my Views a ref to an application context object.

But if I understand it right, the RCP platform actually creates the
instance of my View class, by calling the no-arg constructor.
It doesn't pass anything else. Is there a proper way to pass an
arbitrary object to it? Or to reach back to the Application instance
from within the View constructor?

Thanks

jg
Re: How to pass my context object to my View constructor [message #448796 is a reply to message #448795] Tue, 02 May 2006 14:31 Go to previous message
Eclipse UserFriend
Jim Goodwin wrote:
> A question about constructing and initializing Views:
>
> I need to pass to my Views a ref to an application context object.
>
> But if I understand it right, the RCP platform actually creates the
> instance of my View class, by calling the no-arg constructor.
> It doesn't pass anything else. Is there a proper way to pass an
> arbitrary object to it? Or to reach back to the Application instance
> from within the View constructor?

One option is to have your view contact someone (like your plugin) on
initialization and request the app context. Having your view talk to
it's plugin is acceptable.

Later,
PW
Previous Topic:Browser not resizing in Dialog
Next Topic:key assist in RCP app
Goto Forum:
  


Current Time: Sun Aug 31 13:48:53 EDT 2025

Powered by FUDForum. Page generated in 0.03070 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top