Open Forum > What's New

ScriptBasic 32 bit Windows

(1/2) > >>

Support:
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.  :(

Airr:
John,

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

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: Text ---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!
--- End code ---

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

A.

Support:
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.



Support:
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.  :o

Ran:
Did try to run Scriptbasic under Wine (Ubuntu 12.04)
but it didn't work.
Of course Wine is not a full winows and a lot of Win Progs
do not run under Wine.
You have to be lucky here.
I run Pelle's C under Wine and Visual C++ 6.0

Navigation

[0] Message Index

[#] Next page

Go to full version