• 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: setting preselected file for nsopenpanel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setting preselected file for nsopenpanel


  • Subject: Re: setting preselected file for nsopenpanel
  • From: "Rick C." <email@hidden>
  • Date: Tue, 12 Jun 2012 07:31:09 +0800

Ok with this unfortunately what happens is the actual file is treated as a directory and it appears in the dropdown bar at the top.  So if I pass ~/Downloads/test.pdf for setDirectoryURL: it thinks test.pdf is a directory and wants me to choose a file from the test.pdf directory.  Any other ideas? :-)

rc



On Jun 12, 2012, at 5:11 AM, Corbin Dunn wrote:

> This is a known limitation, as Lee Ann Rucker reported in the prior message.
>
> One work around is to use setDirectoryURL: and pass it the actual file (not the folder). I believe that will pre-select it (sort of by accident).
>
> corbin
>
> On Jun 11, 2012, at 4:08 AM, Rick C. <email@hidden> wrote:
>
>> Hi,
>>
>> Been through numerous posts on stack overflow without a solution so here goes:
>>
>> runModalForDirectory:file:types: was deprecated but in the docs it doesn't give the replacement for the file argument.  How can we have a file preselected when running an open panel?
>>
>> Thanks,
>>
>> rc
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >setting preselected file for nsopenpanel (From: "Rick C." <email@hidden>)
 >Re: setting preselected file for nsopenpanel (From: Corbin Dunn <email@hidden>)

  • Prev by Date: Re: setting preselected file for nsopenpanel
  • Next by Date: Re: TextField not updated in a sheet for document-based Cocoa app
  • Previous by thread: Re: setting preselected file for nsopenpanel
  • Next by thread: TextField not updated in a sheet for document-based Cocoa app
  • Index(es):
    • Date
    • Thread