Menu reference handlin patch and further keyed archiving.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18547 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2004-02-06 00:16:54 +00:00
parent 4e1f4489e3
commit 93b7e7acf8
9 changed files with 220 additions and 175 deletions

View file

@ -294,6 +294,9 @@ static NSNotificationCenter *nc;
{
[nc removeObserver: self];
// Now clean the pointer to us stored each _items element
[_items makeObjectsPerformSelector: @selector(setMenu:) withObject: nil];
RELEASE(_notifications);
RELEASE(_title);
RELEASE(_items);
@ -393,7 +396,10 @@ static NSNotificationCenter *nc;
* isn't added.
*/
if ([newItem menu] != nil)
return;
{
NSLog(@"The object %@ is already attached to a menu, then it isn't possible to add it.\n", newItem);
return;
}
[_items insertObject: newItem atIndex: index];
_needsSizing = YES;