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

<channel>
	<title>Garbage Collector</title>
	<atom:link href="http://www.garbage-collector.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.garbage-collector.net</link>
	<description></description>
	<pubDate>Fri, 03 Apr 2009 19:09:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>140 Zeichen</title>
		<link>http://www.garbage-collector.net/2009/04/140-zeichen/</link>
		<comments>http://www.garbage-collector.net/2009/04/140-zeichen/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 19:09:39 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
		
		<category><![CDATA[Leben]]></category>

		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.garbage-collector.net/?p=105</guid>
		<description><![CDATA[Nun bin ich also auch bei Twitter gelistet&#8230; mal schauen, was ich so alles in 140 Zeichen zu sagen habe!
]]></description>
			<content:encoded><![CDATA[<p>Nun bin ich also auch <a href="http://twitter.com/StefanBartmann">bei Twitter gelistet</a>&#8230; mal schauen, was ich so alles in 140 Zeichen zu sagen habe!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garbage-collector.net/2009/04/140-zeichen/feed/</wfw:commentRss>
		</item>
		<item>
		<title>JavaScript ist mehr als alert()</title>
		<link>http://www.garbage-collector.net/2009/03/javascript-ist-mehr-als-alert/</link>
		<comments>http://www.garbage-collector.net/2009/03/javascript-ist-mehr-als-alert/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 19:03:56 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
		
		<category><![CDATA[Programmierung]]></category>

		<category><![CDATA[Chrome]]></category>

		<category><![CDATA[Google]]></category>

		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.garbage-collector.net/?p=103</guid>
		<description><![CDATA[Seit Web 2.0 und AJAX sollte sich eigentlich herumgesprochen haben, dass JavaScript mehr kann als nur nervige Meldungen mittels alert(); auszugeben oder ein bisschen in Formularen herumzupfuschen. 
Aber was auf Chrome Experiments gezeigt wird, ist schon allererste Kajüte. 
(via Golem)
]]></description>
			<content:encoded><![CDATA[<p>Seit Web 2.0 und AJAX sollte sich eigentlich herumgesprochen haben, dass JavaScript mehr kann als nur nervige Meldungen mittels alert(); auszugeben oder ein bisschen in Formularen herumzupfuschen. </p>
<p>Aber was auf <a href="http://www.chromeexperiments.com/">Chrome Experiments</a> gezeigt wird, ist schon allererste Kajüte. </p>
<p>(via <a href="http://www.golem.de/0903/66002.html">Golem</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garbage-collector.net/2009/03/javascript-ist-mehr-als-alert/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Schaf-Kunst</title>
		<link>http://www.garbage-collector.net/2009/03/schaf-kunst/</link>
		<comments>http://www.garbage-collector.net/2009/03/schaf-kunst/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 18:57:18 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
		
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.garbage-collector.net/?p=99</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><!-- Smart Youtube --><span class="youtube"><object width="480" height="360"><param name="movie" value="http://www.youtube.com/v/D2FX9rviEhw&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;ap=%2526fmt%3D18"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/D2FX9rviEhw&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;ap=%2526fmt%3D18" type="application/x-shockwave-flash" allowfullscreen="true" width="480" height="360" ></embed><param name="wmode" value="transparent" /></object></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.garbage-collector.net/2009/03/schaf-kunst/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Werbefrei</title>
		<link>http://www.garbage-collector.net/2009/02/werbefrei/</link>
		<comments>http://www.garbage-collector.net/2009/02/werbefrei/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 07:46:45 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
		
		<category><![CDATA[Leben]]></category>

		<category><![CDATA[c't Werbung]]></category>

		<guid isPermaLink="false">http://www.garbage-collector.net/?p=97</guid>
		<description><![CDATA[In der aktuellen Ausgabe der c&#8217;t war dieses Mal gar kein Angebotsheftchen von 1&#038;1, Strato und Co. Jetzt habe ich gar kein Lesenzeichen  
]]></description>
			<content:encoded><![CDATA[<p>In der aktuellen Ausgabe der c&#8217;t war dieses Mal gar kein Angebotsheftchen von 1&#038;1, Strato und Co. Jetzt habe ich gar kein Lesenzeichen <img src='http://www.garbage-collector.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.garbage-collector.net/2009/02/werbefrei/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dateien durchsuchen</title>
		<link>http://www.garbage-collector.net/2009/02/dateien-durchsuchen/</link>
		<comments>http://www.garbage-collector.net/2009/02/dateien-durchsuchen/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 06:53:31 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
		
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://www.garbage-collector.net/?p=94</guid>
		<description><![CDATA[Eigentlich finde ich den Editor UltraEdit gar nicht so übel. Allerdings dauert das Durchsuchen von vielen Dateien nach einem bestimmten String doch einigermaßen lange. 
Angenehm schnell (und einfach) geht es mit der Powershell:



Get-ChildItem &#124; Select-String -pattern &#34;Suchstring&#34;



Natürlich kann man auch Unterverzeichnisse durchsuchen und nur bestimmte Dateitypen dabei berücksichtigen:



Get-ChildItem -recurse -Include *.inc &#124; Select-String -pattern &#34;Suchstring&#34;



]]></description>
			<content:encoded><![CDATA[<p>Eigentlich finde ich den Editor <a href="http://www.ultraedit.com/" target="_blank">UltraEdit</a> gar nicht so übel. Allerdings dauert das Durchsuchen von vielen Dateien nach einem bestimmten String doch einigermaßen lange. </p>
<p>Angenehm schnell (und einfach) geht es mit der Powershell:</p>
<div class="geshi no powershell" style="font-family: monospace;">
<ol>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #666699; font-weight: bold;">Get-ChildItem</span> <span style="color: 66cc66;">|</span> <span style="color: #666699; font-weight: bold;">Select-String</span> <span style="color: #006600; font-style: italic;">-pattern</span> <span style="color: #009900;">&quot;Suchstring&quot;</span></div>
</li>
</ol>
</div>
<p>Natürlich kann man auch Unterverzeichnisse durchsuchen und nur bestimmte Dateitypen dabei berücksichtigen:</p>
<div class="geshi no powershell" style="font-family: monospace;">
<ol>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #666699; font-weight: bold;">Get-ChildItem</span> <span style="color: #006600; font-style: italic;">-recurse</span> <span style="color: #006600; font-style: italic;">-Include</span> <span style="color: 66cc66;">*</span>.inc <span style="color: 66cc66;">|</span> <span style="color: #666699; font-weight: bold;">Select-String</span> <span style="color: #006600; font-style: italic;">-pattern</span> <span style="color: #009900;">&quot;Suchstring&quot;</span></div>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.garbage-collector.net/2009/02/dateien-durchsuchen/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Chart-Musik</title>
		<link>http://www.garbage-collector.net/2009/02/chart-musik/</link>
		<comments>http://www.garbage-collector.net/2009/02/chart-musik/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 22:35:07 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
		
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.garbage-collector.net/?p=91</guid>
		<description><![CDATA[Der Komponist Johannes Kreidler nutzt Microsofts Software Songsmith, um hauptsächlich aus Aktiencharts Musik zu machen - die Finanzkrise als Tonleiter von hell nach düster. Doch auch umgekehrte Beispiele hat er in sein Werk aufgenommen - die Zahl der im Irak getöteten US-Soldaten oder das Wachstum der Porno-Industrie&#8230;

(Bericht bei heise.de)
]]></description>
			<content:encoded><![CDATA[<p>Der Komponist <a href="http://www.kreidler-net.de">Johannes Kreidler</a> nutzt Microsofts Software Songsmith, um hauptsächlich aus Aktiencharts Musik zu machen - die Finanzkrise als Tonleiter von hell nach düster. Doch auch umgekehrte Beispiele hat er in sein Werk aufgenommen - die Zahl der im Irak getöteten US-Soldaten oder das Wachstum der Porno-Industrie&#8230;</p>
<p><!-- Smart Youtube --><span class="youtube"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/2-BZfFakpzc&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/2-BZfFakpzc&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="355" ></embed><param name="wmode" value="transparent" /></object></span></p>
<p>(Bericht bei <a href="http://www.heise.de/newsticker/So-klingt-die-Finanzkrise-Musik-aus-Aktienkursen--/meldung/126685">heise.de</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garbage-collector.net/2009/02/chart-musik/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Internet Explorer, MooTools und Elemente</title>
		<link>http://www.garbage-collector.net/2009/01/internet-explorer-mootools-und-elemente/</link>
		<comments>http://www.garbage-collector.net/2009/01/internet-explorer-mootools-und-elemente/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 17:59:58 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
		
		<category><![CDATA[Programmierung]]></category>

		<category><![CDATA[Internet Explorer]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[MooTools]]></category>

		<guid isPermaLink="false">http://www.garbage-collector.net/?p=78</guid>
		<description><![CDATA[Am Freitag hatte ich noch ein JavaScript-Problem, das ich leider nicht mehr lösen konnte. Das Problem trat im Zusammenspiel der Multibox (einer Lightbox für verschiedene Inhalte auf MooTools-Basis) mit einem per AJAX geladenen Link auf. Multibox erweitert alle Links mit einer bestimmten CSS-Klasse durch ein onClick-Event, das ein Overlay über die Seite legt, in dem [...]]]></description>
			<content:encoded><![CDATA[<p>Am Freitag hatte ich noch ein JavaScript-Problem, das ich leider nicht mehr lösen konnte. Das Problem trat im Zusammenspiel der <a href="http://www.phatfusion.net/multibox/" target="_blank">Multibox</a> (einer Lightbox für verschiedene Inhalte auf MooTools-Basis) mit einem per AJAX geladenen Link auf. Multibox erweitert alle Links mit einer bestimmten CSS-Klasse durch ein onClick-Event, das ein Overlay über die Seite legt, in dem der verlinkte Inhalt angezeigt wird. Dies ist eigentlich auch eine ganz smarte Lösung, denn so erhalten Nutzer, die kein JavaScript (aktiviert) haben, den Inhalt als normalen Link. Allerdings wird mein Link zum Inhalt dynamisch per AJAX geladen. Daher hat das Multibox-Skript gar keine Chance, diesen Link onDOMReady zu kennen.</p>
<p>Mein Lösungsansatz war, einfach in der Verarbeitung des AJAX-Ergebnisses per JavaScript ein neues <code>a</code>-Element zu erstellen und in dem ohnehin schon auf der Seite vorhandenen Multibox-Element hinzuzufügen. Der Ansatz funktioniert auch tadellos im Firefox - leider nicht im Internet Explorer (Object doesn&#8217;t support this property or method). </p>
<p>Wenigstens wusste ich schon, an welcher Stelle der Fehler lag. Daher konnte ich das Problem (vereinfacht) nachstellen und heute auch aufspüren: Die von MooTools bereitgestellten Methoden <em>setProperty</em> und <em>getProperty</em> funktionieren im Internet Explorer nur bei Elementen, die bereits im ursprünglich an den Browser ausgelieferten HTML vorhanden sind, nicht bei nachträglich hinzugefügten Elementen.</p>
<p>Nehmen wir folgende (einfache) HTML-Seite:</p>
<div class="geshi no html4strict" style="font-family: monospace;">
<ol>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html&gt;</span></span></div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head&gt;</span></span></div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title&gt;</span></span>Test-Script<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title&gt;</span></span></div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;js/mootools.v1.1.js&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></span></div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head&gt;</span></span></div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body&gt;</span></span></div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;inDOM&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;border:4px solid #004000; background: #80FF00; width: 600px;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>This is just a Test-DIV with the ID <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em&gt;</span></span>inDOM<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;doTest();&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Test Me<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;br</span> <span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body&gt;</span></span></div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html&gt;</span></span></div>
</li>
</ol>
</div>
<p><span id="more-78"></span><br />
Klickt man auf den Link TestMe, wird die JavaScript-Funktion doTest ausgeführt. Folgender Code funktioniert sowohl im Internet Explorer als auch im Firefox:</p>
<div class="geshi no javascript" style="font-family: monospace;">
<ol>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> doTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #003366; font-weight: bold;">var</span> a = $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;inDOM&#39;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>a.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;id&#39;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
</ol>
</div>
<p>Wie zu erwarten wird ein Meldungsfenster mit &#8220;inDOM&#8221; ausgegeben. Auch folgender Code wird von beiden Browsern interpretiert:</p>
<div class="geshi no javascript" style="font-family: monospace;">
<ol>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> doTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #003366; font-weight: bold;">var</span> a = $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;inDOM&#39;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>a.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;id&#39;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;a.<span style="color: #006600;">setProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;id&quot;</span>, <span style="color: #3366CC;">&quot;changedByJS&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>a.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;id&#39;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
</ol>
</div>
<p>Zunächst wird &#8220;inDOM&#8221; ausgegeben, danach wird mittels <em>setProperty</em> ein neuer Wert für <em>id</em> gesetzt - und vollkommen korrekt &#8220;changedByJS&#8221; ausgegeben.</p>
<p>Auch ein neues Element mittels JavaScript zu erstellen klappt einwandfrei:</p>
<div class="geshi no javascript" style="font-family: monospace;">
<ol>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> doTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #003366; font-weight: bold;">var</span> a = $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;inDOM&#39;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>a.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;id&#39;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;a.<span style="color: #006600;">setProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;id&quot;</span>, <span style="color: #3366CC;">&quot;changedByJS&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>a.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;id&#39;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #003366; font-weight: bold;">var</span> b = document.<span style="color: #006600;">createElement</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;div&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
</ol>
</div>
<p>Der Internet Explorer bricht erst, wenn man versucht, diesem neu erstellten DIV mittels <em>setProperty</em> eine <em>id</em> zuzuweisen:</p>
<div class="geshi no javascript" style="font-family: monospace;">
<ol>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> doTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #003366; font-weight: bold;">var</span> a = $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;inDOM&#39;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>a.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;id&#39;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;a.<span style="color: #006600;">setProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;id&quot;</span>, <span style="color: #3366CC;">&quot;changedByJS&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>a.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;id&#39;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #003366; font-weight: bold;">var</span> b = document.<span style="color: #006600;">createElement</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;div&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;b.<span style="color: #006600;">setProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;id&quot;</span>, <span style="color: #3366CC;">&quot;createdByJS&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
</ol>
</div>
<p>Es bringt auch nichts, das mittels <code>document.createElement</code> erzeugte DIV dem DOM hinzuzufügen: Weder <code>a.appendChild(b)</code> noch <code>document.body.appendChild(b)</code> helfen. Fügt man jedoch das Element &#8220;hart&#8221; mittels <code>innerHTML</code> hinzu, klappt&#8217;s auch mit dem IE:</p>
<div class="geshi no javascript" style="font-family: monospace;">
<ol>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> doTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #003366; font-weight: bold;">var</span> a = $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;inDOM&#39;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>a.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;id&#39;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;a.<span style="color: #006600;">setProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;id&quot;</span>, <span style="color: #3366CC;">&quot;changedByJS&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>a.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;id&#39;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;a.<span style="color: #006600;">innerHTML</span> += <span style="color: #3366CC;">&#39;&lt;div id=&quot;innerHTML&quot;&gt;DIV innerHTML&lt;/div&gt;&#39;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;b = $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;innerHTML&#39;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;b.<span style="color: #006600;">setProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;id&quot;</span>, <span style="color: #3366CC;">&quot;createdByJS&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>b.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;id&#39;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
</ol>
</div>
<p>Hier wird das Meldungsfenster &#8220;createdByJS&#8221; ausgegeben. Das ist aber nicht die Lösung, die ich möchte - immerhin brauche ich das Element nur, um das Multibox-Objekt damit zu füttern und möchte es nicht irgendwo auf der Seite einfügen.</p>
<p>Ich denke aber, an der Stelle kann man auch auf <code>setProperty</code> und <code>getProperty</code> verzichten und direkt mit der <code>id</code>-Eigenschaft arbeiten:</p>
<div class="geshi no javascript" style="font-family: monospace;">
<ol>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> doTest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #003366; font-weight: bold;">var</span> a = $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;inDOM&#39;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>a.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;id&#39;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;a.<span style="color: #006600;">setProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;id&quot;</span>, <span style="color: #3366CC;">&quot;changedByJS&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>a.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&#39;id&#39;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #003366; font-weight: bold;">var</span> b = document.<span style="color: #006600;">createElement</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;div&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;b.<span style="color: #006600;">id</span> = <span style="color: #3366CC;">&quot;createdByJS&quot;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>b.<span style="color: #006600;">id</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
</ol>
</div>
<p>So klappt es dann sowohl im Internet Explorer als auch im Firefox. Jetzt hoffe ich nur, dass mir Opera keinen Strich durch die Rechnung macht <img src='http://www.garbage-collector.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.garbage-collector.net/2009/01/internet-explorer-mootools-und-elemente/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Weiter geht&#8217;s mit der PowerShell</title>
		<link>http://www.garbage-collector.net/2009/01/weiter-gehts-mit-der-powershell/</link>
		<comments>http://www.garbage-collector.net/2009/01/weiter-gehts-mit-der-powershell/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 20:14:53 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
		
		<category><![CDATA[PowerShell]]></category>

		<category><![CDATA[Programmierung]]></category>

		<guid isPermaLink="false">http://www.garbage-collector.net/?p=63</guid>
		<description><![CDATA[Wenn ich nun schon motiviert bin, mich mit der PowerShell auseinander zu setzen, will ich natürlich auch gleich weiter machen. Aber es ist wie so oft, wenn man etwas neues lernt - auch wenn die einführenden Beispiele einleuchtend und einfach sind, hat man sie nach einem langen Arbeitstag schon wieder zum Teil vergessen. 
Da ich [...]]]></description>
			<content:encoded><![CDATA[<p>Wenn ich nun schon motiviert bin, mich mit der PowerShell auseinander zu setzen, will ich natürlich auch gleich weiter machen. Aber es ist wie so oft, wenn man etwas neues lernt - auch wenn die einführenden Beispiele einleuchtend und einfach sind, hat man sie nach einem langen Arbeitstag schon wieder zum Teil vergessen. </p>
<p>Da ich mich kenne, weiß ich, dass ich viel besser lerne, wenn ich die Übung nicht nur mache sondern auch dokumentiere. Dazu werde ich nun einfach das Blog verwenden <img src='http://www.garbage-collector.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
<span id="more-63"></span><br />
<strong>Alles ist ein Objekt</strong><br />
Die PowerShell ist eine objektorientierte Shell. Ein- und Ausgaben von Befehlen (in der PowerShell Sprache &#8220;Cmdlets&#8221;, Commandlets, genannt) sind Objekte - und wenn eine Ausgabe auf dem Bildschirm ausgegeben werden soll, wird ein Text daraus gemacht (also eine Art automatische toString-Methode). </p>
<p>Die Cmdlets folgen einer einheitlichen Syntax: <em>&lt;Verb&gt;-&lt;Substantiv&gt; [-Parameter]</em>. <em>Get-Help</em>, <em>Get-Help -detailed</em>, <em>Sort-Object</em>, <em>Get-ChildItem</em>&#8230;</p>
<p>Für viele Cmdlets sind Aliase definiert - so lassen sich die gesamten &#8220;alten&#8221; Befehle der cmd.exe/command.exe weiterverwenden. <em>dir</em> ist ein Alias für <em>get-ChildItem</em>, <em>help</em> ein Alias für <em>Get-Help</em>. Viele UNIX-Kommandos stehen ebenfalls als Alias zur Verfügung: <em>ls</em>, <em>man</em>, <em>mount</em>&#8230;</p>
<p><strong>Piping</strong><br />
Befehle lassen sich über eine Pipe | verbinden - die Ausgabe des Cmdlets links der Pipe wird als Eingabe für das Cmdlet rechts der Pipe verwendet:</p>
<div class="geshi no powershell" style="font-family: monospace;">
<ol>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #666699; font-weight: bold;">Get-Help</span> <span style="color: 66cc66;">*</span> <span style="color: 66cc66;">|</span> <span style="color: #666699; font-weight: bold;">Get-Help</span> <span style="color: #006600; font-style: italic;">-detailed</span></div>
</li>
</ol>
</div>
<p><em>Get-Help *</em> liefert alle Hilfethemen, diese Liste wird weitergeleitet an <em>Get-Help -detailed</em> - so erhält man die detaillierte Hilfe zu jedem Thema in der PowerShell-Hilfe.</p>
<p>Durch Pipes kann eine beliebige Anzahl an Befehlen verkettet werden:</p>
<div class="geshi no powershell" style="font-family: monospace;">
<ol>
<li style="font-family: &#39;Courier New&#39;, Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: normal;"><span style="color: #666699; font-weight: bold;">Get-Help</span> <span style="color: 66cc66;">*</span> <span style="color: 66cc66;">|</span> <span style="color: #666699; font-weight: bold;">Get-Help</span> <span style="color: #006600; font-style: italic;">-detailed</span> <span style="color: 66cc66;">|</span> <span style="color: #666699; font-weight: bold;">Out-File</span> d:\hilfe.txt</div>
</li>
</ol>
</div>
<p>So wird die gesamte Hilfe in eine Text-Datei geschrieben.</p>
<p>To be continued&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garbage-collector.net/2009/01/weiter-gehts-mit-der-powershell/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Erste Schritte mit der Windows PowerShell</title>
		<link>http://www.garbage-collector.net/2009/01/erste-schritte-mit-der-windows-powershell/</link>
		<comments>http://www.garbage-collector.net/2009/01/erste-schritte-mit-der-windows-powershell/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 06:52:06 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
		
		<category><![CDATA[PowerShell]]></category>

		<category><![CDATA[Programmierung]]></category>

		<guid isPermaLink="false">http://www.garbage-collector.net/?p=60</guid>
		<description><![CDATA[Wie gesagt beschäftige ich mich gerade wenn etwas Zeit ist mit der Windows PowerShell. Einen ganz schönen Einsteiger-Workshop gibt es von Frank Koch, den ich gerade durcharbeite. Ein erstes kleines Skript ist dabei auch schon heraus gekommen - eine HTML-Seite mit den Windows-Services, sortiert nach Status (stopped oder running) und entsprechend dem Status farblich hinterlegt:
[UPDATE: [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.garbage-collector.net/2009/01/windows-powershell/" target="_self">Wie gesagt</a> beschäftige ich mich gerade wenn etwas Zeit ist mit der Windows PowerShell. Einen ganz schönen Einsteiger-Workshop gibt es von <a href="http://frankoch.com/PS.aspx" target="_blank">Frank Koch</a>, den ich gerade durcharbeite. Ein erstes kleines Skript ist dabei auch schon heraus gekommen - eine HTML-Seite mit den Windows-Services, sortiert nach Status (stopped oder running) und entsprechend dem Status farblich hinterlegt:</p>
<p>[<strong>UPDATE:</strong> Da das Syntax-Highlighting leider die Darstellung im Internet Explorer versaut, habe ich das kleine Skript erstmal entfernt. Wer sich dafür interessiert, findet es in dem <a href="http://frankoch.com/PS.aspx" target="_blank">Workshop von Frank Koch</a>]</p>
<p>Sicherlich noch nicht die Monster-Anwendung, aber ich finde es schon ziemlich cool - und bin sehr gespannt, was die PowerShell noch so alles kann.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garbage-collector.net/2009/01/erste-schritte-mit-der-windows-powershell/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Erster Release Candidate vom Internet Explorer 8</title>
		<link>http://www.garbage-collector.net/2009/01/erster-release-candidate-vom-internet-explorer-8/</link>
		<comments>http://www.garbage-collector.net/2009/01/erster-release-candidate-vom-internet-explorer-8/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 06:53:17 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
		
		<category><![CDATA[Web]]></category>

		<category><![CDATA[Browser]]></category>

		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://www.garbage-collector.net/?p=53</guid>
		<description><![CDATA[Gestern ist er also erschienen, der erste Release Candidate vom neuen Internet Explorer 8 (Meldung bei heise.de, golem.de). Download und Installation gehen recht fix, allerdings mit typischen Windows-Neustart. Der erste kleine Schock dann beim Einrichten:
Der Browser möchte mich auf Websites hinweisen, die mich auch interessieren könnten - basierend auf meinem Besuchsverlauf. Da muss ich doch [...]]]></description>
			<content:encoded><![CDATA[<p>Gestern ist er also erschienen, der erste Release Candidate vom neuen Internet Explorer 8 (Meldung bei <a href="http://www.heise.de/newsticker/Erster-Release-Kandidat-des-Internet-Explorer-8-erschienen--/meldung/122388">heise.de</a>, <a href="http://www.golem.de/0901/64841.html">golem.de</a>). Download und Installation gehen recht fix, allerdings mit typischen Windows-Neustart. Der erste kleine Schock dann beim Einrichten:</p>
<div id="attachment_56" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.garbage-collector.net/wp-content/uploads/2009/01/ie8-vorgeschlagenesites.png"><img class="size-medium wp-image-56" title="ie8-vorgeschlagenesites" src="http://www.garbage-collector.net/wp-content/uploads/2009/01/ie8-vorgeschlagenesites-300x222.png" alt="Screenshot der IE8 &quot;Vorgeschlagenen Sites&quot;" width="300" height="222" /></a><p class="wp-caption-text">Screenshot der IE8 &quot;Vorgeschlagenen Sites&quot;</p></div>
<p>Der Browser möchte mich auf Websites hinweisen, die mich auch interessieren könnten - basierend auf meinem Besuchsverlauf. Da muss ich doch glatt sagen - danke, ich verzichte.</p>
<p>Nach der Einrichtung musste ich natürlich gleich ein paar Seiten testen. Garbage-Collector.net sieht so aus, wie es soll:</p>
<div id="attachment_54" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.garbage-collector.net/wp-content/uploads/2009/01/ie8-garbagecollector.png"><img class="size-medium wp-image-54" title="ie8-garbagecollector" src="http://www.garbage-collector.net/wp-content/uploads/2009/01/ie8-garbagecollector-300x253.png" alt="Screenshot von Garbage-Collector.net im IE8" width="300" height="253" /></a><p class="wp-caption-text">Screenshot von Garbage-Collector.net im IE8</p></div>
<p>Auch &#8220;meine&#8221; anderen Webseiten - die beruflichen - laufen grundsätzlich, trotzdem sind mir schon ein paar kleinere (und hoffentlich schnell und einfach zu fixende) Layout-Bugs aufgefallen.</p>
<p>Einen ersten Blick auf die Entwicklertools (zu finden unter &#8220;Extras&#8221; oder mit der F12-Taste) habe ich auch geworfen - sehen gut aus. Die Entwicklung wird damit sicherlich ein gutes Stück vereinfacht.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.garbage-collector.net/2009/01/erster-release-candidate-vom-internet-explorer-8/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
