Hi,

the following method of NSButtonImageSource looks weird :

NSMutableDictionary     *sources = nil;

+ (id) buttonImageSourceWithName: (NSString*)name
{
  NSButtonImageSource   *source;

  source = [sources objectForKey: name];
  if (source == nil)
    {
      source = [self alloc];
      source->imageName = [name copy];
      source->images = [NSMutableDictionary new];
      [sources setObject: source forKey: sources->imageName];
      RELEASE(source);
    }
  return source;
}

I think the line where the new object is added to the sources dictionary should be :

[sources setObject: source forKey: source->imageName];
instead of
[sources setObject: source forKey: sources->imageName];

What do you think ?


_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to