>Subject: What form functions are valid before FrmDrawForm? >From: "Chris Tutty" <[EMAIL PROTECTED]> >Date: Sat, 21 Oct 2000 19:00:01 +1300 >In order to prevent OS3.5 choking on my old form draw code I've >added a FrmDrawForm call before anything else. Of course this >creates some nasty redraw artifacts and I'd like to split the code I >inherited up into that which can validly be done before the form is >drawn and the post-draw logic. >Unfortunately I'm having some trouble finding any documentation on >when specific operations (such as object hiding, label modification, etc) >are valid. >There is an exchange about this in the archive which seems to terminate >at message: >http://www.egroups.com/message/palm-dev-forum/39894 >where our esteemed Mr Rollin has stated: >> That bus error is intentional. When there is no actively determined >> "draw window", Palm OS jams an invalid pointer into the variable >> that normally points to the draw window. Then, if anything tries to >> perform an operation on the draw window before re-establishing >> what that window is, it gets a bus error. >and Stringer has replied: >> Can you be specific as to what functions, when called before >> FrmDrawForm() on v3.5 debug ROMs, will return garbage, but >> when used on other ROMs would return a valid value. What functions >> specifically can't we use and what is the valid alternative? >Has someone got an answer to this or can point me in the direction of >the docs on the subject? >If it's down to trial and error I'd be willing to accumulate information >fragments from other people into a FAQ entry on this subject. >Chris Tutty In my (frustrating) experience you have very carefully read the documentation for each API call you might want to use before FrmDrawForm(). Some of the API functions are smart enough to know not to write to the screen, most are not. However, all those that I've checked out that aren't smart enough, do say or imply in the documentation that they always write to the screen. So my advise to CAREFULLY read up on any API call you might want to use there, before you use it. For example, if you want to change the font of a field, or enable or disable a button, you can't use the API's calls. You have to directly modify the controlling structure. Personally I don't like doing that, I'd much rather use an API call. Regards -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
