pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger Whitcomb (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIVOT-840) Improve instructions on how to use BXML in an application
Date Sat, 18 Feb 2012 22:05:59 GMT

    [ https://issues.apache.org/jira/browse/PIVOT-840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211122#comment-13211122
] 

Roger Whitcomb commented on PIVOT-840:
--------------------------------------

And accessing BXML resources is quite the same as accessing any other kind of resources from
within a Java application.  You can use (for instance) "ClassLoader.getResourceAsStream" to
load them from your .jar file or another URL, or the FileReader or FileInputStream classes
to load them from an external file.

In our desktop application (packaged in a .jar file) we use: "new BXMLSerializer().readObject(MyMainClass.class.getResource(<resource
name>)..." where the BXML files are packaged relative to the MyMainClass package in the
.jar file hierarchy.

So, if you are not familiar with packaging Java applications or other aspects of working with
Java, I can see how some of things could seem daunting, but there is nothing new or unconventional
about the way Pivot handles things with regard to BXML files -- all this would be the same
if you were developing an Eclipse app or a Swing application.  

And, there is no requirement to use BXML files within Pivot -- a perfectly reasonable Pivot
application can be developed that creates everything dynamically, as is often done with Swing
applications.  BXML provides, IMO, a much more convenient method for specifying the UI layout,
but it is not at all required in order to develop Pivot applications.
                
> Improve instructions on how to use BXML in an application
> ---------------------------------------------------------
>
>                 Key: PIVOT-840
>                 URL: https://issues.apache.org/jira/browse/PIVOT-840
>             Project: Pivot
>          Issue Type: Improvement
>          Components: demos, tutorials
>    Affects Versions: 2.0.1
>         Environment: All Environments
>            Reporter: Robert Brown III
>            Assignee: Sandro Martini
>            Priority: Minor
>              Labels: application, bxml, demos, documentation, tutorials
>             Fix For: 2.0.2
>
>
> All demos and documentation emphasize the use of BXML for specifying the user interface.

> All demos are implemented as applets where the system is apparently able to "find" the
BXML file that it needs to create the UI.
> Unfortunately, when anyone attempts to use BXML in an actual desktop application, using
the proper "ScriptApplication" class and setting the "src" property, the application keeps
generating an error saying that it "cannot find" the BXML file.
> There are no instructions anywhere in the documentation about deploying a BXML file with
a Pivot application. There is nothing saying where the file should be, how to get the ScriptApplication
to find it, or any demos showing how to deploy a desktop application in general. There are
no real instructions even for deploying  BXML- based Applets!
> This is a "show- stopper" making Pivot's BXML mechanism unusable for most applications,
in particular desktops. 
> If people are to use BXML for most applications, some deployment instructions are seriously
needed...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message