• 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: Open Window from Input Manager
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open Window from Input Manager


  • Subject: Re: Open Window from Input Manager
  • From: Kevin Gessner <email@hidden>
  • Date: Wed, 29 Oct 2008 10:32:49 -0400

Is your spelling right? The method is "loadNibNamed:owner:"; your email says "loadNibName:owner:". AppKit should be included in your average cocoa program. Also note that it's a class method, not an instance method. Not sure what else would be causing it.

-- Kevin

Kevin Gessner
http://www.kevingessner.com
email@hidden




On Oct 29, 2008, at 10:25 AM, Daniel wrote:

Hi Kevin,

this seems to be right method, but I don't know how to use the
NSBundle with the AppKit additions ... and therefore I get the
"selector not recognized" error while using the loadNibName:owner:
method.

Best regards and thanks,
Daniel

On Wed, Oct 29, 2008 at 3:06 PM, Kevin Gessner <email@hidden> wrote:
Would loadNibNamed:owner: in the NSBundle Additions work?
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSBundle_AppKitAdditions/Reference/Reference.html#/ /apple_ref/doc/uid/20000401-CJBHHDFC


Pass in an object in your bundle as owner, and it should look in your bundle
for the window. Then you can treat the window (and other NIB objects) as any
other, through outlets.


HTH,
-- Kevin

Kevin Gessner
http://www.kevingessner.com
email@hidden




On Oct 29, 2008, at 9:29 AM, Daniel wrote:

Hi,

thank you for your reply.

Does this mean that I'm trying to loading a NIB file from the bundle
of the running application (in which the input manager has been
loaded)?

NSBundle *bundle = [NSBundle bundleWithIdentifier: @"org.x616c.LMC"];

I've found out how to find the right bundle, but I'm still stuck in
trying to load a window from a NIB file inside my bundle ... can
someone help me?

Best regards,
Daniel

On Wed, Oct 29, 2008 at 4:49 AM, <cocoa-dev- email@hidden>
wrote:

Hi,

I'm working on a project for inserting special characters in text
fields in all Cocoa apps by means of an Input Manager.

After a given trigger/shortcut I have the need to open a window/ panel,
but I don't get it.


I've tried to load a NIB file, but the Console reported

-[NSWindowController loadWindow]: failed to load window nib file
'Chooser'

Is there another way to do it right? I've basically the need to open a
panel/window, change the keyboard focus from the textfield to the
opened panel and then continue by closing the panel.

Hard to say if there's another way to do it when we don't know how you're doing it now.

At a guess, you're telling Cocoa to look for "Chooser" in the main
bundle, but you are not the main bundle so this is the wrong place to
look.


Mike

_______________________________________________

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: 
 >Re: Open Window from Input Manager (From: Daniel <email@hidden>)

  • Prev by Date: Re: ASL & Unicode in Xcode's Console
  • Next by Date: Re: filtering a tableView from a pulldown
  • Previous by thread: Re: Open Window from Input Manager
  • Next by thread: Re: Open Window from Input Manager
  • Index(es):
    • Date
    • Thread