Probably something like this would work.

on mouseUp
  put the buttonList of current card into tButtons
  put the short name of last btn into tTargetButton
  put lineoffset(tTargetButton,tButtons) into tOffset -- get the matching
line number in tButtons
  if tOffset > 0 then -- if there was a match...
     delete line tOffset of tButtons -- remove the button name from the list
     delete button tTargetButton -- delete the butotn
     answer tTargetButton & "Button has been deleted."
     set the buttonlist of the current card to tButtons -- set the property
to the adjusted tbuttons
     end if
end mouseUp

On Tue, May 29, 2012 at 8:14 PM, JOHN PATTEN <johnpat...@me.com> wrote:

> Hi All…
>
> I have a script that is storing objects via their name in a custom
> property of the card. I'm trying to delete one of the objects by checking
> if the object name is 'among' the 'list' of items. This works fine. However
> I can delete the name of the object from the list of objects in the custom
> property?
>
> Here's essentially what I'm trying to do:
>
> on mouseUp
>   put the buttonList of current card into tButtons
>   put the short name of last btn into tTargetButton
>   if  tTargetButton  is among the lines of tBullets then
>      delete the foundline of tButtons
>      answer tTargetButton & "Button has been deleted."
>      end if
> end mouseUp
>
> How can I delete the name of an object listed in the custom property?
>
> Thank you!
>
> John Patten
> SUSD
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to