Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

(minor) Seperating some stuff into `- [YRSolcounter initTextField]`

  • Loading branch information...
commit feff9482950e62c514ce8188a12d5b97f6c426f8 1 parent 10a5efc
@ELLIOTTCABLE authored
Showing with 7 additions and 3 deletions.
  1. +1 −0  YRSolcounter.h
  2. +6 −3 YRSolcounter.m
View
1  YRSolcounter.h
@@ -20,6 +20,7 @@
}
-(id) initWithBundle: (NSBundle*)bundle;
+-(void) initTextField;
-(void) handleTimer: (NSTimer*)_;
@end
View
9 YRSolcounter.m
@@ -25,11 +25,16 @@ -(id) initWithBundle: (NSBundle*)bundle {
userInfo: nil
repeats: YES];
- NSNib *nib = [[NSNib alloc] initWithNibNamed: @"Solcounter" bundle: bundle];
+ NSNib *nib = [[[NSNib alloc] initWithNibNamed: @"Solcounter" bundle: bundle] autorelease];
[nib instantiateNibWithOwner: self topLevelObjects: /* sets `textField` */ nil];
[self setView: textField];
+ [self initTextField];
+ return self;
+}
+
+-(void) initTextField {
NSRect frame = [textField frame];
[textField setFrame: NSMakeRect(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height - 1)];
[[textField cell] setBackgroundStyle: NSBackgroundStyleRaised];
@@ -43,8 +48,6 @@ -(id) initWithBundle: (NSBundle*)bundle {
lastObject], 18.0, NULL);
[self handleTimer: nil];
- [nib dealloc];
- return self;
}
-(void) handleTimer: (NSTimer*)_ {
Please sign in to comment.
Something went wrong with that request. Please try again.