<?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>devbar.de &#187; Blackberry</title>
	<atom:link href="http://www.devbar.de/index.php/tag/blackberry/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devbar.de</link>
	<description>just code chunks</description>
	<lastBuildDate>Sat, 07 Jan 2012 19:50:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>FlashDevelop f&#252;r Blackberry Playbook fit machen</title>
		<link>http://www.devbar.de/index.php/2011/04/flashdevelop-fr-blackberry-playbook-fit-machen/</link>
		<comments>http://www.devbar.de/index.php/2011/04/flashdevelop-fr-blackberry-playbook-fit-machen/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 21:00:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[FlashDevelop]]></category>
		<category><![CDATA[Macros]]></category>
		<category><![CDATA[Playbook]]></category>
		<category><![CDATA[Remote Debugging]]></category>

		<guid isPermaLink="false">http://www.devbar.de/index.php/2011/04/flashdevelop-fr-blackberry-playbook-fit-machen/</guid>
		<description><![CDATA[Wer die kostenlose IDE FlashDevelop zum Entwickeln von Playbook Apps nutzt, muss im Vergleich zum kommerziellen FlashBuilder einige Mankos hinnehmen. Allerdings lässt sich mit ein paar Zeilen Script und ein bisschen Fantasie z.B. das Signieren oder Remote-Debuggen bequem in die IDE integrieren.
  
Macros
FlashDevelop bietet unter anderem die Möglichkeit die IDE mit Makros verschiedener Art [...]]]></description>
			<content:encoded><![CDATA[<p align="left">Wer die kostenlose IDE FlashDevelop zum Entwickeln von Playbook Apps nutzt, muss im Vergleich zum kommerziellen FlashBuilder einige Mankos hinnehmen. Allerdings lässt sich mit ein paar Zeilen Script und ein <a href="http://www.devbar.de/wp-content/uploads/2011/04/blackberry-playbook-fd.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="blackberry-playbook-fd" border="0" alt="blackberry-playbook-fd" align="right" src="http://www.devbar.de/wp-content/uploads/2011/04/blackberry-playbook-fd_thumb.png" width="240" height="139" /></a>bisschen Fantasie z.B. das Signieren oder Remote-Debuggen bequem in die IDE integrieren.</p>
<p>  <span id="more-695"></span><br />
<h4>Macros</h4>
<p>FlashDevelop bietet unter anderem die Möglichkeit die IDE mit Makros verschiedener Art anzupassen. Eine Variante ist dabei <a href="http://www.csscript.net/">CS-Script.</a> Mit den Makros möchte ich mir vier Buttons in die IDE aufnehmen: Simulator, Auf Simulator ausführen, Auf Simulator Debuggen(remote) und Signieren.</p>
<p>Hier ist mein Script:</p>
<pre class="brush: csharp;">using System;
using System.Drawing;
using System.Windows.Forms;
using FlashDevelop;
using PluginCore;
using System.Diagnostics;

public class FDScript
{
    public const string SETTINGS_PATH = @&quot;C:\Users\Devbar\AppData\Local\FlashDevelop\Scripts&quot;;
    public const string VM_PLAYER_PATH = @&quot;C:\Program Files (x86)\VMware\VMware Player\vmplayer.exe&quot;;
    public const string VM_PATH = &quot;\&quot;C:\\Users\\Devbar\\Documents\\Virtual Machines\\PB_094\\PB_094.vmx\&quot;&quot;;
    public const string VM_IP = &quot;192.568.426.431&quot;;
    public const string VM_DEBUG_IP = &quot;192.568.30.423&quot;;
    public const string P12_CERT = &quot;D:\\SDK\\RimKeys\\rimkey_tablet.p12&quot;;

    /**
    * Entry point of the script.
    */
    public static void Execute()
    {
        // Get icon for menu items
        Image imgVmImage = Image.FromFile(SETTINGS_PATH + &quot;\\vmware.png&quot;);
        Image imgTabletRun = Image.FromFile(SETTINGS_PATH + &quot;\\tablet_run.png&quot;);
        Image imgTabletDebug = Image.FromFile(SETTINGS_PATH + &quot;\\tablet_debug.png&quot;);
        Image imgTabletSign = Image.FromFile(SETTINGS_PATH + &quot;\\tablet_sign.png&quot;);

        // Add a custom button to the toolstrip
        ToolStrip toolstrip = Globals.MainForm.ToolStrip;
        toolstrip.Items.Add(new ToolStripButton(&quot;&quot;, imgVmImage, OnVmWareClick));
        toolstrip.Items.Add(new ToolStripButton(&quot;&quot;, imgTabletRun, OnTabletRunClick));
        toolstrip.Items.Add(new ToolStripButton(&quot;&quot;, imgTabletDebug, OnTabletDebugClick));
        toolstrip.Items.Add(new ToolStripButton(&quot;&quot;, imgTabletSign, OnTabletSignClick));
    }

    /**
    * run vmware with the simulator
    */
    public static void OnVmWareClick(Object sender, EventArgs e)
    {
        Process.Start(VM_PLAYER_PATH, VM_PATH);
    }

    /**
    * run without debugger
    */
    public static void OnTabletRunClick(Object sender, EventArgs e)
    {
        Run(false);
    }

    /**
    * run with debugger
    */
    public static void OnTabletDebugClick(Object sender, EventArgs e)
    {
        Run(true);
    }

    /**
    * Handles the click event for the menu items.
    */
    public static void OnTabletSignClick(Object sender, EventArgs e)
    {
        Sign();
    }

    /**
    * Runs the blackberry-airpackager to run the application in the simulator.
    * Use the debug flag receive a connection to the remote debugger from simulator.
    */
    private static void Run(bool remoteDebug){
        ProcessStartInfo processInfo = new ProcessStartInfo();
        string pathSwf = null;
        string pathBar = null;
        string pathPng = null;
        string pathArgs = null;
        string path = null;

        pathSwf = PluginBase.CurrentProject.OutputPathAbsolute;
        path = pathSwf.Substring(0,pathSwf.LastIndexOf('\\'));
        pathSwf = pathSwf.Substring(pathSwf.LastIndexOf('\\') +1);
        pathBar = pathSwf.Substring(0,pathSwf.LastIndexOf('.')) + &quot;.bar&quot;;
        pathPng = &quot;blackberry-tablet-icon.png&quot;;

        pathArgs = &quot;-package &quot; +  pathBar + &quot; &quot; +
                   &quot;-installApp -launchApp application.xml &quot; + pathSwf + &quot; blackberry-tablet.xml &quot; + pathPng + &quot; &quot; +
                   &quot;-device &quot; + VM_IP + &quot; &quot; +
                   &quot;-password pwd&quot;;

        if(remoteDebug)
            pathArgs += &quot; -connect &quot; + VM_DEBUG_IP;

        processInfo.WorkingDirectory = path;
        processInfo.FileName = &quot;blackberry-airpackager&quot;;
        processInfo.Arguments = pathArgs;

        Process.Start(processInfo);
    }

    private static void Sign(){
        ProcessStartInfo processInfo = null;
        Process process = null;
        string cskPass = null;
        string p12Pass = null;
        string pathSwf = null;
        string pathBar = null;
        string path = null;
        string pathArgs = null;

        pathSwf = PluginBase.CurrentProject.OutputPathAbsolute;
        path = pathSwf.Substring(0,pathSwf.LastIndexOf('\\'));
        pathSwf = pathSwf.Substring(pathSwf.LastIndexOf('\\') +1);
        pathBar = pathSwf.Substring(0,pathSwf.LastIndexOf('.')) + &quot;.bar&quot;;

        if (InputBox(&quot;Password&quot;, &quot;Enter CSK password:&quot;, ref cskPass) != DialogResult.OK)
            return;

        if (InputBox(&quot;Password&quot;, &quot;Enter P12 password:&quot;, ref p12Pass) != DialogResult.OK)
            return;

        pathArgs =     &quot;-verbose -cskpass &quot; + cskPass + &quot; &quot; +
                    &quot;-keystore &quot; + P12_CERT + &quot; &quot; +
                    &quot;-storepass &quot; + p12Pass + &quot; &quot; + pathBar + &quot; RDK &gt;&gt; signing.txt&quot;;

        processInfo = new ProcessStartInfo();
        processInfo.WorkingDirectory = path;
        processInfo.FileName = &quot;blackberry-signer&quot;;
        processInfo.Arguments = pathArgs;

        process = Process.Start(processInfo);
        process.WaitForExit();

        pathArgs =     &quot;-keystore &quot; + P12_CERT + &quot; &quot; +
                    &quot;-storepass &quot; + p12Pass + &quot; &quot; + pathBar + &quot; author &gt;&gt; signing.txt&quot;;

        processInfo = new ProcessStartInfo();
        processInfo.WorkingDirectory = path;
        processInfo.FileName = &quot;blackberry-signer&quot;;
        processInfo.Arguments = pathArgs;

        process = Process.Start(processInfo);
        process.WaitForExit();
    }

    public static DialogResult InputBox(string title, string promptText, ref string value)
    {
          Form form = new Form();
          Label label = new Label();
          TextBox textBox = new TextBox();
          Button buttonOk = new Button();
          Button buttonCancel = new Button();

          form.Text = title;
          label.Text = promptText;
          textBox.Text = value;

          buttonOk.Text = &quot;OK&quot;;
          buttonCancel.Text = &quot;Cancel&quot;;
          buttonOk.DialogResult = DialogResult.OK;
          buttonCancel.DialogResult = DialogResult.Cancel;

          label.SetBounds(9, 20, 372, 13);
          textBox.SetBounds(12, 36, 372, 20);
          buttonOk.SetBounds(228, 72, 75, 23);
          buttonCancel.SetBounds(309, 72, 75, 23);

          label.AutoSize = true;
          textBox.Anchor = textBox.Anchor | AnchorStyles.Right;
          buttonOk.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
          buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;

          form.ClientSize = new Size(396, 107);
          form.Controls.AddRange(new Control[] { label, textBox, buttonOk, buttonCancel });
          form.ClientSize = new Size(Math.Max(300, label.Right + 10), form.ClientSize.Height);
          form.FormBorderStyle = FormBorderStyle.FixedDialog;
          form.StartPosition = FormStartPosition.CenterScreen;
          form.MinimizeBox = false;
          form.MaximizeBox = false;
          form.AcceptButton = buttonOk;
          form.CancelButton = buttonCancel;

          DialogResult dialogResult = form.ShowDialog();
          value = textBox.Text;
          return dialogResult;
    }
}</pre>
<p><strong>Installation</strong></p>
<ol>
<li>Das komplette Paket (Script und Bilder) kann&#160; <a href="http://www.devbar.de/wp-content/uploads/2011/04/Scripts.zip">hier</a> heruntergeladen werden.</li>
<li>Ruft in FlashDevelop Tools-&gt;Application Files auf und entpackt dort in einen Unterordner “Scripts” die Dateien aus der <em>Script.zip</em>.</li>
<li>Die Einstellungen im oberen Bereich der <em>Playbook.cs </em>müsst ihr auf eure Umgebung anpassen.</li>
<li>Legt in FlashDevelop unter Macros-&gt;Edit Macros einen neuen Eintrag mit folgenden Einstellungen an:</li>
<ul>
<ul>
<li>AutoRun: <em>True</em></li>
<li>Entries [0]: <em>ExecuteScript|Internal;C://Users//Devbar//AppData//Local//FlashDevelop//Scripts//Playbook.cs</em></li>
<li>Image: &lt;kann leer bleiben&gt;</li>
<li>Label: &lt;beliebig&gt;</li>
<li>ShortCut: <em>None</em></li>
</ul>
</ul>
<li>FlashDevelop muss neu gestartet werden, damit die Einträge sichtbar werden.</li>
</ol>
<p>&#160;</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="vmware" border="0" alt="vmware" src="http://www.devbar.de/wp-content/uploads/2011/04/vmware1.png" width="16" height="16" /><strong>Simulator </strong></p>
<p>Startet VMWare und lädt die in der <em>Playbook.cs</em> konfigurierte VM.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="tablet_run" border="0" alt="tablet_run" src="http://www.devbar.de/wp-content/uploads/2011/04/tablet_run1.png" width="16" height="16" /><strong>Ausführen </strong></p>
<p>Packt eure App als Bar-File und startet sie auf dem Simulator.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="tablet_debug" border="0" alt="tablet_debug" src="http://www.devbar.de/wp-content/uploads/2011/04/tablet_debug1.png" width="16" height="16" /><strong>Debugger</strong> </p>
<p>Packt eure App als Bar-File und startet sie auf dem Simulator. Damit das Remote-Debuggen korrekt funktioniert muss vorher per Debug-&gt;Start Remote Session FlashDevelop in Wartestellung gebracht werden. Bitte achtet darauf, dass ihr in die <em>Playbook.cs </em>die korrekt IP-Adresse eingerichtet habt.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="tablet_sign" border="0" alt="tablet_sign" src="http://www.devbar.de/wp-content/uploads/2011/04/tablet_sign1.png" width="16" height="16" /><strong>Signieren </strong></p>
<p>Signiert eine bestehende Bar-File mit dem in der<em> Playbook.cs</em> angegebenen Zertifikat. Passwörter werden vom Script abgefragt.</p>
<p>&#160;</p>
<p><strong>Links</strong>:</p>
<ul>
<li><a href="http://www.csscript.net/">CS-Script</a></li>
<li><a href="http://www.flashdevelop.org/wikidocs/index.php?title=Macros">FlashDevelop: Macros</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2011/04/flashdevelop-fr-blackberry-playbook-fit-machen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Webbrowser mit QNXStageWebView</title>
		<link>http://www.devbar.de/index.php/2011/02/webbrowser-mit-qnxstagewebview/</link>
		<comments>http://www.devbar.de/index.php/2011/02/webbrowser-mit-qnxstagewebview/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 21:13:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[FlashDevelop]]></category>
		<category><![CDATA[Playbook]]></category>

		<guid isPermaLink="false">http://www.devbar.de/index.php/2011/02/webbrowser-mit-qnxstagewebview/</guid>
		<description><![CDATA[Wenn man den BlackBerry Playbook-Simulator installiert, fällt direkt auf, dass es sogar an den wichtigsten Tools fehlt. Da muss man selbst Hand anlegen und sich z.B. seinen eigenen Webbrowser basteln. Wie man dies sogar mit dem OS-Werkzeug FlashDevelop schafft, zeig ich euch hier.

Los geht&#8217;s
Bevor ihr startet, solltet ihr euch das wirklich hervorragende Tutorial von studio&#124;chris [...]]]></description>
			<content:encoded><![CDATA[<p>Wenn man den BlackBerry Playbook-Simulator installiert, fällt direkt auf, dass es sogar an den wichtigsten Tools fehlt. Da muss man selbst Hand anlegen und sich z.B. seinen eigenen Webbrowser basteln. Wie man dies sogar mit dem OS-Werkzeug <a href="http://www.flashdevelop.org/">FlashDevelop</a> schafft, zeig ich euch hier.</p>
<p><span id="more-601"></span></p>
<p><strong>Los geht&#8217;s</strong></p>
<p>Bevor ihr startet, solltet ihr euch das wirklich hervorragende Tutorial von <a href="http://www.studiochris.us/2010/flashdevelop-and-blackberry-playbook-development-the-basics/">studio|chris</a> anschauen.</p>
<p><strong>Das Script</strong></p>
<p>Hier haben wir das Script für unser Tool. Eigentlich nichts spektakuläres. Aber der Teufel liegt im Detail.</p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #9900cc; font-weight: bold;">package</span> <br />
<span style="color: #000000;">&#123;</span> <br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.geom</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=rectangle%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:rectangle.html"><span style="color: #004993;">Rectangle</span></a><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.text</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=textfield%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:textfield.html"><span style="color: #004993;">TextField</span></a><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> qnx<span style="color: #000066; font-weight: bold;">.</span>ui<span style="color: #000066; font-weight: bold;">.</span>buttons<span style="color: #000066; font-weight: bold;">.</span>IconButton<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> qnx<span style="color: #000066; font-weight: bold;">.</span>media<span style="color: #000066; font-weight: bold;">.</span>QNXStageWebView<span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> qnx<span style="color: #000066; font-weight: bold;">.</span>ui<span style="color: #000066; font-weight: bold;">.</span>buttons<span style="color: #000066; font-weight: bold;">.</span>LabelButton<span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> qnx<span style="color: #000066; font-weight: bold;">.</span>ui<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span><span style="color: #000066; font-weight: bold;">.</span>TextInput<span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">import</span> qnx<span style="color: #000066; font-weight: bold;">.</span>ui<span style="color: #000066; font-weight: bold;">.</span>core<span style="color: #000066; font-weight: bold;">.*;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #3f5fbf;">/** <br />
&nbsp; &nbsp; * ... <br />
&nbsp; &nbsp; * @author Siron <br />
&nbsp; &nbsp; */</span><br />
<br />
&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// The following metadata specifies the size and properties of the canvas that </span><br />
&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// this application should occupy on the BlackBerry PlayBook screen. </span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#91;</span>SWF<span style="color: #000000;">&#40;</span><span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;1024&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;600&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">backgroundColor</span>=<span style="color: #990000;">&quot;#cccccc&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">frameRate</span>=<span style="color: #990000;">&quot;30&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Main <span style="color: #0033ff; font-weight: bold;">extends</span> <a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a> <br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">:</span>TextInput<span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> ok<span style="color: #000066; font-weight: bold;">:</span>LabelButton <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> webView<span style="color: #000066; font-weight: bold;">:</span>QNXStageWebView<span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> mainCon<span style="color: #000066; font-weight: bold;">:</span>Container<span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> topCon<span style="color: #000066; font-weight: bold;">:</span>Container<span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> searchButton<span style="color: #000066; font-weight: bold;">:</span>IconButton<span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> draftCon<span style="color: #000066; font-weight: bold;">:</span>Container<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span>Embed<span style="color: #000000;">&#40;</span><span style="color: #004993;">source</span> = <span style="color: #990000;">'../applications-internet.png'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> appInet <span style="color: #000066; font-weight: bold;">:</span> <a href="http://www.google.com/search?q=class%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:class.html"><span style="color: #004993;">Class</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// sets main container </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mainCon = <span style="color: #0033ff; font-weight: bold;">new</span> Container<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mainCon<span style="color: #000066; font-weight: bold;">.</span>flow = ContainerFlow<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">HORIZONTAL</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>mainCon<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// top bar </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; topCon = <span style="color: #0033ff; font-weight: bold;">new</span> Container<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; topCon<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">size</span> = <span style="color: #000000; font-weight:bold;">36</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; topCon<span style="color: #000066; font-weight: bold;">.</span>sizeUnit = SizeUnit<span style="color: #000066; font-weight: bold;">.</span>PIXELS<span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; topCon<span style="color: #000066; font-weight: bold;">.</span>flow = ContainerFlow<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">HORIZONTAL</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; topCon<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">align</span> = ContainerAlign<span style="color: #000066; font-weight: bold;">.</span>FAR<span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; topCon<span style="color: #000066; font-weight: bold;">.</span>containment = Containment<span style="color: #000066; font-weight: bold;">.</span>DOCK_TOP<span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">url</span> = <span style="color: #0033ff; font-weight: bold;">new</span> TextInput<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">.</span>setSize<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">180</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">36</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span> = <span style="color: #000000; font-weight:bold;">500</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span> = <span style="color: #990000;">&quot;http://devbar.de&quot;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; topCon<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">url</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; searchButton = <span style="color: #0033ff; font-weight: bold;">new</span> IconButton<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; searchButton<span style="color: #000066; font-weight: bold;">.</span>setIcon<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> appInet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; searchButton<span style="color: #000066; font-weight: bold;">.</span>setSize<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">36</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">36</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; searchButton<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">CLICK</span><span style="color: #000066; font-weight: bold;">,</span> navigate<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; topCon<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>searchButton<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mainCon<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>topCon<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// draft </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; draftCon = <span style="color: #0033ff; font-weight: bold;">new</span> Container<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; draftCon<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">size</span> = <span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; draftCon<span style="color: #000066; font-weight: bold;">.</span>sizeUnit = SizeUnit<span style="color: #000066; font-weight: bold;">.</span>PERCENT<span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; draftCon<span style="color: #000066; font-weight: bold;">.</span>flow = ContainerFlow<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">VERTICAL</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; draftCon<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">align</span> = ContainerAlign<span style="color: #000066; font-weight: bold;">.</span>NEAR<span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; draftCon<span style="color: #000066; font-weight: bold;">.</span>padding = <span style="color: #000000; font-weight:bold;">10</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mainCon<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>draftCon<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; webView = <span style="color: #0033ff; font-weight: bold;">new</span> QNXStageWebView<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; webView<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stage</span>= <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; webView<span style="color: #000066; font-weight: bold;">.</span>autoFit=<span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; webView<span style="color: #000066; font-weight: bold;">.</span>viewPort = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=rectangle%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:rectangle.html"><span style="color: #004993;">Rectangle</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">40</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageWidth</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span>stageHeight<span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">40</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; webView<span style="color: #000066; font-weight: bold;">.</span>enableCookies = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; webView<span style="color: #000066; font-weight: bold;">.</span>enableJavascript = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; webView<span style="color: #000066; font-weight: bold;">.</span>enableScrolling = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; webView<span style="color: #000066; font-weight: bold;">.</span>loadURL<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;http://devbar.de&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mainCon<span style="color: #000066; font-weight: bold;">.</span>setSize<span style="color: #000000;">&#40;</span><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageWidth</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageHeight</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> navigate<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; webView<span style="color: #000066; font-weight: bold;">.</span>loadURL<span style="color: #000000;">&#40;</span><span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #000000;">&#125;</span></div></div>
<p><strong>Woher kommt QNXStageWebView?</strong></p>
<p><em>QNXStageWebView</em> steckt in <em>qnx-air.swc</em>. Die Library ist im SDK-Pfad im Unterorder <em>frameworks\libs\air.</em> Die Datei müsst ihr eurem Projekt hinzufügen, wie ihr das auch schon von der <em>qnx-screen.swc</em> und <em>spark.swc</em> kennt. Auch hier müsst ihr den Menüeintrag &#8220;Add to Library&#8221; ausführen. Allerdings gibt es hier die Besonderheit, dass ihr über die Optionen der Library festlegen müsst, dass es sich um eine &#8220;External library&#8221; handelt. Der Grund dafür ist, dass die <em>qnx-air.swc</em> zur Laufzeit angebunden werden muss, da Playbook-spezifische Aufrufe enthalten sind.</p>
<p><strong>Class qnx.media::QNXStageWebView could not be found</strong></p>
<p>Diese Meldung werdet ihr immer bekommen, wenn ihr versucht die Anwendung direkt aus FlashDevelop und nicht über den Simulator zu starten. Der Grund ist, wie gesagt, dass die Libraries erst auf dem Playbook zur Laufzeit dynamisch eingehängt werden. Leider lässt sich daher unsere Anwendung nur im Simulator testen.</p>
<p><strong>Ergebnis</strong></p>
<p><a href="http://www.devbar.de/wp-content/uploads/2011/02/bb_browser.png"><img style="width: 400px; height: 234px;" src="http://www.devbar.de/wp-content/uploads/2011/02/zrtn_002p404e3cbc_tn.jpg" alt="" width="400" height="234" /></a></p>
<p><strong>Links:</strong></p>
<ul>
<li><a href="http://www.flashdevelop.org/">FlashDevelop</a></li>
<li><a href="http://www.studiochris.us/2010/flashdevelop-and-blackberry-playbook-development-the-basics/">studio|chris</a></li>
<li><a href="http://www.petefreitag.com/item/770.cfm">petefreitag</a></li>
</ul>
<p><strong>Download</strong></p>
<ul>
<li><a href="http://www.devbar.de/wp-content/uploads/2011/02/WebBrowser.zip">WebBrowser</a></li>
</ul>
<div id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 570px; left: -10000px;">package<br />
{<br />
import flash.display.Sprite;<br />
import flash.events.MouseEvent;<br />
import flash.geom.Rectangle;<br />
import flash.text.TextField;<br />
import qnx.ui.buttons.IconButton;import qnx.media.QNXStageWebView;<br />
import qnx.ui.buttons.LabelButton;<br />
import qnx.ui.text.TextInput;<br />
import qnx.ui.core.*;</p>
<p>/**<br />
* &#8230;<br />
* @author Siron<br />
*/</p>
<p>// The following metadata specifies the size and properties of the canvas that<br />
// this application should occupy on the BlackBerry PlayBook screen.<br />
[SWF(width="1024", height="600", backgroundColor="#cccccc", frameRate="30")]</p>
<p>public class Main extends Sprite<br />
{</p>
<p>private var url:TextInput;<br />
private var ok:LabelButton<br />
private var webView:QNXStageWebView;<br />
private var mainCon:Container;<br />
private var topCon:Container;<br />
private var searchButton:IconButton;<br />
private var draftCon:Container;</p>
<p>[Embed(source = '../applications-internet.png')]<br />
public var appInet : Class;</p>
<p>public function Main()<br />
{<br />
// sets main container<br />
mainCon = new Container();<br />
mainCon.flow = ContainerFlow.HORIZONTAL;<br />
addChild(mainCon);</p>
<p>// top bar<br />
topCon = new Container();<br />
topCon.size = 36;<br />
topCon.sizeUnit = SizeUnit.PIXELS;<br />
topCon.flow = ContainerFlow.HORIZONTAL;<br />
topCon.align = ContainerAlign.FAR;<br />
topCon.containment = Containment.DOCK_TOP;</p>
<p>url = new TextInput();<br />
url.setSize(180, 36);<br />
url.width = 500;<br />
url.text = &#8220;http://devbar.de&#8221;;<br />
topCon.addChild(url);</p>
<p>searchButton = new IconButton();<br />
searchButton.setIcon(new appInet());<br />
searchButton.setSize(36, 36);<br />
searchButton.addEventListener(MouseEvent.CLICK, navigate);<br />
topCon.addChild(searchButton);</p>
<p>mainCon.addChild(topCon);</p>
<p>// draft<br />
draftCon = new Container();<br />
draftCon.size = 100;<br />
draftCon.sizeUnit = SizeUnit.PERCENT;<br />
draftCon.flow = ContainerFlow.VERTICAL;<br />
draftCon.align = ContainerAlign.NEAR;<br />
draftCon.padding = 10;</p>
<p>mainCon.addChild(draftCon);</p>
<p>webView = new QNXStageWebView();<br />
webView.stage= stage;<br />
webView.autoFit=true;<br />
webView.viewPort = new Rectangle(1,40,stage.stageWidth,stage.stageHeight-40);<br />
webView.enableCookies = true;<br />
webView.enableJavascript = true;<br />
webView.enableScrolling = true;<br />
webView.loadURL(&#8220;http://devbar.de&#8221;);</p>
<p>mainCon.setSize(stage.stageWidth, stage.stageHeight);<br />
}</p>
<p>private function navigate(event:MouseEvent):void {<br />
webView.loadURL(url.text);<br />
}</p>
<p>}</p>
<p>}</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2011/02/webbrowser-mit-qnxstagewebview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playbook-Apps mit FlashDevelop</title>
		<link>http://www.devbar.de/index.php/2011/01/playbook-apps-mit-flashdevelop/</link>
		<comments>http://www.devbar.de/index.php/2011/01/playbook-apps-mit-flashdevelop/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 16:26:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Playbook]]></category>

		<guid isPermaLink="false">http://www.devbar.de/index.php/2011/01/playbook-apps-mit-flashdevelop/</guid>
		<description><![CDATA[
Hier vielleicht nochmal ein kleiner Nachtrag für alle, die sich jetzt auch in Adobe-AIR für das Playbook stürzen wollen. Unter diesem Link findet ihr eine sehr nützliche Anleitung zum Einstieg in FlashDevelop + Blackberry Tablet SDK. Englischkenntnisse werden vorausgesetzt  
]]></description>
			<content:encoded><![CDATA[<p style="TEXT-ALIGN: left"><img src="http://www.devbar.de/wp-content/uploads/2011/01/FlashDevelop_logo.jpg" style="DISPLAY: inline; FLOAT: left" height="125" alt="FlashDevelop_logo.jpg" width="126"/></p>
<p style="TEXT-ALIGN: left">Hier vielleicht nochmal ein kleiner Nachtrag für alle, die sich jetzt auch in Adobe-AIR für das Playbook stürzen wollen. Unter diesem <a href="http://www.studiochris.us/2010/flashdevelop-and-blackberry-playbook-development-the-basics/">Link</a> findet ihr eine sehr nützliche Anleitung zum Einstieg in FlashDevelop + Blackberry Tablet SDK. Englischkenntnisse werden vorausgesetzt <img src='http://www.devbar.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2011/01/playbook-apps-mit-flashdevelop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kostenloses BlackBerry PlayBook f&#252;r Entwickler</title>
		<link>http://www.devbar.de/index.php/2011/01/kostenloses-blackberry-playbook-fur-entwickler/</link>
		<comments>http://www.devbar.de/index.php/2011/01/kostenloses-blackberry-playbook-fur-entwickler/#comments</comments>
		<pubDate>Fri, 28 Jan 2011 05:12:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[4fun]]></category>
		<category><![CDATA[Blackberry]]></category>

		<guid isPermaLink="false">http://www.devbar.de/?p=576</guid>
		<description><![CDATA[    So, jetzt wird mal wieder ein bisschen der Blog mit Leben gefüllt. Ich habe zwar lange nichts von mir hören lassen, war aber nicht faul  .
   Die letzten Wochen habe ich fleißig an meiner ersten Playbook-App gebastelt. RIM hat nämlich versprochen, dass es für Entwickler die Apps einreichen [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devbar.de/wp-content/uploads/2011/01/bluepad_90.png"><img class="size-full wp-image-578 alignleft" title="bluepad_90" alt="" src="http://www.devbar.de/wp-content/uploads/2011/01/bluepad_90.png" width="90" height="90" /></a>    <br />So, jetzt wird mal wieder ein bisschen der Blog mit Leben gefüllt. Ich habe zwar lange nichts von mir hören lassen, war aber nicht faul <img src='http://www.devbar.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>  <span id="more-576"></span> Die letzten Wochen habe ich fleißig an meiner ersten Playbook-App gebastelt. RIM hat nämlich versprochen, dass es für Entwickler die Apps einreichen das Playbook für lau gibt. Hab&#8217; ich ja nicht so recht dran geglaubt. Aber so wie&#8217;s aussieht bin ich wohl unter den Glücklichen *freu*.
<p>Mein Beitrag ist übrigens ein kleiner Texteditor mit dem Namen <a href="http://appworld.blackberry.com/webstore/content/23608?lang=en">BluePad</a>.</p>
<p>Die Aktion wurde bis zum 15. März verlängert. Das Gerät kommt logischerweise erst, wenn es auch zu kaufen ist.</p>
<p>Links:</p>
<ul>
<li><a href="http://appworld.blackberry.com/webstore/content/23608?lang=en">BluePad</a> </li>
<li><a href="http://us.blackberry.com/developers/tablet/playbook_offer.jsp">Free Blackberry Playbook offer</a> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2011/01/kostenloses-blackberry-playbook-fur-entwickler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mailen und GPS mit Blackberry Widget-API</title>
		<link>http://www.devbar.de/index.php/2010/05/mailen-und-gps-mit-blackberry-widget-api-ermitteln/</link>
		<comments>http://www.devbar.de/index.php/2010/05/mailen-und-gps-mit-blackberry-widget-api-ermitteln/#comments</comments>
		<pubDate>Fri, 14 May 2010 04:12:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://devbar.de/?p=288</guid>
		<description><![CDATA[Ich hatte ja vor einigen Tagen schonmal über die Entwicklung von Blackberry-Widgets in Visual Studio geschrieben. Damals gab die entsprechende Beispiel-Anwendung einfach &#8220;Hallo Welt!&#8221; aus, was schlicht gar nichts mit der Blackberry-API zu tun hat. Hier liefer ich mal ein kleines Snippet nach.
Vorbereitung
Wichtig ist, dass ihr bevor ihr das untenstehende Snippet ausprobieren könnt, eurem Widget [...]]]></description>
			<content:encoded><![CDATA[<p>Ich hatte ja vor einigen Tagen schonmal über die <a href="http://devbar.de/index.php/2010/05/blackberry-widget-mit-visual-studio-erstellen/">Entwicklung von Blackberry-Widgets in Visual Studio</a> geschrieben. Damals gab die entsprechende Beispiel-Anwendung einfach &#8220;Hallo Welt!&#8221; aus, was schlicht gar nichts mit der Blackberry-API zu tun hat. Hier liefer ich mal ein kleines Snippet nach.</p>
<p><span id="more-288"></span><strong>Vorbereitung</strong></p>
<p>Wichtig ist, dass ihr bevor ihr das untenstehende Snippet ausprobieren könnt, eurem Widget ein paar API-Referenzen hinzufügen müsst. Dazu öffnet ihr die config.xml in Visual Studio. Im Bereich &#8220;Widget Permissions&#8221; geht ihr auf &#8220;Add Feature&#8221; und wählt diese Einträge aus:</p>
<ul>
<li>blackberry.message</li>
<li>blackberry.find</li>
<li>blackberry.identity</li>
</ul>
<p>Wenn ihr wissen wollt, wass sich hinter den anderen Einträgen verbirgt und was man sonst so alles mit der API machen kann, empfehle ich euch die <a href="http://www.blackberry.com/developers/docs/widgetapi/">Widget-API-Doku</a>.</p>
<p><strong>Aufruf</strong></p>
<p>Danach könnt ihr den Code z.B. in den Clicked-Event eures Buttons einfügen. Viel Spaß beim Ausprobieren.</p>
<pre class="brush: js">                // Location neu ermitteln
                blackberry.location.refreshLocation();

                var loc = "Latitude: " + blackberry.location.latitude + "\r\n";
                loc += "Longitude: " + blackberry.location.longitude;

                var message = new blackberry.message.Message();
                message.toRecipients = "my@example.com";
                message.subject = "Hier bin ich";
                message.body = loc;
                message.send();</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2010/05/mailen-und-gps-mit-blackberry-widget-api-ermitteln/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>BlackBerry Widget mit Visual Studio erstellen</title>
		<link>http://www.devbar.de/index.php/2010/05/blackberry-widget-mit-visual-studio-erstellen/</link>
		<comments>http://www.devbar.de/index.php/2010/05/blackberry-widget-mit-visual-studio-erstellen/#comments</comments>
		<pubDate>Sat, 08 May 2010 07:14:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[VisualStudio]]></category>

		<guid isPermaLink="false">http://devbar.de/?p=9</guid>
		<description><![CDATA[Als ich mir Anfang des Jahres meinen BlackBerry zugelegt hatte, war der Gedanke mit .NET irgendetwas auf dem Ding reißen zu können schon fast verworfen. Auf Windows Mobile hatte ich aber auch nicht so wirklich Bock, scheint das doch der spießige Nerd-Junge zu sein mit dem die hippen iPhones, Androids und BlackBerrys nicht spielen wollen.
Um [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://devbar.de/wp-content/uploads/2010/05/blackberry_visualstudio.png"><img class="alignright size-full wp-image-216 reflection" title="blackberry_visualstudio" src="http://devbar.de/wp-content/uploads/2010/05/blackberry_visualstudio.png" alt="" width="194" height="320" /></a>Als ich mir Anfang des Jahres meinen BlackBerry zugelegt hatte, war der Gedanke mit .NET irgendetwas auf dem Ding reißen zu können schon fast verworfen. Auf Windows Mobile hatte ich aber auch nicht so wirklich Bock, scheint das doch der spießige Nerd-Junge zu sein mit dem die hippen iPhones, Androids und BlackBerrys nicht spielen wollen.</p>
<p>Um so überraschter war ich, dass es tatsächlich aktuelle Plugins für Visual Studio zum Entwickeln von BB-Widgets und BB-Webanwendungen gibt. .NET-Technologie wird hier zwar bestenfalls im Backend zum Einsatz kommen, aber hey! Visual Studio!</p>
<p>Auf in ein Welt voller Spannung und Abenteuer <img src='http://www.devbar.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span id="more-9"></span></p>
<p><strong>Vorbereitung der Entwicklungsumgebung</strong></p>
<p>Ihr braucht:</p>
<ul>
<li>Visual Studio 2008 mindestens mit SP1</li>
<li>Java SDK mindestens in der Version 1.6 <a href="http://java.sun.com/javase/downloads/index.jsp">[link]</a></li>
<li>BlackBerry Plug-in for Microsoft Visual Studio v2.0 <a href="http://na.blackberry.com/eng/developers/browserdev/eclipseplugin.jsp">[link]</a></li>
</ul>
<p>Ich weiß leider nicht ob die Express-Edition von Visual Studio reicht und kann dies hier auch schlecht testen. Wer als erstes in die Comments postet ob&#8217;s geht, gewinnt &#8230; äh meinen Respekt und meine Anerkennung <img src='http://www.devbar.de/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> .</p>
<p>Beim Download der Plugins müsst ihr mal wieder ein bischen was über euch zum Besten geben. Mein Tipp an dieser Stelle: Einfach lügen und Trashmail nutzen <img src='http://www.devbar.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . Bei der Installation ist weiter nichts zu beachten (immer schön Next, Next, Finished).</p>
<p><strong>Die Windows 7-Falle</strong></p>
<p>Nachdem ihr alles soweit installiert habt bekommen die Windows 7 Benutzer noch eine Extraaufgabe. Es ist anscheinend so, dass in Windows 7 der Pfad für Java nicht mehr in die Umgebungsvariable PATH geschrieben wird. Mir persönlich ganz Recht, da PATH sowieso irgendwann überläuft und man den Überblick verliert.</p>
<p>D.h. per Notepad die Datei <em>C:\Program Files (x86)\Research In Motion\BlackBerry Widget Packager\bin\bbwp.properties</em> öffnen und im Tag &#8220;&lt;java&gt;&#8221; den Pfad zum SDK angeben.</p>
<pre class="brush:xml">&lt;java&gt;C:\Program Files (x86)\Java\jdk1.6.0_20&lt;/java&gt;
</pre>
<p><strong>Die Anwendung erstellen</strong></p>
<p>Ein Video sagt ja mehr als tausend Zeilen. Deswegen hier die Anleitung, wie ihr eure erste &#8220;Hallo Welt&#8221;-Anwendung in Visual Studio erstellt.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/HIMvUdlCj4Q" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/HIMvUdlCj4Q"></embed></object></p>
<p><strong>Die Anwendung testen</strong></p>
<p>Wenn das soweit geklappt hat, könnt ihr das Ergebnis testen. Da es während der Entwicklung ziemlich umständlich ist nach jeder Zeile Code die Anwendung erneut auf euren BlackBerry zu kopieren, gibt es zum Testen einen Emulator. In der aktuellen Version kann ein BlackBerry 9550 Storm und ein BlackBerry 9700 Bold emuliert werden.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/LQwSC1EvHns" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/LQwSC1EvHns"></embed></object></p>
<p><strong>Die Anwendung verteilen</strong></p>
<p>Um die Anwendung auf euren Blackberry zu installieren könnt ihr natürlich einfach die entsprechenden Datei (<em>BlackBerryHelloDevBar.cod</em>) aus dem Unterverzeichnis <em>StandardInstall</em> auf euren Blackberry übertragen und dort öffnen.</p>
<p>Ein anderer Weg ist das Verteilen per IIS. Wenn ihr bereits einen IIS installiert habt, solltet ihr eine neue Website mit dem Namen <em>blackberry</em> anlegen. In das Verzeichnis legt ihr die Dateien <em>BlackBerryHelloDevBar.cod </em>und <em>BlackBerryHelloDevBar.jad</em>.<em> </em>Die neue Website sollte das Auflisten von Dateien erlauben. So könnt ihr beliebig viele neue Anwendung in das Verziechnis ablegen und anbieten. Damit die Dateien verfügbar und installierbar sind, müssen allerdings noch drei Einträge für die MIME-Typen konfiguriert werden.</p>
<ul>
<li>.jad: text/vnd.sun.j2me.app-descriptor</li>
<li>.jar: application/java-archive</li>
<li>.cod: application/vnd.rim.cod</li>
</ul>
<div id="attachment_235" class="wp-caption aligncenter" style="width: 437px"><a href="http://devbar.de/wp-content/uploads/2010/05/iis_mime_blackberry-e1273180138320.png"><img class="size-full wp-image-235" title="MIME-Typen" src="http://devbar.de/wp-content/uploads/2010/05/iis_mime_blackberry-e1273180138320.png" alt="" width="427" height="285" /></a><p class="wp-caption-text">MIME-Typen im IIS konfigurieren</p></div>
<p style="text-align: center;"><a href="http://devbar.de/wp-content/uploads/2010/05/iis_mime_blackberry.png"><br />
</a></p>
<p>Wenn ihr die Site jetzt mit eurem BlackBerry ansurft, solltet ihr die Testanwendung downloaden und installieren können.</p>
<p><strong>Fazit</strong></p>
<p>Ich hoffe ihr habt einen kleinen Einblick bekommen. Das fertige Projekt könnt ihr zum rumprobieren auch hier downloaden.</p>
<ul>
<li><a href="http://devbar.de/wp-content/uploads/2010/05/BlackBerryHelloDevBar.zip">BlackBerryHelloDevBar</a></li>
</ul>
<p>Demnächst werde ich mal ein paar API-Examples programmieren und hier posten.</p>
<p><a href="http://devbar.de/wp-content/uploads/2010/05/iis_mime_blackberry.png"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devbar.de/index.php/2010/05/blackberry-widget-mit-visual-studio-erstellen/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

