// a PIMListListener.
final PIM p = PIM.getInstance();
try {
final BlackBerryPIMList memoList =
(BlackBerryPIMList) p.openPIMList(
BlackBerryPIM.MEMO_LIST, PIM.READ_WRITE);
memoList.addListener(new MemoListListener());
} catch (final PIMException e) {
// Can't add listener
errorDialog("PIM#openPIMList() threw " + e.toString());