<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Home</title><link>https://sourceforge.net/p/tkml/wiki/Home/</link><description>Recent changes to Home</description><atom:link href="https://sourceforge.net/p/tkml/wiki/Home/feed" rel="self"/><language>en</language><lastBuildDate>Wed, 27 Mar 2013 18:08:16 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/tkml/wiki/Home/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage Home modified by Portucalle</title><link>https://sourceforge.net/p/tkml/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -1,16 +1,8 @@
-Pages
-=====
+Quick Links
+===========

-Introduction Page : [Introduction]
-Examples : [Examples]
+The documentation for **tkml** will be available in this wiki. Here are a few quick links for accessing the top-level pages:

+* Introduction Page : [Introduction]
+* Examples : [Examples]

-Welcome to your wiki!
-=====================
-
-This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].
-
-The wiki uses [Markdown](/p/tkml/wiki/markdown_syntax/) syntax.
-
-[[project_admins]]
-[[download_button]]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Portucalle</dc:creator><pubDate>Wed, 27 Mar 2013 18:08:16 -0000</pubDate><guid>https://sourceforge.net4fc673fef418a0f2f9fa74b07d11fb270c567389</guid></item><item><title>WikiPage Home modified by Portucalle</title><link>https://sourceforge.net/p/tkml/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -2,6 +2,7 @@
 =====

 Introduction Page : [Introduction]
+Examples : [Examples]

 Welcome to your wiki!
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Portucalle</dc:creator><pubDate>Wed, 27 Mar 2013 17:10:21 -0000</pubDate><guid>https://sourceforge.netf539bf701c0c01653ca2e19d5a010c65e3192ebf</guid></item><item><title>WikiPage Home modified by Portucalle</title><link>https://sourceforge.net/p/tkml/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,4 +1,11 @@
+Pages
+=====
+
+Introduction Page : [Introduction]
+
+
 Welcome to your wiki!
+=====================

 This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Portucalle</dc:creator><pubDate>Wed, 27 Mar 2013 16:35:18 -0000</pubDate><guid>https://sourceforge.net6c732c3d21820e7dbde93a408690a053d343f375</guid></item><item><title>Discussion for Home page</title><link>https://sourceforge.net/p/tkml/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="description"&gt;Description&lt;/h1&gt;
&lt;h2 id="what-is-it"&gt;What is it?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;tkml&lt;/strong&gt; is a library written in pure Tcl which make use of the &lt;strong&gt;Itcl&lt;/strong&gt; object oriented package for providing its users (Tcl/Tk programmers) with a way of easily creating GUIs based on XML text with a pre-defined set of tags and corresponding attributes.&lt;/p&gt;
&lt;h2 id="what-is-it-for"&gt;What is it for?&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;tkml&lt;/strong&gt; library is intended to be used as a very simple way to build Tk GUIs and edit them on the fly. It reads XML text containing pre-defined tags and attributes (whose names are identical to the corresponding Tk widget commands) and creates the corresponding GUI elements. Once created, those elements are accessible through Itcl objects which can be used to read/modify their attributes.&lt;br /&gt;
With &lt;strong&gt;tkml&lt;/strong&gt; you can concentrate on creating your GUI's content instead of dealing with its programmatic details. &lt;/p&gt;
&lt;h2 id="who-is-it-for"&gt;Who is it for?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;tkml&lt;/strong&gt; is aimed at Tcl/Tk programmers who want to standardize their GUI creation procedures and make use of templates wherever possible. For those who have used CGI/Javascript and realize their ease of use, they should experience no major difficulties in understanding the concept behind the library and how to use it. &lt;/p&gt;
&lt;h2 id="features"&gt;Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Maps XML text into Tcl/Tk GUIs.&lt;/li&gt;
&lt;li&gt;The set of tags/attributes used to define the widgets resemble as much as possible the corresponding Tk commands and sub-commands.&lt;/li&gt;
&lt;li&gt;Serializes a whole GUI with a single command.&lt;/li&gt;
&lt;li&gt;Reads/writes most of the attributes accepted by Tk.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="how-to-use-it"&gt;How to use it?&lt;/h2&gt;
&lt;p&gt;You can save your static or dynamic templates on files (or create them on-the-fly in your code) and then just feed them to the &lt;strong&gt;tkml&lt;/strong&gt; engine which takes care of displaying them. This behavior is similar to the way a Web browser interacts with CGI scripts on the server but, in this case, everything is running on Tcl.&lt;br /&gt;
Additionally, you can search for &lt;strong&gt;tkml&lt;/strong&gt; objects by name or ID and query/set their attributes, just like you would using Javascript. For example: &lt;br /&gt;
    # Load the tkml package #&lt;br /&gt;
    package require tkml&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="c"&gt;# Read the file containing the markup #&lt;/span&gt;
