I have text field, when I type anything and press space bar the field become empty. If I press up arrow then it should display the last command (like linux terminal) , If I press down arrow also display the nex command . How I do this

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

I think expected behavior is same of messages box.But what do you mean by "the last" or "the next" command?
Code: Select all
on keyDown tkey
   put tKey after me
   set the lastText of me to me
   if tkey is space then put "" into me
end keyDown
on rawKeyDown tKey
   if tKey = 65362 then set the text of me to the lastText of me
   select after text of me
   pass rawKeyDown
end rawKeyDownI do not understand what you want.suppose I want see the all entered word in field then, how I change this code
Code: Select all
on keyDown tkey
   put tKey after me
   set the lastText of me to the lastText of me & tKey
   if tkey is space then put "" into me
end keyDown
on rawKeyDown tKey
   if tKey = 65362 then set the text of me to the lastText of me
   select after last char of me
 pass rawKeyDown
end rawKeyDownCode: Select all
on keyDown tkey
      put tKey after me
      if tkey is space then
       set the lastText of me to me & return & the lastText of me
      put "" into me
   end if
   put the lastText of me into fld 2
end keyDown
on rawKeyDown tKey
   if tKey = 65362 then 
   --your homework here
 pass rawKeyDown
end rawKeyDown