[M3devel] UI, Trestle, native... Cocoa??

Darko darko at darko.org
Tue Sep 28 08:47:06 CEST 2010


I think that's the problem with implementing Trestle on another GUI, it's too idiosyncratic in its structure. Generated Obj-C interfaces using OBJECT are definitely the way to go. It mostly involves a thin layer but all field access is done using functions from what I understand so it won't be completely natural without some syntax extensions to M3. The question is  if it matters.


On 27/09/2010, at 11:38 PM, Jay K wrote:

> 
> I think what is a bit unusual about Trestle is how much it implements itself.
> 
> 
> It does *not* appear to be a thin wrapper around a native event or control or window management interface. It appears to handle event routing itself, clipping itself, some aspects of drawing itself. I think it might only depend on the ability to draw dots, and to get some form of keyboard/mouse events.
> 
> 
> *and* it is multithreaded.
> Unusual for GUI libraries (e.g. Java swing).
> 
> 
> Whenever I read about it, I get lost once they start talking about the locking protocol.
> 
> 
> The "split" layout mechanism seems maybe nice.
>  It bugs me how Windows encouraged pixel count layout and how much fixed size gui there is.
> 
> 
> I suspect the authors knew or discovered far more than any of us here.
> 
> 
> You probably can make a decent binding to Cocoa.
> But I don't know.
> 
> 
> Runtime and compiler support, often allow for nicer syntax, but I really don't know if a mere wrapper library will be nice/graceful or not. I would suggest looking into if you have enough "generation" ability to, e.g. spit the headers back out, or generate a nicer C++ library. And then you can probably without much difficulty make either a "straightforward" wrapper library or maybe even something a bit more idiomatic ... e.g. do you use OBJECT or not?
> 
> 
>> Trestle under X did not took my breath
> 
> 
> I find Trestle GUI pretty difficult to interact with.
> Using scrollbars for example.
> I have trouble with most X GUI actually.
> 
> 
> The Win32 changes are a bit encouraging though. With only a little bit of change the GUI is a slightly less little bit better. We still don't have the dpi problem fixed properly. I don't have a high dpi system.
> 
> 
> Qt looks very nice...
> 
> 
> - Jay
> 
> ----------------------------------------
>> From: dragisha at m3w.org
>> To: darko at darko.org
>> Date: Tue, 28 Sep 2010 08:23:04 +0200
>> CC: m3devel at elegosoft.com
>> Subject: Re: [M3devel] UI, Trestle, native... Cocoa??
>> 
>> I am about to do a port of some simple (in its GUI aspect) application
>> to Mac.
>> 
>> I am also discouraged (at least tried to) to near death :) by a guy from
>> another community, he is 1000% sure Modula-3 cannot be made to support
>> Cocoa not a "g" of gracefully.
>> 
>> Trestle under X did not took my breath. After peeking and pooking around
>> sources a bit, I think it was very nice project in its time, and
>> reasonable one to use 12-15yrs ago, but things moved on. In other words
>> - I cannot think an explanation to my customer why a GUI appliction of
>> mine is not more.... GUIsh...
>> 
>> I did a lot of Gtk+ in Modula-3, under Linux (and colleague did his
>> testing on Windows while he was working with me on it) and from that
>> experience I know it's not impossible to make native GUI work.
>> 
>> In other words - count on me for low level binding/interfacing once I
>> start doing my work on Mac - in few weeks time.
>> 
>> On Mon, 2010-09-27 at 13:12 -0700, Darko wrote:
>>> I can't say I'm interested in Trestle, and getting compatibility with Cocoa objects might be a hassle, but I am interested in Cocoa support in M3. The things that need to be done to make this happen are:
>>> 
>>> - run time support for Objective-C objects, basically the ability to call Obj-C methods and reference Obj-C fields in objects
>>> - conversion of Cocoa interfaces to M3. This can probably be automated to some degree, I've already gone through the process with Carbon API (admittedly from Pascal interfaces).
>>> 
>>> If anyone wants to take on the first task I'd be happy to take on the second. Apple has Obj-C internals doco on the web.
>>> 
>>> 
>>> On 25/09/2010, at 1:42 PM, Dragiša Durić wrote:
>>> 
>>>> Is it feasible to make it mora native to Mac? Interesting?
>>>> 
>>>> On Sat, 2010-09-25 at 12:31 +0000, Jay K wrote:
>>>>> It draws all the controls itself.
>>>>> The Mac version is the X Windows version.
>>>>> 
>>>>> - Jay
>>>>> 
>>>>> ----------------------------------------
>>>>>> From: dragisha at m3w.org
>>>>>> To: m3devel at elegosoft.com
>>>>>> Date: Sat, 25 Sep 2010 13:41:19 +0200
>>>>>> Subject: [M3devel] UI, Trestle, native... Cocoa??
>>>>>> 
>>>>>> Anybody working UI's with Trestle? It is mapped no native widgets on
>>>>>> Windows? What about Mac?
>>>>>> --
>>>>>> Dragiša Durić
>>>>>> 
>>>>> 
>>>> 
>>>> --
>>>> Dragiša Durić 
>>>> 
>>> 
>> 
>> --
>> Dragiša Durić 
>> 		 	   		  




More information about the M3devel mailing list