If you want the BXML files to share the same namespace, you need to specify inline="true" on the include.
On Nov 9, 2011, at 8:00 AM, pan peter wrote: > i have a big bxml file that contains a lot of stuff. now i want to reduce the > size of this bxml file, for example, put some menu bar definition into a new > file menubar.bxml, then how should i define this in main bxml file? > > In main bxml I tried replace the MenuBar part with > > <menuBar> > <bxml:include src="menubar.bxml"/> > </menuBar> > > and inside the menubar.bxml, i have > > <menubar xmlns:bxml="http://pivot.apache.org/bxml" > xmlns="org.apache.pivot.wtk.content"> <MenuBar bxml:id="menubar" > styles="{backgroundColor:'#99ffff'}"> > <MenuBar.Item buttonData="File"> > ....... > </MenuBar.Item> > </MenuBar> > </menubar> > > then i got null pointer exception while read object for main bxml file. > > any suggestions? > > > -- > View this message in context: > http://apache-pivot-users.399431.n3.nabble.com/how-to-put-some-bxml-code-into-another-bxml-file-tp3493447p3493447.html > Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
