Howdy.

I'm in CurrentFORM and I want to get the text from a list (MyOtherFORMList)
in MyOtherFORM.  MyOtherFORM isn't loaded so I've got to 

- load the form, 
- get a pointer to the list, 
- get a pointer to the listtext, 
- copy the text, 
- unload the form

At least, that's what I *think* I should be doing. ;-)

I'm using: 

static void DisplayListItem( void )
{
    FormPtr frm;

    char pListStr[ MAX_TZ_LENGTH ];

    Int len;

    // Find the OTHER form

/**** PROBLEM HERE ****/
    frm = FrmInitForm( MyOtherFORMForm );

    // Copy the list text from the selection wSelect
    StrCopy(    pListStr, LstGetSelectionText( FrmGetObjectPtr( frm,
FrmGetObjectIndex( frm, MyOtherFORMList ) ), wSelect ) );

    //     We're done with the OTHER form...delete it.
    FrmDeleteForm( frm );

    //Draw the text.
    len = StrLen(pListStr);

    WinDrawChars( pListStr, len, 4, 93 );
}

wSelect is a global.

The FrmInitForm() failed in the high gremlins (~950K).  

Given that I'm loading a form that isn't active, should I be allocating
memory to hold MyOtherFORM explicitly while I'm examining the contents of
the list?  If so, how (MemPtrNew?) ?  Examples?  Suggestions?

Cheers,
--
Andrew Ball
[EMAIL PROTECTED]

Reply via email to