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:[email protected]]
Sent: Monday, January 20, 2014 6:11 AM
To: [email protected]
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