<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Joseph Mate&#039;s Blog</title>
	<atom:link href="http://josephmate.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://josephmate.wordpress.com</link>
	<description>What is Joseph working on?</description>
	<lastBuildDate>Sat, 14 Jan 2012 23:18:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='josephmate.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Joseph Mate&#039;s Blog</title>
		<link>http://josephmate.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://josephmate.wordpress.com/osd.xml" title="Joseph Mate&#039;s Blog" />
	<atom:link rel='hub' href='http://josephmate.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Android Appendable List &#8211; Github</title>
		<link>http://josephmate.wordpress.com/2012/01/14/android-appendable-list-github/</link>
		<comments>http://josephmate.wordpress.com/2012/01/14/android-appendable-list-github/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 23:03:41 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://josephmate.wordpress.com/?p=119</guid>
		<description><![CDATA[Hey everyone, Due to some people having issues getting the code to run, I have posted the complete example code on github. Just download the code and open it up in eclipse. https://github.com/josephmate/AndroidAppendableList If you don&#8217;t know how to use git, you can download a zip file of the sourcecode above, or run this command: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=119&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hey everyone,</p>
<p>Due to some people having issues getting the code to run, I have posted the complete example code on github. Just download the code and open it up in eclipse.</p>
<p><a href="https://github.com/josephmate/AndroidAppendableList">https://github.com/josephmate/AndroidAppendableList</a><br />
If you don&#8217;t know how to use git, you can download a zip file of the sourcecode above, or run this command:<br />
git clone git://github.com/josephmate/AndroidAppendableList.git</p>
<p>Cheers,<br />
Joseph</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/josephmate.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/josephmate.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/josephmate.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/josephmate.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/josephmate.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/josephmate.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/josephmate.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/josephmate.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/josephmate.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/josephmate.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/josephmate.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/josephmate.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/josephmate.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/josephmate.wordpress.com/119/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=119&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://josephmate.wordpress.com/2012/01/14/android-appendable-list-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e0fe695d8be1d9a1696fc1c8daf0533?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Joseph</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating a Continuously Appendable List &#8211; Result</title>
		<link>http://josephmate.wordpress.com/2010/09/10/creating-a-continuously-appendable-list-result/</link>
		<comments>http://josephmate.wordpress.com/2010/09/10/creating-a-continuously-appendable-list-result/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 04:23:38 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://josephmate.wordpress.com/?p=112</guid>
		<description><![CDATA[Result ( The left is mine. ): Big Picture of What&#8217;s Going On: I have a TableLayout that I add rows to when the &#8220;+&#8221; button is clicked. Each row has a &#8220;-&#8221; button that knows which table and row it belongs to. That way it has enough information to remove itself from the table. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=112&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Result ( The left is mine. ):<br />
<img src="http://josephmate.files.wordpress.com/2010/09/screenshot-7.png?w=720" alt="Result" /> <img src="http://josephmate.files.wordpress.com/2010/09/continuously-appendable.png?w=720" alt="Original" /></p>
<p>Big Picture of What&#8217;s Going On:<br />
I have a TableLayout that I add rows to when the &#8220;+&#8221; button is clicked. Each row has a &#8220;-&#8221; button that knows which table and row it belongs to. That way it has enough information to remove itself from the table.</p>
<p>Code:<br />
<pre class="brush: java;">
public class AppendToAList extends Activity {
    
	TableLayout list;
	int rowsSoFar = 0;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        Button addButton = (Button) findViewById( R.id.add );
        // Every time the &quot;+&quot; button is clicked,
        // add a new row to the table.
        addButton.setOnClickListener( new OnClickListener() {
			public void onClick(View view) { addButton(); }
		});
        
        list = (TableLayout) findViewById( R.id.list );
        
        // Start with one row.
        addButton();
    }
    
    /***
     * Gets all the information necessary to delete itself from the constructor.
     * Deletes itself when the button is pressed.
     */
    private static class RowRemover implements OnClickListener {
    	private TableLayout list;
    	private TableRow rowToBeRemoved;
    	
    	/***
    	 * @param list	The list that the button belongs to
    	 * @param row	The row that the button belongs to
    	 */
    	public RowRemover( TableLayout list, TableRow row ) {
    		this.list = list;
    		this.rowToBeRemoved = row;
    	}
    	
    	public void onClick( View view ) {
    		list.removeView( rowToBeRemoved );
    	}
    }
    
    public void addButton() {
    	TableRow newRow = new TableRow( list.getContext() );
    	Button actionButton = new Button( newRow.getContext() );
    	actionButton.setText( &quot;Action: &quot; + ++rowsSoFar );
    	Button removeSelfButton = new Button( newRow.getContext() );
    	removeSelfButton.setText( &quot;-&quot; );
    	// pass on all the information necessary for deletion
    	removeSelfButton.setOnClickListener( new RowRemover( list, newRow ));
    	newRow.addView( actionButton );
    	newRow.addView( removeSelfButton );
    	list.addView( newRow );
    }
}
</pre></p>
<p>Layout:<br />
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;ScrollView xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    android:layout_width=&quot;fill_parent&quot;
    android:layout_height=&quot;fill_parent&quot; &gt;
	&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
	    android:orientation=&quot;vertical&quot;
	    android:layout_width=&quot;fill_parent&quot;
	    android:layout_height=&quot;fill_parent&quot; &gt;
		&lt;TableLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
		    android:orientation=&quot;vertical&quot;
		    android:layout_width=&quot;fill_parent&quot;
		    android:layout_height=&quot;fill_parent&quot;
		    android:stretchColumns=&quot;0&quot; &gt;
		    &lt;TableRow
		    	android:layout_width=&quot;fill_parent&quot; &gt;
		    	&lt;TextView
		    		android:text=&quot;Heading&quot; /&gt;
		    	&lt;Button
		    		android:id=&quot;@+id/add&quot;
		    		android:text=&quot;+&quot; /&gt;
		    &lt;/TableRow&gt;
		&lt;/TableLayout&gt;
		&lt;TableLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
			android:id=&quot;@+id/list&quot;
		    android:orientation=&quot;vertical&quot;
		    android:layout_width=&quot;fill_parent&quot;
		    android:layout_height=&quot;fill_parent&quot; 
    		android:stretchColumns=&quot;0&quot; /&gt;

	&lt;/LinearLayout&gt;
&lt;/ScrollView&gt;
</pre></p>
<p>I&#8217;m off to apply this to my android application!<br />
Cheers,<br />
Joseph</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/josephmate.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/josephmate.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/josephmate.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/josephmate.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/josephmate.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/josephmate.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/josephmate.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/josephmate.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/josephmate.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/josephmate.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/josephmate.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/josephmate.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/josephmate.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/josephmate.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=112&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://josephmate.wordpress.com/2010/09/10/creating-a-continuously-appendable-list-result/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e0fe695d8be1d9a1696fc1c8daf0533?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Joseph</media:title>
		</media:content>

		<media:content url="http://josephmate.files.wordpress.com/2010/09/screenshot-7.png" medium="image">
			<media:title type="html">Result</media:title>
		</media:content>

		<media:content url="http://josephmate.files.wordpress.com/2010/09/continuously-appendable.png" medium="image">
			<media:title type="html">Original</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating a Continuously Appendable List &#8211; Tinkering</title>
		<link>http://josephmate.wordpress.com/2010/09/10/creating-a-continuously-appendable-list-tinkering/</link>
		<comments>http://josephmate.wordpress.com/2010/09/10/creating-a-continuously-appendable-list-tinkering/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 00:54:47 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://josephmate.wordpress.com/?p=99</guid>
		<description><![CDATA[My goal is to create a list where the user can continuously append buttons. This is similar to the functionality we see when editing a contact on the android. First I started tinkering with a LinearLayout and dynamically added some buttons to it. Here&#8217;s the code I came up with: And this is the layout: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=99&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My goal is to create a list where the user can continuously append buttons. This is similar to the functionality we see when editing a contact on the android.<br />
<img src="http://josephmate.files.wordpress.com/2010/09/continuously-appendable.png?w=720" alt="Continuously Appendable List" /></p>
<p>First I started tinkering with a LinearLayout and dynamically added some buttons to it.</p>
<p>Here&#8217;s the code I came up with:<br />
<pre class="brush: java;">
public class AppendToAList extends Activity {
    
	LinearLayout list;
	
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        list = (LinearLayout) findViewById( R.id.list );
        
        Button b1 = new Button( list.getContext() );
        b1.setText( &quot;This is the first textbox&quot; );
        Button b2 = new Button( list.getContext() );
        b2.setText( &quot;This is the second textbox&quot; );
        list.addView(b1);
        list.addView(b2);
    }
}
</pre><br />
And this is the layout:<br />
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
	android:id=&quot;@+id/list&quot;
    android:orientation=&quot;vertical&quot;
    android:layout_width=&quot;fill_parent&quot;
    android:layout_height=&quot;fill_parent&quot;
    &gt;
&lt;/LinearLayout&gt;
</pre></p>
<p>The result looked like this:<br />
<img src="http://josephmate.files.wordpress.com/2010/09/first_try.png?w=331" alt="first try" /></p>
<p>Sweet, it worked. Now I am going to add an OnclickListener to one of the buttons to add more buttons:<br />
<pre class="brush: java;">
public class AppendToAList extends Activity {
    
	LinearLayout list;
	
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        list = (LinearLayout) findViewById( R.id.list );
        
        Button addButtons = new Button( list.getContext() );
        addButtons.setText( &quot;Add a button.&quot; );
        addButtons.setOnClickListener( new OnClickListener() {
			
        	int buttonsSoFar = 0;
        	
			public void onClick(View arg0) {
				Button newButton = new Button( list.getContext() );
				newButton.setText( &quot;Button: &quot; + ++buttonsSoFar );
				list.addView( newButton );
			}
		});
        list.addView(addButtons);
    }
}
</pre></p>
<p>The result:<br />
<img src="http://josephmate.files.wordpress.com/2010/09/screenshot-1.png?w=326" alt="Second Try" /></p>
<p>There&#8217;s a a slight problem. You cannot see the new buttons if you try to add more than eight. Here&#8217;s what is looks like when I added 12 buttons:<br />
<img src="http://josephmate.files.wordpress.com/2010/09/screenshot-2.png?w=720" alt="Problem with the Second Try" /></p>
<p>However, we can just place the LinearLayout inside a ScrollView, to make it scrollable:<br />
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;ScrollView xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    android:layout_width=&quot;fill_parent&quot;
    android:layout_height=&quot;fill_parent&quot;
	&gt;
	&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
		android:id=&quot;@+id/list&quot;
	    android:orientation=&quot;vertical&quot;
	    android:layout_width=&quot;fill_parent&quot;
	    android:layout_height=&quot;fill_parent&quot;
	    &gt;
	&lt;/LinearLayout&gt;
&lt;/ScrollView&gt;
</pre></p>
<p>The result:<br />
<img src="http://josephmate.files.wordpress.com/2010/09/third_try.png?w=720" alt="Third Try" /></p>
<p>Now I believe that I have all the tools necessary to mimic the google contact&#8217;s continuously appendable list.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/josephmate.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/josephmate.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/josephmate.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/josephmate.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/josephmate.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/josephmate.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/josephmate.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/josephmate.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/josephmate.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/josephmate.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/josephmate.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/josephmate.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/josephmate.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/josephmate.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=99&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://josephmate.wordpress.com/2010/09/10/creating-a-continuously-appendable-list-tinkering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e0fe695d8be1d9a1696fc1c8daf0533?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Joseph</media:title>
		</media:content>

		<media:content url="http://josephmate.files.wordpress.com/2010/09/continuously-appendable.png" medium="image">
			<media:title type="html">Continuously Appendable List</media:title>
		</media:content>

		<media:content url="http://josephmate.files.wordpress.com/2010/09/first_try.png?w=331" medium="image">
			<media:title type="html">first try</media:title>
		</media:content>

		<media:content url="http://josephmate.files.wordpress.com/2010/09/screenshot-1.png?w=326" medium="image">
			<media:title type="html">Second Try</media:title>
		</media:content>

		<media:content url="http://josephmate.files.wordpress.com/2010/09/screenshot-2.png" medium="image">
			<media:title type="html">Problem with the Second Try</media:title>
		</media:content>

		<media:content url="http://josephmate.files.wordpress.com/2010/09/third_try.png" medium="image">
			<media:title type="html">Third Try</media:title>
		</media:content>
	</item>
		<item>
		<title>Cryptic Stacktrace from Android</title>
		<link>http://josephmate.wordpress.com/2010/03/29/cryptic-stacktrace-from-android/</link>
		<comments>http://josephmate.wordpress.com/2010/03/29/cryptic-stacktrace-from-android/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 01:04:34 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://josephmate.wordpress.com/?p=93</guid>
		<description><![CDATA[I was building a new Activity for my Android application and I came across this error as I was running it: However, there was nothing wrong with my layout XML: The problem was I accidentally had my Activity extend from ListActivity instead of Activity: Here is a link to a problem with the exact same [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=93&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was building a new Activity for my Android application and I came across this error as I was running it:</p>
<p><pre class="brush: java;">
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tfc/com.tfc.ui.LearningScreen}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
     at android.app.ActivityThread.access$2100(ActivityThread.java:116)
     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
     at android.os.Handler.dispatchMessage(Handler.java:99)
     at android.os.Looper.loop(Looper.java:123)
     at android.app.ActivityThread.main(ActivityThread.java:4203)
     at java.lang.reflect.Method.invokeNative(Native Method)
     at java.lang.reflect.Method.invoke(Method.java:521)
     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
     at dalvik.system.NativeStart.main(Native Method)
 Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
     at android.app.ListActivity.onContentChanged(ListActivity.java:236)
     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:316)
     at android.app.Activity.setContentView(Activity.java:1620)
     at com.tfc.ui.LearningScreen.onCreate(LearningScreen.java:29)
     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
     ... 11 more
</pre></p>
<p>However, there was nothing wrong with my layout XML:<br />
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    android:orientation=&quot;vertical&quot;
    android:layout_width=&quot;fill_parent&quot;
    android:layout_height=&quot;fill_parent&quot;
    &gt;

   	&lt;TextView  
	   android:layout_width=&quot;fill_parent&quot; 
	   android:layout_height=&quot;wrap_content&quot; 
	   android:layout_weight=&quot;1.0&quot;
	   /&gt;

	&lt;Button
	    android:layout_width=&quot;fill_parent&quot; 
	    android:layout_height=&quot;wrap_content&quot; 
		android:text=&quot;Flip&quot;
		android:id=&quot;@+id/btnFlip&quot;
		/&gt;
    
	&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
	    android:orientation=&quot;horizontal&quot;
	    android:layout_width=&quot;fill_parent&quot;
	    android:layout_height=&quot;wrap_content&quot;
	    &gt;
		&lt;Button
		    android:layout_width=&quot;wrap_content&quot; 
		    android:layout_height=&quot;wrap_content&quot; 
	    	android:layout_weight=&quot;0.5&quot;
			android:text=&quot;Right&quot;
			android:id=&quot;@+id/btnRight&quot;
			/&gt;
		&lt;Button
		    android:layout_width=&quot;wrap_content&quot; 
		    android:layout_height=&quot;wrap_content&quot; 
	    	android:layout_weight=&quot;0.5&quot;
			android:text=&quot;Wrong&quot;
			android:id=&quot;@+id/btnWrong&quot;
			/&gt;
    &lt;/LinearLayout&gt;

&lt;/LinearLayout&gt;
</pre></p>
<p>The problem was I accidentally had my Activity extend from ListActivity instead of Activity:<br />
<pre class="brush: java;">
public class LearningScreen extends ListActivity {
     @Override public void onCreate(Bundle icicle) {
          super.onCreate(icicle);
          setContentView(R.layout.learning_screen);
     }
}
</pre></p>
<p>Here is a link to a problem with the exact same symptom, but turned out to be a completely different cause:<br />
&#8220;Your content must have a listview whose id attribute is &#8216;android.R.id.list&#8217; &#8220;</p>
<p>http://groups.google.com/group/android-developers/browse_thread/thread/d4d1d09dea087a71</p>
<p>Hope this helps you if you&#8217;re stuck with a similar issue.</p>
<p>Cheers,<br />
Joseph</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/josephmate.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/josephmate.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/josephmate.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/josephmate.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/josephmate.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/josephmate.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/josephmate.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/josephmate.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/josephmate.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/josephmate.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/josephmate.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/josephmate.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/josephmate.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/josephmate.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=93&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://josephmate.wordpress.com/2010/03/29/cryptic-stacktrace-from-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e0fe695d8be1d9a1696fc1c8daf0533?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Joseph</media:title>
		</media:content>
	</item>
		<item>
		<title>Javascript to Redirect a Drop Down List (select)</title>
		<link>http://josephmate.wordpress.com/2010/03/05/javascript-to-redirect-a-drop-down-list-select/</link>
		<comments>http://josephmate.wordpress.com/2010/03/05/javascript-to-redirect-a-drop-down-list-select/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 00:05:20 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[drop down list]]></category>
		<category><![CDATA[html select]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://josephmate.wordpress.com/?p=85</guid>
		<description><![CDATA[You can redirect using an html select without having to place it in a form, or have the user press a button. The user only needs to change the value. Check out the following code that you can copy and paste into an html file and take for a test drive: Breaking down the javascript [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=85&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You can redirect using an html select without having to place it in a form, or have the user press a button. The user only needs to change the value.</p>
<p>Check out the following code that you can copy and paste into an html file and take for a test drive:<br />
<pre class="brush: xml;">
&lt;html&gt;
	&lt;head&gt;
		&lt;title&gt;Drop Down List Redirect&lt;/title&gt;
	&lt;/head&gt;

	&lt;body&gt;
		&lt;select onchange=&quot;top.location.href = 'http://www.google.com/search?q='
				+ this.options[ this.selectedIndex ].value&quot; &gt;
			&lt;option value=&quot;&quot;&gt;None&lt;/option&gt;
			&lt;option value=&quot;cute+dogs&quot;&gt;Cute Dogs&lt;/option&gt;
			&lt;option value=&quot;lasers+beams&quot;&gt;Laser Beams&lt;/option&gt;
			&lt;option value=&quot;kitty+cat&quot;&gt;Kitty Cat&lt;/option&gt;
		&lt;/select&gt;
	&lt;/body&gt;
&lt;/html&gt;
</pre></p>
<p>Breaking down the javascript code into more understandable chunks gives:<br />
<pre class="brush: jscript;">
// 'this' points to the select object after change the item in the drop down list.
var drop_down = this;

// drop_down.selectedIndex contains the position of the item that was selected from the drop down
var selected_index = drop_down.selectedIndex;

// drop_down.options contains all of html option elements inside the html select
// we need to go to .value to get the 'value=&quot;something&quot;' written in the HTML
var selected_value = drop_down.options[ selected_index ].value;

// changing top.location.href redirects ( unless you only append #blah )
top.location.href = 'http://www.google.com/search?q=' + selected_value
</pre></p>
<p>I hope you guys find this helpful!</p>
<p>Cheers,<br />
Joseph</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/josephmate.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/josephmate.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/josephmate.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/josephmate.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/josephmate.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/josephmate.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/josephmate.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/josephmate.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/josephmate.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/josephmate.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/josephmate.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/josephmate.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/josephmate.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/josephmate.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=85&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://josephmate.wordpress.com/2010/03/05/javascript-to-redirect-a-drop-down-list-select/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e0fe695d8be1d9a1696fc1c8daf0533?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Joseph</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting URL using Javascript</title>
		<link>http://josephmate.wordpress.com/2010/02/22/setting-url-using-javascript/</link>
		<comments>http://josephmate.wordpress.com/2010/02/22/setting-url-using-javascript/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 02:55:57 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://josephmate.wordpress.com/?p=80</guid>
		<description><![CDATA[Severin just pointed out a much easier way to update the URL using javascript: Thanks Severin! I have extended this code into an example you can copy and paste into an html file and play around with: With Markus, this leaves lots of places for us to place the code. For a link_to_remote, we can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=80&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Severin just pointed out a much easier way to update the URL using javascript:<br />
<pre class="brush: xml;">
&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;
   window.location.href = &quot;/main/some_controller/some_action#some_anchor&quot;;
&lt;/script&gt;
</pre></p>
<p>Thanks Severin!<br />
I have extended this code into an example you can copy and paste into an html file and play around with:<br />
<pre class="brush: xml;">
&lt;html&gt;
&lt;head&gt;&lt;title&gt;URL Updating&lt;/title&gt;&lt;/head&gt;
&lt;body&gt;

&lt;input    type=&quot;button&quot; 
             name=&quot;cool&quot;
             value=&quot;cool&quot;
             onclick=&quot;window.location.href = window.location.href + '#value=param';&quot; /&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre></p>
<p>With Markus, this leaves lots of places for us to place the code. For a link_to_remote, we can place set the window.location.href in the :before or :complete variables. Example:<br />
markus/app/views/ajax_paginate/_initial_paginate_links_alpha.html.erb<br />
<pre class="brush: ruby;">
&lt;%= link_to_remote &quot;&lt;&lt; &quot; + t('pagination.first'), :url =&gt; {
      :action =&gt; action,
      :id =&gt; assignment.id,
      :filter =&gt; filter,
      :page =&gt; 1,
      :per_page =&gt; per_page,
      :sort_by =&gt; sort_by,
      :alpha_category =&gt; alpha_pagination_options[0],
      :update_alpha_pagination_options =&gt; &quot;false&quot;
    },
    :before =&gt; &quot;ap_thinking_start('#{table_name}');&quot;,
    :complete =&gt; &quot;ap_thinking_stop(); window.location.href = window.location.href + '#value=param';&quot; %&gt;
</pre></p>
<p>Notice that I stuck it right after the :complete =&gt; &#8220;ap_thinking_stop(); Additionally, notice that we are no longer limited to a&#8217;s. We can not apply this to any html objects.</p>
<p>Cheers,<br />
Joseph</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/josephmate.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/josephmate.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/josephmate.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/josephmate.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/josephmate.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/josephmate.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/josephmate.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/josephmate.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/josephmate.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/josephmate.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/josephmate.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/josephmate.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/josephmate.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/josephmate.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=80&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://josephmate.wordpress.com/2010/02/22/setting-url-using-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e0fe695d8be1d9a1696fc1c8daf0533?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Joseph</media:title>
		</media:content>
	</item>
		<item>
		<title>Rails, AJAX, Back Buttons, and Bookmarks</title>
		<link>http://josephmate.wordpress.com/2010/02/20/rails-ajax-back-buttons-and-bookmarks/</link>
		<comments>http://josephmate.wordpress.com/2010/02/20/rails-ajax-back-buttons-and-bookmarks/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 01:04:13 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://josephmate.wordpress.com/?p=68</guid>
		<description><![CDATA[Markus&#8217;s submission page uses AJAX to grab the next or previous page of the table of submissions. However, this breaks bookmarks and the back button. So the goal is to do something similar to gmail. They update everything after the anchor (#) in the URL. Here is what we can do with Markus with Ruby [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=68&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Markus&#8217;s submission page uses AJAX to grab the next or previous page of the table of submissions. However, this breaks bookmarks and the back button. So the goal is to do something similar to gmail. They update everything after the anchor (#) in the URL. Here is what we can do with Markus with Ruby on Rails, to do the exact same thing.</p>
<p>My examples are only going to cover the implementation of the Next &gt; button. However, this can apply to any AJAX link.</p>
<p>The part of code that generates the Next link is in:<br />
_initial_paginate_links.html.erb:<br />
<pre class="brush: ruby;">
   &lt;%= link_to_remote &quot;Next &gt;&quot;, :url =&gt; {
         :action =&gt; 's_table_paginate',
         :id =&gt; assignment.id,
         :filter =&gt; filter,
         :page =&gt; current_page + 1,
         :per_page =&gt; per_page,
         :sort_by =&gt; sort_by
       },
       :before =&gt; &quot;ap_thinking_start();&quot;,
       :complete =&gt; &quot;ap_thinking_stop();&quot; %&gt;
</pre></p>
<p>When the page loads it generates:<br />
<pre class="brush: xml;">
&lt;a onclick=&quot;ap_thinking_start();; new
Ajax.Request('/main/submissions/s_table_paginate/1?filter=none&amp;amp;page=3&amp;amp;per_page=30&amp;amp;sort_by=group_name',
{asynchronous:true, evalScripts:true,
onComplete:function(request){ap_thinking_stop();},
parameters:'authenticity_token=' +
encodeURIComponent('hjLTZo+xwhfYVOjA6E6Cbt3mm0SoaJw3t+nQG9UF/iA=')});
return false;&quot;
href=&quot;#&quot;&gt;Next &gt;&lt;/a&gt;
</pre></p>
<p>However, we want the URL to update, so we need to get rid of the &#8221; return false; &#8221; at the end of onclick. I accomplished that by using link_to and the remote_function helpers that Rails provides.</p>
<p>_initial_paginate_links.html.erb:<br />
<pre class="brush: ruby;">
   &lt;%= link_to &quot;Next &gt;&quot;, &quot;#value=param&quot;,
         : onclick =&gt;
           remote_function(
             :url =&gt; {
               :action =&gt; 's_table_paginate',
               :id =&gt; assignment.id,
               :filter =&gt; filter,
               :page =&gt; current_page + 1,
               :per_page =&gt; per_page,
               :sort_by =&gt; sort_by
             },
             :before =&gt; &quot;ap_thinking_start();&quot;,
             :complete =&gt; &quot;ap_thinking_stop();&quot;
           )
 %&gt;
</pre></p>
<p>Which generates:<br />
<pre class="brush: xml;">
&lt;a onclick=&quot;ap_thinking_start();; new
Ajax.Request('/main/submissions/s_table_paginate/1?filter=none&amp;amp;page=3&amp;amp;per_page=30&amp;amp;sort_by=group_name',
{asynchronous:true, evalScripts:true,
onComplete:function(request){ap_thinking_stop();},
parameters:'authenticity_token=' +
encodeURIComponent('hjLTZo+xwhfYVOjA6E6Cbt3mm0SoaJw3t+nQG9UF/iA=')});&quot;
href=&quot;#value=param&quot;&gt;Next &gt;&lt;/a&gt;
</pre></p>
<p>Notice that the return false is no longer there! If you try to click the Next &gt; button, then it will place #value=param at the end of the url without reloading the page.</p>
<p>Now all that remains is figuring out how to do this with an html form. For example drop downlists, with an onchange method that updates the page using AJAX but still appends #value=param to the end of the URL.</p>
<p>Cheers,<br />
Joseph</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/josephmate.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/josephmate.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/josephmate.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/josephmate.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/josephmate.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/josephmate.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/josephmate.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/josephmate.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/josephmate.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/josephmate.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/josephmate.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/josephmate.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/josephmate.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/josephmate.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=68&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://josephmate.wordpress.com/2010/02/20/rails-ajax-back-buttons-and-bookmarks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e0fe695d8be1d9a1696fc1c8daf0533?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Joseph</media:title>
		</media:content>
	</item>
		<item>
		<title>Updating URLs with a href</title>
		<link>http://josephmate.wordpress.com/2010/02/15/updating-urls-with-a-href/</link>
		<comments>http://josephmate.wordpress.com/2010/02/15/updating-urls-with-a-href/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 22:43:34 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://josephmate.wordpress.com/?p=61</guid>
		<description><![CDATA[You can put parameters into the URL with javascript. Here is an example html document: So with Markus&#8217;s submission browse page, instead of having: We can have something like: However, that means with every AJAX call that flips the page on the table, will will also have to update all the links on the page [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=61&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You can put parameters into the URL with javascript. Here is an example html document:<br />
<pre class="brush: xml;">
&lt;html&gt;
&lt;body&gt;
	&lt;a href=&quot;#test=test&quot;&gt;testing&lt;/a&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre></p>
<p>So with Markus&#8217;s submission browse page,  instead of having:<br />
<pre class="brush: xml;">
&lt;span class=&quot;ap_next_link&quot;&gt;
  &lt;a href=&quot;#&quot; onclick=&quot;ajax stuff&quot;&gt;Next &lt;/a&gt;
&lt;/span&gt;
</pre><br />
We can have something like:<br />
<pre class="brush: xml;">
&lt;span class=&quot;ap_next_link&quot;&gt;
  &lt;a href=&quot;#&lt;PARAMS GO HERE&gt;&quot; onclick=&quot;ajax stuff&quot;&gt;Next &lt;/a&gt;
&lt;/span&gt;
</pre></p>
<p>However, that means with every AJAX call that flips the page on the table, will will also have to update all the links on the page as well.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/josephmate.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/josephmate.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/josephmate.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/josephmate.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/josephmate.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/josephmate.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/josephmate.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/josephmate.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/josephmate.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/josephmate.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/josephmate.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/josephmate.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/josephmate.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/josephmate.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=61&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://josephmate.wordpress.com/2010/02/15/updating-urls-with-a-href/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e0fe695d8be1d9a1696fc1c8daf0533?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Joseph</media:title>
		</media:content>
	</item>
		<item>
		<title>will_paginate and markus</title>
		<link>http://josephmate.wordpress.com/2010/02/15/will_paginate-and-markus/</link>
		<comments>http://josephmate.wordpress.com/2010/02/15/will_paginate-and-markus/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 21:51:00 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://josephmate.wordpress.com/?p=57</guid>
		<description><![CDATA[Problem Experienced: The page number is not saved in the URL when flipping through pages. At first we thought it was something to do with will_paginate. However, if you take a look at: http://railscasts.com/episodes/51-will-paginate . You will notice that will_paginate successfully puts the parameters into the URL. It&#8217;s not will_paginate; it&#8217;s the way we&#8217;re using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=57&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Problem Experienced:<br />
The page number is not saved in the URL when flipping through pages.</p>
<p>At first we thought it was something to do with will_paginate. However, if you take a look at: http://railscasts.com/episodes/51-will-paginate . You will notice that will_paginate successfully puts the parameters into the URL. It&#8217;s not will_paginate; it&#8217;s the way we&#8217;re using will_paginate.</p>
<p>So now I am looking at where the Rail&#8217;s params[] are used. Markus does something differently with params[] compared to the simple website from the railscast. Additionally, I&#8217;m looking through all the AJAX calls we make on the submissions page. Finally, I am trying to understand how s_table_paginate is participating in pagination.</p>
<p>On a side note:<br />
Mike gave me a nice console script to populate the submissions page for markers.<br />
Just run script/console and place paste the following code ( ctrl shift v to paste into a terminal ):<br />
<pre class="brush: ruby;">
a = Assignment.first
Student.all.each do |student|
    student.create_group_for_working_alone_student(a.id)
end
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/josephmate.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/josephmate.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/josephmate.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/josephmate.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/josephmate.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/josephmate.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/josephmate.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/josephmate.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/josephmate.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/josephmate.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/josephmate.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/josephmate.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/josephmate.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/josephmate.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=57&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://josephmate.wordpress.com/2010/02/15/will_paginate-and-markus/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e0fe695d8be1d9a1696fc1c8daf0533?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Joseph</media:title>
		</media:content>
	</item>
		<item>
		<title>Weird Behaviour Of Mocha</title>
		<link>http://josephmate.wordpress.com/2010/01/31/weird-behaviour-of-mocha/</link>
		<comments>http://josephmate.wordpress.com/2010/01/31/weird-behaviour-of-mocha/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 03:08:02 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://josephmate.wordpress.com/?p=4</guid>
		<description><![CDATA[In the markus code, there are a lot of places where we use markus_config_&#60;something&#62; instead of MarkusConfigurator.markus_config_&#60;something&#62;. We should start using the latter. He&#8217;s why: ensure_config_helper.rb Output from running rake test:units When loading everything up: At this point, &#60;blah&#62; == MarkusConfigurator.&#60;blah&#62; When running the test cases: Now you can see that &#60;blah&#62; != MarkusConfigurator.&#60;blah&#62; . [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=4&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the markus code, there are a lot of places where we use markus_config_&lt;something&gt; instead of MarkusConfigurator.markus_config_&lt;something&gt;. We should start using the latter. He&#8217;s why:</p>
<p>ensure_config_helper.rb</p>
<p><pre class="brush: ruby;">
def self.check_config()
  puts &quot;Checking #{markus_config_logging_logfile}&quot;
  puts &quot;Checking #{markus_config_logging_errorlogfile}&quot;
  puts &quot;Checking #{markus_config_repository_storage}&quot;
  puts &quot;Checking #{markus_config_validate_file}&quot;
  puts &quot;Checking #{MarkusConfigurator.markus_config_logging_logfile}&quot;
  puts &quot;Checking #{MarkusConfigurator.markus_config_logging_errorlogfile}&quot;
  puts &quot;Checking #{MarkusConfigurator.markus_config_repository_storage}&quot;
  puts &quot;Checking #{MarkusConfigurator.markus_config_validate_file}&quot;
  check_in_writable_dir(markus_config_logging_logfile, &quot;MARKUS_LOGGING_LOGFILE&quot;)
  check_in_writable_dir(markus_config_logging_errorlogfile, &quot;MARKUS_LOGGING_ERRORLOGFILE&quot;)
  check_writable(markus_config_repository_storage, &quot;REPOSITORY_STORAGE&quot;)
  check_readable(markus_config_repository_storage, &quot;REPOSITORY_STORAGE&quot;)
  if ! RUBY_PLATFORM =~ /(:?mswin|mingw)/ # should match for Windows only
    check_executable(markus_config_validate_file, &quot;VALIDATE_FILE&quot;)
  end
end
</pre></p>
<p>Output from running rake test:units When loading everything up:</p>
<p><pre class="brush: bash;">
Checking log/info_development.log
Checking log/error_development.log
Checking /home/jmate/everything/workspaces/repos
Checking /home/jmate/everything/workspaces/markus/config/dummy_validate.sh
Checking log/info_development.log
Checking log/error_development.log
Checking /home/jmate/everything/workspaces/repos
Checking /home/jmate/everything/workspaces/markus/config/dummy_validate.sh
</pre></p>
<p>At this point, &lt;blah&gt; == MarkusConfigurator.&lt;blah&gt;</p>
<p>When running the test cases:</p>
<p><pre class="brush: bash;">
/tmp/ensure_config_helper_test_777699315/log/log_info_file.log
Checking log/info_test.log
Checking log/error_test.log
Checking /home/jmate/everything/workspaces/repos
Checking /home/jmate/everything/workspaces/markus/config/dummy_validate.sh
Checking /tmp/ensure_config_helper_test_777699315/log/log_info_file.log
Checking /tmp/ensure_config_helper_test_777699315/log/log_error_file.log
Checking /tmp/ensure_config_helper_test_777699315/source_repo_dir
Checking /tmp/ensure_config_helper_test_777699315/validate_script.sh
/tmp/ensure_config_helper_test_595310852/log/log_info_file.log
...
...
...
Checking log/info_test.log
Checking log/error_test.log
Checking /home/jmate/everything/workspaces/repos
Checking /home/jmate/everything/workspaces/markus/config/dummy_validate.sh
Checking /tmp/ensure_config_helper_test_473533902/log/log_info_file.log
Checking /tmp/ensure_config_helper_test_473533902/log/log_error_file.log
Checking /tmp/ensure_config_helper_test_473533902/source_repo_dir
Checking /tmp/ensure_config_helper_test_473533902/validate_script.sh
</pre></p>
<p>Now you can see that &lt;blah&gt; != MarkusConfigurator.&lt;blah&gt; . So the namespace for the method you are trying to call cannot be ambiguous. In the source code above you must use MarkusConfigurator.&lt;blah&gt;.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/josephmate.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/josephmate.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/josephmate.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/josephmate.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/josephmate.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/josephmate.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/josephmate.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/josephmate.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/josephmate.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/josephmate.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/josephmate.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/josephmate.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/josephmate.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/josephmate.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=josephmate.wordpress.com&amp;blog=11599195&amp;post=4&amp;subd=josephmate&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://josephmate.wordpress.com/2010/01/31/weird-behaviour-of-mocha/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e0fe695d8be1d9a1696fc1c8daf0533?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Joseph</media:title>
		</media:content>
	</item>
	</channel>
</rss>
