mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Fix to find images correctly
This commit is contained in:
parent
2a52461368
commit
3c06db624f
1 changed files with 5 additions and 3 deletions
|
@ -71,9 +71,10 @@ int defaultNumberFormatIndex = 0;
|
|||
{
|
||||
id v;
|
||||
NSImage *img;
|
||||
|
||||
img = [NSImage imageNamed: imageName];
|
||||
NSLog(@"img = %@", img);
|
||||
NSString *path = [[NSBundle bundleForClass: [self class]]
|
||||
pathForImageResource: imageName];
|
||||
|
||||
img = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
v = [[NSImageView alloc] initWithFrame: frame];
|
||||
[v setImageFrameStyle: NSImageFramePhoto];
|
||||
[v setImageScaling: NSScaleProportionally];
|
||||
|
@ -83,6 +84,7 @@ int defaultNumberFormatIndex = 0;
|
|||
[contents addSubview: v];
|
||||
[self associateObject: fm type: IBFormatterPboardType with: v];
|
||||
RELEASE(v);
|
||||
RELEASE(img);
|
||||
}
|
||||
|
||||
- (void) finishInstantiate
|
||||
|
|
Loading…
Reference in a new issue