• 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: how to manage two nib files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to manage two nib files


  • Subject: Re: how to manage two nib files
  • From: email@hidden
  • Date: Mon, 08 Dec 2008 10:33:22 -0500

Not knowing why you need an apple event...here's my two cents (and boff on those who don't like my "feelings"):

1. find your printer (it is obviously installed, yes?) - you should know how to locate that in the Mac's resources. (get a list of installed printers/devices, etc.)
2. you should be able to determine from the installation parameters whether it is installed via USB or network.
3. in your cocoa app, in your main nib, have a an object that uses that information to determine which nib to load from there.


If you need information on how to work with nibs, etc., see NSBundle. Also, see Hillegass' book Cocoa Programming for Mac OS X Third Edition (that's the one I have). I'm sure there are multiple appropriate references available otherwise (incl. Apple dox as previously pointed out).

Hope this helps!

Peace, Love, and Light,

/s/ Jon C. Munson II


Quoting XiaoGang Li <email@hidden>:

Thanks. I have read these references, but I still have no idea about my
issue, Maybe I did not understand them completely now, but I am worried that
maybe I have not give a clear expression in my first email. Maybe I need
give a more detailed description:

           this application is a utility for my printer, which be launched
by the utility button on the Printer Setup Center. when user click the
utility button, the Mac OS X will launch the linked application. and the
application should first register an apple event, the Mac OS X then will
send the apple event which used to tell my utility the printer model name
and related information about the device. So, before the appliction be
launched, it should get the apple  event and check the printer name, then it
will load the nib file dependently. If the printer is a USB printer, it will
load a normal window to interact with user, if it is a Network, it will
launch another application to do other things.

            So, I have no idea to design this application. I think this
question maybe can not be implemented by cocoa application template, but I
know that it seems no need to use NSDocument class. Thanks.

2008/12/8 Kiel Gillard <email@hidden>

<
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindowController_Class/Reference/Reference.html
>
<
http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/Concepts/WinControllersAndNibs.html#//apple_ref/doc/uid/20000026
>
<http://cocoadevcentral.com/articles/000064.php>

Hope this helps!

On 08/12/2008, at 1:47 PM, XiaoGang Li wrote:

Hi, List,

I have a question about how to design my applicaiton in Cocoa.

    My applicaiton is not a normal application.  it is a utility for my
printer device. when user double-click the application icon, the
application
first register an apple event before any UI being shown, he application
will
receive a apple event from Mac OS later, which tells it that whether the
device is USB-connected or Network-connected, when the application get
this
information, then it will launch the corresponding UI depend on the
connect
mode. (there are two nib files, one for USB, another for Network.).

    I have no idea how to manage two nib files, or two window controller.
I hope soneone can give me some comments. thanks very much.

XiaogangLi
_______________________________________________

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




_______________________________________________

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: 
 >how to manage two nib files (From: "XiaoGang Li" <email@hidden>)
 >Re: how to manage two nib files (From: Kiel Gillard <email@hidden>)
 >Re: how to manage two nib files (From: "XiaoGang Li" <email@hidden>)

  • Prev by Date: Animation proxies and Python
  • Next by Date: What does 'DO' mean?
  • Previous by thread: Re: how to manage two nib files
  • Next by thread: Re: how to manage two nib files
  • Index(es):
    • Date
    • Thread