BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 01-24-2012, 06:33 AM   #1
taraspaliy
New Member
 
Join Date: Dec 2011
Model: 9105
PIN: N/A
Carrier: null
Posts: 13
Default ObjectGroupReadOnlyException

Please Login to Remove!

Hi All,
when I'm trying to pick specific smartCard from the list, i get this exception:

Code:
SmartCard[] allSmartCards = SmartCardFactory.getSmartCards();
SmartCard mySmartCard = null;
for (int i = 0; i < allSmartCards.length; i++) {
if("smartCardName".equals(allSmartCards[i].getLabel())
       mySmartCard = allSmartCards[i]; //Here I get this exception
}
using
SmartCard mySmartCard = ObjectGroup.expandGroup(allSmartCards[i]);
doesn't help=(

Please help me, thanks in advance

Last edited by taraspaliy; 01-24-2012 at 06:35 AM.. Reason: spelling
Offline  
Old 01-24-2012, 05:00 PM   #2
hrbuckley
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Default Re: ObjectGroupReadOnlyException

Its going to be a while till I can look at my code for ObjectGroups, but since no one else has weighed in...

IIRC to do what you want you have to ungroup the whole allSmartCards array, then pull out the one you want. Don't forget to group it up again.
__________________
My other Blackberry is a PlayBook.
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


TruBind TB-S20A Coil Binding Machine W/ Electric Coil- UNTESTED (No Power Cord) picture

TruBind TB-S20A Coil Binding Machine W/ Electric Coil- UNTESTED (No Power Cord)

$115.00



Ignition Coil for Ford Tractor 12V 2000 3000 4000 5000 Naa600 800 1965 & Up D5TE picture

Ignition Coil for Ford Tractor 12V 2000 3000 4000 5000 Naa600 800 1965 & Up D5TE

$26.38



Utility Aluminum Trim Coil 24

Utility Aluminum Trim Coil 24" x 40-45 FT Long with Minor Scratches and Dents

$84.95



Eaton AN16GNY11AB Enhanced Coil Starter, Size 2, 45A, 120V Coil, 65MM, 3-Pole picture

Eaton AN16GNY11AB Enhanced Coil Starter, Size 2, 45A, 120V Coil, 65MM, 3-Pole

$349.00



D4PE12029AA 6 Volt Ignition Coil Fits Ford/New Holland Tractor 600 700 800 picture

D4PE12029AA 6 Volt Ignition Coil Fits Ford/New Holland Tractor 600 700 800

$26.44



Dual Purpose Manual Coil Counting Winding Machine Coiler Count Range 0-99999 NEW picture

Dual Purpose Manual Coil Counting Winding Machine Coiler Count Range 0-99999 NEW

$39.05







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