> Re: xTalk: Call for participation: external API extensions
The long-defunct WinPlus (which morphed into OMO) had a class of entities
called "Software Slot Functions", "Software Slot Commands", and "Software
Slot Objects" that allowed developers to define a more elaborate interface
than XCMDs and XFCNs have. Though I don't have the documentation here (I'm
on vacation and on the road) and in addition I may no longer have ANY
documentation left in my possession, I recall that parameters to
user-defined SWSFs and SWFCs were binary and could be 'by reference'. That
is, one could send the names of xTalk containers to be accessed or filled
with data (as opposed to sending only the contents). I don't remember
whether there was any type-checking built in.
In addition, one could define new 'objects' that (if I remember correctly)
might or might not have a visual representation. These objects could have
contents and properties (like xTalk objects or XML entities) as well as
handling messages via their own scripts or their C internals. In other
words, like a hybrid between xTalk objects and C++ classes.
On the projects that I worked on using WinPlus, I was the scripter, not the
C programmer (I didn't know C at the time), so my mental image of the C
interface is dim and distorted. Now that I program in C++ as well as xTalk I
realize that there must have been an elaborate API to support such
functionality. If anyone is interested, when I return home (in a week) I'll
do what I can to find out what the interface was like. We made some powerful
applications with WinPlus enhanced with SWSFs and SWSCs.
I confess, a plug-in object architecture sounds very appealing to me. I'd
love to be able to script, for example:
create new XMLelement rootElement -- in this stack? on this card?
set the tag of XMLelement rootElement to "MY_XML_STUFF"
set the attributes of XMLelement rootElement to tMyArrayOfAttributes
create XMLelement child1
set the parent of XMLelement child1 to rootElement
put "some text" into child1
...
get the completeText of XMLelement rootElement
print it
--and so on
Of course, I'm totally immersed in XML at the moment (I'm implementing an
XML parser). And as I think about what I'm proposing, it seems that the
user-defined class I'm imagining might be implemented entirely without
user-supplied external code per se. That is,
create class XMLelement
set the class script of XMLelement to tSomeScript -- mostly setprop/getprop
handlers
-- then continue as above
However, a class with a screen presence would probably need to be written in
C and interface directly to the xtalk application.
The highway beckons, but I'll stay tuned,
tereza