Permalink
Browse files

removed debug lines and demo data from capp version

  • Loading branch information...
1 parent f376589 commit f10e0dcafb318197a7c404d4b8598786e6b2497b @jfahrenkrug committed Dec 2, 2010
Showing with 0 additions and 14 deletions.
  1. +0 −2 capp_image_search/AppController.j
  2. +0 −12 capp_image_search/ImagesController.j
@@ -47,8 +47,6 @@
//Create the ImagesController
imagesController = [[ImagesController alloc] init];
- //Load example data
- [imagesController loadExampleImages];
/* ------------ Images --------------- */
imageListView = [[ImageListView alloc] initWithFrame:CGRectMake(0.0, 0.0, 250.0, 400.0)];
@@ -1,6 +1,5 @@
@import <Foundation/CPObject.j>
@import "GoogleImage.j"
-@import "DemoData.j"
@import "ImageListView.j"
@implementation ImagesController : CPObject
@@ -22,13 +21,6 @@
return images;
}
-- (void)loadExampleImages {
- //var json = [[DemoData exampleJSONString] objectFromJSON];
- var json = [DemoData exampleJSON];
- console.log(json);
- [self setImages:[GoogleImage imagesFromJSONObjects:json]];
-}
-
- (Image)selectedImage {
return [images objectAtIndex:[[imageListView selectionIndexes] firstIndex]];
}
@@ -41,7 +33,6 @@
- (void)search:(CPString)term {
if (term && [term length] > 0) {
- console.log('search1');
var request = [CPURLRequest requestWithURL:'http://ajax.googleapis.com/ajax/services/search/images?v=1.0&rsz=large&imgtype=photo&q=' + term];
[request setHTTPMethod:@"GET"];
@@ -56,7 +47,6 @@
- (void)connection:(CPURLConnection)connection didReceiveData:(CPString)data
{
- console.log('search2');
if (!receivedData) {
receivedData = data;
} else {
@@ -72,7 +62,6 @@
- (void)connectionDidFinishLoading:(CPURLConnection)aConnection
{
- console.log('search3 ' + receivedData);
var result = nil;
try {
@@ -82,7 +71,6 @@
}
if (result) {
- console.log('search4');
var images = [GoogleImage imagesFromJSONObjects:result]
console.log(images);
if (images) {

0 comments on commit f10e0dc

Please sign in to comment.