When developing or tweaking a GUI, I use a simple tool that essentially keeps polling a BXML file to look for changes, and then reloads and displays it. It was initially very quick to develop, and allowed me to visualize the changes I made to most BXML files very quickly.
The tool itself has a simple GUI which allows me to switch to another target BXML file. It also includes the ComponentPropertyInspector and ComponentStyleInspector components from the Component Explorer tutorial. http://pivot.apache.org/demos/component-explorer.html http://svn.apache.org/repos/asf/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/explorer/tools/ Other than that, it populates a TreeView with the components being displayed, so that I can see the component graph and click within it to select components easily for use with the style & property inspector components. I also added a context menu to allow a component to be selected within the GUI by right clicking and choosing 'Inspect Component' It has gradually grown to include various features as I needed them. The currently selected component can be optionally highlighted in the TreeView and within the GUI. Likewise, selecting a component in the TreeView can highlight the corresponding component in the GUI. It currently opens a new Display to show the contents of the target BXML file. When a change has been detected, the BXML file is reloaded, and if there are no errors, it is wrapped in some Component specific 'presentation BXML'. For instance, if the BXML file I am watching has a root component that is a BoxPane, I might create a new Display containing a maximized Window which in turn contains the BoxPane from the BXML file. If the root Component was a Frame, the Display will again contain a maximized Window, the Frame itself, and a PushButton which will re-open the Frame after it has been closed. Ultimately, it is very similar to the ComponentExplorer tutorial, but instead of having a small number of hard coded examples, it allows arbitrary BXML files to be displayed (and monitored for changes). Chris On 15 April 2011 16:50, Vicente de Rivera III <[email protected]>wrote: > hi, I think one good feature of Pivot is to have a fast preview (just like > when you're coding HTML or JSP). > > how do you code your pivot app? is it the usual edit bxml and run your app? > -- > http://sites.google.com/site/thirdyderivera/ >
