R
Raffi
Hi Folks,
I have the Class below for deleting all record stores for a MIDLet.
It works fine with the SUN wireless toolkit as well as the IBM J9 VM,
but throws an application error on a Motorola V551 phone. If I replace
"names.length" with the actual count of the record stores, it works
fine. Am I doing something wrong? If not and this is a limitation of
the VM the phone uses, are there other ways to get the array length
besides "names.length"?
Thanks,
Raffi
Code-----------------------------------------------------------------------
public void deleteAllRMS()
{
names = RecordStore.listRecordStores();
int count = names.length;
for (int i = 0; i < count; ++i)
{
try
{
RecordStore.deleteRecordStore(names);
}
catch (Exception e)
{
System.out.println("Error - " + e);
}
}
}
-------------------------------------------------------------------------------
I have the Class below for deleting all record stores for a MIDLet.
It works fine with the SUN wireless toolkit as well as the IBM J9 VM,
but throws an application error on a Motorola V551 phone. If I replace
"names.length" with the actual count of the record stores, it works
fine. Am I doing something wrong? If not and this is a limitation of
the VM the phone uses, are there other ways to get the array length
besides "names.length"?
Thanks,
Raffi
Code-----------------------------------------------------------------------
public void deleteAllRMS()
{
names = RecordStore.listRecordStores();
int count = names.length;
for (int i = 0; i < count; ++i)
{
try
{
RecordStore.deleteRecordStore(names);
}
catch (Exception e)
{
System.out.println("Error - " + e);
}
}
}
-------------------------------------------------------------------------------