Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 28
Registered: ‎07-24-2008
My Device: Not Specified

Calling all bb-ant-tools users, need input on design decision

[ Edited ]

Several bb-ant-tools users have brought to my attention some changes that have been made in JDE 4.7.0 in regards to application icon handling.

 

It seems you can now set your focus icon via project settings.  Furthermore you can set multiple application icons and focus icons for a given project (though I have no idea why).

 

So I want to add this feature to bb-ant-tools but I am struggling with how this should look and the most logical solution is to ask the users! (I think there are a few of you here correct?)

 

The first idea that comes to mind is add another attribute to the <jdp> element, and extend it to support a comma delimited list of icon paths:

 

<rapc>
<jdp icon="appicon1.png,appicon2.png" focusicon="focus1.png,focus2.png" />
</rapc>

 

Advantage to this is it's backwards compatible with existing build scripts.  Another advantage to this is putting project settings in a .properties file would still work, eg:

 

# project.properties
icon = appicon1.png,appicon2.png
focusicon = focus1.png,focus2.png

<!-- build.xml -->
<rapc>
<jdp file="project.properties" />
</rapc>

 

The disadvantage is that it suffers from an existing problem that bb-ant-tools has always had.  The path specified in the icon and focusicon attributes is relative to the build directory which can be counter intuitive to say the least.

Another possible syntax:

 

 

<rapc>
<jdp>
<icon file="path/to/appicon1.png" />
<icon file="path/to/appicon2.png" />
<icon file="path/to/focus1.png" focus="true" />
<icon file="path/to/focus2.png" focus="true" />
</jdp>
</rapc>

 

In this example, bb-ant-tools can leverage ant to verify the path of the file and generate a build error when it is not found.  Then automagically adjust the path appropriately when calling the rapc compiler.

 

The disadvantage to this is that it breaks compatibility with old scripts (however, I can just leave the existing icon attribute there and deprecate it) and it means .properties files can't be used to list application icons.

 

Ideas? Suggestions? Comments?

 

 

 

Message Edited by jiggak on 09-11-2009 04:00 PM
New Developer
Posts: 6
Registered: ‎09-10-2009
My Device: Not Specified

Re: Calling all bb-ant-tools users, need input on design decision

Jiggak,

 

  Going with the best solution and possibly depricating the old seems like it would work best.

 

  Couple of questions:

 

   1. why have <icon ....  focus=true>, why not have <icon> and <focusicon>?  I think this is more explicit and less apt to user error.

   2. the icon and focusicon nested elements could support fileset.

 

  Suggested syntax: 

  <rapc>

       <jdp>

           <icon fileset="appicon*.png" />

           <focusicon fileset="focus*.png" />

      </jdp>

   </rapc>

 

Love bb-ant-tools!!! 

New Developer
Posts: 32
Registered: ‎10-27-2009
My Device: Not Specified

Re: Calling all bb-ant-tools users, need input on design decision

Did you make these updates?  Ditto to the love the bb-ant-tools comment.

 

Thanks,

Scott

Developer
Posts: 28
Registered: ‎07-24-2008
My Device: Not Specified

Re: Calling all bb-ant-tools users, need input on design decision

Scott,

 

I finally sat down and hacked this out.  You can find the latest release on the sourceforge page: https://sourceforge.net/projects/bb-ant-tools/

 

I went with the easiest/quickest sollution which was to use the existing syntax along with a new attribute for the rollover icon.  Example:

 

 

<rapc ...>
   <jdp icon="icon.png" focusIcon="focus.png" />
</rapc>