Permalink
Browse files

adding string, integer, float, date, time, datetime to pick one answe…

…rs. closes #37
  • Loading branch information...
Mark Yoon
Mark Yoon committed Mar 28, 2012
1 parent 382f9d4 commit 1dd83d234b7729332c654864cce77a4143c42a0d
@@ -4,7 +4,7 @@ Feature:
So I can tell you about my medications
Scenario:
- Medications
+ Medications Pick Any
Given I launch the app using iOS 5.0 and the ipad simulator
Given the device is in portrait orientation
And I touch the button marked "Inspect"
@@ -56,4 +56,42 @@ Feature:
And I touch the button marked "Cancel"
Then the 6th cell should be checked
And I touch the button marked "Inspect"
- Then I should see "5 responses"
+ Then I should see "5 responses"
+
+ Scenario:
+ Medications Pick One
+ Given I launch the app using iOS 5.0 and the ipad simulator
+ Given the device is in portrait orientation
+ And I touch the button marked "Inspect"
+ And I touch the button marked "loadComplexResponses"
+ And I touch the button marked "Sections"
+ When I touch the table cell marked "One"
+ And I should see "When did you last take your medication?"
+ And I touch the upper left of the table cell marked "NUOneDatePickerCell Today at"
+ And I touch the button marked "Now"
+ Then the 1st cell should be dotted
+ And I touch the button marked "Inspect"
+ Then I should see "1 response"
+
+ When I navigate back
+ And I touch the upper left of the table cell marked "NUOneDatePickerCell On this very day"
+ And I touch the button marked "Done"
+ Then the 2nd cell should be dotted
+ And the 1st cell should be undotted
+ And I touch the button marked "Inspect"
+ Then I should see "1 response"
+
+ When I navigate back
+ And I touch the upper left of the table cell marked "NUOneStringOrNumberCell I cannot tell you because (null) (null)"
+ Then the 4th cell should be dotted
+ And the 2nd cell should be undotted
+ And I touch the button marked "Inspect"
+ Then I should see "1 response"
+
+ When I navigate back
+ And I touch the upper left of the table cell marked "NUOneStringOrNumberCell I cannot tell you because (null) (null)"
+ Then the 4th cell should be dotted
+ And I touch the upper left of the table cell marked "NUOneDatePickerCell On this day, at"
+ And I touch the button marked "Cancel"
+ And I touch the button marked "Inspect"
+ Then I should see "1 response"
@@ -10,18 +10,11 @@
dotted.should == [true]
end
-When /^the (\d*)(?:st|nd|rd|th)? cell should be checked$/ do |ordinal|
+When /^the (\d*)(?:st|nd|rd|th)? cell should be (un)?(checked|dotted)$/ do |ordinal, negator, type|
cell_selector = ("tableViewCell index:#{ordinal.to_i - 1}")
check_element_exists( cell_selector )
- checked = frankly_map( cell_selector, 'checked' )
- checked.should == [true]
-end
-
-When /^the (\d*)(?:st|nd|rd|th)? cell should be unchecked$/ do |ordinal|
- cell_selector = ("tableViewCell index:#{ordinal.to_i - 1}")
- check_element_exists( cell_selector )
- checked = frankly_map( cell_selector, 'checked' )
- checked.should == [false]
+ checked = frankly_map( cell_selector, type )
+ checked.should == (negator == "un" ? [false] : [true])
end
When /^I press done on the keyboard$/ do
@@ -10,6 +10,10 @@
0083A90C14F746F5005C1D94 /* NUConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 0083A90B14F746F5005C1D94 /* NUConstants.h */; };
3B24DED514EEEA8400E7D04C /* basic_survey.feature in Resources */ = {isa = PBXBuildFile; fileRef = 3B24DED414EEEA8400E7D04C /* basic_survey.feature */; };
3B24DED714EEEABF00E7D04C /* response_set_steps.rb in Resources */ = {isa = PBXBuildFile; fileRef = 3B24DED614EEEABF00E7D04C /* response_set_steps.rb */; };
+ 3B2AB06E1522429E00525F25 /* NUOneStringOrNumberCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B2AB06C1522429E00525F25 /* NUOneStringOrNumberCell.h */; };
+ 3B2AB06F1522429E00525F25 /* NUOneStringOrNumberCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B2AB06D1522429E00525F25 /* NUOneStringOrNumberCell.m */; };
+ 3B2AB0721522483E00525F25 /* NUOneDatePickerCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B2AB0701522483E00525F25 /* NUOneDatePickerCell.h */; };
+ 3B2AB0731522483E00525F25 /* NUOneDatePickerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B2AB0711522483E00525F25 /* NUOneDatePickerCell.m */; };
3B8CF201151B91C600EA4148 /* test-birth-date-survey.json in Resources */ = {isa = PBXBuildFile; fileRef = 3B8CF200151B91C600EA4148 /* test-birth-date-survey.json */; };
3BA2E94A14CDCD0F0057D05C /* NUSurvey.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BA2E94814CDCD0F0057D05C /* NUSurvey.h */; };
3BA2E94B14CDCD0F0057D05C /* NUSurvey.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BA2E94914CDCD0F0057D05C /* NUSurvey.m */; };
@@ -179,6 +183,10 @@
3B08678E14FED8C100D43E02 /* group_dependency.feature */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = group_dependency.feature; sourceTree = "<group>"; };
3B24DED414EEEA8400E7D04C /* basic_survey.feature */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = basic_survey.feature; sourceTree = "<group>"; };
3B24DED614EEEABF00E7D04C /* response_set_steps.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = response_set_steps.rb; sourceTree = "<group>"; };
+ 3B2AB06C1522429E00525F25 /* NUOneStringOrNumberCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NUOneStringOrNumberCell.h; path = Views/NUOneStringOrNumberCell.h; sourceTree = "<group>"; };
+ 3B2AB06D1522429E00525F25 /* NUOneStringOrNumberCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NUOneStringOrNumberCell.m; path = Views/NUOneStringOrNumberCell.m; sourceTree = "<group>"; };
+ 3B2AB0701522483E00525F25 /* NUOneDatePickerCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NUOneDatePickerCell.h; path = Views/NUOneDatePickerCell.h; sourceTree = "<group>"; };
+ 3B2AB0711522483E00525F25 /* NUOneDatePickerCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NUOneDatePickerCell.m; path = Views/NUOneDatePickerCell.m; sourceTree = "<group>"; };
3B8CF200151B91C600EA4148 /* test-birth-date-survey.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "test-birth-date-survey.json"; sourceTree = "<group>"; };
3BA2E94814CDCD0F0057D05C /* NUSurvey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NUSurvey.h; path = Models/NUSurvey.h; sourceTree = "<group>"; };
3BA2E94914CDCD0F0057D05C /* NUSurvey.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NUSurvey.m; path = Models/NUSurvey.m; sourceTree = "<group>"; };
@@ -730,6 +738,10 @@
671F3E8814CA318100CEE042 /* NUCell.h */,
3BD52B0514C8B70500AB61E8 /* NUOneCell.h */,
3BD52B0614C8B70500AB61E8 /* NUOneCell.m */,
+ 3B2AB06C1522429E00525F25 /* NUOneStringOrNumberCell.h */,
+ 3B2AB06D1522429E00525F25 /* NUOneStringOrNumberCell.m */,
+ 3B2AB0701522483E00525F25 /* NUOneDatePickerCell.h */,
+ 3B2AB0711522483E00525F25 /* NUOneDatePickerCell.m */,
3BD52AE714C8B6A400AB61E8 /* NUAnyCell.h */,
3BD52AE814C8B6A400AB61E8 /* NUAnyCell.m */,
3BC61A7C1520CBDB00A8C20C /* NUAnyStringOrNumberCell.h */,
@@ -1888,6 +1900,8 @@
0083A90C14F746F5005C1D94 /* NUConstants.h in Headers */,
3BC61A7E1520CBDB00A8C20C /* NUAnyStringOrNumberCell.h in Headers */,
3BC61A841520F75000A8C20C /* NUAnyDatePickerCell.h in Headers */,
+ 3B2AB06E1522429E00525F25 /* NUOneStringOrNumberCell.h in Headers */,
+ 3B2AB0721522483E00525F25 /* NUOneDatePickerCell.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2134,6 +2148,8 @@
67DB499B14D0933E009CC8C3 /* NUGridOneCell.m in Sources */,
3BC61A7F1520CBDB00A8C20C /* NUAnyStringOrNumberCell.m in Sources */,
3BC61A851520F75000A8C20C /* NUAnyDatePickerCell.m in Sources */,
+ 3B2AB06F1522429E00525F25 /* NUOneStringOrNumberCell.m in Sources */,
+ 3B2AB0731522483E00525F25 /* NUOneDatePickerCell.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -38,9 +38,20 @@ + (NSString *) classNameForQuestion:(NSDictionary *)questionOrGroup answer:(NSDi
className = [(NSString *)[answer objectForKey:@"pick"] isEqualToString:@"one"] ?
@"NUGridOneCell" : @"NUGridAnyCell";
}else if ([(NSString *)[questionOrGroup objectForKey:@"pick"] isEqualToString:@"one"]) {
- className = [(NSString *)[questionOrGroup objectForKey:@"type"] isEqualToString:@"dropdown"] || [(NSString *)[questionOrGroup objectForKey:@"type"] isEqualToString:@"slider"] ?
- @"NUPickerCell" : @"NUOneCell";
-
+ if([(NSString *)[questionOrGroup objectForKey:@"type"] isEqualToString:@"dropdown"] || [(NSString *)[questionOrGroup objectForKey:@"type"] isEqualToString:@"slider"]){
+ className = @"NUPickerCell";
+ } else {
+ className = @"NUOneCell";
+ if ([[answer objectForKey:@"type"] isEqualToString:@"string"] ||
+ [[answer objectForKey:@"type"] isEqualToString:@"integer"] ||
+ [[answer objectForKey:@"type"] isEqualToString:@"float"] ) {
+ className = @"NUOneStringOrNumberCell";
+ } else if ([[answer objectForKey:@"type"] isEqualToString:@"date"] ||
+ [[answer objectForKey:@"type"] isEqualToString:@"time"] ||
+ [[answer objectForKey:@"type"] isEqualToString:@"datetime"] ) {
+ className = @"NUOneDatePickerCell";
+ }
+ }
} else if([(NSString *)[questionOrGroup objectForKey:@"pick"] isEqualToString:@"any"]){
className = @"NUAnyCell";
if ([[answer objectForKey:@"type"] isEqualToString:@"string"] ||
@@ -237,7 +248,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
UITableViewCell<NUCell> *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
- if ([CellIdentifier isEqualToString:@"NUAnyDatePickerCell"]) {
+ if ([CellIdentifier isEqualToString:@"NUAnyDatePickerCell"] || [CellIdentifier isEqualToString:@"NUOneDatePickerCell"]) {
cell = [(UITableViewCell<NUCell> *)[NSClassFromString(CellIdentifier) alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier];
} else {
cell = [(UITableViewCell<NUCell> *)[NSClassFromString(CellIdentifier) alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
@@ -594,6 +605,9 @@ - (void)textFieldDidBeginEditing:(UITextField *)textField{
if ([cell.reuseIdentifier isEqualToString:@"NUAnyStringOrNumberCell"]) {
[cell performSelector:@selector(check)];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
+ } else if ([cell.reuseIdentifier isEqualToString:@"NUOneStringOrNumberCell"]) {
+ [cell performSelector:@selector(dot)];
+ cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
@@ -604,7 +618,7 @@ - (void)textFieldDidEndEditing:(UITextField *)textField {
UITableViewCell *cell = (UITableViewCell *)textField.superview.superview;
NSIndexPath *idx = [self.tableView indexPathForCell:cell];
[self deleteResponseForIndexPath:idx];
- if ([cell.reuseIdentifier isEqualToString:@"NUAnyStringOrNumberCell"] || (textField.text != nil && ![textField.text isEqualToString:@""])) {
+ if ([cell.reuseIdentifier isEqualToString:@"NUAnyStringOrNumberCell"] || [cell.reuseIdentifier isEqualToString:@"NUOneStringOrNumberCell"] || (textField.text != nil && ![textField.text isEqualToString:@""])) {
[self newResponseForIndexPath:idx Value:textField.text];
cell.selectionStyle = UITableViewCellSelectionStyleBlue;
}
@@ -7,12 +7,10 @@
//
#import "NUAnyCell.h"
-#import "NUSectionTVC.h"
#import "NUPickerVC.h"
@interface NUAnyDatePickerCell : NUAnyCell <UIPopoverControllerDelegate>
-@property (nonatomic, weak) NUSectionTVC *sectionTVC;
@property (nonatomic, strong) NUPickerVC *pickerVC;
@property (nonatomic, strong) UIPopoverController *popoverController;
@property (nonatomic, strong) NSDateFormatter *dateFormatter;
@@ -15,7 +15,7 @@ - (NSDateFormatter *) dateFormatterFromType:(NSString *)type;
@end
@implementation NUAnyDatePickerCell
-@synthesize sectionTVC = _sectionTVC, pickerVC = _pickerVC, popoverController = _popoverController, dateFormatter = _dateFormatter;
+@synthesize pickerVC = _pickerVC, popoverController = _popoverController, dateFormatter = _dateFormatter;
@synthesize type = _type;
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
@@ -10,7 +10,6 @@
@interface NUAnyStringOrNumberCell : NUAnyCell
-@property (nonatomic, weak) NUSectionTVC *sectionTVC;
@property (nonatomic, strong) UITextField *textField;
@property (nonatomic, strong) UILabel *label;
@property (nonatomic, strong) UILabel *postLabel;
@@ -14,7 +14,7 @@ - (void) resetContent;
@end
@implementation NUAnyStringOrNumberCell
-@synthesize textField = _textField, label = _label, postLabel = _postLabel, sectionTVC = _sectionTVC;
+@synthesize textField = _textField, label = _label, postLabel = _postLabel;
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
@@ -126,10 +126,8 @@ - (void)selectedinTableView:(UITableView *)tableView indexPath:(NSIndexPath *)in
[(NUAnyCell *)[tableView cellForRowAtIndexPath:indexPath] check];
if (self.textField.hidden == NO) {
[self.textField becomeFirstResponder];
- // let the text field delegate (NUSectionTVC) handle the response creation
- } else {
- [self.sectionTVC newResponseForIndexPath:indexPath];
}
+ [self.sectionTVC newResponseForIndexPath:indexPath];
}
[self.sectionTVC.tableView deselectRowAtIndexPath:indexPath animated:YES];
}
@@ -0,0 +1,21 @@
+//
+// NUOneDatePickerCell.h
+// NUSurveyor
+//
+// Created by Mark Yoon on 3/27/2012.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import "NUOneCell.h"
+#import "NUPickerVC.h"
+
+@interface NUOneDatePickerCell : NUOneCell <UIPopoverControllerDelegate>
+
+@property (nonatomic, strong) NUPickerVC *pickerVC;
+@property (nonatomic, strong) UIPopoverController *popoverController;
+@property (nonatomic, strong) NSDateFormatter *dateFormatter;
+@property (nonatomic, strong) NSString *type;
+
+- (UIDatePickerMode)datePickerModeFromType:(NSString *)type;
+
+@end
@@ -0,0 +1,126 @@
+//
+// NUOneDatePickerCell.m
+// NUSurveyor
+//
+// Created by Mark Yoon on 3/27/2012.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import "NUOneDatePickerCell.h"
+#import "NUOneStringOrNumberCell.h"
+
+@interface NUOneDatePickerCell()
+- (void) pickerDone;
+- (NSDateFormatter *) dateFormatterFromType:(NSString *)type;
+@end
+@implementation NUOneDatePickerCell
+@synthesize pickerVC = _pickerVC, popoverController = _popoverController, dateFormatter = _dateFormatter, type = _type;
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated
+{
+ [super setSelected:selected animated:animated];
+
+ // Configure the view for the selected state
+}
+
+#pragma mark - NUCell
+- (NSString *)accessibilityLabel{
+ return [NSString stringWithFormat:@"NUOneDatePickerCell %@", self.textLabel.text];
+}
+- (void)configureForData:(id)dataObject tableView:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
+ self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+ self.dateFormatter = [self dateFormatterFromType:[dataObject objectForKey:@"type"]];
+ self.textLabel.text = [dataObject objectForKey:@"text"];
+
+ self.type = [dataObject objectForKey:@"type"];
+
+ // set up popover with datepicker
+ if (self.pickerVC == nil) {
+ self.pickerVC = [[NUPickerVC alloc] init];
+ UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:self.pickerVC];
+ self.pickerVC.contentSizeForViewInPopover = CGSizeMake(384.0, 260.0);
+ self.popoverController = [[UIPopoverController alloc] initWithContentViewController:nav];
+ [self.pickerVC setupDelegate:self withTitle:[NSString stringWithFormat:NSLocalizedString(@"Pick %@", @""), [dataObject objectForKey:@"type"]] date:YES];
+ self.pickerVC.nowButton.title = [[dataObject objectForKey:@"type"] isEqualToString:@"date"] ? @" Today " : @" Now ";
+ self.pickerVC.datePicker.datePickerMode = [self datePickerModeFromType:[dataObject objectForKey:@"type"]];
+ self.popoverController.delegate = self;
+ }
+
+ // look up existing response, fill in text and set datepicker
+ self.sectionTVC = (NUSectionTVC *)tableView.delegate;
+ NSManagedObject *existingResponse = [[self.sectionTVC responsesForIndexPath:indexPath] lastObject];
+ if (existingResponse) {
+ [self dot];
+ self.detailTextLabel.text = [NSString stringWithFormat:@"%@ %@", [dataObject objectForKey:@"text"], [existingResponse valueForKey:@"value"]];
+ self.detailTextLabel.textColor = RGB(1, 113, 233);
+ self.pickerVC.datePicker.date = [self.dateFormatter dateFromString:[existingResponse valueForKey:@"value"]];
+ } else {
+ [self undot];
+ self.detailTextLabel.text = [NSString stringWithFormat:NSLocalizedString(@"Pick %@", @""), [dataObject objectForKey:@"type"]];
+ self.detailTextLabel.textColor = [UIColor blackColor];
+ }
+
+}
+- (void)selectedinTableView:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath{
+ for (int i = 0; i < [tableView numberOfRowsInSection:indexPath.section]; i++) {
+ NSIndexPath *j = [NSIndexPath indexPathForRow:i inSection:indexPath.section];
+ if (![j isEqual:indexPath]) {
+ [self.sectionTVC deleteResponseForIndexPath:j];
+ NUOneCell *cell = (NUOneCell *)[tableView cellForRowAtIndexPath:j];
+ [cell undot];
+ if ([[[tableView cellForRowAtIndexPath:j] reuseIdentifier] isEqualToString:@"NUOneStringOrNumberCell"]) {
+ ((NUOneStringOrNumberCell *)cell).textField.text = nil;
+ [((NUOneStringOrNumberCell *)cell).textField resignFirstResponder]; // doing this will create a response, which needs to be deleted
+ [self.sectionTVC deleteResponseForIndexPath:j];
+ } else if([[[tableView cellForRowAtIndexPath:j] reuseIdentifier] isEqualToString:@"NUOneDatePickerCell"]){
+ cell.detailTextLabel.text = [NSString stringWithFormat:NSLocalizedString(@"Pick %@", @""), ((NUOneDatePickerCell *)cell).type];
+ cell.detailTextLabel.textColor = [UIColor blackColor];
+ }
+
+ }
+ }
+ if (![[self.sectionTVC responsesForIndexPath:indexPath] lastObject]) {
+ [self.sectionTVC newResponseForIndexPath:indexPath];
+ }
+ [self.popoverController presentPopoverFromRect:self.frame inView:tableView permittedArrowDirections:UIPopoverArrowDirectionAny animated:NO];
+ [(NUOneCell *)[tableView cellForRowAtIndexPath:indexPath] dot];
+ [self.sectionTVC.tableView deselectRowAtIndexPath:indexPath animated:YES];
+}
+- (UIDatePickerMode)datePickerModeFromType:(NSString *)type {
+ if ([type isEqualToString:@"datetime"]) {
+ return UIDatePickerModeDateAndTime;
+ } else if ([type isEqualToString:@"time"]) {
+ return UIDatePickerModeTime;
+ }
+ return UIDatePickerModeDate;
+}
+- (NSDateFormatter *) dateFormatterFromType:(NSString *)type {
+ NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
+ [formatter setDateFormat:@"MM/dd/yyyy"];
+ if ([type isEqualToString:@"datetime"]) {
+ [formatter setDateFormat:@"MM/dd/yyyy HH:mm"];
+ } else if ([type isEqualToString:@"time"]) {
+ [formatter setDateFormat:@"HH:mm"];
+ }
+ return formatter;
+}
+- (void) nowPressed{
+ [self.pickerVC.datePicker setDate:[NSDate date] animated:YES];
+ [self performSelector:@selector(pickerDone) withObject:nil afterDelay:0.4];
+}
+- (void) pickerDone{
+ [self.popoverController dismissPopoverAnimated:NO];
+
+ NSString *selectedDate = [self.dateFormatter stringFromDate:[self.pickerVC.datePicker date]];
+ [self.sectionTVC deleteResponseForIndexPath:[self.sectionTVC.tableView indexPathForCell:self]];
+ [self.sectionTVC newResponseForIndexPath:[self.sectionTVC.tableView indexPathForCell:self] Value:selectedDate];
+ [self.sectionTVC showAndHideDependenciesTriggeredBy:[self.sectionTVC.tableView indexPathForCell:self]];
+ self.detailTextLabel.text = selectedDate;
+ self.detailTextLabel.textColor = RGB(1, 113, 233);
+}
+- (void) pickerCancel{
+ [self.popoverController dismissPopoverAnimated:NO];
+}
+
+
+@end
Oops, something went wrong.

0 comments on commit 1dd83d2

Please sign in to comment.