assuming handle is allocated successfully, that looks right. are you sure erro is not form elsewhere? ---- Best Regards, Dmitry Grinberg (847) 226 9295
On Wed, Apr 8, 2009 at 1:34 PM, Ryan Rix <[email protected]> wrote: > D, > I assigned a handle that's large enough for the text, but only contains a > single NULL character at application launch. > > at the top of mainFormInit(): > [snip] > MemHandle fld = MemHandleNew(128); > char* fldT = MemHandleLock(fld); > (*fldT)=0; > MemHandleUnlock(fld) > FldSetTextHandle(getObjectPointer(pForm, mainField), fld); > [/snip] > > Ryan > > On Wed, Apr 8, 2009 at 11:22 AM, Dmitry Grinberg <[email protected]> wrote: >> >> do you assign any text to the field before this? Do you do it using a >> handle? [or incorrectly using a pointer] >> ---- >> Best Regards, >> Dmitry Grinberg >> (847) 226 9295 >> >> >> >> On Wed, Apr 8, 2009 at 9:53 AM, Ryan Rix <[email protected]> wrote: >> > Hi, >> > >> > An application I am developing consists simply of a Field in which a >> > user is >> > able to launch applications and do various other things. >> > >> > Due to the dynamic nature of the field I have encountered some issues >> > with >> > SysHandleEvent fighting with my field handling code and as a result I >> > have >> > set up my application to call SysHandleEvent AFTER my application does >> > its >> > field handling. To make sure that everything works okay, and to make >> > sure >> > that the field is updated before the mainFormHandler kicks in, I call >> > FldHandleEvent( fieldP, &event ); at the top of my keyDownEvent handler. >> > This works, for the most part, much more reliably than having >> > SysHandleEvent >> > at the top of my event handling. I am able to enter 10 characters into >> > my >> > field, counting backspaces, until my application dies with a >> > MemoryManager.c >> > "Chunk under locked" crash. >> > >> > Does anyone know why this happens or how to get around it? I am not able >> > to >> > use SysHandleEvent before my keyDownEvent handler due to stability >> > issues, >> > for whatever reason. >> > >> > Ryan >> > >> > -- >> > Thanks and best regards, >> > Ryan Rix >> > TamsPalm - The PalmOS Blog >> > (623)-239-1103 <-- Grand Central, baby! >> > >> > Jasmine Bowden - Class of 2009, Marc Rasmussen - Class of 2008, Erica >> > Sheffey - Class of 2009, Rest in peace. >> > >> > -- >> > For information on using the ACCESS Developer Forums, or to unsubscribe, >> > please see http://www.access-company.com/developers/forums/ >> >> -- >> For information on using the ACCESS Developer Forums, or to unsubscribe, >> please see http://www.access-company.com/developers/forums/ > > > > -- > Thanks and best regards, > Ryan Rix > TamsPalm - The PalmOS Blog > (623)-239-1103 <-- Grand Central, baby! > > Jasmine Bowden - Class of 2009, Marc Rasmussen - Class of 2008, Erica > Sheffey - Class of 2009, Rest in peace. > > -- > For information on using the ACCESS Developer Forums, or to unsubscribe, > please see http://www.access-company.com/developers/forums/ -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
