Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!kth.se!cyklop.nada.kth.se!news From: d88-jwa@aswad.nada.kth.se (Jon W{tte) Newsgroups: comp.sys.mac.programmer Subject: Re: Linked Lists: Handles or Pointers? Message-ID: <1991Jan24.145729.12853@nada.kth.se> Date: 24 Jan 91 14:57:29 GMT References: <1991Jan23.002212.7648@umiami.ir.miami.edu> <.664719435@rw8.urc.tue.nl> Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 29 In article <.664719435@rw8.urc.tue.nl> rcbaab@urc.tue.nl writes: >>I'm no expert on the subject, but here's my response: >It's not that difficult to do but please do not use calls like MoveHHi() and >HLock() and HUnlock(). They have given me lot's of problems and so I don't >use them anymore... Remind me not to use your programs... If you use a dereferenced handle (like, pass it to the ToolBox) you'll have to lock it. If you lock a handle, it's nice to do it at the top of the heap. Thus: char state ; state = HGetState ( handle ) ; MoveHHi ( handle ) ; HLock ( handle ) ; DoSomething ( * handle ) ; HSetState ( handle , state ) ; This is the recommended way of doing it. h+ Jon W{tte, Stockholm, Sweden, h+@nada.kth.se :: This article is fake. If you take it for real, the _REAL_ :: Jon W{tte will sue you for slander. So there ! Nyah ! :-)