<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,7 +2,10 @@ require File.dirname(__FILE__) + '/example_helper'
 
 at &quot;http://localhost/sites/testing&quot; do
   
-  create_list &quot;Custom List&quot;, GenericList
+  create_list &quot;Custom List&quot;, GenericList do
+    add_column &quot;test&quot;
+  end
+  
   create_list &quot;Links List&quot;, Links
   create_list &quot;Tasks List&quot;, Tasks
   create_list &quot;Documents&quot;, DocumentLibrary</diff>
      <filename>examples/creating_lists.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,12 @@ at :webapp =&gt; &quot;http://localhost&quot; do
     
     # create site hierarchy within our new site
     inside root_web do
+      
+      # create lists
+      create_list &quot;Documents&quot;, DocumentLibrary
+      create_list &quot;Announcements&quot;, Announcements
+      
+      # create child sites
       create_web &quot;Test New Site&quot;, BlankSite do
         create_web &quot;Child Web&quot;, BlankSite
       end</diff>
      <filename>examples/simple_migration.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,7 +8,9 @@ module RPoint
 			# Checks if this context is a valid context for the
 			# args provided
 			def self.valid_context_for?(*args)
-				# if first arg is hash and has key of :site, valid
+			  return true if args[0].is_a? SPList
+			  
+				# if first arg is hash and has key of :list, valid
 				if args[0].is_a? Hash
 					return true if args[0].has_key?(:list)
 				end
@@ -20,8 +22,12 @@ module RPoint
 			
 			# Instance Methods -------------------------------------------------------------------
 			
+			attr_reader :list
+			
 			def initialize(*args)
-				
+				if args[0].is_a? SPList
+				  @list = args[0]
+			  end
 			end
 			
 			def add_column(name)</diff>
      <filename>lib/rpoint/contexts/list_context.rb</filename>
    </modified>
    <modified>
      <diff>@@ -54,23 +54,26 @@ module RPoint
 			def create_web(name, template, options = {}, &amp;blk)
 			  # create our new web
 			  new_web = Webs.create_web(@web, name, template, options)
-			  new_web_context = WebContext.new(new_web)
-			  
-			  # if we have a block, execute it in the scope of the new context
-			  if block_given?
-			    new_web_context.instance_eval(&amp;blk)
-		    end
-		    
-		    new_web_context
+			  context_for_new_object(new_web, WebContext, &amp;blk)
 			end
 			
 			
 			##
 			# Creates a new list
 			def create_list(name, template, options = {}, &amp;blk)
-			  puts &quot;creating list named #{name}&quot;
+			  # create the new list
 			  new_list = Lists.create_list(@web, name, template, options)
-			  puts &quot;done&quot;
+			  context_for_new_object(new_list, ListContext, &amp;blk)
+			end
+			
+			private
+			
+			def context_for_new_object(created_object, context_class, &amp;blk)
+			  ctx = context_class.new(created_object)
+			  if block_given?
+			    ctx.instance_eval(&amp;blk)
+		    end
+		    ctx
 			end
 			
 		end</diff>
      <filename>lib/rpoint/contexts/web_context.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>458e7cec409bcfa954617c54014f44315b1c2760</id>
    </parent>
  </parents>
  <author>
    <name>Glen Cooper</name>
    <email>glen@glenc.net</email>
  </author>
  <url>http://github.com/glenc/rpoint/commit/87e71853fda6ca3ac0944ffcda508f899a81b89d</url>
  <id>87e71853fda6ca3ac0944ffcda508f899a81b89d</id>
  <committed-date>2008-08-10T23:29:13-07:00</committed-date>
  <authored-date>2008-08-10T23:29:13-07:00</authored-date>
  <message>Added ability for create_list to execute a block</message>
  <tree>c0a96b1dec152f384d9b5406b16db81f68e90f11</tree>
  <committer>
    <name>Glen Cooper</name>
    <email>glen@glenc.net</email>
  </committer>
</commit>
