better code than ' if it is in btn "Kat2" then '

Reinhold Venzl-Schubert r.venzl-schubert at t-online.de
Thu Sep 29 03:20:31 CDT 2005


Hi!

I am looking for a better script line than:
if it is in btn "Kat2" then
because:

I create a script for a popup-button with the possibility to fill in  
a new menu-line.
For to avoid a duplicate I wrote:

on menuPick which
   if which = "new subject" then
     ask "Please fill out a new subject!"
     if it is empty then
       exit menupick
     else
       if it is in btn "Kat2" then
         exit menupick
       else
         repeat with i = 1 to 2
           delete word-1 of btn "Kat2"
         end repeat
         put CR & it after btn "Kat2"
         sort btn "Kat2"
         put CR & "new subject" after btn "Kat2"
       end if
     end if
   end if
end menuPick

When now I fill in for example the new subject "Fossilien"
mc don't add "Fossilien" to the menulist because
there is already the subject "Spurfossilien" and "Fossilien" is a  
part of it

This is my Button (Menu) Content:

Brachiopoden
Gesteine
Korallen
Molusken
Schwaemme
Spurfossilien
Trilobiten
new subject


What code will resolve my problem?

Thanks
Reinhold

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.runrev.com/pipermail/metacard/attachments/20050929/b47c23e2/attachment.html


More information about the metacard mailing list