BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 06-19-2008, 04:09 AM   #1
mathewsgp
New Member
 
Join Date: Jun 2008
Model: 8310
PIN: N/A
Carrier: Test
Posts: 1
Default Accessing sms from added menu context

Please Login to Remove!

I have added the following menu item in the Messages list view as

amir.addMenuItem(ApplicationMenuItemRepository.MEN UITEM_MESSAGE_LIST,
new SampleMenuItem());

private static class SampleMenuItem extends ApplicationMenuItem {
SampleMenuItem() {
super(20);
}

public String toString() {
return "Print Message";
}

public Object run(Object context) {
Type c = (Type)context; //an error if this doesn't work
if ( c != null ) {
// new ContactsDemo().enterEventDispatcher();
} else {
throw new IllegalStateException( "Context is null, expected a Contact instance");
}
net.rim.device.api.ui.component.Dialog.alert("View ing an email message in the email view");
return null;
}
}
}

But i dont know how to access the sms contet of the selected message.
On debuging the context type isw shown as net.rim.device.cldc.io.sms.TextMessageImpl

but i am unable to type cast the context to net.rim.device.cldc.io.sms.TextMessageImpl

please help me
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 Apple 1 16 Pin IC Socket - NOS  picture

Vintage Apple 1 16 Pin IC Socket - NOS

$3.99



Vintage Apple Computer 4” Paper Cube Notepad Macintosh 80s 90s Office White picture

Vintage Apple Computer 4” Paper Cube Notepad Macintosh 80s 90s Office White

$39.95



Vintage Post-it Note Pad Apple Magnetic Holder Pince A Notes Unused 1988 NOS picture

Vintage Post-it Note Pad Apple Magnetic Holder Pince A Notes Unused 1988 NOS

$11.04



Vintage Apple Day Planner Zipper Mead Office Products New W/ Tags  picture

Vintage Apple Day Planner Zipper Mead Office Products New W/ Tags

$59.99



Lot of 6 Vintage Apple Drawstring Bags For iPhone, Mac, Apple Watch, iPod picture

Lot of 6 Vintage Apple Drawstring Bags For iPhone, Mac, Apple Watch, iPod

$45.00



VINTAGE COLLECTIBLE / IBM / APPLE / POWERPC / MICROPROCESSOR CHIP / 90X8941 (JO) picture

VINTAGE COLLECTIBLE / IBM / APPLE / POWERPC / MICROPROCESSOR CHIP / 90X8941 (JO)

$9.99







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