<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -74,6 +74,7 @@
  * get the current page token for the currently executing method or the last method executed.  this token is automatically
  * set before a bound method is invoked and persists until the next method is invoked against the module.
  */
+
 - (NSString*) getPageToken;
 
 /**</diff>
      <filename>iphone/Classes/TitaniumBasicModule.h</filename>
    </modified>
    <modified>
      <diff>@@ -102,6 +102,9 @@
 
 - (void) setPageToken: (NSString *)token
 {
+	if ([token isEqualToString:pageToken]) {
+		return;
+	}
 	[pageToken release];
 	pageToken = [token retain];
 }</diff>
      <filename>iphone/Classes/TitaniumBasicModule.m</filename>
    </modified>
    <modified>
      <diff>@@ -374,7 +374,8 @@
 			imageKeys = [templateKeys mutableCopy];
 		}
 	}
-
+	[imageKeys addObject:@&quot;backgroundImage&quot;];
+	[imageKeys addObject:@&quot;selectedBackgroundImage&quot;];
 
 	NSArray * oldKeys = [imagesCache allKeys];
 	for (NSString * thisKey in oldKeys) {
@@ -391,7 +392,7 @@
 	
 	
 	for (NSString * thisKey in imageKeys) {
-		[self noteImage:@&quot;image&quot; relativeToUrl:baseUrl];
+		[self noteImage:thisKey relativeToUrl:baseUrl];
 	}
 
 </diff>
      <filename>iphone/Classes/TitaniumCellWrapper.m</filename>
    </modified>
    <modified>
      <diff>@@ -138,6 +138,7 @@ typedef enum {
 - (void) unregisterThread:(TitaniumCmdThread *) thread;
 - (TitaniumCmdThread *) threadForToken: (NSString *) token;
 - (TitaniumCmdThread *) currentThread;
+- (NSString *)	doTitaniumMethod:(NSURL *)functionUrl withArgumentString:(NSString *)argString;
 
 #pragma mark Module registration
 - (TitaniumModule *) moduleNamed: (NSString *) moduleClassName;</diff>
      <filename>iphone/Classes/TitaniumHost.h</filename>
    </modified>
    <modified>
      <diff>@@ -20,9 +20,9 @@
 
 @interface TitaniumImageView : UIImageView
 {
-	id&lt;TitaniumImageViewDelegate&gt;	delegate;
+	NSObject&lt;TitaniumImageViewDelegate&gt;	* delegate;
 }
-@property(nonatomic,readwrite,assign)	id&lt;TitaniumImageViewDelegate&gt; delegate;
+@property(nonatomic,readwrite,assign)	NSObject&lt;TitaniumImageViewDelegate&gt; * delegate;
 
 @end
 </diff>
      <filename>iphone/Classes/TitaniumImageViewController.h</filename>
    </modified>
    <modified>
      <diff>@@ -79,6 +79,8 @@ typedef enum {
 	NSLock * actionLock;
 	NSMutableArray * actionQueue;
 
+	UIColor * backgroundColor;
+
 	TitaniumCellWrapper * templateCell;
 }
 </diff>
      <filename>iphone/Classes/TitaniumTableViewController.h</filename>
    </modified>
    <modified>
      <diff>@@ -309,6 +309,7 @@ UIColor * checkmarkColor = nil;
 		tableView = [[UITableView alloc] initWithFrame:startSize style:tableStyle];
 		[tableView setDelegate:self];	[tableView setDataSource:self];
 		[tableView setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight];
+		if(backgroundColor != nil)[tableView setBackgroundColor:backgroundColor];
 		if (tableRowHeight &gt; 5){
 			[tableView setRowHeight:tableRowHeight];
 		}		
@@ -370,6 +371,9 @@ UIColor * checkmarkColor = nil;
 		checkmarkColor = [[UIColor alloc] initWithRed:(55.0/255.0) green:(79.0/255.0) blue:(130.0/255.0) alpha:1.0];
 	}
 
+	[backgroundColor release];
+	backgroundColor = [UIColorWebColorNamed([inputState objectForKey:@&quot;backgroundColor&quot;]) retain];
+
 	Class dictClass = [NSDictionary class];
 	if (![inputState isKindOfClass:dictClass]){
 		NSLog(@&quot;[WARN] SHOULDN'T HAPPEN: %@ is trying to read the state of a non-dictionary %@!&quot;,self,inputState);
@@ -606,8 +610,6 @@ UIColor * checkmarkColor = nil;
 			result = [[[ComplexTableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@&quot;complex&quot;] autorelease];
 		}
 		[(ComplexTableViewCell *)result setDataWrapper:rowWrapper];
-		[sectionLock unlock];
-		return result;
 		
 	} else if ([rowWrapper isButton]) {
 		result = [ourTableView dequeueReusableCellWithIdentifier:@&quot;button&quot;];
@@ -617,6 +619,7 @@ UIColor * checkmarkColor = nil;
 		}
 		[(id)result setText:[rowWrapper title]];
 		[(id)result setFont:[rowWrapper font]];
+		[(id)result setImage:[rowWrapper image]];
 	} else { //plain cell
 		NSString * valueString = [rowWrapper value];
 		if (valueString == nil){
@@ -640,14 +643,44 @@ UIColor * checkmarkColor = nil;
 		UIColor * textColor = [UIColor blackColor];
 		if (ourType == UITableViewCellAccessoryCheckmark) textColor = checkmarkColor;
 		[(id)result setTextColor:textColor];
+		[(id)result setImage:[rowWrapper image]];
 	}
 
-	[(id)result setImage:[rowWrapper image]];
 	[result setAccessoryType:ourType];
 	[result setAccessoryView:[[rowWrapper inputProxy] nativeView]];
 	UIColor * bgColor = [rowWrapper colorForKey:@&quot;backgroundColor&quot;];
-	if(bgColor != nil)[result setBackgroundColor:bgColor];
-	else [result setBackgroundColor:[UIColor whiteColor]];
+	UIColor * selectedBgColor = [rowWrapper colorForKey:@&quot;selectedBackgroundColor&quot;];
+
+	UIImage * bgImage = [rowWrapper stretchableImageForKey:@&quot;backgroundImage&quot;];
+	UIImage	* selectedBgImage = [rowWrapper stretchableImageForKey:@&quot;selectedBackgroundImage&quot;];
+
+	if((tableStyle == UITableViewStyleGrouped) &amp;&amp; (bgImage == nil)){
+		if(bgColor != nil)[result setBackgroundColor:bgColor];
+		else [result setBackgroundColor:[UIColor whiteColor]];
+	} else {
+		UIImageView * bgView = (UIImageView *)[result backgroundView];
+		if(![bgView isKindOfClass:[UIImageView class]]){
+			bgView = [[[UIImageView alloc] initWithFrame:[result frame]] autorelease];
+			[result setBackgroundView:bgView];
+		}
+		[bgView setImage:bgImage];
+		[bgView setBackgroundColor:(bgColor==nil)?[UIColor clearColor]:bgColor];
+	}
+
+	if((selectedBgColor == nil)&amp;&amp;(selectedBgImage == nil)){
+		[result setSelectedBackgroundView:nil];
+	} else {
+		UIImageView * selectedBgView = (UIImageView *)[result selectedBackgroundView];
+		if(![selectedBgView isKindOfClass:[UIImageView class]]){
+			selectedBgView = [[[UIImageView alloc] initWithFrame:[result frame]] autorelease];
+			[result setSelectedBackgroundView:selectedBgView];
+		}
+		
+		[selectedBgView setImage:selectedBgImage];
+		[selectedBgView setBackgroundColor:(selectedBgColor==nil)?[UIColor clearColor]:selectedBgColor];
+		
+	}
+
 
 
 	[sectionLock unlock];</diff>
      <filename>iphone/Classes/TitaniumTableViewController.m</filename>
    </modified>
    <modified>
      <diff>@@ -95,7 +95,7 @@ try{
 		{title:'row 3',backgroundColor:'#00FFFF'},
 		{html:'&lt;b&gt;row&lt;/b&gt; 4 has &lt;i&gt;html?&lt;/i&gt;',selected:true},
 
-		{rowHeight:50,title:'Layout test',image:'Phone.png',layout:[{top:5,height:5,left:10,name:'title',type:'text',fontSize:'10px'},{type:'image',name:'image',top:0,height:40}]},
+		{rowHeight:50,title1:'Layout test1',image3:'Phone.png',layout:[{top:5,height:5,left:45,name:'title1',type:'text',fontSize:'10px'},{type:'image',name:'image3',top:0,height:40,left:5,width:40}]},
 
 		{title:'row 1', hasChild:true, image:'Mail.png',backgroundColor:'#00FFFF'},
 		{title:'row 2', hasDetail:true, image:'Safari.png'},
@@ -177,7 +177,7 @@ function test2()
 {
 try{
 	var buttonData = [
-		{title:null,image:'images/one.png'},
+		{title:null,image:'images/one.png',backgroundImage:'Safari.png',selectedBackgroundImage:'Phone.png'},
 		{image:'images/two.png',backgroundColor:'#00FFFF'}
 	];
 
@@ -229,7 +229,7 @@ try{
 //		Ti.API.debug(e.toString());
 		Titanium.UI.createAlertDialog({title:&quot;Input!&quot;,message:('Button:'+e.index)}).show();
 	});
-	var groupedView = Titanium.UI.iPhone.createGroupedView({template:{title:'Button?',backgroundColor:'#FFFF00'}});
+	var groupedView = Titanium.UI.iPhone.createGroupedView({backgroundColor:'transparent',template:{title:'Button?',backgroundColor:'#FFFF00'}});
 //{data:data,rowHeight:80}, function(eventObject) {
 //		var rowData = eventObject.rowData;
 //
@@ -253,7 +253,7 @@ try{
 //	groupedView.setLeftNavButton(Ti.UI.createButton({systemButton:'rewind'}));
 
 //	groupedView.setLeftNavButton(null);
-	var winny = Ti.UI.createWindow({views:[groupedView]});
+	var winny = Ti.UI.createWindow({backgroundImage:'Default.png',views:[groupedView]});
 //	winny.addView(groupedView);
 	winny.open();
 //	groupedView.open({animated:false});</diff>
      <filename>iphone/Resources/ui.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fd6120f897d14b3c3a18e3583304603b2ce1784b</id>
    </parent>
    <parent>
      <id>0a5f90144475be387a3521a22da27fc1e11c353e</id>
    </parent>
  </parents>
  <author>
    <name>Jeff Haynie</name>
    <email>jhaynie@gmail.com</email>
  </author>
  <url>http://github.com/appcelerator/titanium_mobile/commit/85a751c8be52b052fdb68ea7d9ec1a5112a58179</url>
  <id>85a751c8be52b052fdb68ea7d9ec1a5112a58179</id>
  <committed-date>2009-11-09T21:55:56-08:00</committed-date>
  <authored-date>2009-11-09T21:55:56-08:00</authored-date>
  <message>Merge branch 'master' of git@github.com:appcelerator/titanium_mobile</message>
  <tree>6500a547b4758a186af117b0116f65f2ae32b9fb</tree>
  <committer>
    <name>Jeff Haynie</name>
    <email>jhaynie@gmail.com</email>
  </committer>
</commit>
