Hi all,

> My application is not GUI centric, and I don't want to make the GUI the main 
> part of the application.
>
> How can I pass variables back from  DesktopApplicationContext or start a 
> pivot application without  DesktopApplicationContext?

Under trunk (for Pivot-2.1.0, still in development) I put some new
classes related to this:
ApplicationWithProperties and ApplicationWithPropertiesTest .

Take a look and tell us if there is something that should be
updated/improved, even for your needs.


Note that some month ago I put some test Groovy scripts and classes
under Pivot-Stuff (
http://code.google.com/a/apache-extras.org/p/pivot-stuff/ ) in the
project pivot-stuff-common-groovy ... under scripts and test you can
find some minimal example fro using Pivot in a little different way.
As soon as I find some time I should update these examples (or add
others) using the new method added in ApplicationWithProperties , so
for example I could get GroovyClassLoader from Groovy and set into
Pivot application, etc ... I hope this can help you.


Bye,
Sandro


2014/1/21 Mark R. Chambers <m...@mrchambers.org>:
> Hi Roger,
>
>
>
> Thanks for your reply.  Previously I was using Swing and my own XML parser
> to create the GUI. So it was called with for example GUIPanel mGUIPanel =
> new GUIPanel() from my main application class that controlled various
> devices and the database connections;
>
> Then I could just access the MGUIPanel.mState information etc…
>
> The application can be run headless, so sometimes there is not a GUI, but I
> guess I can hack around that…
>
>
>
> I can probably modify the DesktopApplicationContext.main (to maybe
> mainReturn) to return, a reference to the application return type(Just calls
> main and then returns the reference….)
>
> Or I could change the architecture to have it GUI centric… It just that my
> diagrams would then need to change… and they would not look at neat:]
>
>
>
> Anyway I think your answer is, that currently it is not supported:] It would
> be a nice feature, since probably not everybody wants to use Pivot from
> main…
>
>
>
> PS-Thanks for the Pivot Framework, I like the code;] Although the
> documentation still needs massive amounts of work;] And the Component
> Explorer needs to be finished;]
>
> PS2- If I get some time I will start adding to the Wiki… to try to minimise
> the learning cliff;]
>
> Regards,
>
> Mark.
>
>
>
> From: Roger L. Whitcomb [mailto:roger.whitc...@actian.com]
> Sent: Tuesday, 21 January 2014 1:35 AM
> To: user@pivot.apache.org
> Subject: RE: How to Run Application without DesktopApplicationContext
>
>
>
> Hi Mark,
>
>                 Welcome to Pivot.  I’m sorry that you’re having trouble, but
> let me see if I can help.  To start with, could you tell me what the
> original application was written in (i.e., what GUI framework you were
> using)?  How did you pass information back and forth between the GUI and the
> main application before (i.e., was it some kind of RPC, or what)?
>
>                 Currently Pivot has just two modes of operation:  as a
> desktop app, or as a browser applet.  These two would use
> DesktopApplicationContext and BrowserApplicationContext.  There is probably
> no real reason we couldn’t have a third type of application (maybe an
> “EmbeddedApplicationContext” that would act more like the GUI object that
> you’re talking about).  At this moment I wouldn’t know exactly how to go
> about writing such a class, but I don’t know of any technical reason why it
> couldn’t be done.  At some point you have to hook into AWT and connect to a
> GUI widget and the event handling (event loop) for it, but that (I’m pretty
> sure) could be wrapped in a slightly different way than
> DesktopApplicationContext does it (which pretty much assumes it is the main
> program of the application), but maybe more like BrowserApplicationContext
> (which obviously is assuming it is wrapped inside a browser as an applet).
>
>                 There should be no reason you couldn’t pass application
> arguments even to a DesktopApplicationContext via the command line stuff
> even now.  Or if you are using a message bus, or some other RPC mechanism,
> why you couldn’t use that with Pivot also.  Unless I’m misunderstanding the
> way your app is architected.  So, maybe you could explain a bit more.
>
>                 Again, thanks for trying Pivot, and I hope we can get you
> going!
>
>
>
> ~Roger
>
>
>
> From: Mark R. Chambers [mailto:m...@mrchambers.org]
> Sent: Monday, January 20, 2014 6:11 AM
> To: user@pivot.apache.org
> Subject: How to Run Application without DesktopApplicationContext
>
>
>
> Hi Pivot,
>
>
>
> My application is not GUI centric, and I don't want to make the GUI the main
> part of the application.
>
> How can I pass variables back from  DesktopApplicationContext or start a
> pivot application without  DesktopApplicationContext?
>
>
>
> BACKGROUND:
>
> I have an existing application and I am replacing the GUI component with
> Pivot, it is a component of a much larger application. I previously just had
> a GUI object that I called and it made the GUI etc. and I could pass state
> information and values back to the main application. Is there any way to do
> this with pivot? Or do I need to modify the pivot src? (Or choose another
> GUI option, although I have battled with pivot for 3 days. to convert my
> GUI, and now find out that I can't seem to be able to get any variables back
> to the main program.)
>
>
>
> Regards,
>
> Mark
>
>

Reply via email to