I just sat down to continue my development efforts after a pause before which I had committed some work to Subversion via Subclipse. I started Eclipse and the first thing I did was to run the simulator, just to get caught up and remind myself where I'd left off, running it through the exact same sequence (supposedly) as when I left off before Christmas. This time when I ran it, though, I started having two very odd problems, one of which is extremely annoying and the other of which is a development show-stopper:
The simulator keeps spontaneously starting without me telling it to debug or run, the only necessary condition apparently is having Eclipse open and the edit window on my desktop. If it is minimized in the task bar, this doesn't seem to happen. It may start two or three instantiations of the simulator, and it is not "connected" with Eclipse in the debug sense (i. e., the little squiggly doohickey marked "Disconnect" in Debug Perspective is grayed out and no startup messages appear in the console window). I have to start the task manager and kill whatever fledge and BbDevMgr processes are running to get rid of these extraneous, out-of-nowhere simulator startups.
OK, that's annoying, but the show-stopper is this code snippet:
Code:
public boolean getFromUser()
{
System.out.println("NativeContact::getFromUser() trying...");
try
{
// Should we do this in RoloContact, since that's where we're trying to isolate native code?
System.out.println("NativeContact::getFromUser() calling choose()...");
PIMItem pim_con= ((BlackBerryContactList)PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE)).choose();
System.out.println("NativeContact::getFromUser() returned");
if(pim_con instanceof Contact)
{
System.out.println("NativeContact::getFromUser got instanceof Contact; pim_con= " + pim_con.toString());
contact= (BlackBerryContact) pim_con;
System.out.println("NativeContact::returning");
return true;
}
}
catch (PIMException e)
{
// TODO Auto-generated catch block
System.out.println("NativeContact::getFromUser: " + e.toString());
e.printStackTrace();
return false;
}
return false;
} Except for the one in the catch clause, all the System.out.println's have been added since I've been fooling with this. The last time I ran this before Christmas it worked fine. When this function returned, I just popped up a dialog in the calling program that said "OK, here we are", waited for a click on the "OK" button, and exited. Now, when it executes the line with choose() in it, the Blackberry screen comes up just as expected. I can add or edit a contact, but it just hangs within the contact-choose screen; i. e., it won't just select and return to my program, but the contact app appears to continue to function.
These seem like two unrelated problems, and I debated two separate posts, but they "all of a sudden" started happening at exactly the same time, and I am just not that much of a believer in coincidence (having said that, I'm certainly open to other opinions).
Some additional information: I've tried to do a software update, and was informed that all the software was up-to-date; I've "cleaned" the simulator (as in "Project->Blackberry->Clean Simulator"), whatever that means, and also did a clean on the project, which in most cases seems to have magical restorative properties, but not this time. Also, the behavior is the same in the 8300 and the 8830 simulators. I'm developing on OS version 4.5.
And, yes, I do know that in the computer world things don't just "all of a sudden" happen, but I can't think of anything I did over the past month that could have caused this. The last major mod I made to the IDE was to add the Subversion Subclipse plugin, but I used the system for at least a couple of weeks and, except for the incredibly touchy, delicate nature of Subversion CM (more the subject of a rant than a forum post;-), there seemed to be no problems. I am going to backtrack that and continue to play around with this, but I'm hoping that in the meantime someone may have some insight.
TIA...
Allen