Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'hue' into develop

  • Loading branch information...
commit fbf440e1b936a20ad824b0222aa6bf1b5e327a87 2 parents ebd2981 + 7079abe
@lovableCurmudgeon authored
View
9 DistanceChooserViewController.m
@@ -19,11 +19,12 @@ -(IBAction)buttonClicked:(id)sender {
NSLog(@"**** DCVC bC");
NSLog(@"**** DCVC bC sender id = %d", [sender tag]);
- NearbyPhotosViewController *npvc = [[NearbyPhotosViewController alloc] initWithNibName:nil bundle:nil];
id tmp = [_distanceChoicesArray objectAtIndex:[sender tag]];
- npvc.nearbyness = [tmp floatValue];
-
NSLog(@"**** DCVC bC sender float = %f", [tmp floatValue]);
+
+
+ NearbyPhotosViewController *npvc = [[NearbyPhotosViewController alloc] initWithNibName:nil bundle:nil];
+ npvc.nearbyness = [tmp floatValue];
[self.navigationController pushViewController:npvc animated:YES];
}
@@ -58,7 +59,7 @@ - (void)viewDidLoad {
NSMutableDictionary *tmpdir = _appDelegate.DVCustomPlistData;
_distanceChoicesArray = [tmpdir objectForKey:@"distanceChoices"];
- NSLog(@"**** %@", _distanceChoicesArray);
+ NSLog(@"**** DVCV VDL %@", _distanceChoicesArray);
}
View
7 DistanceChooserViewController.xib
@@ -77,7 +77,6 @@
<string key="NSFrame">{{124, 136}, {72, 37}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:225</string>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">1</int>
@@ -104,7 +103,7 @@
<reference key="NSNextKeyView" ref="1034646588"/>
<string key="NSReuseIdentifierKey">_NS:225</string>
<bool key="IBUIOpaque">NO</bool>
- <int key="IBUITag">3</int>
+ <int key="IBUITag">2</int>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
@@ -128,7 +127,7 @@
<reference key="NSNextKeyView" ref="1040238704"/>
<string key="NSReuseIdentifierKey">_NS:225</string>
<bool key="IBUIOpaque">NO</bool>
- <int key="IBUITag">4</int>
+ <int key="IBUITag">3</int>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
@@ -151,7 +150,7 @@
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:225</string>
<bool key="IBUIOpaque">NO</bool>
- <int key="IBUITag">5</int>
+ <int key="IBUITag">4</int>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
View
55 HueChooserViewController.m
@@ -19,13 +19,66 @@ -(IBAction)buttonClicked:(id)sender {
NSLog(@"**** HVC bC");
NSLog(@"**** HVC bC sender id = %d", [sender tag]);
-
+ NSLog(@"**** HVC bC hvf = %@", _hueValueField.text);
+
+ // ok now make a call to the API, check the login, return a yay or nay
+
+ NSString *urlString = @"http://173.11.94.85:81/hueMatchesAPI/post";
+
+ //now we have the ASIHTTP working, this will upload the data , still as a POST
+ NSString *urlwithparams = [[NSString alloc] initWithFormat:@"%@?hue=%s", urlString, _hueValueField];
+
+ NSURL *url = [NSURL URLWithString:urlwithparams];
+ ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
+ [request setDelegate:self];
+ [request startSynchronous];
+ [request setTimeOutSeconds:20];
+ [request setNumberOfTimesToRetryOnTimeout:2];
+
+
+ HuePhotosViewController *hpvc = [[HuePhotosViewController alloc] initWithNibName:nil bundle:nil];
+// id tmp = [_distanceChoicesArray objectAtIndex:[sender tag]];
+ // hpvc.nearbyness = [tmp floatValue];
+
+// NSLog(@"**** DCVC bC sender float = %f", [tmp floatValue]);
+ [self.navigationController pushViewController:hpvc animated:YES];
+
+
+
}
+
+
+#pragma mark UITextFieldDelegate
+
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
+
+ NSLog(@"**** HCVC Txtdel TFSR");
[textField resignFirstResponder];
return YES;
}
+
+#pragma mark - ASIHTTPmethods
+- (void)requestFinished:(ASIHTTPRequest *)request {
+
+ NSLog(@"**** HCVC ASIHTTP RF ");
+
+ // Use when fetching text data
+ NSString *responseString = [request responseString];
+ NSLog(@"**** HCVC ASIHTTP RF = %@", responseString);
+
+}
+
+- (void)requestFailed:(ASIHTTPRequest *)request {
+ NSError *error = [request error];
+
+ NSLog(@"**** HCVC ASIHTTP RF response error = %@", error);
+
+}
+
+
+
+
#pragma mark - provided methods
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
View
11 HueChooserViewController.xib
@@ -78,7 +78,6 @@
<string key="NSFrame">{{213, 224}, {72, 37}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:225</string>
<bool key="IBUIOpaque">NO</bool>
<int key="IBUITag">5</int>
@@ -134,6 +133,14 @@
<int key="connectionID">3</int>
</object>
<object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">hueValueField</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="380933317"/>
+ </object>
+ <int key="connectionID">18</int>
+ </object>
+ <object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">buttonClicked:</string>
<reference key="source" ref="1040238704"/>
@@ -204,7 +211,7 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
- <int key="maxID">17</int>
+ <int key="maxID">18</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
Please sign in to comment.
Something went wrong with that request. Please try again.