Commit 5e8ad617 authored by Marvin Scholz's avatar Marvin Scholz

macosx: Remove flawed cell initialization

The developer needs to ensure the Cell class is set correctly in IB,
as there is no good way to do this the right way in code, without
loosing all settings from IB for the cell.
parent a2022f51
...@@ -30,9 +30,8 @@ ...@@ -30,9 +30,8 @@
{ {
self = [super initWithCoder:coder]; self = [super initWithCoder:coder];
if (self) { if (self) {
if (![self.cell isKindOfClass:[VLCDefaultValueSliderCell class]]) { NSAssert([self.cell isKindOfClass:[VLCDefaultValueSliderCell class]],
self.cell = [[VLCDefaultValueSliderCell alloc] init]; @"VLCDefaultSlider cell is not VLCDefaultValueSliderCell");
}
_isScrollable = YES; _isScrollable = YES;
} }
return self; return self;
......
...@@ -31,9 +31,8 @@ ...@@ -31,9 +31,8 @@
self = [super initWithCoder:coder]; self = [super initWithCoder:coder];
if (self) { if (self) {
if (![self.cell isKindOfClass:[VLCSliderCell class]]) { NSAssert([self.cell isKindOfClass:[VLCSliderCell class]],
self.cell = [[VLCSliderCell alloc] init]; @"VLCSlider cell is not VLCSliderCell");
}
} }
return self; return self;
} }
...@@ -49,14 +48,6 @@ ...@@ -49,14 +48,6 @@
[super setNeedsDisplayInRect:[self bounds]]; [super setNeedsDisplayInRect:[self bounds]];
} }
- (void)awakeFromNib {
[super awakeFromNib];
if(![self.cell isKindOfClass:[VLCSliderCell class]]) {
self.cell = [[VLCSliderCell alloc] init];
}
}
- (BOOL)getIndefinite - (BOOL)getIndefinite
{ {
return [(VLCSliderCell*)[self cell] indefinite]; return [(VLCSliderCell*)[self cell] indefinite];
......
...@@ -32,9 +32,8 @@ ...@@ -32,9 +32,8 @@
self = [super initWithCoder:coder]; self = [super initWithCoder:coder];
if (self) { if (self) {
if (![self.cell isKindOfClass:[VLCVolumeSliderCell class]]) { NSAssert([self.cell isKindOfClass:[VLCVolumeSliderCell class]],
self.cell = [[VLCVolumeSliderCell alloc] init]; @"VLCVolumeSlider cell is not VLCVolumeSliderCell");
}
} }
return self; return self;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment