<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>webfreak.no</title>
	
	<link>http://webfreak.no/wp</link>
	<description>Freaky thoughts on web development</description>
	<lastBuildDate>Tue, 13 Oct 2009 09:42:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Webfreakno" /><feedburner:info uri="webfreakno" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>Missing “key ports” in Live Messenger on Vista – FIX!</title>
		<link>http://webfreak.no/wp/2009/10/13/missing-key-ports-in-live-messenger-on-vista-fix/</link>
		<comments>http://webfreak.no/wp/2009/10/13/missing-key-ports-in-live-messenger-on-vista-fix/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 09:40:25 +0000</pubDate>
		<dc:creator>Jens Anders Bakke</dc:creator>
		<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/webfreak/public_html/wp/wp-content/plugins/autometa/autometa.php</b> on line <b>300</b><br />
		<category><![CDATA[Rant]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://webfreak.no/wp/?p=100</guid>
		<description><![CDATA[As of lately, using WLM has been like a game of Russian roulette.
One day you can log in fine, the next day you cannot log in, and WLM is complaining about missing key ports.
Thanks to google and a user named "Pete" at kioskea.net, here is a fix that solves the issue.]]></description>
			<content:encoded><![CDATA[<p><strong>The problem</strong><br />
As of lately, using WLM has been like a game of Russian roulette.<br />
One day you can log in fine, the next day you cannot log in, and WLM is complaining about missing key ports.<br />
<span id="more-100"></span><br />
Being unable to log in to WLM (Windows Live Messenger) is a serious problem when it&#8217;s a part of your work flow, and a way to connect with clients and colleagues.<br />
And while there are alternate ways to connect to the Messenger service (I can mention numerous applications, all with their limitations and features, but none mentioned &#8211; none forgotten..), none of them work as seamless as WLM, or with a matching feature set (webcam support?).<br />
Also, some of us use plugins and extensions with WLM that makes our life and work easier.. (Messenger Plus! anyone?)</p>
<p>I tend to fix this by reinstalling WLM. A tedious task, and it doesn&#8217;t always solve the problem.<br />
But today, google was my friend, and I found an easier solution. Even though it requires a reboot.</p>
<p><strong>The solution</strong><br />
Type the following in <em>cmd</em>*: <strong>netsh winsock reset catalog</strong><br />
It does require &#8220;elevation&#8221;, see description below.<br />
It will then ask you to reboot. But when I logged back on, WLM should work without a problem. It will use quite some time to log in the first time though.</p>
<p>A big thank you to the anonymous user named &#8220;Pete&#8221; at the <a href="http://en.kioskea.net/forum/affich-30427-what-is-key-ports#1">kioskea.net forum</a>, this truly saved my day <img src='http://webfreak.no/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>*<strong>cmd</strong> &#8211; Windows command line.<br />
This is how you open cmd.exe with &#8220;elevation&#8221; (with administrator privileges):</p>
<ol>
<li>Open the start menu</li>
<li>write <strong>cmd</strong> in the field at the bottom</li>
<li><strong>right click <em>cmd.exe</em></strong>, and choose <em>Run as Administrator</em></li>
</ol>
<p>The last part is where &#8220;elevation&#8221; is done, as the cmd needs administration rights to run the command.</p>
]]></content:encoded>
			<wfw:commentRss>http://webfreak.no/wp/2009/10/13/missing-key-ports-in-live-messenger-on-vista-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a reset method to Aeron Glemann’s Calendar</title>
		<link>http://webfreak.no/wp/2009/07/15/adding-a-reset-method-to-aeron-glemanns-calendar/</link>
		<comments>http://webfreak.no/wp/2009/07/15/adding-a-reset-method-to-aeron-glemanns-calendar/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 11:47:05 +0000</pubDate>
		<dc:creator>Jens Anders Bakke</dc:creator>
		<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/webfreak/public_html/wp/wp-content/plugins/autometa/autometa.php</b> on line <b>300</b><br />
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[mootools]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://webfreak.no/wp/?p=93</guid>
		<description><![CDATA[We use Aeron Glemann&#8217;s Calendar quite frequently in projects at work, and in a recent project we ran into a case where we needed to reset the calendar with new available dates depending on some other choices in the form (we also reversed the blocked option, so only the &#8220;blocked&#8221; dates are selectable, but that&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>We use <a href="http://www.electricprism.com/aeron/">Aeron Glemann</a>&#8217;s <a href="http://www.electricprism.com/aeron/calendar/">Calendar</a> quite frequently in projects at <a href="http://www.eddamedia.no/">work</a>, and in a recent project we ran into a case where we needed to reset the calendar with new available dates depending on some other choices in the form (we also reversed the blocked option, so only the &#8220;blocked&#8221; dates are selectable, but that&#8217;s another story).<br />
<span id="more-93"></span><br />
At first we implemented a method to destroy the whole class instance, but it turned out to be a dumb solution, merely reseting the instance seemed like a better option (thanks to <em>ethanol</em> on <a href="irc://irc.freenode.net/#mootools">#mootools</a> who reseted my thoughts on the matter :p).</p>
<p>So without further ado, I present to you, the code:</p>
<pre class="brush: jscript;">Calendar.implement({
	reset: function(obj, options){
		this.calendars.each(function(item){
			item.el.removeClass(this.classes.calendar);
			item.button.destroy();
		}.bind(this));
		if(this.iframe) this.iframe.destroy();
		this.initialize(obj, options);
	}
});</pre>
<p>What we have done, is to find any elements created by the Calendar class and destroy them, and then run the initialize function again. Works like a charm <img src='http://webfreak.no/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://webfreak.no/wp/2009/07/15/adding-a-reset-method-to-aeron-glemanns-calendar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>getStyle in percentage for mootools</title>
		<link>http://webfreak.no/wp/2009/02/27/getstyle-in-percentage-for-mootools/</link>
		<comments>http://webfreak.no/wp/2009/02/27/getstyle-in-percentage-for-mootools/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 13:17:08 +0000</pubDate>
		<dc:creator>Jens Anders Bakke</dc:creator>
		<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/webfreak/public_html/wp/wp-content/plugins/autometa/autometa.php</b> on line <b>300</b><br />
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[mootools]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://webfreak.no/wp/?p=59</guid>
		<description><![CDATA[At #mootools the other day, DiegoMax started talking about how Element.getStyle returns the px values of properties, even if they where set with %.
Because of issues with how you retrieve those styles from different browsers (Computed vs Cascaded Style), there&#8217;s little or no way to know if a value is set with % or not. [...]]]></description>
			<content:encoded><![CDATA[<p>At <a href="irc://irc.freenode.net/#mootools">#mootools</a> the other day, <em>DiegoMax</em> started talking about how <em>Element.getStyle</em> returns the px values of properties, even if they where set with %.</p>
<p>Because of issues with how you retrieve those styles from different browsers (<a href="http://erik.eae.net/archives/2007/07/27/18.54.15/">Computed vs Cascaded Style</a>), there&#8217;s little or no way to know if a value is set with % or not. But, returning the value as a percentage of its nearest parent (or any other parent element, when we&#8217;re first at it) is highly possible. If you know that you want %..</p>
<p>As I saw it, there where two approaches..<br />
1. Make a new method for Element, like Element.getPercentageStyle()<br />
2. Replace Element.getStyle(), and add new optional parameters..</p>
<p>I went for the easiest solution first, a new method for Element..<br />
But then I decided to write the other solution as well. And it turned out to be a nice demonstration of how to replace an Element method, while still retain and use the original method as well.</p>
<p>Both sourcecodes can be found below.<br />
<span id="more-59"></span><br />
<strong>#1: A new method named getPercentageStyle().</strong><br />
Takes 2 arguments: property and parent. parent is optional.</p>
<pre class="brush: jscript;">Element.implement({
	getPercentageStyle: function(property,parent){
		return ((this.getStyle(property).toInt() / this.getParent(parent).getStyle(property).toInt()) * 100).round();
	}
});</pre>
<p><strong>#2: Replaces Element.getStyle.</strong><br />
Adds 2 new optional parameters: unit and parent (thats 3 in total: property,unit,parent).<br />
To get percentage results, <em>unit</em> must be set to <em>&#8216;%&#8217;</em>.</p>
<pre class="brush: jscript;">(function(){
	var oldGetStyle = Element.prototype.getStyle;
	Element.implement({
		getStyle: function(property,unit,parent){ // unit can only be '%' for now.. might add em if I find a way to add that..
			return (!unit || unit != '%')?oldGetStyle.call(this, property):((oldGetStyle.call(this, property).toInt() / oldGetStyle.call(this.getParent(parent), property).toInt()) * 100).round();
		}
	});
})();</pre>
<p>Notice how the surrounding anonymous function keeps oldGetStyle away from the global scope, while still making it (the old Element.prototype.getStyle) available to the new getStyle method.<br />
It&#8217;s also important to notice the use of Element<strong>.prototype</strong>.getStyle, as using only Element.getStyle will get you nowhere (it will get you in a loop, actually).</p>
<p>A big thank you to <a href="http://www.clientcide.com/">Aaron Newton</a> who I learned this technique from by reading through his <a href="http://www.clientcide.com/code-releases/event-delegation-take-2/">Event.Delegate plugin</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://webfreak.no/wp/2009/02/27/getstyle-in-percentage-for-mootools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>file uploads with iframe and IE 6/7</title>
		<link>http://webfreak.no/wp/2009/02/27/file-uploads-and-ie/</link>
		<comments>http://webfreak.no/wp/2009/02/27/file-uploads-and-ie/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 09:00:03 +0000</pubDate>
		<dc:creator>Jens Anders Bakke</dc:creator>
		<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/webfreak/public_html/wp/wp-content/plugins/autometa/autometa.php</b> on line <b>300</b><br />
		<category><![CDATA[(X)HTML]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[IE bugs]]></category>
		<category><![CDATA[Web development]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://webfreak.no/wp/?p=42</guid>
		<description><![CDATA[Yesterday, macsim&#8217;work on #mootools asked some questions regarding IE and file uploads.
He tried to send a form with an attachment to an iframe, and it worked without problems in any non-IE browser (Opera, Firefox, Safari, Chrome).
And while file uploads today is no brain science, this error/bug was new to me, and something I&#8217;d never run [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, <a href="http://macsim.labolinux.net/index.php/post/2009/02/26/Input-type-file-non-uploader-avec-ie6/ie7" target="_blank">macsim&#8217;work</a> on <a title="#mootools on freenode" href="irc://irc.freenode.net/#mootools">#mootools</a> asked some questions regarding IE and file uploads.</p>
<p>He tried to send a form with an attachment to an iframe, and it worked without problems in any non-IE browser (Opera, Firefox, Safari, Chrome).<br />
And while file uploads today is no brain science, this error/bug was new to me, and something I&#8217;d never run into before.</p>
<p>We sat down and had a thorough look at the issue.. And with some help from <em>ie developer toolbar</em> and <em>google</em> we found a solution.<br />
<span id="more-42"></span><br />
While it works without a problem to upload files using <em>enctype=&#8221;multipart/form-data&#8221;</em> in most browsers:</p>
<pre class="brush: xml;">&lt;form action=&quot;#&quot; enctype=&quot;multipart/form-data&quot; method=&quot;post&quot;&gt;
&lt;input name=&quot;myFile&quot; type=&quot;file&quot; /&gt;
&lt;/form&gt;</pre>
<p>IE 6/7 also needed the encoding set in this case.. So we added <em>encoding=&#8221;multipart/form-data&#8221;</em> to the form:</p>
<pre class="brush: xml;">&lt;form action=&quot;#&quot; enctype=&quot;multipart/form-data&quot; encoding=&quot;multipart/form-data&quot; method=&quot;post&quot;&gt;
&lt;input name=&quot;myFile&quot; type=&quot;file&quot; /&gt;
&lt;/form&gt;</pre>
<p>So, lesson learned:</p>
<blockquote><p>&#8220;If a form fails to send file fields as files in IE, with <em>enctype</em> of <em>multipart/form-data</em>, try setting <em>encoding</em> to <em>multipart/form-data</em> as well&#8221;</p></blockquote>
<p><a href="http://translate.google.com/translate?prev=hp&amp;hl=no&amp;u=http%3A%2F%2Fmacsim.labolinux.net%2Findex.php%2Fpost%2F2009%2F02%2F26%2FInput-type-file-non-uploader-avec-ie6%2Fie7&amp;sl=fr&amp;tl=en" target="_blank">macsim&#8217;work&#8217;s blogpost in english</a> (for the not so french savvy, thanks to <a href="http://translate.google.com" target="_blank">google translate</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://webfreak.no/wp/2009/02/27/file-uploads-and-ie/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JSON.test() rewritten (for mootools 1.2.1)</title>
		<link>http://webfreak.no/wp/2009/01/21/jsontest-rewritten-for-mootools-121/</link>
		<comments>http://webfreak.no/wp/2009/01/21/jsontest-rewritten-for-mootools-121/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 12:41:09 +0000</pubDate>
		<dc:creator>Jens Anders Bakke</dc:creator>
		<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/webfreak/public_html/wp/wp-content/plugins/autometa/autometa.php</b> on line <b>300</b><br />
		<category><![CDATA[Rant]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://webfreak.no/wp/?p=33</guid>
		<description><![CDATA[I recieved a comment from Philipp on the old Json.test() post the other day.
But since that code was written for mootools 1.11, I thought it would be good to update the code to 1.2.1.
(I&#8217;m migrating all my old code snippets to 1.2.1 these days, so expect more posts like this in the days to come..)

Without [...]]]></description>
			<content:encoded><![CDATA[<p>I recieved a comment from <a href="http://nerdylabs.de">Philipp</a> on the old Json.test() post the other day.<br />
But since that code was written for mootools 1.11, I thought it would be good to update the code to 1.2.1.<br />
(I&#8217;m migrating all my old code snippets to 1.2.1 these days, so expect more posts like this in the days to come..)</p>
<p><span id="more-33"></span></p>
<p>Without further ado, I give you JSON.test() for mootools 1.2.1:</p>
<pre class="brush: jscript;">/*
Function: JSON.test
Tests wether a string is json

Version: 1.1

Arguments:
str - string; The string to check

Example:
&gt;Json.test('{&quot;foo&quot;:&quot;bar&quot;,&quot;bar&quot;:&quot;foo&quot;}'); //returns &quot;true&quot;
&gt;Json.test('{&quot;foo&quot;:&quot;bar&quot;,bar:foo}'); //returns &quot;false&quot;

Returns:
Returns true or false

Credits:
Function by Jens Anders Bakke, webfreak.no
Regex reused from the JSON.decode function
*/
JSON.extend({
test: function(str){
return ($type(str) == &quot;string&quot; &amp;amp;amp;&amp;amp;amp; (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str.replace(/\\./g, '@').replace(/&quot;[^&quot;\\\n\r]*&quot;/g, '')));
}
});  </pre>
]]></content:encoded>
			<wfw:commentRss>http://webfreak.no/wp/2009/01/21/jsontest-rewritten-for-mootools-121/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Element.appendHTML</title>
		<link>http://webfreak.no/wp/2008/12/17/mootools-elementappendhtml-without-innerhtml-or-sethtml/</link>
		<comments>http://webfreak.no/wp/2008/12/17/mootools-elementappendhtml-without-innerhtml-or-sethtml/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 14:16:17 +0000</pubDate>
		<dc:creator>Jens Anders Bakke</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[mootools]]></category>

	<!-- AutoMeta Start -->
	<category>html</category>
	<category>append</category>
	<category>thrown</category>
	<category>challenges</category>
	<category>week</category>
	<category>element</category>
	<category>good</category>
	<category>string</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://webfreak.no/wp/2008/12/17/mootools-elementappendhtml-without-innerhtml-or-sethtml/</guid>
		<description><![CDATA[One of the js challenges that was thrown my way at work today was:
&#8220;do you know of a good way to append a string with HTML to an element, like Element.appendText() but with HTML beeing parsed? And outperforms the =+ logic based solutions?&#8220;..
I didn&#8217;t have a solution at hand, but I had some ideas.. Thus [...]]]></description>
			<content:encoded><![CDATA[<p>One of the js challenges that was thrown my way at work today was:<br />
&#8220;<em>do you know of a good way to append a string with HTML to an element, like Element.appendText() but with HTML beeing parsed? And outperforms the =+ logic based solutions?</em>&#8220;..</p>
<p>I didn&#8217;t have a solution at hand, but I had some ideas.. Thus Element.appendHTML() was born..</p>
<p><span id="more-32"></span></p>
<pre class="brush: jscript;">
Element.implement({
appendHTML: function(html,where){
return this.grab(new Element('text',{'html':html}),where);
}
});
</pre>
<p>It extends the element with a new text node, and supports the same arguments as appendText (&#8220;top&#8221;, &#8220;bottom&#8221;, &#8220;after&#8221;, &#8220;before&#8221;).</p>
<p>Ps. remember to use this with $()..</p>
<pre class="brush: jscript;">$('foo').appendHTML('&lt;em&gt;bar&lt;/em&gt;');
$(document.body).appendHTML('&lt;h1&gt;foobar&lt;/h1&gt;','top');</pre>
]]></content:encoded>
			<wfw:commentRss>http://webfreak.no/wp/2008/12/17/mootools-elementappendhtml-without-innerhtml-or-sethtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Korg nano Kontrol with Deckadance, it sorta works</title>
		<link>http://webfreak.no/wp/2008/12/11/korg-nano-kontrol-with-deckadance-it-sorta-works/</link>
		<comments>http://webfreak.no/wp/2008/12/11/korg-nano-kontrol-with-deckadance-it-sorta-works/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 07:20:31 +0000</pubDate>
		<dc:creator>Jens Anders Bakke</dc:creator>
				<category><![CDATA[Deckadance]]></category>
		<category><![CDATA[Korg nano]]></category>
		<category><![CDATA[Music]]></category>

	<!-- AutoMeta Start -->
	<category>beeing</category>
	<category>eager</category>
	<category>impatient</category>
	<category>learn</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://webfreak.no/wp/2008/12/11/korg-nano-kontrol-with-deckadance-it-sorta-works/</guid>
		<description><![CDATA[Beeing the impatient beeing that I am (at least when it&#8217;s about learning something new and get my hands on new gadgets), I couldn&#8217;t wait untill I got the &#8220;new Midi Controller&#8221; issue sorted (I want to get my hands on a Vestax VCI-100 or Dj-Tech i-Mix Reload, whichever I can get first)..
So when I [...]]]></description>
			<content:encoded><![CDATA[<p>Beeing the impatient beeing that I am (at least when it&#8217;s about learning something new and get my hands on new gadgets), I couldn&#8217;t wait untill I got the &#8220;new Midi Controller&#8221; issue sorted (I want to get my hands on a Vestax VCI-100 or Dj-Tech i-Mix Reload, whichever I can get first)..</p>
<p>So when I visited my local music store today, to get some more info on the VCI-100 (vestax btw has no retailer in Norway, kind of sucks..), I just couldn&#8217;t leave empty handed..<br />
At least not when the Korg nano series got my attention.. If you don&#8217;t know what the &#8220;Korg nano series&#8221; is, it&#8217;s a &#8220;nano sized&#8221; set of midi controllers for the pc or mac..</p>
<p><img src='http://webfreak.no/wp/wp-content/uploads/2008/12/korg-nano.jpg' alt='Korg nano series' /></p>
<p>As I wasn&#8217;t very impressed of the finish on the keyboard, and I don&#8217;t realy have the need for a drum/pad controller, I went for the nano Kontrol.<br />
It has 9 midi control groups, each containing 1 knob, 1 slider, and two buttons.. in addition to 6 transport buttons (play, stop, pause, rec, loop, rewind, fast forward) and a &#8220;scene&#8221; button.<br />
And at the price of 560,- NOK that&#8217;s not a bad deal at all..</p>
<p>My initial thought was to use this mainly with FL Studio, to control effects, the master mixer, and channels..<br />
but, I was more in a deckadance mood today, and after playing with it for a few hours I got the setup I want..<br />
Inspired by the button setup on the VCI-100, this is what I ended up with (only thing I REALY miss in this setup is a jog-wheel or some sort of searching back and forth in the songs.. have to do that manualy with a mouse for now):<br />
<a href='http://webfreak.no/wp/wp-content/uploads/2008/12/korg-nano-kontrol-deckadance-mapping.jpg' title='Korg nanoKontrol'><img src='http://webfreak.no/wp/wp-content/uploads/2008/12/korg-nano-kontrol-deckadance-mapping.thumbnail.jpg' alt='Korg nanoKontrol' /></a></p>
<p>No video yet, although I have the mapping done, it&#8217;s just not there yet to show in a video&#8230;<br />
The midi settings-file for deckadance can be found here: <a class="downloadlink dlimg" href="http://webfreak.no/wp/download/nano_kontrol_-_vci-100_inspired.zip" title="Version 1 downloaded 587 times" ><img src="http://webfreak.no/wp/wp-content/plugins/download-monitor/img/download.gif" alt="Download Korg nanoKontrol deckadance mapping (VCI-100 inspired) Version 1" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://webfreak.no/wp/2008/12/11/korg-nano-kontrol-with-deckadance-it-sorta-works/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Extending mootools selectors (pseudo-selector: containsNoCase)</title>
		<link>http://webfreak.no/wp/2008/11/29/extending-mootools-selectors-pseudo-selector-containsnocase/</link>
		<comments>http://webfreak.no/wp/2008/11/29/extending-mootools-selectors-pseudo-selector-containsnocase/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 09:01:34 +0000</pubDate>
		<dc:creator>Jens Anders Bakke</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[mootools]]></category>

	<!-- AutoMeta Start -->
	<category>selector</category>
	<category>easy</category>
	<category>impressive</category>
	<category>extend</category>
	<category>class</category>
	<category>mootools</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://webfreak.no/wp/2008/11/29/extending-mootools-selectors-pseudo-selector-containsnocase/</guid>
		<description><![CDATA[It&#8217;s impressive how easy it is to extend mootools..
Just 8 lines of code, and String.containsNoCase and pseudo-selector: containsNoCase is implemented..

String.implement({
	containsNoCase: function(string, separator){
		return this.toLowerCase().contains(string.toLowerCase(), separator);
	}
});
Selectors.Pseudo.containsNoCase =	function(text){
	return (this.innerText &#124;&#124; this.textContent &#124;&#124; '').containsNoCase(text);
};

Now I can do case insensitive searchs through an rss feed (titles) with element selectors
xml.getElements('entry title:containsNoCase(query)');
]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s impressive how easy it is to extend mootools..</p>
<p>Just 8 lines of code, and String.containsNoCase and pseudo-selector: containsNoCase is implemented..</p>
<pre class="brush: jscript;">
String.implement({
	containsNoCase: function(string, separator){
		return this.toLowerCase().contains(string.toLowerCase(), separator);
	}
});
Selectors.Pseudo.containsNoCase =	function(text){
	return (this.innerText || this.textContent || '').containsNoCase(text);
};
</pre>
<p>Now I can do case insensitive searchs through an rss feed (titles) with element selectors</p>
<pre class="brush: jscript;">xml.getElements('entry title:containsNoCase(query)');</pre>
]]></content:encoded>
			<wfw:commentRss>http://webfreak.no/wp/2008/11/29/extending-mootools-selectors-pseudo-selector-containsnocase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Elements.getTotalSize(), get the total size of an array of elements</title>
		<link>http://webfreak.no/wp/2007/10/26/elementsgettotalsize-get-the-total-size-of-an-array-of-elements/</link>
		<comments>http://webfreak.no/wp/2007/10/26/elementsgettotalsize-get-the-total-size-of-an-array-of-elements/#comments</comments>
		<pubDate>Fri, 26 Oct 2007 06:12:32 +0000</pubDate>
		<dc:creator>Jens Anders Bakke</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[mootools]]></category>

	<!-- AutoMeta Start -->
	<category>navigator</category>
	<category>fancy</category>
	<category>gallery</category>
	<category>controled</category>
	<category>creating</category>
	<category>slider</category>
	<category>image</category>
	<category>mootools</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://webfreak.no/wp/2007/10/26/elementsgettotalsize-get-the-total-size-of-an-array-of-elements/</guid>
		<description><![CDATA[While creating a mootools Slider-controled image gallery navigator (fancy huh?) at work, I suddenly had the need for getting the Total size (width in this case) of all the li elements inside a ul.

Why would you need that?
The case is that when you have overflow:hidden; or overflow:auto; on an element, you cannot have elements inside [...]]]></description>
			<content:encoded><![CDATA[<p>While creating a mootools Slider-controled image gallery navigator (fancy huh?) at work, I suddenly had the need for getting the Total size (width in this case) of all the li elements inside a ul.</p>
<p><span id="more-23"></span></p>
<p><strong>Why would you need that?</strong><br />
The case is that when you have overflow:hidden; or overflow:auto; on an element, you cannot have elements inside with float:left/right; unless there is a wrapper arround them with enough width to let them float nicely beside each other.</p>
<p>My setup was, div (overflow:hidden) > ul > li(float:left)</p>
<p>And somehow I had to get the total width of all the li elements, and set the width of ul to that amount.</p>
<p><strong>The solution</strong><br />
Mootools has a neat function for Element (an aparently also for Elements and Array) called getSize(), which get the size, scrollsize and scroll of the element.</p>
<p>I started out with a function that took an Array of Elements as it&#8217;s parameter, just looping over the elements and adding the values together, returning the same Array as getSize(), only with the total values. Simple enough.<br />
Then it came to mind that making it an Array/Elements property might be a better idea, kind of better syntax and easier usage in my opinion.</p>
<p>So after some issues (explained in the previous post), here is what I ended up with, Elements.getTotalSize():</p>
<pre class="brush: jscript;">
/*
Property: getTotalSize
    Return the total getSize of the elements in an array

Version: 1
Example:
    &gt; $$('ul li').getTotalSize();
Returns:
    &gt; {'size': {'x': 2968, 'y':2141}, 'scrollSize': {'x': 2968, 'y':2141}, 'scroll': {'x': 78028, 'y':3043}}
Credits:
        Property by Jens Anders Bakke, webfreak.no
        Thanks to JanK__ at #mootools
*/
Elements.extend({
		getTotalSize: function(){
			var obj = {
				'size': {'x': 0,'y': 0},
		        'scrollSize': {'x': 0,'y': 0},
		        'scroll': {'x': 0,'y': 0
		        }
		    };
		        this.each(function(item){
		            var is = item.getSize();
		            obj = {
		                'size': {
		                    'x': obj.size.x + is.size.x,
		                    'y': obj.size.y + is.size.y
		                },
		                'scrollSize': {
		                    'x': obj.scrollSize.x + is.scrollSize.x,
		                    'y': obj.scrollSize.y + is.scrollSize.y
		                },
		                'scroll': {
		                    'x': obj.scroll.x + is.scroll.x,
		                    'y': obj.scroll.y + is.scroll.y
		                }
		            };
		        });
		    return obj;
		}
	});
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webfreak.no/wp/2007/10/26/elementsgettotalsize-get-the-total-size-of-an-array-of-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lesson learned, extending mootools with Array/Element properties</title>
		<link>http://webfreak.no/wp/2007/10/26/lesson-learned-extending-mootools-with-arrayelement-properties/</link>
		<comments>http://webfreak.no/wp/2007/10/26/lesson-learned-extending-mootools-with-arrayelement-properties/#comments</comments>
		<pubDate>Fri, 26 Oct 2007 05:52:09 +0000</pubDate>
		<dc:creator>Jens Anders Bakke</dc:creator>
				<category><![CDATA[Rant]]></category>

	<!-- AutoMeta Start -->
	<category>array</category>
	<category>twisted</category>
	<category>angles</category>
	<category>brain</category>
	<category>reason</category>
	<category>extension</category>
	<category>returning</category>
	<category>object</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://webfreak.no/wp/2007/10/26/lesson-learned-extending-mootools-with-arrayelement-properties/</guid>
		<description><![CDATA[I&#8217;ve twisted my brain in all different angles today, trying to get my first custom Array property in mootools to work.
For some reason my code kept returning the content as an array, and not as an object like I&#8217;d set up my piece of code to do.
It turned out that there was allready a property [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve twisted my brain in all different angles today, trying to get my first custom Array property in mootools to work.<br />
For some reason my code kept returning the content as an array, and not as an object like I&#8217;d set up my piece of code to do.</p>
<p>It turned out that there was allready a property with the name I selected for Elements, which Array then had inherited..<br />
thus, it allready existed, returning an array of objects (the same object I was trying to return, actually..).</p>
<p>I ended up adding the property to Elements instead (for another reason), with a new Property name.</p>
<p>Lesson: before you try to add a new property to Array, Elements, or any Class in general, <strong>check if it allready exists</strong> :p</p>
]]></content:encoded>
			<wfw:commentRss>http://webfreak.no/wp/2007/10/26/lesson-learned-extending-mootools-with-arrayelement-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
