BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 11-12-2008, 11:42 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2008
Model: 7100T
PIN: N/A
Carrier: none
Posts: 32
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default invokeApplication in a JDE 4.2.1 environment

Please Login to Remove!

Dear Forum,

I have a problem using Invoke.invokeApplication in an application in a JDE 4.2.1 environment. My invocation aims at opening a new calendar item.

The following simple code is executed:

Code:
import net.rim.blackberry.api.invoke.CalendarArguments;
import net.rim.blackberry.api.invoke.Invoke;
import net.rim.device.api.ui.UiApplication;


public class OpenNewCalendarItem extends UiApplication {
	public static void main(String[] args)	{
		new OpenNewCalendarItem().enterEventDispatcher();
		System.exit(0);
	} 

	public OpenNewCalendarItem() {
		super();
		Invoke.invokeApplication( Invoke.APP_TYPE_CALENDAR, new CalendarArguments( CalendarArguments.ARG_NEW ));
	}
}
The new agenda item is correctly opened BUT after this opening, it is impossible for the end-user to exit the calendar application: it seems that the device (and simulator) has crashed.

Is it a defect? Is there a workaround?

Thank you again for your precious support,

MikaŽl Donini.
Offline  
Old 11-12-2008, 01:01 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Mikael,

You are invoking the calendar application prior to entering the event dispatcher. Try placing the invoke in your UiApplication.activate() method.
Offline  
Old 11-14-2008, 05:36 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2008
Model: 7100T
PIN: N/A
Carrier: none
Posts: 32
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default problem solved

Thank you Doug for your answer!!

My issue is happening because UiApplication is being extend when no UI items are added to the application. Extending Application instead solves the problem.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright © 2004-2014 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.