Next: 4 Loading the gsmarkup Up: GNUstep Renaissance Previous: 2 Prerequisites and target

3 Writing the gsmarkup file

We start by writing a gsmarkup file to create an empty window using GNUstep Renaissance:
<gsmarkup>

  <objects>

    <window />

  </objects>

</gsmarkup>
We save this code in a file called Window.gsmarkup. As you can easily see, the code - which is written in the gsmarkup format - is very similar to HTML; as a matter of fact, it is a variant of XML. There are tags (such as <gsmarkup>) and each tag is closed after having been opened (for example, </gsmarkup> closes <gsmarkup>). The syntax <window /> is equivalent to <window></window>, that is, the window tag is opened and immediately closed.

The code starts with <gsmarkup>, and ends with </gsmarkup>: it's all contained in a gsmarkup tag. This is equivalent to an HTML file, which starts with <html>, and ends with </html>.

Inside the <gsmarkup> tag, we find the <objects> tag. The <objects> tag enclose a list of tags; each of those tags represents an object which is to be created when the file is loaded.

In this case, there is a single tag inside the <objects> tag: the <window /> tag, which tells GNUstep Renaissance to create a single object - a window - when the file is loaded.


Next: 4 Loading the gsmarkup Up: GNUstep Renaissance Previous: 2 Prerequisites and target
2008-01-16