[comp.sys.mac.programmer] FKEYs and Think C3

erik@tvcent.uucp (Eirk Peterson) (05/25/90)

I have written an FKEY using Think C3.? but it seems to be givving me trouble.

Basically this is the story:

I open the modem port
set the settings
loop
	check for a mouse down
		if there, 
			close the serial port
			flush any events that have accumulated
			return
	check the serial buffer
		if char is there, add it to an array
		is it \013?
			if so end the loop
end loop
loop until all chars in the array have been processed
	post a keydown event for the array member
end loop
close the modem port

The problem is that the system bombs when I click the mouse to abort the
FKEY.

Does anyone know how to write an FKEY??  If so, could you tell me what I'm
missing??  I beleive TN#3 has something to say on this.  Does anyone have it?

PS. I am not using constants or globals.

Erik Petersen
epeterse@cvsinc.uucp