• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: conditional error - my late night solution
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: conditional error - my late night solution


  • Subject: Re: conditional error - my late night solution
  • From: monk <email@hidden>
  • Date: Sun, 22 Jul 2001 13:22:57 -0400

-- 7/22/01 04:50 am: email@hidden said:

> when i run this, the first 'if' compiles fine, but the second and third give
> me an error that 'can't make some data into expected type'
> --
>
> if button returned of (display dialog "process by:" buttons {"word", "line",
> "paragraph"} default button "word") is "word" then
>
> set _listsource to (read _source as text using delimiter {return,
> space})
>
> else if button returned is "line" then
>
> set _listsource to (read _source as text using delimiter {return})
>
> else
>
> set _listsource to (read _source as text using delimiter {space})
>
> end if
>
> --
>
> any ideas on why this is failing?
>
this seemed to work too:

if button returned of (display dialog "process by:" buttons {"word",
"line", "paragraph"} default button "word") is "word" then

set _listsource to (read _source as list using delimiter {return,
space})

else if result is "line" then

set _listsource to (read _source as list using delimiter {return})

else

set _listsource to (read _source as list using delimiter {space})

end if

h 'monk' elmer
--
http://www.assemblage.org
[ _ o
o o _ -- - - -- > s y m p h o n i c j a m s ]


References: 
 >conditional error (From: monk <email@hidden>)

  • Prev by Date: Re: Incrementing digits in a file name (was: writing multiple files)
  • Next by Date: Re: Incrementing digits in a file name (was: writing multiple files)
  • Previous by thread: Re: conditional error
  • Next by thread: Re: conditional error
  • Index(es):
    • Date
    • Thread