From 33bf502992b0b0fa01b09db651efce9b3e99bbe9 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 4 Jan 2008 12:00:42 -0800 Subject: [PATCH] Refactoring _stack --- English.lproj/Debugger.nib/keyedobjects.nib | Bin 17617 -> 17617 bytes Source/DebuggerWindowController.h | 2 +- Source/DebuggerWindowController.m | 16 ++++++++-------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/English.lproj/Debugger.nib/keyedobjects.nib b/English.lproj/Debugger.nib/keyedobjects.nib index b75432464c5e802a007bcbfdb7da649c992a8b31..00dfa60dbd5e002ddb48b31a8979d5c4a595f4f3 100644 GIT binary patch delta 3551 zcmai033L=y7Om>M-$_VFe%Q%E0wlFB>F%n8T?2|Dp+OQ7LJ~p@EoKrr(CN-L#Qvp# zf-EEDdOSKRj>m=3(cr=$%5oTGP#L1)$}S+t0J6EkFuyyIWtchBeX5uD?|<*!dhh*u zJD0FKm#}}yWr5k_NU#m|T#grtpcu-a4(3Au8X*WFXogm3gWm%I3l_tDu*~*428LgQ zH(?8W2p_@6umk=9JE0Rkh0oy&*bRH&Abbl);TW8Rvv3Z6fnO1W5ON}nQcy3{7p0>N zGzjG&4)I7sI?6@)Xc!ufMxX*T7L7x!yOD+NK?~7pv;`fs z4?BwcIhQ$?J6AYYI{)B&(7DQKGo{XlnBBHFCc7gT^E{4oAoe7=gOqm+>4Q^B_mchO z1UW@cle6SJ`HB2OE|7m&Y!8b~wAdtz#TJ`lvAr#}uf_JW*Z~%sZn2pbJH%phELOBw z#bR}fb$`kv!EhJ>BViO1WHRj~IoXKpV{w$Q+3-|#&7C`%R&<=M)*nWyH4M!BTz@n&v z(d1-tAmkr$we(g>@c~M4ET#BEX;oveIv8ra0*GvHh6khDhmkX7jX~eM$xXh%H9j&O zb?_+l;UMkg-1OPLdf%MtpfBpAPxl>eqG6t-5Dx|YXeY=6qr^h6I_g;?KbJ;4Pq>Dg zqmFKRk#1_In|`gV3i#&KQdFR%*4KQ6;V7n&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InqUao!Z0CE7$uAm#tP$vLZM8k5Nd>gFh^(=76^-kWx^xEDq*egj<8oa zDf}q>6cQPc6G2Q8MNt-2Q5Untp<;nJPP|>5D>jHtVzbyPJ|O;8d{SH`J|(UZ+r_uU zt>W9_c5#QePy9msQamkwC4Mb-NO2OCdP%*dzEXyiBl#pt8X^soCP)*dLa9h9mRh8T zq*c;ZX`8fNdRKZ++9~alLc66s(g)Ih>7aB{IxU@*zLCC@E=V16l-xs3l#}H_@-TUX zJW?JnPnPeHTja&^1M*UNxx7+-UVdHPD8DIhlDEk3%ZKD6@-g|id_q2}a0)0MC0dD9 z`YVc}DTb1xn92=Gp;DwwR!WpIr9!z&saNJI4Ly{3%0lHK@7I(?b` zoW4!puJ6dzcj~+JJ^Eh#yb)(8hHhjVKEpDG7{iSz#$02*(Pq4Ayk=}L-Z1`UY&NzS z+l+UNcioPHw%C)|r?SsvpUpm(ecruqR844m&Y_%dy>VW_Tj-tbZS$`1KH+`dyV?7` z_fzjhU$oEgP4La~E$}Vz{l&M&_oD9=-!9)#-+43M>}RH!sb-cbnv&@?E%Wc@Kh3q~ zOXe%)YvxAtO>>j^mbuk@+uUyMFn5}}%@56w%zfr3<^l7NdBi+s9yd>zCr6m4%roX$ z^PG9!{LcKryl8eS@JW309)j$4au2trTm3HP9MtWm%%7Sej*6UiWXK h^H`7j+2~v2TXXNuZOaYiI=T1e-j}<`y=lz-{{xY&OOXHo diff --git a/Source/DebuggerWindowController.h b/Source/DebuggerWindowController.h index 2db6c49..5d0276a 100644 --- a/Source/DebuggerWindowController.h +++ b/Source/DebuggerWindowController.h @@ -23,7 +23,7 @@ DebuggerConnection *connection; IBOutlet NSArrayController *stackController; - NSArray *_stack; + NSArray *stack; IBOutlet NSTreeController *_registerController; IBOutlet NSOutlineView *_registerView; diff --git a/Source/DebuggerWindowController.m b/Source/DebuggerWindowController.m index d5902dc..3c96f27 100644 --- a/Source/DebuggerWindowController.m +++ b/Source/DebuggerWindowController.m @@ -114,17 +114,17 @@ /** * Sets the root node element of the stacktrace */ -- (void)setStack:(NSArray *)stack +- (void)setStack:(NSArray *)node { - if (_stack != nil) + if (stack != nil) { - [_stack release]; + [stack release]; } - _stack = stack; - [_stack retain]; + stack = node; + [stack retain]; - if ([_stack count] > 1) + if ([stack count] > 1) { [_stepOutButton setEnabled:YES]; } @@ -228,13 +228,13 @@ } // get the filename and then set the text - NSString *filename = [[_stack objectAtIndex:selection] valueForKey:@"filename"]; + NSString *filename = [[stack objectAtIndex:selection] valueForKey:@"filename"]; filename = [[NSURL URLWithString:filename] path]; NSString *text = [NSString stringWithContentsOfFile:filename]; [_sourceViewer setString:text]; // go through the document until we find the NSRange for the line we want - int destination = [[[_stack objectAtIndex:selection] valueForKey:@"lineno"] intValue]; + int destination = [[[stack objectAtIndex:selection] valueForKey:@"lineno"] intValue]; int rangeIndex = 0; for (int line = 0; line < destination; line++) { -- 2.43.5