• 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
how do get contentView of a NSOpenPanel and run it inside another window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how do get contentView of a NSOpenPanel and run it inside another window?


  • Subject: how do get contentView of a NSOpenPanel and run it inside another window?
  • From: "Alan Smith" <email@hidden>
  • Date: Tue, 27 Jun 2006 11:38:01 -0400

Hi everyone,
I'm trying to place a NSOpenPanel inside a custom view. This will
enable me to put it in a tab. Don't ask why I want to do this. Let's
just say, I'm trying to reuse the NSOpenPanel instead of making my
own. Here is my code:

- (void)awakeFromNib
{
   panel = [NSOpenPanel openPanel];

   [view addSubview: [panel contentView]];
}

Very simple and it works quite well. Except I have no control over the
panel. I'd never know when the Okay button gets pressed. The standard
way to use a NSOpenPanel is to use one of the 'runModalForDirectory…'
or 'beginForDirectory…' but I don't want it to appear on screen other
than  in my view. I have found that one has to call one of those to
get the panel to run. So, either I figure out how those methods work
or I find a way to run it other than with those methods.

How do I run a NSOpenPanel without using those methods?

Thanks, Alan

--
// Quotes from yours truly -------------------------
"You don't forget, you just don't remember."
"Maturity resides in the mind."
"Silence is the Universe's greatest gift."
"Don't waste your life doing things others have already done."
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Full screen tiny issue
  • Next by Date: Re: Simplest Dongle Method? Making a file uncopyable on CD?
  • Previous by thread: Re: Making NSTableView Cells Selectable, But Not Editable
  • Next by thread: Using return and goto statements in exception handler
  • Index(es):
    • Date
    • Thread