> Sergio,
> 
> Can you explain what a NULL handle is, and what it would relate to in my
> program. All I'm doing at the moment is using API Serial Functions, Field
> writing using FldSetTextPtr (which doesn't work - ???), and that's about it.
> By the way, do I have to use MemPtrFree at the end of the functions?

  NULL handle = the handle has a value of NULL (ie: not pointing
  anywhere).
 
> ps. If you can tell me about how to write to fields I'd be grateful. Read
> only BTW.

  here is an excerp of code i use:

---
VoidHand codeH;
CharPtr  codeStr;

FieldPtr codeCtl;

// set the codeCtl as per normal (FrmGetObjectPtr)

codeH    = MemHandleNew( {the size you want });
codeStr = MemHandleLock(codeH);
// do something with codeStr
MemHandleUnlock(codeH);

FldSetTextHandle(codeCtl, (Handle)codeH);

// do something with the dialog

buttonHit = FrmDoDialog(myForm);

FldSetTextHandle(userNameCtl, NULL);
---

  this is basically what the example code does for HardBall 
  and others provided in the SDK

  refer to the example code for more explanations.. 

  you basically have to get access to a chunk of memory,
  then lock it.. do something with it.. then unlock it.
  
  thats the rule.

  cheers.

az. 
--
Aaron Ardiri 
Lecturer                       http://www.hig.se/~ardiri/
University-College i G�vle     mailto:[EMAIL PROTECTED]
SE 801 76 G�vle SWEDEN       
Tel: +46 26 64 87 38           Fax: +46 26 64 87 88
Mob: +46 70 352 8192           A/H: +46 26 10 16 11

Reply via email to