comparison Question.m @ 44:a1e75b94c505

Snap to eval points. Double tap to go to preset (doesn't quite work yet). Coloured locks. Changed Question 2. Fixed some leaks.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Mon, 22 Apr 2013 18:32:34 +0100
parents 79c129e500e1
children
comparison
equal deleted inserted replaced
43:b91a1859829a 44:a1e75b94c505
42 // get the set of answers depending on what type the q was 42 // get the set of answers depending on what type the q was
43 // pseudo static variable 43 // pseudo static variable
44 if(type == AGREE_DISAGREE){ 44 if(type == AGREE_DISAGREE){
45 [Question setCount:NUM_CHOICES]; 45 [Question setCount:NUM_CHOICES];
46 46
47 // potential leak 47 NSArray *answers = [[[NSArray alloc] initWithObjects:
48 return [[NSArray alloc] initWithObjects:
49 @"Strongly agree",@"Agree", @"Neither agree nor disagree", 48 @"Strongly agree",@"Agree", @"Neither agree nor disagree",
50 @"Disagree",@"Strongly disagree", nil]; 49 @"Disagree",@"Strongly disagree", nil] autorelease];
51 50
51 return answers;
52 52
53 }else if(type == SLIDERS_ZOOMER){ 53 }else if(type == SLIDERS_ZOOMER){
54 [Question setCount:NUM_CHOICES]; 54 [Question setCount:NUM_CHOICES];
55 // potential leak 55 NSArray *answers = [[[NSArray alloc] initWithObjects:
56 return [[NSArray alloc] initWithObjects:
57 @"definitely the Sliders", @"maybe the Sliders", @"Neither/Both equal", 56 @"definitely the Sliders", @"maybe the Sliders", @"Neither/Both equal",
58 @"maybe the Zoomer", @"definitely the Zoomer", nil]; 57 @"maybe the Zoomer", @"definitely the Zoomer", nil] autorelease];
58
59 return answers;
59 }else{ 60 }else{
60 return nil; 61 return nil;
61 } 62 }
62 } 63 }
63 /// 64 ///