<?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>The curse of Dennis D. Spreen</title>
	<atom:link href="http://blog.spreendigital.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.spreendigital.de</link>
	<description>A blog about Delphi programming, web and other technical stuff</description>
	<lastBuildDate>Fri, 11 Nov 2011 12:06:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>VerySimpleXML &#8211; a lightweight Delphi XML reader and writer</title>
		<link>http://blog.spreendigital.de/2011/11/10/verysimplexml-a-lightweight-delphi-xml-reader-and-writer/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=verysimplexml-a-lightweight-delphi-xml-reader-and-writer</link>
		<comments>http://blog.spreendigital.de/2011/11/10/verysimplexml-a-lightweight-delphi-xml-reader-and-writer/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 10:04:24 +0000</pubDate>
		<dc:creator>Dennis</dc:creator>
				<category><![CDATA[Delphi 2009]]></category>
		<category><![CDATA[Delphi 2010]]></category>
		<category><![CDATA[Delphi Programming]]></category>
		<category><![CDATA[Delphi XE]]></category>
		<category><![CDATA[Delphi XE2]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://blog.spreendigital.de/?p=897</guid>
		<description><![CDATA[There are lot of possibilities if you&#8217;re in need to parse or write XML files: use TXMLDocument (the MSXML wrapper) or use xml components like OmniXML, NativeXml, ADOM, SAX, libxml2, DIXml, fcl-XML, Fast XMLParser, SimpleXML Now here comes another one: VerySimpleXML &#8211; a lightweight, one-unit XML reader/writer in under 500 lines of code. Use it [...]]]></description>
			<content:encoded><![CDATA[<p>There are lot of possibilities if you&#8217;re in need to parse or write <a href="http://www.w3.org/XML/" target="_blank">XML</a> files:</p>
<ul>
<li>use <a href="http://delphi.about.com/od/internetintranet/ss/xml_rss_read.htm" target="_blank">TXMLDocument</a> (the MSXML wrapper)</li>
<li>or use xml components like <a href="http://www.omnixml.com/" target="_blank">OmniXML</a>, <a href="http://www.simdesign.nl/xml.html" target="_blank">NativeXml</a>, <a href="http://www.philo.de/xml/downloads.shtml" target="_blank">ADOM</a>, <a href="http://sourceforge.net/projects/saxforpascal/" target="_blank">SAX</a>, <a href="http://sourceforge.net/projects/libxml2-pas/" rel="nofollow" target="_blank">libxml2</a>, <a href="http://www.yunqa.de/delphi/doku.php/products/xml/index" target="_blank">DIXml</a>,<a href="http://wiki.freepascal.org/fcl-xml" target="_blank"> fcl-XML</a>, <a href="http://destructor.de/xmlparser/index.htm" target="_blank">Fast XMLParser,</a> <a href="http://www.audio-data.de/simplexml.html" target="_blank">SimpleXML<br />
</a></li>
</ul>
<p>Now here comes another one: <strong>VerySimpleXML &#8211; a lightweight, one-unit XML reader/writer</strong> in under 500 lines of code. Use it for small well-formed XML files (like configuration files, etc.).<span id="more-897"></span></p>
<p><strong>Download <a href='http://blog.spreendigital.de/wp-content/uploads/2011/11/verysimplexml-v1.0.zip'>verysimplexml-v1.0.zip</a></strong> (7kb)</p>
<p>Some usage examples:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">uses</span> Xml<span style="color: #000066;">.</span><span style="color: #006600;">VerySimple</span><span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span>
  Xml<span style="color: #000066;">:</span> TVerySimpleXML<span style="color: #000066;">;</span>
  Node<span style="color: #000066;">,</span> Child<span style="color: #000066;">:</span> TXmlNode<span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
  Xml <span style="color: #000066;">:</span><span style="color: #000066;">=</span> TVerySimpleXml<span style="color: #000066;">.</span><span style="color: #006600;">Create</span><span style="color: #000066;">;</span>
  Xml<span style="color: #000066;">.</span><span style="color: #006600;">LoadFromFile</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'example.xml'</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  Xml<span style="color: #000066;">.</span><span style="color: #006600;">Root</span><span style="color: #000066;">.</span><span style="color: #006600;">Find</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'book'</span><span style="color: #000066;">,</span> <span style="color: #ff0000;">'id'</span><span style="color: #000066;">,</span> <span style="color: #ff0000;">'bk102'</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">.</span><span style="color: #006600;">Find</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'author'</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">.</span><span style="color: #006600;">Text</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #ff0000;">'Dein, Carol'</span><span style="color: #000066;">;</span>
  Node <span style="color: #000066;">:</span><span style="color: #000066;">=</span> Xml<span style="color: #000066;">.</span><span style="color: #006600;">Root</span><span style="color: #000066;">.</span><span style="color: #006600;">AddChild</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'book'</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  Child <span style="color: #000066;">:</span><span style="color: #000066;">=</span> Node<span style="color: #000066;">.</span><span style="color: #006600;">AddChild</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'author'</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  Child<span style="color: #000066;">.</span><span style="color: #006600;">Text</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #ff0000;">'Barger, Al'</span><span style="color: #000066;">;</span>
  Child<span style="color: #000066;">.</span><span style="color: #006600;">Attribute</span><span style="color: #000066;">&#91;</span><span style="color: #ff0000;">'type'</span><span style="color: #000066;">&#93;</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #ff0000;">'topseller'</span><span style="color: #000066;">;</span>
  Node<span style="color: #000066;">.</span><span style="color: #006600;">AddChild</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'title'</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">.</span><span style="color: #006600;">SetAttribute</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'lang'</span><span style="color: #000066;">,</span> <span style="color: #ff0000;">'en'</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">.</span><span style="color: #006600;">SetText</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'A big View'</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  Xml<span style="color: #000066;">.</span><span style="color: #006600;">SaveToFile</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'output.xml'</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  Xml<span style="color: #000066;">.</span><span style="color: #006600;">Free</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p>VerySimpleXML supports just a subset of the XML specification:</p>
<ul>
<li>load and save from stream or file</li>
<li>nodes, childs and attributes</li>
<li>UTF-8 and ANSI encoding</li>
<li>compact output by setting Xml.Ident := &#8221;;</li>
<li>method chaining</li>
<li>&#8220;&gt;&#8221; and &#8220;&gt;&#8221; inside text and attribute values when wrapped in quotation marks (XML-spec requires you to transform them into &amp;lt; etc.)</li>
</ul>
<p>It does NOT support:</p>
<ul>
<li>CDATA, comments, etc&#8230;</li>
</ul>
<p>Example XML-file:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;catalog<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;book</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;bk101&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;author<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Gambardella, Matthew<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/author<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keywords</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/book<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;book</span> <span style="color: #000066;">id</span>=bk102 <span style="color: #000066;">lang</span>=<span style="color: #ff0000;">&quot;en&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;author<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Ralls, Kim<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/author<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Midnight Rain<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>A former architect battles corporate zombies<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keywords<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keyword</span> <span style="color: #000066;">lang</span>=<span style="color: #ff0000;">&quot;es&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>no-muerto<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/keyword<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keyword</span> <span style="color: #000066;">lang</span>=en<span style="color: #000000; font-weight: bold;">&gt;</span></span>zombies<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/keyword<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/keywords<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/book<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;book</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;bk103&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;author</span> <span style="color: #000066;">rate</span>=<span style="color: #ff0000;">&quot;&gt;</span></span>5&quot;&gt;Corets, Eva<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/author<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Maeve Ascendant<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>&quot;The collapse of a <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;nanotechnology<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> society&quot;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/book<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/catalog<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Warning! This is not a standard well-formed XML file (not all attributes are wrapped with quotation marks, &lt; and &gt; are used within attributes and text), it is an example of the (very simple) fault tolerance of VerySimpleXML.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.spreendigital.de/2011/11/10/verysimplexml-a-lightweight-delphi-xml-reader-and-writer/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Solving circular unit references with class helpers</title>
		<link>http://blog.spreendigital.de/2011/06/09/solving-circular-unit-references-with-class-helpers/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=solving-circular-unit-references-with-class-helpers</link>
		<comments>http://blog.spreendigital.de/2011/06/09/solving-circular-unit-references-with-class-helpers/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 08:39:45 +0000</pubDate>
		<dc:creator>Dennis</dc:creator>
				<category><![CDATA[Delphi 2009]]></category>
		<category><![CDATA[Delphi 2010]]></category>
		<category><![CDATA[Delphi Programming]]></category>
		<category><![CDATA[Delphi XE]]></category>

		<guid isPermaLink="false">http://blog.spreendigital.de/?p=767</guid>
		<description><![CDATA[Sooner or later you run into the circular unit reference problem when using a single unit for each class. There are some solutions (move the common used structs into a separate unit, use type casting, redesign your obvious bad class design, etc.) &#8211; this is a solution using class helpers. Recommended reading: &#8220;Class Helpers &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Sooner or later you run into the circular unit reference problem when using a single unit for each class. There are some <a href="http://stackoverflow.com/questions/2644973/getting-around-circular-references-in-delphi" target="_blank">solutions</a> (move the common used structs into a separate unit, use type casting, redesign your obvious bad class design, etc.) &#8211; this is a solution using class helpers. <span id="more-767"></span>Recommended reading: &#8220;<a href="http://davidglassborow.blogspot.com/2006/05/class-helpers-good-or-bad.html" target="_blank">Class Helpers &#8211; good or bad ?</a>&#8221; and &#8220;<a href="http://edn.embarcadero.com/article/34324" target="_blank">New Delphi language features since Delphi 7</a>&#8220;:</p>
<blockquote><p>&#8220;Class helpers provide a way to extend a class, but they should not be viewed as a design tool to be used when developing new code. They should be used solely for their intended purpose, which is language and platform RTL binding. &#8220;</p></blockquote>
<p>Let&#8217;s suppose we have a simple <em>TDog </em>class:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">unit</span> Dog<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">type</span>
  TDog <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span>
    Name<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">String</span><span style="color: #000066;">;</span>
  <span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p>and a corresponding <em>TMaster</em> class:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">unit</span> Master<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">type</span>
  TMaster <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span>
    Name<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">String</span><span style="color: #000066;">;</span>
  <span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p>Let&#8217;s create our objects:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">uses</span>
  Dog<span style="color: #000066;">,</span> Master<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span>
  Dog<span style="color: #000066;">:</span> TDog<span style="color: #000066;">;</span>
  Master<span style="color: #000066;">:</span> TMaster<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">begin</span>
  Dog <span style="color: #000066;">:</span><span style="color: #000066;">=</span> TDog<span style="color: #000066;">.</span><span style="color: #006600;">Create</span><span style="color: #000066;">;</span>
  Dog<span style="color: #000066;">.</span><span style="color: #006600;">Name</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #ff0000;">'Bobby'</span><span style="color: #000066;">;</span>
&nbsp;
  Master <span style="color: #000066;">:</span><span style="color: #000066;">=</span> TMaster<span style="color: #000066;">.</span><span style="color: #006600;">Create</span><span style="color: #000066;">;</span>
  Master<span style="color: #000066;">.</span><span style="color: #006600;">Name</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #ff0000;">'Joe'</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p>Works. Now we&#8217;re adding the dog&#8217;s master in our<em> TDog </em>class:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">unit</span> Dog<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">uses</span>
  Master<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">type</span>
  TDog <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span>
    Name<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">String</span><span style="color: #000066;">;</span>
    Master<span style="color: #000066;">:</span> TMaster<span style="color: #000066;">;</span>
  <span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p>Ok, compiles. Alright. Now what if we need a reference to our dog in the <em>TMaster</em> class? First approach:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">unit</span> Master<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">uses</span>
  Dog<span style="color: #000066;">;</span> <span style="color: #808080; font-style: italic;">// Compile error</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">type</span>
  TMaster <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span>
    Name<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">String</span><span style="color: #000066;">;</span>
    Dog<span style="color: #000066;">:</span> TDog<span style="color: #000066;">;</span>
  <span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p>Won&#8217;t compile &#8211; circular unit reference (unit <em>Dog</em> uses unit <em>Master</em>, and unit <em>Master </em>uses unit <em>Dog</em>). You may getting around by using TObject as the<em> Dog</em> object:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;">  TMaster <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span>
    Name<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">String</span><span style="color: #000066;">;</span>
    Dog<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">;</span>
  <span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p>Well, that compiles &#8211; but you always have to type cast your <em>Dog</em> object:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000066;">&#91;</span><span style="color: #000066;">..</span><span style="color: #000066;">&#93;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
  Dog <span style="color: #000066;">:</span><span style="color: #000066;">=</span> TDog<span style="color: #000066;">.</span><span style="color: #006600;">Create</span><span style="color: #000066;">;</span>
  Dog<span style="color: #000066;">.</span><span style="color: #006600;">Name</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #ff0000;">'Bobby'</span><span style="color: #000066;">;</span>
&nbsp;
  Master <span style="color: #000066;">:</span><span style="color: #000066;">=</span> TMaster<span style="color: #000066;">.</span><span style="color: #006600;">Create</span><span style="color: #000066;">;</span>
  Master<span style="color: #000066;">.</span><span style="color: #006600;">Name</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #ff0000;">'Joe'</span><span style="color: #000066;">;</span>
&nbsp;
  Master<span style="color: #000066;">.</span><span style="color: #006600;">Dog</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> Dog<span style="color: #000066;">;</span>  <span style="color: #808080; font-style: italic;">// The Master has a dog</span>
  Dog<span style="color: #000066;">.</span><span style="color: #006600;">Master</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> Master<span style="color: #000066;">;</span>  <span style="color: #808080; font-style: italic;">// The dog's master is Master</span>
&nbsp;
  <span style="color: #000066;">Writeln</span><span style="color: #000066;">&#40;</span>TDog<span style="color: #000066;">&#40;</span>Master<span style="color: #000066;">.</span><span style="color: #006600;">Dog</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">.</span><span style="color: #006600;">Name</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p>Now &#8211; how about using class helpers? First we move the<em> Dog </em>object into our protected area:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">unit</span> Master<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">type</span>
  TMaster <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span>
  <span style="color: #000000; font-weight: bold;">protected</span>
    FDog<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">;</span>
  <span style="color: #000000; font-weight: bold;">public</span>
    Name<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">String</span><span style="color: #000066;">;</span>
  <span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p>then we introduce a new class helper which &#8220;exports&#8221; the dog as a <em>TDog</em> class</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">unit</span> MasterClassHelper<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">uses</span>
  Dog<span style="color: #000066;">,</span> Master<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">type</span>
  TMasterClassHelper <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span> helper <span style="color: #000000; font-weight: bold;">for</span> TMaster
  <span style="color: #000000; font-weight: bold;">private</span>
    <span style="color: #000000; font-weight: bold;">procedure</span> SetDog<span style="color: #000066;">&#40;</span>Value<span style="color: #000066;">:</span> TDog<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
    <span style="color: #000000; font-weight: bold;">function</span> GetDog<span style="color: #000066;">:</span> TDog<span style="color: #000066;">;</span>
  <span style="color: #000000; font-weight: bold;">public</span>
    <span style="color: #000000; font-weight: bold;">property</span> Dog<span style="color: #000066;">:</span> TDog <span style="color: #000066;">read</span> GetDog <span style="color: #000066;">write</span> SetDog<span style="color: #000066;">;</span>
  <span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> TMasterClassHelper<span style="color: #000066;">.</span><span style="color: #006600;">GetDog</span><span style="color: #000066;">:</span> TDog<span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
  Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> TDog<span style="color: #000066;">&#40;</span>FDog<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>  <span style="color: #808080; font-style: italic;">// We cast the TObject(FDog) to TDog!</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">procedure</span> TMasterClassHelper<span style="color: #000066;">.</span><span style="color: #006600;">SetDog</span><span style="color: #000066;">&#40;</span>Value<span style="color: #000066;">:</span> TDog<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
  FDog <span style="color: #000066;">:</span><span style="color: #000066;">=</span> Value<span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p>Now we&#8217;re able to access the <em>Dog</em> reference of the <em>Master</em> object without typecasting:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">uses</span>
  Dog<span style="color: #000066;">,</span> Master<span style="color: #000066;">,</span> MasterClassHelper<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span>
  Dog<span style="color: #000066;">:</span> TDog<span style="color: #000066;">;</span>
  Master<span style="color: #000066;">:</span> TMaster<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">begin</span>
  Dog <span style="color: #000066;">:</span><span style="color: #000066;">=</span> TDog<span style="color: #000066;">.</span><span style="color: #006600;">Create</span><span style="color: #000066;">;</span>
  Dog<span style="color: #000066;">.</span><span style="color: #006600;">Name</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #ff0000;">'Bobby'</span><span style="color: #000066;">;</span>
&nbsp;
  Master <span style="color: #000066;">:</span><span style="color: #000066;">=</span> TMaster<span style="color: #000066;">.</span><span style="color: #006600;">Create</span><span style="color: #000066;">;</span>
  Master<span style="color: #000066;">.</span><span style="color: #006600;">Name</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #ff0000;">'Joe'</span><span style="color: #000066;">;</span>
&nbsp;
  Master<span style="color: #000066;">.</span><span style="color: #006600;">Dog</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> Dog<span style="color: #000066;">;</span>  <span style="color: #808080; font-style: italic;">// The Master has a dog</span>
  Dog<span style="color: #000066;">.</span><span style="color: #006600;">Master</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> Master<span style="color: #000066;">;</span>  <span style="color: #808080; font-style: italic;">// The dog's master is Master</span>
&nbsp;
  <span style="color: #000066;">Writeln</span><span style="color: #000066;">&#40;</span>Master<span style="color: #000066;">.</span><span style="color: #006600;">Dog</span><span style="color: #000066;">.</span><span style="color: #006600;">Name</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>  <span style="color: #808080; font-style: italic;">// &quot;Bobby&quot;</span>
  <span style="color: #000066;">Writeln</span><span style="color: #000066;">&#40;</span>Dog<span style="color: #000066;">.</span><span style="color: #006600;">Master</span><span style="color: #000066;">.</span><span style="color: #006600;">Name</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>  <span style="color: #808080; font-style: italic;">// &quot;Joe&quot;;</span>
&nbsp;
  <span style="color: #000066;">Writeln</span><span style="color: #000066;">&#40;</span>Dog<span style="color: #000066;">.</span><span style="color: #006600;">Master</span><span style="color: #000066;">.</span><span style="color: #006600;">Dog</span><span style="color: #000066;">.</span><span style="color: #006600;">Master</span><span style="color: #000066;">.</span><span style="color: #006600;">Dog</span><span style="color: #000066;">.</span><span style="color: #006600;">Master</span><span style="color: #000066;">.</span><span style="color: #006600;">Dog</span><span style="color: #000066;">.</span><span style="color: #006600;">Name</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span> <span style="color: #808080; font-style: italic;">// &quot;Bobby&quot;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p>Adding the <em>MasterClassHelper</em> in the implementation part of the <em>Master</em> unit allows us to access the<em> TDog</em> class inside our <em>TMaster</em> class, too:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">unit</span> Master<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">type</span>
  TMaster <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span>
  <span style="color: #000000; font-weight: bold;">protected</span>
    FDog<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">;</span>
  <span style="color: #000000; font-weight: bold;">public</span>
    Name<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">String</span><span style="color: #000066;">;</span>
    <span style="color: #000000; font-weight: bold;">procedure</span> RenameDog<span style="color: #000066;">;</span>
  <span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">implementation</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">uses</span>
  MasterClassHelper<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">procedure</span> TMaster<span style="color: #000066;">.</span><span style="color: #006600;">RenameDog</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
  Dog<span style="color: #000066;">.</span><span style="color: #006600;">Name</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #ff0000;">'Buddy'</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p>Download Delphi source <a href="http://blog.spreendigital.de/wp-content/uploads/2011/06/DogMaster.zip">DogMaster.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.spreendigital.de/2011/06/09/solving-circular-unit-references-with-class-helpers/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to change the language of the Cisco SPA504G</title>
		<link>http://blog.spreendigital.de/2011/02/22/how-to-change-the-language-of-the-cisco-spa504g/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-change-the-language-of-the-cisco-spa504g</link>
		<comments>http://blog.spreendigital.de/2011/02/22/how-to-change-the-language-of-the-cisco-spa504g/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 12:19:06 +0000</pubDate>
		<dc:creator>Dennis</dc:creator>
				<category><![CDATA[Cisco SPA504G]]></category>
		<category><![CDATA[VOIP]]></category>

		<guid isPermaLink="false">http://blog.spreendigital.de/?p=711</guid>
		<description><![CDATA[This tutorial shows how to change the language of your VOIP phone Cisco SPA 504G. 1. Download and install TFTPD32 2. Download SPA Phone Localization XML dictionaries (download both: english and your language) 3. Extract the language ZIP or copy the (extracted) XML files to the TFTPD folder 4. Run TFTPD32, press [Show dir] to [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial shows how to change the language of your VOIP phone Cisco SPA 504G.<br />
<span id="more-711"></span></p>
<p>1. Download and install <a href="http://tftpd32.jounin.net/" target="_blank">TFTPD32</a></p>
<p>2. Download <a href="https://supportforums.cisco.com/docs/DOC-9923" target="_blank">SPA Phone Localization XML dictionaries</a> (download both: english and your language)</p>
<p>3. Extract the language ZIP or copy the (extracted) XML files to the TFTPD folder</p>
<p>4. Run TFTPD32, press <em>[Show dir]</em> to verify that your XML files are available as a tftp download</p>
<p>5. Log into the web interface of your phone (http://ip.of.your.phone/)</p>
<p>6. Switch over to <em>Admin login: advanced</em> (top right)</p>
<p>7. Insert your dictionary script (as one line) into <em>Voice -&gt; Regional -&gt; Dictionary Server Script</em> (at the bottom of the page), e.g.:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Dictionary_Server_Script ua=&quot;na&quot; serv=tftp://192.168.0.2/;
d0=English;x0=spa50x_30x_en_v747.xml;
d1=German;x1=spa50x_30x_de_v746.xml; / Dictionary_Server_Script</pre></div></div>

<p>Replace<em> 192.168.0.2 </em>with the IP of your PC, <em>d1=German</em> and <em>x1=spa50x_30x_de_v746.xml</em> with your language and your language file.</p>
<p>8. Insert your language as used above (e.g. <em>German</em>) into the <em>Change Language Selection-</em>field below</p>
<p>9. <em>[Submit All Changes]</em>, your phone should now reboot</p>
<p>10. You should notice the download of the XML files in the tftp <em>Log viewer </em>and your phone should talk in your language then<em><br />
</em></p>
<p><strong><br />
</strong></p>
<h3><strong>How to change the background image</strong></h3>
<p>1. Place a 128 x 48 pixel bitmap (b/w, 2 bits, .BMP format) in the tftp folder</p>
<p>2. In the web interface set your bitmap URI at <em>Voice -&gt; Phone -&gt; BMP Picture Download URL</em> to your bitmap path, e.g.:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">tftp://192.168.0.2/background.bmp</pre></div></div>

<p>Replace<em> 192.168.0.2 </em>with the IP of your PC and <em>background.bmp</em> with the name of your bitmap.</p>
<p>3. <em>[Submit All Changes]</em>, your phone should now change the background image</p>
<h3><strong><br />
How to add ringtones</strong></h3>
<p>Use the <a href="https://supportforums.cisco.com/docs/DOC-9944/" target="_blank">ringtone utility</a> from the Cisco Support Forums.</p>
<h3><strong><br />
Need further informations?</strong></h3>
<p>For further informations read the <a href="http://www.cisco.com/en/US/docs/voice_ip_comm/csbpipp/ip_phones/administration/guide/spa500_admin.pdf" target="_blank">Cisco SPA 500 admin guide</a>, visit the <a href="https://supportforums.cisco.com/" target="_blank">Cisco Support Forums</a> or <a href="https://www.myciscocommunity.com/" target="_blank">Cisco Community Central</a>.</p>
<h3><strong><br />
</strong></h3>
]]></content:encoded>
			<wfw:commentRss>http://blog.spreendigital.de/2011/02/22/how-to-change-the-language-of-the-cisco-spa504g/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Eclipse on Mac OS X &#8211; Workspace error on NFS mounts</title>
		<link>http://blog.spreendigital.de/2010/03/26/eclipse-on-mac-os-x-workspace-error-on-nfs-mounts/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=eclipse-on-mac-os-x-workspace-error-on-nfs-mounts</link>
		<comments>http://blog.spreendigital.de/2010/03/26/eclipse-on-mac-os-x-workspace-error-on-nfs-mounts/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 08:04:50 +0000</pubDate>
		<dc:creator>Dennis</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[locking]]></category>
		<category><![CDATA[macos]]></category>
		<category><![CDATA[macosx]]></category>
		<category><![CDATA[nfs]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[workbench]]></category>

		<guid isPermaLink="false">http://www.spreendigital.de/blog/?p=533</guid>
		<description><![CDATA[If you are using Eclipse on Mac OS X and experience a &#8220;Workspace in use or cannot be created, choose a different one&#8221; after moving your workspace to a NFS share, try running eclipse with these arguments: ./eclipse -vmargs -Dosgi.locking=java.io or you may add this line to your /Application/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini file: -Dosgi.locking=java.io]]></description>
			<content:encoded><![CDATA[<p>If you are using Eclipse on Mac OS X and experience a &#8220;Workspace in use or cannot be created, choose a different one&#8221; after moving your workspace to a NFS share, try running eclipse with these arguments:</p>
<p><code>./eclipse -vmargs -Dosgi.locking=java.io</code></p>
<p>or you may add this line to your <code>/Application/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini</code> file:</p>
<p><code>-Dosgi.locking=java.io</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.spreendigital.de/2010/03/26/eclipse-on-mac-os-x-workspace-error-on-nfs-mounts/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Lua 5.1 for Delphi 2010</title>
		<link>http://blog.spreendigital.de/2009/09/28/lua-5-1-for-delphi-2010/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=lua-5-1-for-delphi-2010</link>
		<comments>http://blog.spreendigital.de/2009/09/28/lua-5-1-for-delphi-2010/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 18:36:18 +0000</pubDate>
		<dc:creator>Dennis</dc:creator>
				<category><![CDATA[Delphi 2009]]></category>
		<category><![CDATA[Delphi 2010]]></category>
		<category><![CDATA[Delphi Programming]]></category>
		<category><![CDATA[Lua]]></category>

		<guid isPermaLink="false">http://www.spreendigital.de/blog/?p=375</guid>
		<description><![CDATA[This is a Lua 5.1 Wrapper for Delphi 2009 and Delphi 2010 which automatically creates OOP callback functions. &#8220;Lua is a powerful, fast, lightweight, embeddable scripting language, it has been used in many industrial applications (e.g., Adobe&#8217;s Photoshop Lightroom), with an emphasis on embedded systems (e.g., the Ginga middleware for digital TV in Brazil) and [...]]]></description>
			<content:encoded><![CDATA[<p>This is a Lua 5.1 Wrapper for Delphi 2009 and Delphi 2010 which automatically creates OOP callback functions.<br />
<span id="more-375"></span><a href="http://www.lua.org/about.html" target="_blank"><br />
<em>&#8220;Lua</em></a><em> is a powerful, fast, lightweight, embeddable scripting language, it has been used in many industrial applications (e.g., Adobe&#8217;s Photoshop Lightroom), with an emphasis on embedded systems (e.g., the Ginga middleware for digital TV in Brazil) and games (e.g., World of Warcraft). Lua is currently the leading scripting language in games and it has a deserved reputation for performance. To claim to be &#8220;as fast as Lua&#8221; is an aspiration of other scripting languages.&#8221;</em></p>
<p>This Lua Wrapper is based on Lua-Pascal v0.2 by <a href="http://www.marcoabreu.eti.br" target="_blank">Marco Antonio Abreu</a><br />
- converted PChar to PAnsiChar<br />
- converted Char to AnsiChar<br />
- added function LuaLibLoaded: Boolean;<br />
- added a new base class (TLua) with OOP call back functions</p>
<p><strong>Download</strong><br />
<a href="http://www.spreendigital.de/blog/wp-content/uploads/2009/09/LuaDelphi2010-v1.2.zip"></a><a href="http://blog.spreendigital.de/wp-content/uploads/2009/10/LuaDelphi2010-v1.3.zip">LuaDelphi2010-v1.3</a></p>
<p><strong>History</strong><br />
1.3 Improved Callback, now uses pointer instead of object index. Modified RegisterFunctions to allow methods from other class to be registered, moved object table into TLua class<br />
1.2  Added example on how to extend lua with a delphi dll<br />
1.1  Improved global object table, optimized delphi function calls<br />
1.0  Initial Release</p>
<p><strong>Example</strong><br />
TLua automatically creates OOP callback functions for Delphi &lt;-&gt; Lua:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">uses</span>
  Lua<span style="color: #000066;">,</span> LuaLib<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">type</span>
  TMyLua <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #000066;">&#40;</span>TLua<span style="color: #000066;">&#41;</span>
  <span style="color: #000000; font-weight: bold;">published</span>
    <span style="color: #000000; font-weight: bold;">function</span> HelloWorld<span style="color: #000066;">&#40;</span>LuaState<span style="color: #000066;">:</span> TLuaState<span style="color: #000066;">&#41;</span><span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Integer</span><span style="color: #000066;">;</span>
  <span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> TMyLua<span style="color: #000066;">.</span><span style="color: #006600;">HelloWorld</span><span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Integer</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">var</span>
  ArgCount<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Integer</span><span style="color: #000066;">;</span>
  I<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">integer</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
  <span style="color: #000066;">writeln</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'Delphi: Hello World'</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
&nbsp;
  ArgCount <span style="color: #000066;">:</span><span style="color: #000066;">=</span> Lua_GetTop<span style="color: #000066;">&#40;</span>LuaState<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  <span style="color: #000066;">writeln</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'Arguments: '</span><span style="color: #000066;">,</span> ArgCount<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  <span style="color: #000000; font-weight: bold;">for</span> I <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #0000ff;">1</span> <span style="color: #000000; font-weight: bold;">to</span> ArgCount <span style="color: #000000; font-weight: bold;">do</span>
    <span style="color: #000066;">writeln</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'Arg1'</span><span style="color: #000066;">,</span> I<span style="color: #000066;">,</span> <span style="color: #ff0000;">': '</span><span style="color: #000066;">,</span> Lua_ToInteger<span style="color: #000066;">&#40;</span>LuaState<span style="color: #000066;">,</span> I<span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
&nbsp;
  <span style="color: #808080; font-style: italic;">// Clear stack</span>
  Lua_Pop<span style="color: #000066;">&#40;</span>LuaState<span style="color: #000066;">,</span> Lua_GetTop<span style="color: #000066;">&#40;</span>LuaState<span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
&nbsp;
  <span style="color: #808080; font-style: italic;">// Push return values</span>
  Lua_PushInteger<span style="color: #000066;">&#40;</span>LuaState<span style="color: #000066;">,</span> <span style="color: #0000ff;">101</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  Lua_PushInteger<span style="color: #000066;">&#40;</span>LuaState<span style="color: #000066;">,</span> <span style="color: #0000ff;">102</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #0000ff;">2</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span>
  MyLua<span style="color: #000066;">:</span> TLua<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">begin</span>
  MyLua <span style="color: #000066;">:</span><span style="color: #000066;">=</span> TMyLua<span style="color: #000066;">.</span><span style="color: #006600;">Create</span><span style="color: #000066;">;</span>
  MyLua<span style="color: #000066;">.</span><span style="color: #006600;">DoFile</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'Helloworld.lua'</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  MyLua<span style="color: #000066;">.</span><span style="color: #006600;">Free</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p><em>helloworld.lua</em></p>

<div class="wp_syntax"><div class="code"><pre class="lua" style="font-family:monospace;"><span style="color: #b1b100;">print</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;LuaDelphi Test&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
p1,p2 <span style="color: #66cc66;">=</span> HelloWorld<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">2</span>,<span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #b1b100;">print</span> <span style="color: #ff0000;">&quot;Results:&quot;</span><span style="color: #66cc66;">;</span>
<span style="color: #b1b100;">print</span> <span style="color: #66cc66;">&#40;</span>p1<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #b1b100;">print</span> <span style="color: #66cc66;">&#40;</span>p2<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.spreendigital.de/2009/09/28/lua-5-1-for-delphi-2010/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin &#8211; QR Code Tag v1.0</title>
		<link>http://blog.spreendigital.de/2009/09/19/qr-code-tag-wordpress-plugin-v1-0/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=qr-code-tag-wordpress-plugin-v1-0</link>
		<comments>http://blog.spreendigital.de/2009/09/19/qr-code-tag-wordpress-plugin-v1-0/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 08:12:06 +0000</pubDate>
		<dc:creator>Dennis</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.spreendigital.de/blog/?p=330</guid>
		<description><![CDATA[QR Code Tag Use QR Codes (Google API or QR Code Lib) anywhere in your WordPress blog, as a Widget, Shortcode, Tooltip or with a PHP function. Features: Choose your QR Code generator: Google Chart API (online connection required) or QR Code Lib (included) Uses cURL if allow_url_fopen is disabled (Google Chart API) GIF, PNG [...]]]></description>
			<content:encoded><![CDATA[<h1>QR Code Tag</h1>
<p>Use QR Codes (Google API or QR Code Lib) anywhere in your WordPress blog, as a Widget, Shortcode, Tooltip or with a PHP function.<em><br />
<span id="more-330"></span></em></p>
<p>Features:</p>
<ul>
<li>Choose your QR Code generator: Google Chart API (online connection required) or QR Code Lib (included)</li>
<li>Uses cURL if <code>allow_url_fopen</code> is disabled (Google Chart API)</li>
<li>GIF, PNG or JPEG image output</li>
<li>All QR Code images are cached</li>
<li>Use as a Sidebar Widget</li>
<li>Use the Shortcode <code>&#91;qrcodetag&#93;content&#91;/qrcodetag&#93;</code> within your posts</li>
<li>Use the Tooltip mode <code>&#91;qrcodetag tooltip="content"&#93;some text&#91;/qrcodetag&#93;</code> within your posts</li>
<li>Use the PHP function inside your own template</li>
<li>&#8220;Best Read Mode&#8221; for optimized QR Code image size</li>
<li>Works with PHP 5.3 as well</li>
<li>Works on symlinked plugin folders</li>
<li>Available plugin admin interface languages: English, German</li>
</ul>
<p><a href="http://wordpress.org/extend/plugins/qr-code-tag/installation/" target="_blank">Installation<br />
</a><a href="http://wordpress.org/extend/plugins/qr-code-tag/faq/" target="_blank">FAQ</a><br />
<a href="http://wordpress.org/extend/plugins/qr-code-tag/screenshots/" target="_blank">Screenshots<br />
</a><a href="http://downloads.wordpress.org/plugin/qr-code-tag.zip">Download QR Code Tag  v1.0</a></p>
<p>Donations are welcome:</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="dennis@spreendigital.de">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="D. Spreen WordPress QR Code Plugin">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_SM.gif:NonHostedGuest">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"><br />
</form>
]]></content:encoded>
			<wfw:commentRss>http://blog.spreendigital.de/2009/09/19/qr-code-tag-wordpress-plugin-v1-0/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>Favourite Android applications</title>
		<link>http://blog.spreendigital.de/2009/09/18/essential-android-applications/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=essential-android-applications</link>
		<comments>http://blog.spreendigital.de/2009/09/18/essential-android-applications/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 07:31:45 +0000</pubDate>
		<dc:creator>Dennis</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.spreendigital.de/blog/?p=305</guid>
		<description><![CDATA[Here are some of my favorite free essential Android applications &#8220;Google Sky Map turns your Android-powered mobile phone into a window on the night sky.&#8221; By using the Android phone&#8217;s orientation sensors, a star map for your location is shown. Impressive. &#8220;Graphics and sound to keep your toddler entertained without having to worry about them [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some of<strong> </strong>my favorite free essential Android applications<br />
<span id="more-305"></span><br />
<span class="qrcttooltip" title="http://blog.spreendigital.de/wp-content/plugins/qr-code-tag/data/qrct-2e246519ff14fa69450029a5f5a6c659.png"><a href="http://www.cyrket.com/package/com.google.android.stardroid" target="_blank"><strong>SkyMap</strong></a></span><em><br />
&#8220;Google Sky Map turns your Android-powered mobile phone into a window on the night sky.&#8221;</em><br />
By using the Android phone&#8217;s orientation sensors, a star map for your location is shown. Impressive.</p>
<p><span class="qrcttooltip" title="http://blog.spreendigital.de/wp-content/plugins/qr-code-tag/data/qrct-3562e5ed43d2ccdefe82c83039745760.png"><strong><a href="http://www.cyrket.com/package/marcone.toddlerlock" target="_blank">Toddler Lock</a></strong></span><br />
<em>&#8220;Graphics and sound to keep your toddler entertained without having to worry about them dialing a number or going in to other applications.&#8221;</em><br />
Very essential if you&#8217;re surrounded by kids.</p>
<p><span class="qrcttooltip" title="http://blog.spreendigital.de/wp-content/plugins/qr-code-tag/data/qrct-a35f72e0a4a1ffce8b72f5bb0223d2e2.png"><a href="http://www.cyrket.com/package/com.rmfdev.callfaker" target="_blank"><strong>Call Faker</strong></a></span><br />
<em>&#8220;Ever been in an uncomfortable situation or with someone who talks too much? Just set the contact, time, and ringtone, and the phone will ring with a fake call, allowing you to escape!&#8221;</em><br />
Oh yes, works great and helps you to escape mother in law sunday afternoon talks. Somehow essential.</p>
<p><span class="qrcttooltip" title="http://blog.spreendigital.de/wp-content/plugins/qr-code-tag/data/qrct-e881a8acdf621b3179cafbf2b71f4548.png"><a href="http://www.cyrket.com/package/com.farproc.wifi.analyzer" target="_blank"><strong>WifiAnalyzer</strong></a></span><br />
<em>&#8220;Turns your android phone into a Wi-Fi analyzer!! Shows the Wi-Fi channels around you. Helps you to find a less crowded channel for your wireless router.&#8221;<br />
</em>Best Wifi analyzer. Use Menu|View to change graph and list view mode.</p>
<p><span class="qrcttooltip" title="http://blog.spreendigital.de/wp-content/plugins/qr-code-tag/data/qrct-6b18a77974431a53bb4763af6cc6937b.png"><strong> <a href="http://www.cyrket.com/package/com.geekyouup.android.ustopwatch" target="_blank">Ultimate Stopwatch &amp; Timer</a></span></strong><br />
<em>&#8220;Nice UI stopwatch with lap timer and countdown timer. Can run in background and you can save lap times to compare later. New Alarm Sound when Countdown complete, uses system volume.&#8221;<br />
</em> A very nice interface and it does it&#8217;s job very well.</p>
<p><span class="qrcttooltip" title="http://blog.spreendigital.de/wp-content/plugins/qr-code-tag/data/qrct-4e43e1f7c95bf3a4c09246a2be47134e.png"><strong> </strong><a href="http://www.cyrket.com/package/org.swiftp" target="_blank"><strong>SwiFTP Server</strong></a><strong></span></strong><br />
<em>&#8220;SwiFTP is an open-source FTP server that allows you to connect to your phone over wifi to upload and download files. Any FTP client may be used.&#8221;<br />
</em>Nice and easy interface, transferred the data faster than any other Android FTP server application.</p>
<p><span class="qrcttooltip" title="http://blog.spreendigital.de/wp-content/plugins/qr-code-tag/data/qrct-50449fd62ae831fa22a3222b237ae37c.png"><a href="http://www.cyrket.com/package/de.jersey.tvguide" target="_blank"><strong>TV-Guide</strong></a></span><em><br />
&#8220;Fast and easy TV listings for Germany. Quickly get an overview of what&#8217;s on right now &#8211; the shows, the movies and the sports events.&#8221;</em><br />
This version is for German Television &#8211; it works nice and gives you a quick overview. <span class="qrcttooltip" title="http://blog.spreendigital.de/wp-content/plugins/qr-code-tag/data/qrct-37bd607332d2fedbb9f3b1c8ab23307b.png"><a href="http://www.cyrket.com/package/se.jersey.tvguide" target="_blank">Swedish</a></span> and <span class="qrcttooltip" title="http://blog.spreendigital.de/wp-content/plugins/qr-code-tag/data/qrct-dfad0e9b93e5a9cb67ea092b181659f8.png"><a href="http://www.cyrket.com/package/ukfree.jersey.tvguide">UK</a></span> version also available.</p>
<p><span class="qrcttooltip" title="http://blog.spreendigital.de/wp-content/plugins/qr-code-tag/data/qrct-1b2ac8201c2362f8f33c8403ddc0ff60.png"><a href="http://www.cyrket.com/package/com.layar" target="_blank"><strong>Layar &#8211; Reality Browser</strong></a></span><br />
<em> &#8220;The Layar Reality Browser displays real time digital information on top of reality in the camera screen of the mobile phone.&#8221;</em><br />
Depends heavily on your location &#8211; you won&#8217;t find any additional informations right out in the sticks. Use it while you&#8217;re in the city.</p>
<p><span class="qrcttooltip" title="http://blog.spreendigital.de/wp-content/plugins/qr-code-tag/data/qrct-8612930f5404f0a2256bf165abf526db.png"><a href="http://www.cyrket.com/package/com.a0soft.gphone.aTrackDog" target="_blank"><strong>aTrackDog</strong></a></span><br />
<em>&#8220;aTrackDog finds the newest version for all apps even they are not listed in Market.&#8221;</em><br />
Gives you a nice overview about installed applications and updated versions.</p>
<p><span class="qrcttooltip" title="http://blog.spreendigital.de/wp-content/plugins/qr-code-tag/data/qrct-558ef02389b8678a71f6e8cce358c8fd.png"><a href="http://www.cyrket.com/package/com.eclipsim.gpsstatus2" target="_blank"><strong>GPS Status</strong></a></span><br />
<em>&#8220;Display your GPS and sensor data: Shows the position, number and signal strength of GPS satellites. Check your position, GPS accuracy, speed, acceleration and bearing. A magnetic compass is included which displays both magnetic and true north. Use it as a leveling tool or detect magnetic anomalies in your area.&#8221;<br />
</em>The one with the best interface.</p>
<p><span class="qrcttooltip" title="http://blog.spreendigital.de/wp-content/plugins/qr-code-tag/data/qrct-d9606cd3bc84e9a7fd66d1e23176f862.png"><a href="http://www.cyrket.com/package/com.a0soft.gphone.aCurrency" target="_blank"><strong>aCurrency</strong></a></span><br />
<em>&#8220;A currency converter for 160+ currencies with daily exchange rates update.&#8221;</em><br />
Always up to date. Nice.</p>
<p><span class="qrcttooltip" title="http://blog.spreendigital.de/wp-content/plugins/qr-code-tag/data/qrct-c93ddbcd69892825ec1d99ff7c0fd5a8.png"><a href="http://www.cyrket.com/package/de.klicktel.android" target="_blank"><strong>klickTel</strong></a></span><em><br />
&#8220;Funktionen:  Telefonbuch, Branchenbuch, Rückwärtssuche und Lokale Suche in einem  Geldautomaten: Suche nach Bankautomaten aller Banken.Kaffee und Burger: Überall Starbucks und McDonald’s finden. Nie wieder im Stau stehen: Anzeige aktueller Verkehrsinfos und Baustellen&#8221;</em><br />
German only. Sehr kompakt für alle oben genannten Informationen.</p>
<p><a href="http://www.cyrket.com/" target="_blank"><strong>Android Application Browser</strong> (Website)<br />
</a><em>&#8220;Now you can keep up with new Android apps from the comfort of your desk!&#8221;</em></p>
<p><strong>What are your favorite Android applications?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.spreendigital.de/2009/09/18/essential-android-applications/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Hint: Blank Typo3 installation screen</title>
		<link>http://blog.spreendigital.de/2009/08/14/hint-blank-typo3-installation-screen/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=hint-blank-typo3-installation-screen</link>
		<comments>http://blog.spreendigital.de/2009/08/14/hint-blank-typo3-installation-screen/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 11:45:47 +0000</pubDate>
		<dc:creator>Dennis</dc:creator>
				<category><![CDATA[Typo3]]></category>

		<guid isPermaLink="false">http://www.spreendigital.de/blog/?p=298</guid>
		<description><![CDATA[If you experience a blank installation screen while trying to setup Typo3, take a look at your mysql database time out setting in your php.ini file: mysql.connect_timeout = 60 If this exceeds your max_execution_time setting, you&#8217;ll get a blank typo3 installation screen. Set it to a low vale, e.g. 5.]]></description>
			<content:encoded><![CDATA[<p>If you experience a blank installation screen while trying to setup Typo3, take a look at your mysql database time out setting in your php.ini file:</p>
<pre>mysql.connect_timeout = 60</pre>
<p>If this exceeds your max_execution_time setting, you&#8217;ll get a blank typo3 installation screen. Set it to a low vale, e.g. 5.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.spreendigital.de/2009/08/14/hint-blank-typo3-installation-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create an ESXi v4 Whitebox ISO with Windows Tools</title>
		<link>http://blog.spreendigital.de/2009/07/27/how-to-create-an-esxi-v4-whitebox-iso-with-windows-tools/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-create-an-esxi-v4-whitebox-iso-with-windows-tools</link>
		<comments>http://blog.spreendigital.de/2009/07/27/how-to-create-an-esxi-v4-whitebox-iso-with-windows-tools/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 10:58:44 +0000</pubDate>
		<dc:creator>Dennis</dc:creator>
				<category><![CDATA[VMWare]]></category>
		<category><![CDATA[ESXi]]></category>
		<category><![CDATA[Whitebox]]></category>

		<guid isPermaLink="false">http://www.spreendigital.de/blog/?p=276</guid>
		<description><![CDATA[This is a short tutorial on how to build a custom ESXi v4.0 Whitebox ISO with Windows Tools (and an Ubuntu-VMImage for VMWare Player) by integrating a new driver (RTL8169 network card) into the Community Driver Pack and integrating this pack into the ISO, too. See &#8220;Create an ESXi v3.5 Whitebox ISO&#8221; for creating an [...]]]></description>
			<content:encoded><![CDATA[<p>This is a short tutorial on how to build a custom ESXi v4.0 Whitebox ISO with Windows Tools (and an Ubuntu-VMImage for VMWare Player) by integrating a new driver (RTL8169 network card) into the Community Driver Pack and integrating this pack into the ISO, too.<br />
<span id="more-276"></span> <img title="More..." src="http://www.spreendigital.de/blog/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" /></p>
<p><em>See &#8220;<a href="http://www.spreendigital.de/blog/2009/03/13/create-an-esxi-whitebox-iso-with-windows-tools/" target="_self">Create an ESXi v3.5 Whitebox ISO</a>&#8221;  for creating an ESXi v3.5 Whitebox.</em></p>
<p><strong><em>1. Warning:<br />
</em></strong><em>You need a 64bit CPU in order to run ESXi v4! Download </em><a href="http://www.vmware.com/download/ws/drivers_tools.html">Processor Check for 64-Bit Compatibility</a> on the VMware site <em>and determine whether your CPU is supported!<br />
Btw: the Intel T2300 CPU is NOT  a 64bit CPU&#8230;<br />
</em><strong><em> </em></strong></p>
<p><strong><em>2. Warning:<br />
</em></strong><em>There are reports that the RTL driver may not work on all boards because of the new 64-bit portion of the ESXi driver model. Try ESXi 3.5 then. Or wait until a new full supported 64bit driver is made. Check<a href="http://www.vm-help.com/forum/"> vm-help forum</a> regularly.</em><br />
<em><br />
</em><br />
<span style="text-decoration: underline;">ESX Hardware Requirements</span><br />
VMware ESX 4.0 will only install and run on servers with 64-bit x86 CPUs. Known 64-bit processors:</p>
<ul>
<li>All AMD Opterons support 64 bit.</li>
<li>All Intel Xeon 3000/3200, 3100/3300, 5100/5300, 5200/5400, 7100/7300, and 7200/7400 support 64 bit.</li>
<li>All Intel Nehalem (no Xeon brand number assigned yet) support 64 bit.</li>
</ul>
<p>Use this tools<br />
- <a href="http://www.ezbsystems.com/ultraiso/">UltraIso</a> $29.95 USD / Free Trial<br />
- <a href="http://www.vmware.com/appliances/directory/55047">Ubuntu Server 8.10</a> for <a href="http://www.vmware.com/products/player/">VMWare Player</a> Free<br />
- <a href="http://www.bitvise.com/tunnelier">Bitvise Tunnelier</a> Free for individual use (or <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">Putty</a>, but Tunnelier is preferred)<br />
- <a href="http://www.winimage.com/download.htm">WinImage</a> US$ 30.00 / Free Trial</p>
<p>Let&#8217;s prepare by downloading the VMWare ISO, the Community Driver Pack and the new driver.</p>
<p>Download <a href="http://www.vmware.com/download/esxi/">VMware ESXi 4 Installable</a><br />
Download <a href="http://www.vm-help.com/esx/esx3i/Custom_oem.tgz/CommunityUnifiedDriverPack_v1.1.0_U3-123629.oem.tgz">Community Unified oem.tgz v1.1.0</a><br />
Download <a href="http://www.icjacobsen.com/dld/oem.tgz">Realtek RLT8168 Driver oem.tgz package</a><br />
Download <a href="http://downloads.sourceforge.net/open-vdrivers/mymods-0.1.tgz?use_mirror=mesh">Realtek RTL8169 Driver (if needed, try above first!)<br />
</a></p>
<p>1. Extract <code>image.tgz</code> from the VMware ISO with UltraIso</p>
<p>2. Use Tunnelier to log into Ubunto and create a new directory called &#8220;esxi&#8221; (either with SFTP or by command console with <code>mkdir esxi</code>)</p>
<p>3. Move<code> image.tgz</code> to this esxi directory (use Tunneliers SFTP)<br />
Extract the contents by changing to this directory<br />
<code>cd esxi</code><br />
<code>tar zxvf image.tgz</code></p>
<p>and remove the tgz file<br />
<code>rm image.tgz</code></p>
<p>4. Decompress the VMWare diskimage<br />
<code>cd usr/lib/vmware/installer/</code><br />
<code>bzip2 -d VMware-VMvisor-big-171294-x86_64.dd.bz2</code></p>
<p><em>Skip step 5-12 if you&#8217;re using the <a href="http://www.icjacobsen.com/dld/oem.tgz">Realtek RLT8168 Driver oem.tgz package</a></em></p>
<p>5. Make a new directory for the Community Driver Pack<br />
<code>cd<br />
mkdir oem<br />
cd oem<br />
</code></p>
<p>6. Upload the Driver Pack into this directory and rename it to <code>oem.tgz</code> then extract the contents and remove the file with<br />
<code>tar zxvf oem.tgz<br />
rm oem.tgz<br />
</code></p>
<p>7. Prepare a new directory for the realtek driver<br />
<code>cd<br />
mkdir rtl8169<br />
</code></p>
<p>8. Upload the <code>mymods-0.1.tar</code> into this directory and extract the content with<br />
<code>cd rtl8169<br />
tar zxvf mymods.tgz<br />
</code></p>
<p>9. Then add this driver to the pack<br />
<code>cp mod/r8169.o ../oem/mod<br />
cd ../oem<br />
</code></p>
<p>10. Add the PCIID to the <code>simple.map</code> by using the texteditor <code>nano</code> (no, we are not using the &#8220;thing called vi&#8221;. Thanks).<br />
<code>cd etc/vmware<br />
nano simple.map<br />
</code></p>
<p>11. Insert the line <code>10ec:8169 0000:0000 network r8169</code> at the appropriate place:<br />
<code>...<br />
10df:fd00 0000:0000 storage lpfc_740<br />
10df:fe00 0000:0000 storage lpfc_740<br />
<strong>10ec:8169 0000:0000 network r8169</strong><br />
1166:0211 0000:0000 storage ide<br />
1166:0212 0000:0000 storage ide<br />
...</code></p>
<p>12. Now create the updated oem.tgz file and download it to windows<br />
<code>cd<br />
cd oem<br />
tar cfvz oem.tgz *</code></p>
<p>13. Now download the <code>usr/lib/vmware/installer/VMware-VMvisor-big-171294-x86_64.dd</code> file to windows and open it with WinImage (open partition0).</p>
<p>14. Use WinImage to replace the <code>oem.tgz</code> on partition 0 and save.</p>
<p>15. Transfer the dd  file to ubuntu <code>/esxi/usr/lib/vmware/installer/</code> and compress it<br />
<code>cd<br />
cd esxi<br />
cd usr/lib/vmware/installer/<br />
bzip2 VMware-VMvisor-</code><code>big-171294-x86_64.dd</code></p>
<p>16. Now recreate the image.tgz file<br />
<code>cd<br />
cd esxi<br />
tar cfvz image.tgz *</code></p>
<p>17. Download <code>image.tgz</code> to Windows</p>
<p>18. Use Ultraiso to replace <code>image.tgz</code> and add <code>oem.tgz</code> (yes, as of v4 the file isn&#8217;t here by default as it was with v3.5)</p>
<p>19. Burn ISO and start installing ESXi.</p>
<p><em><strong>ESXi Tips and Tricks</strong></em><br />
<a href="http://www.vm-help.com/">http://www.vm-help.com/</a></p>
<p><em><strong><br />
</strong></em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.spreendigital.de/2009/07/27/how-to-create-an-esxi-v4-whitebox-iso-with-windows-tools/feed/</wfw:commentRss>
		<slash:comments>61</slash:comments>
		</item>
		<item>
		<title>Ext: tt_news &#8211; no translation for name of months</title>
		<link>http://blog.spreendigital.de/2009/07/15/ext-tt_news-no-translation-for-name-of-months/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ext-tt_news-no-translation-for-name-of-months</link>
		<comments>http://blog.spreendigital.de/2009/07/15/ext-tt_news-no-translation-for-name-of-months/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 11:21:48 +0000</pubDate>
		<dc:creator>Dennis</dc:creator>
				<category><![CDATA[Typo3]]></category>
		<category><![CDATA[Extension]]></category>
		<category><![CDATA[locale]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[tt_news]]></category>

		<guid isPermaLink="false">http://www.spreendigital.de/blog/?p=265</guid>
		<description><![CDATA[Typo3-Extension: tt_news &#8211; non translated month names If you stumble across this problem, maybe you haven&#8217;t installed the right locale on your linux computer.  Open a new shell and type locale -a This prints out all available locales. Refer to your OS manual on how to install additional locales. Try this php script for testing [...]]]></description>
			<content:encoded><![CDATA[<p>Typo3-Extension: tt_news &#8211; non translated month names</p>
<p>If you stumble across this problem, maybe you haven&#8217;t installed the right locale on your linux computer.  Open a new shell and type</p>
<pre>locale -a</pre>
<p>This prints out all available locales. Refer to your OS manual on how to install additional locales.<br />
Try this php script for testing locales (taken from php manual setlocale)</p>
<div>
<div><code><span style="color: #000000;"> <span style="color: #0000bb;">&lt;?php<br />
</span><span style="color: #ff8000;">/* Set locale to Dutch */<br />
</span><span style="color: #0000bb;">setlocale</span><span style="color: #007700;">(</span><span style="color: #0000bb;">LC_ALL</span><span style="color: #007700;">, </span><span style="color: #dd0000;">'nl_NL'</span><span style="color: #007700;">);</p>
<p></span><span style="color: #ff8000;">/* Output: vrijdag 22 december 1978 */<br />
</span><span style="color: #007700;">echo </span><span style="color: #0000bb;">strftime</span><span style="color: #007700;">(</span><span style="color: #dd0000;">"%A %e %B %Y"</span><span style="color: #007700;">, </span><span style="color: #0000bb;">mktime</span><span style="color: #007700;">(</span><span style="color: #0000bb;">0</span><span style="color: #007700;">, </span><span style="color: #0000bb;">0</span><span style="color: #007700;">, </span><span style="color: #0000bb;">0</span><span style="color: #007700;">, </span><span style="color: #0000bb;">12</span><span style="color: #007700;">, </span><span style="color: #0000bb;">22</span><span style="color: #007700;">, </span><span style="color: #0000bb;">1978</span><span style="color: #007700;">));</p>
<p></span><span style="color: #ff8000;">/* try different possible locale names for german as of PHP 4.3.0 */<br />
</span><span style="color: #0000bb;">$loc_de </span><span style="color: #007700;">= </span><span style="color: #0000bb;">setlocale</span><span style="color: #007700;">(</span><span style="color: #0000bb;">LC_ALL</span><span style="color: #007700;">, </span><span style="color: #dd0000;">'de_DE@euro'</span><span style="color: #007700;">, </span><span style="color: #dd0000;">'de_DE'</span><span style="color: #007700;">, </span><span style="color: #dd0000;">'de'</span><span style="color: #007700;">, </span><span style="color: #dd0000;">'ge'</span><span style="color: #007700;">);<br />
echo </span><span style="color: #dd0000;">"Preferred locale for german on this system is '</span><span style="color: #0000bb;">$loc_de</span><span style="color: #dd0000;">'"</span><span style="color: #007700;">;<br />
</span><span style="color: #0000bb;">?&gt;</span> </span> </code></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.spreendigital.de/2009/07/15/ext-tt_news-no-translation-for-name-of-months/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.640 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-04 20:07:53 -->

