le 2001/09/09 10:16, Alain Pastor à apastor@... a écrit : > jonathan wrote: >> >> le 2001/09/08 19:55, Alain Pastor à apastor@... a écrit : >> >>> DrawText may move memory, perhaps you should try to lock the handle >>> before calling it and see what happens. >> >> did that, too. i even drop into macsbug before the call, check that the text >> is there, and drop in again after [it has printed trash] and it's still >> there. and as i said, it works the first time, but not subsequent. >> >> i persist, something is getting scrambled. >> > Did you take into account that the pen is not moved? yes. i said, i changed for drawstring and stringwidth, with exactly the same routines and it works. > Sorry for this third contribution, but I reread your original post > and you wrote: > > this doesn't [work]: > myH = theHandle > drawtext( [myH] +start,start,25) > start =start +25 > drawtext( [myH] +start,start,25) > > I'm not sure of your intent here, but the second call adds an offset > to the starting address, plus another one of the same amount in the > second parameter: > > Shouldn't this be?: > > start = start + 25 > drawtext( [myH] +start,0,25) > or > drawtext( [myH],start,25) > -- i didn't have the code in front of me. all i wanted to say was: - when i used a new handle and recalled the routines, all worked ok - when i offset the same handle and called the routine again, it didn't. i checked in macsbug before and after and all was in place; yes i offset the pen [each offset is a new line], i used the exact same routines with drawstring and stringwidth and they work. this means that my lines are limited to 255 chars. it is not the end of the world. i just wanted to engage a discussion on this point as it seems to be a particularity of the toolbox, and i didn't want some else to waste time. perhaps one of the other old grey beards can find out what happened. i suspect, that is why i included it, the comment in thinkref was pointing in that direction. :-j :-j