Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
ianstrain
Posts: 62
Registered: 07-15-2008

Alternate Entry Point

Device: BlackBerry Pearl 8100 v4.2.1.94 Platform 2.3.0.77

 

I have followed the instructions for creating a BlackBerry UI application with alternative entry points and rollover icons from

How To - Define a rollover icon for an application 

and 

How To - Setup an alternate entry point for my application

 

and developed it in the Blackberry JDE. I have to use an external build system and from looking at the builds created from these examples it is my understanding that in the jad the alternative entry point is created by using "MIDlet-1: ,,gui" and "RIM-MIDlet-Flags-1: 0, meaning that midlet 1 will sit on the ribbon and pass in "gui" to the main application which is defined using "MIDlet-2: ,,"and RIM-MIDlet-Flags-2: , meaning that midlet 2 will autostart (I am unsure as how to make it a system module, do you have something like RIM-MIDlet-Flags-2: 3, * and * being a value for System Module)

 

From this understanding I have used my build system which creates a jad file as follows:

 

Manifest-Version: 1.0
MIDlet-Version: 1.0
MIDlet-Jar-Size: 4987
MicroEdition-Configuration: CLDC-1.1
MIDlet-Jar-URL: RollOver.jar
RIM-COD-Module-Dependencies: net_rim_cldc,net_rim_bb_framework_api
RIM-MIDlet-Flags-2: 3
RIM-MIDlet-Flags-1: 0
RIM-COD-Module-Name: RollOver
MIDlet-Name: RollOver
RIM-COD-Size: 5000
RIM-COD-Creation-Time: 1220353588
MIDlet-2: ,,
MIDlet-1: ,,gui
RIM-COD-URL: RollOver.cod
RIM-COD-SHA1: f7 b6 88 31 de 1a 0f 54 04 92 78 bc 84 41 2a d3 ce d9 2d 9c
MicroEdition-Profile: MIDP-2.0
MIDlet-Vendor: Vendor

 

 This works fine on the Simulator but when I transfer to the device I get the following error:

 "Uncaught exception: Module with handle [4798] and index [0] has no application entry point"

 

I can still run the application, but there is no rollover effect.

 

 

 

Please use plain text.
Developer
ianstrain
Posts: 62
Registered: 07-15-2008

Re: Alternate Entry Point

More Info:

I have determined the values for the RIM-MIDlet-Flags-1

0 = Normal application

1 = Auto-Startup

2 = System Module

3 = System Module & Auto-Startup

 

does the 1 in RIM-MIDlet-Flags-1 mean the MIDlet-1 will have those properties and if I want to set properties for MIDlet-2 I set RIM-MIDlet-Flags-2?

Please use plain text.
Developer
ianstrain
Posts: 62
Registered: 07-15-2008

Re: Alternate Entry Point

More info:

When I install the app and get this message

"Uncaught exception: Module with handle [4798] and index [0] has no application entry point"

 

I pull out the battery to do a reset and when the device starts up again the application can do the rollover icon.

Please use plain text.
BlackBerry Development Advisor
ttahir
Posts: 36
Registered: 07-14-2008

Re: Alternate Entry Point

Hi Ian,

 

Thanks for posting to the developer forums. Here are a couple of links I found useful in describing the Midlet Flags:

 

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=636

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&thread.id=907

 

As for the Exception, it's because you are setting the rollover icon for the incorrect entry point. In the Knowledge Base article you referenced, this is indicated the the HomeScreen.updateIcon(regIcon, 0) and HomeScreen.setRolloverIcon(icon, 0) API calls.

 

Finally, it's very important to understand that JDE versions are only forwards compatible with handheld software versions. Are you building with JDE 4.3 and then installing the application on a handheld with software version 4.2.1? This could be the cause of the problem.

 

-Tariq

Please use plain text.
Developer
ianstrain
Posts: 62
Registered: 07-15-2008

Re: Alternate Entry Point

Thanks Tariq I will give this a try. I'm just wondering why I get the message when I install the app and then when I reset the device it works? Also when I download via O.T.A I get no error message and the rollover works.
Please use plain text.
Developer
ianstrain
Posts: 62
Registered: 07-15-2008

Re: Alternate Entry Point

[ Edited ]
Does anyone have an expanation why the error occurs when I use the desktop manager but not when I install OTA?
Message Edited by ianstrain on 09-11-2008 12:51 PM
Please use plain text.
Administrator
MSohm
Posts: 11,465
Registered: 07-09-2008
My Carrier: Bell

Re: Alternate Entry Point

Do you get this error when the application is built in the BlackBerry JDE or only when build using your custom build environment?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
KarlH
Posts: 29
Registered: 09-12-2008

Re: Alternate Entry Point

I hope you don't mind me stepping in here with my experiences in this subject.

 

I also followed the advice in the referenced knowledgebase topics, and after paying special attention to the alternate entry point index number as described in the rapc output file, I was able to get this all to work as advertised, without the exception.  If you have the wrong number on the index parm then you will get the exception, as noted above.

 

However, I now have two applications on the home screen ribbon.  Careful study of the attachments to the knowledgebase article on alternate entry points referenced above reveals that the version of the JDE I'm using  (Version 4.3.0.1r) doesn't have the 'none' checkbox on the "Home Screen Position" item on the application tab of the properties screen.

 

Was this checkbox replaced with something else?  I don't find any documented (document version 4.3.0) method of the HomeScreen class that seems to do it...

 

Any assistance would be appreciated.  Thanks in advance.

Please use plain text.
Developer
ianstrain
Posts: 62
Registered: 07-15-2008

Re: Alternate Entry Point

I get the error with the custom build.
Please use plain text.
Developer
ianstrain
Posts: 62
Registered: 07-15-2008

Re: Alternate Entry Point

I tried the build with the JDE and I still get the error. Is there meant to be a certain number as the index in

 

HomeScreen.updateIcon( regIcon, 0 ); HomeScreen.setRolloverIcon( icon, 0 );

 

 

Please use plain text.