BlackBerryForums.com : Your Number One BlackBerry Community      

»Sponsored Links




Reply
 
LinkBack Thread Tools
  (#1 (permalink)) Old
mathewsgp Offline
New Member
 
Posts: 1
Join Date: Jun 2008
Model: 8310
PIN: N/A
Carrier: Test
Default Accessing sms from added menu context - 06-19-2008, 05:09 AM

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
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!

Reply


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-2008 BlackBerryNews.com, BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.1