On Wed, 14 Jul 1999, Stuart Norton wrote:
> I searched through, and the only reference to 'handle' is the verb sense.
> There are no 'handles' as in nouns anywhere! Also, something is going wrong
> on exit, and it crashes 50% of the time.

  :>
 
> I may have found it though. I'm assigning memory for a temporary CharPtr.
> Here's the line:
> CharPtr disptext=MemPtrNew(sizeof(newtext));
> I'm then pointing the field to disptext, copying newtext to disptext using
> StrCopy, and updating the field. I'm hoping this procedure would work for
> writing to the display but it doesn't. Firstly, is using "sizeof(newtext)"
> acutally assigning enough memory, and secondly why doesn't it work? I read
> somewhere that you don't need to use a text handle for read only fields, but
> can just use FldSetTextPtr() as I am doing.

  if you take a look at the documentation, MemPtrNew says it allocates
  a chunk of NON MOVABLE memory. this term is vague.. but maybe this
  is your problem?

  i had the same problem earlier with this.. and i believe that GUI
  code is possibly "moving" it? (as i said, it is very vague what 
  this means)..

  what are you assigning to that pointer? are you moving data from
  a database field into the field? or are you just copying a constant
  string?

> Aaron: Thanks for the code. I'll try it if no-one writes back with a Ptr
> solution.

  i believe the "handle" process is the way to do it in the most
  stable manner.. i could not get the pointer (MemPtrNew) working
  either.. 

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