January 22, 2012
On 1/22/12, Gour <gour@atmarama.net> wrote:
> Using Doxygen output, probably takes care of wrapping C API only, while there would still be work to produce higher-level bindings in the sporit of D language, right?

The php generator creates a C API that's built into a DLL and a php OOP wrapper. This is what some sample php code looks like: http://paste.pocoo.org/show/538858/
January 22, 2012
On 20.01.2012 23:17, Brad Anderson wrote:
> I occasionally try to think about what sort of changes would be made to the
> wxWidgets interface to be more idiomatic to D.  Signals come to mind (along
> with delegates wherever possible).  Range-based access to the items in
> certain containers is something that would be useful (wxWidget's container
> item accessing is a particularly bad part of its API).  Probably use D's
> date/time functionality rather than wxWidget's (or both).  There are some
> stream classes in wxWidgets which could probably be replaced with a range
> based interface (which would just serve as an adapter between ranges and
> the streams).
>
> It's a shame D doesn't have named parameters because wxWidget's usage would
> benefit greatly from them (wxWindow and subclasses of it often have 4 or
> more default parameters that I often need to specify to get to the one
> parameter I actually want to set).  wxSizer's Add method is confusing
> enough that they added a named parameter idiom version so you could
> actually read the method call and figure out what is going on.

It's also a great benefit to be able to rely on wxWidgets' available examples and documentation, which might outweigh most benefits you can get by improving or D-ifying the API.  Adding more convenient ways of doing things on top of the existing API should be fine, though.  DWT doesn't add much on top of SWT, but if I recall correctly, the SWT API is already a lot nicer than wxWidgets.
January 22, 2012
On 2012-01-22 20:00, torhu wrote:
> On 20.01.2012 23:17, Brad Anderson wrote:
>> I occasionally try to think about what sort of changes would be made
>> to the
>> wxWidgets interface to be more idiomatic to D. Signals come to mind
>> (along
>> with delegates wherever possible). Range-based access to the items in
>> certain containers is something that would be useful (wxWidget's
>> container
>> item accessing is a particularly bad part of its API). Probably use D's
>> date/time functionality rather than wxWidget's (or both). There are some
>> stream classes in wxWidgets which could probably be replaced with a range
>> based interface (which would just serve as an adapter between ranges and
>> the streams).
>>
>> It's a shame D doesn't have named parameters because wxWidget's usage
>> would
>> benefit greatly from them (wxWindow and subclasses of it often have 4 or
>> more default parameters that I often need to specify to get to the one
>> parameter I actually want to set). wxSizer's Add method is confusing
>> enough that they added a named parameter idiom version so you could
>> actually read the method call and figure out what is going on.
>
> It's also a great benefit to be able to rely on wxWidgets' available
> examples and documentation, which might outweigh most benefits you can
> get by improving or D-ifying the API. Adding more convenient ways of
> doing things on top of the existing API should be fine, though. DWT
> doesn't add much on top of SWT, but if I recall correctly, the SWT API
> is already a lot nicer than wxWidgets.

The only thing DWT adds is using delegates instead of listeners.

-- 
/Jacob Carlborg
January 23, 2012
On Sun, 22 Jan 2012 20:00:06 +0100
torhu <no@spam.invalid> wrote:

> It's also a great benefit to be able to rely on wxWidgets' available examples and documentation, which might outweigh most benefits you can get by improving or D-ifying the API.  Adding more convenient ways of doing things on top of the existing API should be fine, though.

I believe it's possible to D-ify C++ API so that it's still easy to consult original wx docs as well as have nice higher-level API.

At least, it is possible in e.g. wxhaskell...


Sincerely,
Gour

-- 
It is far better to discharge one's prescribed duties, even though faultily, than another's duties perfectly. Destruction in the course of performing one's own duty is better than engaging in another's duties, for to follow another's path is dangerous.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


January 23, 2012
On Sun, 22 Jan 2012 19:38:42 +0100
Andrej Mitrovic <andrej.mitrovich@gmail.com> wrote:

> The php generator creates a C API that's built into a DLL and a php OOP wrapper.

It looks as wonderful base to build upon it in 'phase-2'. ;)


Sincerely,
Gour

-- 
One who is not connected with the Supreme can have neither transcendental intelligence nor a steady mind, without which there is no possibility of peace. And how can there be any happiness without peace?

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


January 23, 2012
On 01/21/2012 01:29 PM, Andrej Mitrovic wrote:
> I'm porting the JSON scripts first. There are already JSON dumps that
> the php script makes, so I'd like to take advantage of that........

Porting the JSON output to ... [please insert target here ]
Back to XML :)
Well, I am not sure about how usable std.json is.

Can you tell about your progress, trouble, doubts  etc, please ?

Bjoern

--------------------------------------------------------------------------
IMHO it should be a straight forward task to create constants, enums, globals, and the extern C {}  wxWidgets wrapper library.

Creating the wxWidgets D class wrappers, well I think it is not exactly rocket science. But heck, maybe it's more difficult than it looks from a first view.
------
Just a few hours ago I found this : http://wxnet.sourceforge.net/apiref/
Move to :Related pages/Notes for contributors...
It's C#,out of date and DLL specific, but I think the Dispose()  related stuff is nevertheless interesting.
1 2 3
Next ›   Last »