On 25 February 2011 18:28, dranzer_duch <[email protected]> wrote:
> > @ Chris, > Yeah, I am using DesktopApplicationContext.main().. > And even if I use BxmlSerializer, won't i still have to use window to get > my > bxml resource? > I would love to know if BxmlSerializer has options to get the bxml file > otherwise.. > BXMLSerialzer is a tool that creates objects that are described as a BXML file. It is commonly used in Pivot to define the UI layer but can be used to create objects (beans) that have nothing to do with Pivot. If the root of your BXML file is a Pivot Component, then that will be what BXMLSerializer returns, assuming that it can successfully read and process the file along with any resource files and includes that are required. Once you have that object, you are free to use it however you see fit. For a Pivot app, you would generally load one or more BXML files and add the resulting objects into Pivot Containers, or perhaps open a Window to display it. This will require a Pivot Display object which is provided to you when you create a Pivot Application. (DesktopApplication will create a native Frame that will contain a Display). If you want to display Pivot Components in an SWT window, then I think you will need to find or create a SWT component that can render Pivot Components. I did not follow the SWT discussions so cannot tell you if anyone came up with such a component. I also have no SWT experience so don't know the underlying architecture on that side. There have been other discussions (and demos) about mixing Pivot and Swing components in the same application. Your favourite search engine or the following mailing list archives might help you here. http://apache-pivot-developers.417237.n3.nabble.com/ http://apache-pivot-users.399431.n3.nabble.com/ Did you post any questions to Eclipse/SWT mailing lists or forums? You might be able to reference Greg's postings (that I linked to before) in order to help describe what Pivot is and what you are trying to achieve. One other question is whether you absolutely need to have the BXML 'preview' displayed in Eclipse or a SWT app. It is fairly simple to create the same thing with Pivot itself, and this is something that a number of people have already done. The benefit of this is that Pivot apps can obviously render Pivot Components. If you search the mailing lists you should be able to find out about them. This is the only one that I can remember off the top of my head. http://code.google.com/p/wtkxbrowser/ Chris
