I'm stumped on this, hoping someone can help... I have a form, the main item on the form is a list. From this form, you can tap a button, that brings up a modal dialog to let you create a new item for the list. That all works fine.
After the new item is created, I append it to the list and call LstSetSelection so that it is highlighted and the list scrolls to make it visible (although in OS 3.1, the list doesn't scroll, is this a known bug? But that's a side issue...). After the modal dialog is dismissed, the form gets an update event, and I dutifully call FrmDrawForm. Really I do. Here's where the fun starts: I also have a key handling function in my event handler, so the user can use the hard scroll buttons to move the list selection up and down (it calls LstSetSelection to do the work). If, immediately after creating a new item, I try to use the scroll buttons, the debug ROMs report the "calling a draw function without a valid draw context" error. But I have just called FrmDrawForm in the update handler! So I simply don't understand how I could have lost the draw context in the meantime. If I tap on the list first, everything is fine. Does anyone have any clues how this can happen? The error shows up on OS 3.5 and up, not on earlier OSes. As I said, I'm currently stumped, though still tracing through trying to figure it out. Any suggestions would be appreciated. Dave Johnson -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
