BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 11-12-2008, 11:42 AM   #1
Mikal Donini
Knows Where the Search Button Is
 
Join Date: Sep 2008
Model: 7100T
PIN: N/A
Carrier: none
Posts: 32
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,

Mikal Donini.
Offline  
Old 11-12-2008, 01:01 PM   #2
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
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
Mikal Donini
Knows Where the Search Button Is
 
Join Date: Sep 2008
Model: 7100T
PIN: N/A
Carrier: none
Posts: 32
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



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Vintage V-Mac Industries Inc. Pipe Threader Vosper Drophead Threader - READ picture

Vintage V-Mac Industries Inc. Pipe Threader Vosper Drophead Threader - READ

$199.00



Vintage Mac Warehouse  3.5” Floppy Disk Solar Powered Calculator Company Swag picture

Vintage Mac Warehouse 3.5” Floppy Disk Solar Powered Calculator Company Swag

$74.00



Vintage White APPLE IMAC EMC 1857 15

Vintage White APPLE IMAC EMC 1857 15" 20GB HDD Mac OSX 10.2 256MB RAM 500MHz

$85.00



MAC USA 18-6 XDM Six Points 18 MM Socket 3/8

MAC USA 18-6 XDM Six Points 18 MM Socket 3/8" Drive Used Vintage Excellent Condt

$14.99



Vintage MAC TOOLS 18MM Combination Wrench M18CW Metric 12 point **Made in USA** picture

Vintage MAC TOOLS 18MM Combination Wrench M18CW Metric 12 point **Made in USA**

$26.50



Vintage Mac Tools AW343 Series 1/2 Pneumatic Impact Driver  picture

Vintage Mac Tools AW343 Series 1/2 Pneumatic Impact Driver

$50.00







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