• 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
NSOpenPanel trouble with leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOpenPanel trouble with leopard


  • Subject: NSOpenPanel trouble with leopard
  • From: Adrien Mondot <email@hidden>
  • Date: Mon, 3 Dec 2007 11:01:33 +0100

Hello,

I'm getting some trouble to make my cocoa app work with leopard : I converted it to Objective C 2.0, it compiles fine, great. However one critical part don't work as expected at runtime : it's impossible to make appear any open file dialog.
I changed my code to use one of the leopard samples, so it's very simple :



- (IBAction) loadConduite:(id)sender { NSLog(@"load conduite"); NSString *conduiteFilename;

	NSArray *fileTypes = [NSArray arrayWithObjects:@"xml", nil];

        NSOpenPanel *oPanel = [NSOpenPanel openPanel];

	NSLog(@"after openPanel");

    int result = [oPanel runModalForTypes:fileTypes];

    if (result == NSOKButton) {
		conduiteFilename = [oPanel filename];
		NSLog(@"load conduite2b");

		//[renderWindow setLevel:2];
		[self loadConduiteAtPath:conduiteFilename];
		conduiteFilePath = conduiteFilename;
		[conduiteFilePath retain];
		NSLog(@"load conduite3");
	}
	else return;
	NSLog(@"load conduite4");
}

at runtime the line after NSOpenPanel *oPanel = [NSOpenPanel openPanel]; is never executed and the program continue normally, like if the thread for opening just stoped.

Another simple program wih the same code is working properly.

Does someone as any clue or idea of where the problem is ?

Thanks
Adrien
_________________
www.adrienm.net/emotion/


_______________________________________________

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


  • Follow-Ups:
    • Re: NSOpenPanel trouble with leopard
      • From: John Stiles <email@hidden>
  • Prev by Date: Re: Javascript to Objective-C
  • Next by Date: One window, multiple nibs?
  • Previous by thread: Re: CoreAnimation scene becomes blurry after scrolling NSScrollLayer?
  • Next by thread: Re: NSOpenPanel trouble with leopard
  • Index(es):
    • Date
    • Thread