<?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>Johan Mulder dot com</title>
	<atom:link href="https://johanmulder.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>https://johanmulder.com</link>
	<description>Blogging about IT and stuff</description>
	<lastBuildDate>Mon, 19 Jan 2015 15:45:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.39</generator>
	<item>
		<title>Blue Monday</title>
		<link>https://johanmulder.com/?p=48</link>
		<comments>https://johanmulder.com/?p=48#comments</comments>
		<pubDate>Mon, 19 Jan 2015 15:45:29 +0000</pubDate>
		<dc:creator><![CDATA[johanmulder]]></dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Saint Martin]]></category>
		<category><![CDATA[St Maarten]]></category>
		<category><![CDATA[Vacation]]></category>

		<guid isPermaLink="false">http://johanmulder.com.webhosting93.transurl.nl/?p=48</guid>
		<description><![CDATA[Today it is what they call Blue Monday. I had a look at my vacation pictures to brighten up my day a little bit. Here&#8217;s one taken at St. Maarten, a nice little Caribbean island just a few weeks before hurricane Gonzalo hit shore.]]></description>
				<content:encoded><![CDATA[<p>Today it is what they call Blue Monday. I had a look at my vacation pictures to brighten up my day a little bit. Here&#8217;s one taken at St. Maarten, a nice little Caribbean island just a few weeks before hurricane Gonzalo hit shore.</p>
]]></content:encoded>
			<wfw:commentRss>https://johanmulder.com/?feed=rss2&#038;p=48</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solving the &#8216;QUOTA_EXCEEDED_ERR&#8217; message when using local storage on Motorola RhoElements browsers</title>
		<link>https://johanmulder.com/?p=39</link>
		<comments>https://johanmulder.com/?p=39#comments</comments>
		<pubDate>Thu, 27 Nov 2014 13:57:05 +0000</pubDate>
		<dc:creator><![CDATA[johanmulder]]></dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[localStorage]]></category>
		<category><![CDATA[offline]]></category>

		<guid isPermaLink="false">http://johanmulder.com/?p=39</guid>
		<description><![CDATA[Working with JavaScript exceptions can be quirky as descriptions of these exceptions sometimes does not make any sense. In this particular case I was working on a Motorola device lately which was running the RhoElements 4.x web browser. The Motorola RhoElements browser is part of the RhoMobile Suite of Motorola, which allows web developers to &#8230; <a href="https://johanmulder.com/?p=39" class="more-link">Continue reading <span class="screen-reader-text">Solving the &#8216;QUOTA_EXCEEDED_ERR&#8217; message when using local storage on Motorola RhoElements browsers</span></a>]]></description>
				<content:encoded><![CDATA[<p>Working with JavaScript exceptions can be quirky as descriptions of these exceptions sometimes does not make any sense. In this particular case I was working on a Motorola device lately which was running the RhoElements 4.x web browser. The Motorola RhoElements browser is part of the RhoMobile Suite of Motorola, which allows web developers to have a closer hardware integration with Motorola devices.</p>
<p>A strange bug popped up however while I was trying to use local storage to store offline data. The QUOTA_EXCEEDED_ERR exception pops up when I try to store local data. This error is known tot pop up when you use <a href="http://stackoverflow.com/questions/14555347/html5-localstorage-error-with-safari-quota-exceeded-err-dom-exception-22-an" target="_blank">Mobile Safari in Private Browsing Mode</a> but I&#8217;m not using Mobile Safari obviously. This is the code snippet I used to set data into local storage:</p>
<pre class="brush:javascript" style="font-size: 0.8em">
set: function (name, value) {
    try {
        localStorage.setItem(name, value);
    } catch (e) {
        if (e == QUOTA_EXCEEDED_ERR) {
            alert('Quota exceeded!');
        }
    }
}
</pre>
<p>Browsing the Motorola forums finally led to a <a href="https://motorola-dev.hosted.jivesoftware.com/thread/4106" target="_blank">discussion mentioning both this erratic behavior as well as the solution</a>. I was in fact using a dash (&#8216;-&#8216;) in my host name which leads to this strange behavior. It has been promised by a Motorola service desk employee to be solved in 4.2. Currently I&#8217;m working on 4.0 so unfortunately I can&#8217;t check this. Nevertheless, I&#8217;m using the IP address instead of the FQHN for now to bypass this issue.</p>
]]></content:encoded>
			<wfw:commentRss>https://johanmulder.com/?feed=rss2&#038;p=39</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AX Deleting items from a map</title>
		<link>https://johanmulder.com/?p=33</link>
		<comments>https://johanmulder.com/?p=33#comments</comments>
		<pubDate>Tue, 05 Aug 2014 16:16:45 +0000</pubDate>
		<dc:creator><![CDATA[johanmulder]]></dc:creator>
				<category><![CDATA[Dynamics AX Development]]></category>
		<category><![CDATA[AX 2009]]></category>
		<category><![CDATA[AX 2012]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[iterator]]></category>
		<category><![CDATA[X++]]></category>

		<guid isPermaLink="false">http://johanmulder.com/?p=33</guid>
		<description><![CDATA[I faced a challenge in deleting specific items from a map today. The problem occurs when the recordIterator.delete() x++ statement is executed. Any consecutive statement using the recordIterator variable will throw the exception &#8216;the iterator does not designate a valid element&#8217;. According to SysDictCoder it is not a problem to remove items using the ListIterator &#8230; <a href="https://johanmulder.com/?p=33" class="more-link">Continue reading <span class="screen-reader-text">AX Deleting items from a map</span></a>]]></description>
				<content:encoded><![CDATA[<p>I faced a challenge in deleting specific items from a map today. The problem occurs when the recordIterator.delete() x++ statement is executed. Any consecutive statement using the recordIterator variable will throw the exception &#8216;the iterator does not designate a valid element&#8217;. According to <a href="http://sysdictcoder.com/deleting-items-from-a-list/" title="SysDictCoder" target="_blank">SysDictCoder</a> it is not a problem to remove items using the ListIterator though.</p>
<p>The solutions lays within the use of a set in which the keys of the items that needs to be deleted are stored. After the first iteration another iteration takes place to actually delete the applicable items from the map.</p>
<pre class="brush:cpp">
public Map cleanupRecordMap(Map _recordMap)
{
    MapIterator     recordIterator = new MapIterator(_recordMap);
    Set             deleteRecordSet = new Set(Types::String);
    SetEnumerator   deleteRecordSetEnumerator;
    ;

    if(_recordMap.elements() > 0)
    {
        while(recordIterator.more())
        {
            if(true)
            {
                // mark record to be deleted by adding it to a set
                deleteRecordSet.add(recordIterator.domainValue());
            }
            
            recordIterator.next();                                 
        }
                
        // use the set of keys to remove them from the map
        deleteRecordSetEnumerator = deleteRecordSet.getEnumerator();
        while(deleteRecordSetEnumerator.moveNext())
        {
            _recordMap.remove(deleteRecordSetEnumerator.current());   
        }
    }       

    return _recordMap;
}

</pre>
]]></content:encoded>
			<wfw:commentRss>https://johanmulder.com/?feed=rss2&#038;p=33</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Export enumerations of an AX project using AOT traversal</title>
		<link>https://johanmulder.com/?p=19</link>
		<comments>https://johanmulder.com/?p=19#comments</comments>
		<pubDate>Fri, 25 Jul 2014 11:22:16 +0000</pubDate>
		<dc:creator><![CDATA[johanmulder]]></dc:creator>
				<category><![CDATA[Dynamics AX Development]]></category>
		<category><![CDATA[AOT]]></category>
		<category><![CDATA[AX 2012]]></category>
		<category><![CDATA[Pattern]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[Traversal]]></category>
		<category><![CDATA[Tree]]></category>
		<category><![CDATA[X++]]></category>

		<guid isPermaLink="false">http://johanmulder.com/?p=19</guid>
		<description><![CDATA[While working on the documentation phase for an AX 2012 project I needed a way to speed up a few things. One of the requirements for the documentation was to add a description of all enumerations that has been used by this project. The result was a simple but powerful script which recursively traverse all &#8230; <a href="https://johanmulder.com/?p=19" class="more-link">Continue reading <span class="screen-reader-text">Export enumerations of an AX project using AOT traversal</span></a>]]></description>
				<content:encoded><![CDATA[<p>While working on the documentation phase for an AX 2012 project I needed a way to speed up a few things. One of the requirements for the documentation was to add a description of all enumerations that has been used by this project. The result was a simple but powerful script which recursively traverse all nodes of a project to find all enumerations. For each enumeration that is found the actual values are printed.</p>
<p>Of course it is a very specific script for a certain purpose but you can of course change it to gather other kinds of information.</p>
<pre class="brush:cpp" style="font-size: 0.8em">
static void JM_ExportProjectEnumValues(Args _args)
{
    ProjectListNode sharedProjList = infolog.projectRootNode().AOTfindChild("Shared");
    ProjName projName;
    ProjectNode projNode;
    ProjectNode projNodeLoad;

    #TreeNodeSysNodeType

    // warning: recursive function
    void traverseProjectNodes(ProjectNode _rootNode)
    {
        TreeNode childNode;
        TreeNodeIterator rootNodeIterator;
        TreeNodeType treeNodeType;
        DictEnum dictEnum;
        int enumValueIdx;
        ;

        if (_rootNode)
        {
            rootNodeIterator = _rootNode.AOTiterator();
            childNode = rootNodeIterator.next();
            while (childNode)
            {
                treeNodeType = childNode.treeNodeType();
                //info(strfmt("%1: %2 - %3", treeNodeType.id(), rootNode.AOTname(), childNode.AOTname()));

                // found group: jump in
                if (treeNodeType.id() == #NT_PROJECT_GROUP)
                    traverseProjectNodes(childNode);

                // found base enum
                if (treeNodeType.id() == #NT_DBENUMTYPE)
                {
                    dictEnum = new DictEnum(enumName2Id(childNode.AOTname()));
                    if(dictEnum)
                    {
                        info(strFmt("ID:%1 NAME:%2", dictEnum.id(), dictEnum.name()));
                        for(enumValueIdx = 0; enumValueIdx &lt; dictEnum.values(); enumValueIdx++)
                        {
                            info(strFmt("%1 = %2", dictEnum.index2Value(enumValueIdx), dictEnum.index2Label(enumValueIdx)));
                        }
                    }
                }
                childNode = rootNodeIterator.next();
            }
        }
    };

    // traverse all enums of a given project
    projName = ""';
    projNode = sharedProjList.AOTfindChild(projName);
    projNodeLoad = projNode.loadForInspection();
    traverseProjectNodes(projNodeLoad);
    projNodeLoad.treeNodeRelease();
}

</pre>
]]></content:encoded>
			<wfw:commentRss>https://johanmulder.com/?feed=rss2&#038;p=19</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use an offline storage engine to store data in the browser</title>
		<link>https://johanmulder.com/?p=9</link>
		<comments>https://johanmulder.com/?p=9#comments</comments>
		<pubDate>Wed, 08 Jan 2014 19:44:35 +0000</pubDate>
		<dc:creator><![CDATA[johanmulder]]></dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Client-side database]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[IndexedDb]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Offline Storage]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Web SQL]]></category>

		<guid isPermaLink="false">http://johanmulder.com/?p=9</guid>
		<description><![CDATA[Use an offline storage engine to store data in the browser At the moment of writing this article 2 off-line storage engines are available to the majority of the modern browsers. These database engines are also known as Web SQL Database and Indexed Database. While both serve more and less the same purpose they are &#8230; <a href="https://johanmulder.com/?p=9" class="more-link">Continue reading <span class="screen-reader-text">Use an offline storage engine to store data in the browser</span></a>]]></description>
				<content:encoded><![CDATA[<h3>Use an offline storage engine to store data in the browser</h3>
<p>At the moment of writing this article 2 off-line storage engines are available to the majority of the modern browsers. These database engines are also known as Web SQL Database and Indexed Database. While both serve more and less the same purpose they are totally different in use and in their capabilities.</p>
<p>Web SQL is basically a SQLite implementation and thus considered to be a relational database engine. In other words, you can use SQL to query data from tables and relations between tables exist to allow you to store and query data relationally. Indexed Database on the other hand stores records based on keys and indexes similar in having key-value lists. No query language is available so you have to write your own mechanism to get access to your data. Especially when it comes down to handle more complex data structures it can become a challenge.</p>
<p>Unfortunately, according to the <a title="W3C Web Database" href="http://www.w3.org/TR/webdatabase/" target="_blank">W3C specification </a>Web SQL is officially set to a standstill due to a lack of competition. The only  &#8216;future proof&#8217; alternative to store a considerate amount of off-line data is the Indexed Database which is <a title="W3C Indexed Db" href="http://www.w3.org/TR/IndexedDB/" target="_blank">specified here</a>. Also, according to the browser support table on <a title="HTML5Rocks - storage specification" href="http://www.html5rocks.com/en/features/storage" target="_blank">HTML5Rocks.com</a> both engines are not fully supported by all major browsers so that gives most of the web developers a big challenge: Do I need to write a Data Access Layer to support Web SQL, Indexed Database or both?</p>
<p>In the upcoming weeks I will write and post more articles to guide you through the wonder-world of both Web SQL and Indexed Database so you will have all the code and background information you need to build your own off-line storage engine. If you have any questions or remarks then please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>https://johanmulder.com/?feed=rss2&#038;p=9</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
