<?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/"
	>

<channel>
	<title>Note To Self &#187; mac</title>
	<atom:link href="http://www.hawksley.net/tag/mac/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hawksley.net</link>
	<description>John Hawksley &#124; www.hawksley.net</description>
	<lastBuildDate>Sun, 30 May 2010 14:13:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>OSX/Cocoa UI Event Spy</title>
		<link>http://www.hawksley.net/2009/10/osxcocoa-ui-event-spy/</link>
		<comments>http://www.hawksley.net/2009/10/osxcocoa-ui-event-spy/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 14:53:29 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://www.hawksley.net/?p=153</guid>
		<description><![CDATA[I recently had to profile an application, and one of the metrics I wanted to obtain was the performance of the GUI, without (if possible) resorting to GUI testing frameworks. This metric would be the duration of time from when the user commanded a redraw/update, until the render of that redraw actually completed (effectively a [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to profile an application, and one of the metrics I wanted to obtain was the performance of the GUI, without (if possible) resorting to GUI testing frameworks.  This metric would be the duration of time from when the user commanded a redraw/update, until the render of that redraw actually completed (effectively a complete client-server-client round-trip time).</p>
<p>To cut a long story short, there doesn&#8217;t seem to be a developer tool in OS X or XCode to spy on these UI events, but you can enable them on individual applications by supplying the <code>-NSTraceEvents YES</code> flag to the binary, which you must start from Terminal.</p>
<p>For example, here&#8217;s how you&#8217;d start TextEdit and spy on its events.</p>
<p><code>/Applications/TextEdit.app/Contents/MacOS/TextEdit -NSTraceEvents YES</code></p>
<p>In my case, I actually only wanted to have the mouse-up events which would trigger the refresh.  Here&#8217;s how I did it:</p>
<p><code>/Applications/TextEdit.app/Contents/MacOS/TextEdit -NSTraceEvents YES 2>&#038;1 | grep "Received event.*LMouseUp"</code></p>
<p>NSTraceEvents outputs the trace to the <code>stderr</code> stream, which is ignored by grep, so the <code>2&gt;&amp;1</code> is there to redirect <code>stderr</code> to <code>stdout</code>.  The &#8220;<code>Received event.*LMouseUp</code>&#8221; regular expression selects the mouse-up events from the complete stream.</p>
<p>Result:</p>
<p><code>2009-10-11 16:56:13.291 TextEdit[29990:903]<br />
Received event: LMouseUp at: 320.0,243.0 time: 199375872740000 flags: 0x100 win: 1832 ctxt: f0df data: 2531,1<br />
</code></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.hawksley.net/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.hawksley.net/2009/10/osxcocoa-ui-event-spy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reducing Tooltip Time in Eclipse 3.5 (Galileo) on Mac OS X</title>
		<link>http://www.hawksley.net/2009/06/reducing-tooltip-time-in-eclipse-3-5-galileo-on-mac-os-x/</link>
		<comments>http://www.hawksley.net/2009/06/reducing-tooltip-time-in-eclipse-3-5-galileo-on-mac-os-x/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 09:42:39 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.hawksley.net/?p=103</guid>
		<description><![CDATA[Tooltips in Mac OS X display, by default, after 2 seconds. I find this is ample time in the general operating system, but in Eclipse it&#8217;s an eternity. Eclipse uses Tooltips in the Java tooling to display all kinds of useful information, not the least of which is the javadoc for the element and the [...]]]></description>
			<content:encoded><![CDATA[<p>Tooltips in Mac OS X display, by default, after 2 seconds.  I find this is ample time in the general operating system, but in <a href="http://www.eclipse.org">Eclipse</a> it&#8217;s an eternity.  Eclipse uses Tooltips in the Java tooling to display all kinds of useful information, not the least of which is the javadoc for the element and the source.  Waiting for these is frustrating.</p>
<p>The general workaround of using OS X defaulting to change that didn&#8217;t work with previous versions of Eclipse because the SWT (IBM&#8217;s excellent widget set) was built on Carbon, OS X&#8217;s &#8220;UI Compatibility Library&#8221;, which ignored the default.  Eclipse is now available for Mac in a native Cocoa version, which <em>does </em>take the defaulting into account.</p>
<p>Here&#8217;s how to change the global OS X tooltip delay (in Terminal):</p>
<pre>defaults write -g NSInitialToolTipDelay -int 100</pre>
<p>I personally want to keep the 2-second delay for everything except Eclipse, so I applied the default just to Eclipse using the Eclipse bundle name:</p>
<pre>defaults write org.eclipse.eclipse NSInitialToolTipDelay -int 100</pre>
<p>The delay time is in milliseconds. You might have to log out and back in again to make the default take, but usually restarting Eclipse does the trick.</p>
<p>Nice work IBM!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.hawksley.net/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.hawksley.net/2009/06/reducing-tooltip-time-in-eclipse-3-5-galileo-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
