• 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: Menu wierdness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Menu wierdness


  • Subject: Re: Menu wierdness
  • From: "Steven J. Sims" <email@hidden>
  • Date: Wed, 15 Aug 2001 19:02:43 +0100

Hey gang,

First of all, thanks to Byron and Vince for your help.

Unfortunately my experience in using the inspector to adjust the title of a menu item (as per Vince's suggestion) was much the same as Byron's - i.e. it didn't work.

I had actually already discovered that the .nib file was a package and looked at the enclosed files, however the contents aren't quite as described by Byron below. The XML files are classes.nib and info.nib, whereas objects.nib is the streamed object file. Neither of the XML files contained "SubMenu", the duff menu title that was appearing in my app, however the objects.nib file did...

My solution was as follows. I put in a new "File" menu, since that has the same number of characters in the title as "Game", and put in all the appropriate links (outlets and objects) to replace my existing "Game" menu (which was appearing as "SubMenu"). I then saved the file, and replaced the isolated instances of "File" with "Game" inside the objects.nib file using BBEdit.

It should be noted though that this solution only worked because both "Game" and "File" are 4 characters long. Unsurprisingly the format of the objects.nib file doesn't seem to allow for variable length strings.

This obviously is not an acceptable situation. I'm just lucky that I could get away with this hack, and that I'm not (currently) writing commercial software.

So, Vince, this begs the question when can we expect to see this updated Interface Builder that does not have this bug?

Regards,

Steve



On Wednesday, August 15, 2001, at 05:19 am, Byron Sinor wrote:

What Vince told you earlier is correct, however, I
have had little success using the Inspector to fix
this problem. I took matters into my own hands and
investigated the .nib files themselves. I'm sure many
other here have done this, since its pretty simple,
but here is the solution:

The .nib file is just a package, use a control-click
to
select show package contents. Inside you'll find three
files (at least, I did). The classes.nib file is
probably class declarations, the info.nib file seems
to hold property and resource type info, and the
objects.xib is where all your interface objects are
actually described. The info.nib and object.xib files
look like "normal" XML files. The classes.nib appears
to be C code and look like its all declarations and no
implementation. Anyways, what you want to do is fiddle
with the objects.xib file. Within that file, you want
to find a tag like this:

<string name="title">Submenu</string>

Where "Submenu" could also be the name of any other
interface object you are looking to change (although,
I've only found name changing bugs effecting menus and
submenus). But, beware the possibility of name
conflicts (i.e. the name of the menu happens to be the
same as the name of a window) with other items; as
their names are also set with this kind of tag . So,
be sure to keep a backup .nib handy in case you alter
the wrong tag and get strange results. If you have
alot of name conflicts, you'll just have to learn to
read XML. :)

-Byron
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/


  • Follow-Ups:
    • Re: Menu wierdness
      • From: Byron Sinor <email@hidden>
References: 
 >Re: Menu wierdness (From: Byron Sinor <email@hidden>)

  • Prev by Date: Re: Menu wierdness
  • Next by Date: Re: Menu wierdness
  • Previous by thread: Re: Menu wierdness
  • Next by thread: Re: Menu wierdness
  • Index(es):
    • Date
    • Thread