Works in IDE but not Application?

Glen Bojsza gbojsza at gmail.com
Thu Mar 15 12:49:31 EDT 2012


I have a frustrating problem...

In my application I allow a user to add a text field which they can resize,
move and delete.

In the IDE (OS X) everything works as it should.

In the application the popmenu shows but it does not delete the field when
chosen?

Also, I have the following scripts in the card to avoid having the user
being left with the pointer tool if the have the field selected and push
the delete key. Again, this works fine in the IDE but not the application?

Can anybody see why it can work in the the IDE but not in the application?

thanks,

Glen

The field script is:

global tbToDelete
on mouseDown tKey
   if tKey is 3 then

      if the shiftkey is down then
         get the selected of target
         switch it
            case "true"
               set the selected of the target to false
               set the tool to browse
               select empty
               focus on fld "myGarbage"
               break
            case "false"
               set the selected of the target to true
               set the tool to pointer
               break
         end switch
      end if


      if the ctrlkey is down then
         set the t2d of btn text2delete to the ID of the target
         buildtextBoxMenu
         popUp button "Text Menu"
      else
         pass mouseDown
      end if
   else
      pass mouseDown
   end if
   pass mouseDown
end mouseDown

on mouseLeave
   set the selected of the target to false
   set the tool to browse
   focus on fld "myGarbage"
end mouseLeave


Card Script:

on backspacekey
   set the selected of the target to false
   set the tool to  browse
end backspacekey

on deletekey
   set the selected of the target to false
   set the tool to  browse
end deletekey



More information about the use-livecode mailing list