• 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
Changes with El Capitan?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes with El Capitan?


  • Subject: Changes with El Capitan?
  • From: Chris Swain <email@hidden>
  • Date: Tue, 13 Oct 2015 17:05:27 +0100

I’ve used the following code for many years to input a file path into a text box

--Getting input file Using a dialog box
on showModalPanelinput_(sender)
set thePanel to current application's NSOpenPanel's openPanel()
tell thePanel
setMessage_("Choose the input file:")
setExtensionHidden_(true)
setShowsHiddenFiles_(false)
setTreatsFilePackagesAsDirectories_(false)
setCanChooseFiles_(true)
setCanChooseDirectories_(false)
setAllowsMultipleSelection_(false)
setResolvesAliases_(true)
--setAllowedFileTypes_(false) -- set types to allow selection of
set theResult to runModal() -- open, and wait here until it's finished
end tell
if theResult = current application's NSFileHandlingPanelOKButton then
set theURLs to (thePanel's |URLs|()) as list
repeat with aURL in theURLs
--log aURL's |path|()
set my input_file to aURL's |path|()
end repeat
else
-- cancel button
--log "Cancel pressed"
end if
end showModalPanelinput_

Now I get this error

 *** -[iBabelAppDelegate showModalPanelinput:]: item 1 of {file "Macintosh HD:Users:chrisswain:Desktop:Sample Files:caffeine.mol"} doesn’t understand the “path” message. (error -1708)

and the text box is not populated.

Cheers

Chris
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • [ALERT:Possible Phishing] Re: Changes with El Capitan?
      • From: Shane Stanley <email@hidden>
    • Re: Changes with El Capitan?
      • From: Robert DuToit <email@hidden>
  • Prev by Date: Re: How to play consecutive sounds?
  • Next by Date: Re: Changes with El Capitan?
  • Previous by thread: Re: How to play consecutive sounds?
  • Next by thread: Re: Changes with El Capitan?
  • Index(es):
    • Date
    • Thread