From: Rich Kilmer Date: 2002-01-23T15:47:25+09:00 Subject: RE: RANT: Ruby GUI API > -----Original Message----- > From: Curt Hibbs [mailto:curt@hibbs.com] > Sent: Wednesday, January 23, 2002 1:33 AM > To: ruby-talk ML > Subject: RE: RANT: Ruby GUI API > > > Sean Russell wrote: > > > Do you think the FreeRIDE group would be able to contribute an idea of > > their ideal API? IE, a minimal set of requirements for the API > > itself, not > > the underlying toolkit? > > I think we could do this. > > I should mention that our biggest unmet requirements are the > combination of > I18N support and MacOSX support. Beyond that it would just be your typical > issues of performance, api elegance, etc. > > Although, I believe that we completely overlooked what you > brought up -- the > level of integration with the native platform. That should also be a top > consideration. > > > It might be as much work to port as to do it from scratch, but > > perhaps not. > > I just want to make sure that if we do port it, we avoid any legacy API > > baggage, and do things the Ruby Way. > > I'm no expert on SWT, but from my brief investigation I know that its > implementation is divided into two parts. A C (or C++) layer talks to the > OS/widgets, and an wrapper layer (in their case Java, in our case > Ruby) that > implements the SWT widget interface. > > They purposely designed the C level code to be a small as possible -- > anything would *could* be implemented in SWT layer was. Because of this > there's probably nothing that is very Java specific in the C layer, and we > could probably use that code as-is (or with minimal changes). I don't know...this may be full of JNI crap. It may not be simple to extract. And I will repeat myself again, has anyone looked at the SWin/VRuby library. It is Win32 only, but its author did do a minimal native (SWin) library and then a comprehensive ruby (VRuby) library. You may be able to get ideas from what he implemented in V vs. Ruby for an idea on how best to separate the two. I don't necessarily like the way he developed the Ruby API (tried to make it like VB), but it can be learned from. > > I agree completely that the SWT api layer should do things the Ruby way. > >