&lt;span class="k"&gt;set&lt;/span&gt; &lt;span class="n"&gt;handle&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;open&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;main-window.xml&amp;quot;&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;r&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt; &lt;span class="n"&gt;xml&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;read&lt;/span&gt; $&lt;span class="n"&gt;handle&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt; &lt;span class="nb"&gt;close&lt;/span&gt; $&lt;span class="n"&gt;handle&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c"&gt;# Load the markup into the TclML engine #&lt;/span&gt;
&lt;span class="n"&gt;mlObject&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;loadXml&lt;/span&gt; $&lt;span class="n"&gt;xml&lt;/span&gt;

&lt;span class="c"&gt;# Find the object containing the 'contents' ID #&lt;/span&gt;
&lt;span class="k"&gt;set&lt;/span&gt; &lt;span class="n"&gt;contentsObj&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;mlObject&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;findObjectById&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;contents&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c"&gt;# Change its background color #&lt;/span&gt;
$&lt;span class="n"&gt;contentsObj&lt;/span&gt; &lt;span class="n"&gt;setc&lt;/span&gt; &lt;span class="n"&gt;background&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;blue&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;In the example above, it is assumed that in file main-window.xml a tag has been defined with the &lt;em&gt;contents&lt;/em&gt; ID. After reading the markup from the file and loading it by invoking the &lt;code&gt;loadXml&lt;/code&gt; class method of the top level &lt;code&gt;mlObject&lt;/code&gt; class, the code finds the object whose ID is contents and changes its background color to blue by invoking the &lt;code&gt;setc&lt;/code&gt; (&lt;strong&gt;SET C&lt;/strong&gt;onfiguration) object method.&lt;br /&gt;
Of course, as this is Tcl, your code can create the necessary XML text on-the-fly and feed it to the &lt;strong&gt;tkml&lt;/strong&gt; engine, like in the example below: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="c"&gt;# Create new contents #&lt;/span&gt;
&lt;span class="k"&gt;set&lt;/span&gt;    &lt;span class="n"&gt;xml&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;&amp;lt;frame&amp;gt;\n&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;append&lt;/span&gt; &lt;span class="n"&gt;xml&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;  &amp;lt;label height=\&amp;quot;&lt;/span&gt;3&lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&amp;gt;This is the first page of contents&amp;lt;/label&amp;gt;\n&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;append&lt;/span&gt; &lt;span class="n"&gt;xml&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;&amp;lt;/frame&amp;gt;\n&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;append&lt;/span&gt; &lt;span class="n"&gt;xml&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;&amp;lt;frame&amp;gt;&amp;lt;button command=\&amp;quot;&lt;/span&gt;&lt;span class="n"&gt;show_page_2&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&amp;gt;Page 2&amp;lt;/button&amp;gt;&amp;lt;/frame&amp;gt;&amp;quot;&lt;/span&gt;

&lt;span class="c"&gt;# Find the object containing the 'contents' ID #&lt;/span&gt;
&lt;span class="k"&gt;set&lt;/span&gt; &lt;span class="n"&gt;contentsObj&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;mlObject&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;findObjectById&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;contents&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c"&gt;# Feed it with your XML #&lt;/span&gt;
$&lt;span class="n"&gt;contentsObj&lt;/span&gt; &lt;span class="n"&gt;setc&lt;/span&gt; &lt;span class="n"&gt;xml&lt;/span&gt; $&lt;span class="n"&gt;xml&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;In this example, a label and a button are created inside different frame widgets so they get displayed on top of each other (otherwise, they would be displayed next to each other). Next, we simply invoke the &lt;code&gt;setc&lt;/code&gt; object method for the &lt;code&gt;xml&lt;/code&gt; attribute and provide it with the XML text.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Portucalle</dc:creator><pubDate>Wed, 27 Mar 2013 16:30:21 -0000</pubDate><guid>https://sourceforge.netde1b53ea275df82bba4424cc6dbe62109fc11559</guid></item><item><title>WikiPage Home modified by Portucalle</title><link>https://sourceforge.net/p/tkml/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Welcome to your wiki!&lt;/p&gt;
&lt;p&gt;This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: &lt;span&gt;[SamplePage]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The wiki uses &lt;a class="" href="/p/tkml/wiki/markdown_syntax/"&gt;Markdown&lt;/a&gt; syntax.&lt;/p&gt;
&lt;p&gt;&lt;p&gt;&lt;a href="/u/portucalle/"&gt;Portucalle&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;span class="download-button-51530c9f485acd3ed688df5f" style="margin-bottom: 1em; display: block;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Portucalle</dc:creator><pubDate>Wed, 27 Mar 2013 15:13:35 -0000</pubDate><guid>https://sourceforge.net67518b38a776a4a0ea36e553ed994bad23107a69</guid></item></channel></rss>