[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: wxLua on OS X?
- From: "Vijay Aswadhati" <wyseman@...>
- Date: Tue, 5 Aug 2003 20:44:20 -0700
<snip/>
> When I looked at Fox it wasn't working on as many platforms,
> or has such a large useful widget set as WX.
True. I am not sure if we both looked at it during the same
time period. Lately, however it does have a very nice set of
widgets; the number of users are slowly growing and finally
the author is doing a great job by way of support offered
via the newsgroup.
> Wouldn't SWT require a Java VM install?
Not the way I plan on porting it to Lua. Read on...
> Do you mean AWT or SWT - as it's from Eclipse?
I meant SWT and yes it is from IBM's Eclipse project.
> AWT uses native non-portable widgets.
Hmmm. But I am not planning on porting AWT.
The understanding I have is from looking at the source
code and by reading articles that talk about the design
and motivation of SWT <http://www.eclipse.org/articles/index.html>
SWT differs significantly from the approach taken by Sun. The
approach taken by the Eclipse team is to split the toolkit
into three layers:
- Documented platform independent GUI object model (a.k.a SWT)
that is written in Java. [L1]
- An internal platform specific adaptation layer that is also
written in Java. [L2]*N Where N is the number of platforms.
- A native platform specific bridge layer that is written in "C"
and bridges the internal platform specific Java adaptation layer
to the OS supported GUI system calls. [L3]*N Where N is the
number of platforms.
What I am contemplating on is the following:
- The native platform specific bridge layer written in "C" looks
"very" clean. This layer [L3] needs to be converted to Lua "C".
Labor intensive yes, but nothing that cannot be mapped to Lua
"C" API (as a first approximation). This has to be done for
all N
- Port the entire Java code [L1] to Lua. This is to be done only
once.
- Port the [L2] for all N.
That was the scoop and that also explains my earlier post requesting
a sample for "differential inheritance".
Since Lua is faster than Java (metrics obtained from the "Great Language
Shootout"), I am thinking this should work. But then I could be overlooking
something. However I do believe that having a widget toolkit that was built
for Lua from the ground up would bring in a new wave of fans to Lua just
as Tcl/Tk (which by the way is my definition of an ideal marriage)
did during its sunshine days.
Comments and feedback are welcome.
-- Vijay Aswadhati
<<attachment: winmail.dat>>