ScriptBasic
February 09, 2012, 08:33:03 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: The ScriptBasic User, Developer and extension module guides are available at the WIKI.
 
   Home   Wiki Help Search Login Register  
Pages: [1]
  Print  
Author Topic: ScriptBasic 32 bit Windows  (Read 894 times)
support
Administrator
*****
Posts: 369


« on: July 04, 2010, 02:14:42 AM »

I will be posting a release candidate for the 32 bit version of Armando's work with the 64 bit ScriptBasic effort using the GCC / MinGW C/C++ compiler. Armando has sent me the ZLIB and new XML extension modules to test. I will include a batch file to convert ScriptBasic applications to a standalone executable using a shared object runtime using this same compiler.

I have noticed in the site logs that there have been daily downloads of ScriptBasic. It would be great to hear some feedback from the users for a change.  Sad
« Last Edit: July 04, 2010, 02:17:12 AM by support » Logged
Airr
Newbie
*
Posts: 7


« Reply #1 on: July 04, 2010, 06:19:05 PM »

John,

The XML module is not necessarily "new", just "fixed" (somewhat).  Grin

It still requires libxml.dll, iconv.dll, and zlib1.dll files, which add up to about 2megs worth of external dependencies.

I've finished the preliminary work on a replacement xml module, called "mxml".  It requires NO external dependencies.

Using the following xml file as a test:
Code: (XML)
<?xml version="1.0" encoding="UTF-8" ?>


<stufflist>
<stuff_test>This is a test!</stuff_test>
<stuff_test2>And this is another test!</stuff_test2>
<stuff_test3>
<painting>
<img src="madonna.jpg" alt='Foligno Madonna, by Raphael'/>
<caption>This is Raphael's "Foligno" Madonna, painted in
<date>1511</date>.
</caption>
</painting>
</stuff_test3>
<books>
            <book>
                <id>1</id>
                <name>Hello, world!</name>
            </book>
            <book>
                <id>2</id>
                <name>Hello, China!</name>
            </book>
</books>
</stufflist>

I can parse it like so:

Code: (Scriptbasic)
include "c:\scriptbasic\include\mxml.bas"

filename = "stuff.xml"

doc = mxml::LoadDoc(filename)

node =  mxml::GetNode(doc,"/stufflist/stuff_test")
if node then print "Test1: ", mxml::GetNodeValue(node),"\n"

node =  mxml::GetNode(doc,"/stufflist/stuff_test2")
if (node) then print "Test2: ", mxml::GetNodeValue(node),"\n\n"

 
node = mxml::GetNode(doc,"/stufflist/stuff_test3/painting/img")
if node then
print "Image: ", mxml::GetProperty(node,"src"), "\n"
print "Alt Image: ", mxml::GetProperty(node,"alt"), "\n\n"
endif


node = mxml::GetNode(doc,"/stufflist/books")
child = mxml::GetChild(node)

while child
node = mxml::GetNode(child,"id")
if node then print "ID = ", mxml::GetNodeValue(node),"\n"
node = mxml::GetNode(child,"name")
if node then print "Name = ", mxml::GetNodeValue(node),"\n"

child = mxml::GetNext(child)
wend


if doc then mxml::FreeDoc(doc)

I coded this to use an XPATH-like call to get a pointer/handle to a given node.

Here's the output:
Code:
C:\Scriptbasic\mxmltest>\Scriptbasic\bin\scriba.exe mxmltest.sb
Test1: This is a test!
Test2: And this is another test!

Image: madonna.jpg
Alt Image: Foligno Madonna, by Raphael

ID = 1
Name = Hello, world!
ID = 2
Name = Hello, China!

I'll send you the mxml module in a bit so you can test before adding to the RC.

A.

Logged
support
Administrator
*****
Posts: 369


« Reply #2 on: July 04, 2010, 10:47:04 PM »

I now understand that the XML extension module you sent in the Windows 32 build is a fixed version of what we had already.

Your new XML effort looks great with a slimmer look and less baggage is a welcome addition.



Logged
support
Administrator
*****
Posts: 369


« Reply #3 on: July 05, 2010, 12:58:54 AM »

Armando,

Your new XML extension module could be used to treat Gtk XML project files as GUI object templates. I could then load XML template files, extract the GUI definitions I'm interested in and process the request as direct calls to the Gtk-Server extension module. (which hasn't been converted to MinGW/GCC yet under Windows)

If you wanted to, you could use the web as a repository for GUI template definitions. The cURL extension module would come in handy with that task.


Just some low hanging fruit to salivate over.  Shocked
« Last Edit: July 05, 2010, 01:25:49 AM by support » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!