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

Dayton 6X543 Operating Coil 120 VAC w/ Junction Box Solenoid Valve W9329 314CB
$19.99
Dayton 6X543 Operating Coil 120 VAC w/ Junction Box Solenoid Valve W9329 314CB pictureViqua Solenoid emergency Automatic Water shut-off valve kit for Trojan UV system
$211.99
Viqua Solenoid emergency Automatic Water shut-off valve kit for Trojan UV system pictureHot -SG 1/2" Brass Electric Solenoid Valve 110V AC Water Air Normally Closed N/C
$21.96
Hot -SG 1/2Deltrol fluid products 24v AC solenoid coils (2)
$65.0
Deltrol fluid products 24v AC solenoid coils (2) pictureMAC 250B-111CAAA Solenoid Valve 57C-63-116AA 250B111CAAA 57C63116AA (TSC)
$39.99
MAC 250B-111CAAA Solenoid Valve 57C-63-116AA 250B111CAAA 57C63116AA (TSC) picture






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