Community

Derek Parnell wrote:
> On Mon, 07 Aug 2006 22:24:57 +0200, Dejan Lekic wrote:
>
>
>>I share this opinion. Everyone has GNU Make.
>
>
> I don't.
>
I don't either.
However, I'm of the opinion that the DMD front-end should incorporate a
little of Derek's Build goodness: specifically the facility to
incorporate imported modules as part of the codegen/link step.
DMD has always opened and parsed all import modules, but right now it
appears to discard them before codegen. Seems to me that should change
(via a switch, or something); assuming Derek were given some credit for it

Derek Parnell wrote:
>>I share this opinion. Everyone has GNU Make.
>
> I don't.
At this point you can probably just run Build
on the sample application for the same effect ?
(that would be "d-fltk-1.1.x/D/test/hello.d")
Matthias needs some volunteers to port to, and
test on, the Windows and X11 platforms anyway
--anders

Carlos Santander wrote:
> You forgot to add std/c/osx/qd/quickdraw.d to rev 5287. Also, the
> previous two revs didn't work (I got "bus error" with both of them)
Thanks. I added the quickdraw.d header file.
If you get a bus error (which is very likely in this early state), it
would be helpful if you could run 'gdb' on the executable and post the
first eight or so lines of the traceback. Just enter:
gdb button
run
bt
like so:
> gdb button
(gdb) run
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x0000000a
0x00003ec0 in _Dmain (args={length = 1, ptr = 0x303710}) at test/button.d:53
53 (cast(ubyte*)null)[10] = 3;
(gdb) bt
#0 0x00003ec0 in _Dmain (args={length = 1, ptr = 0x303710}) at
test/button.d:53
#1 0x0002c368 in _d_run_main2goFZv ()
#2 0x0002c42c in _d_run_main ()
#3 0x000024a4 in _start (argc=1, argv=0xbffff9a0, envp=0xbffff9a8) at
/SourceCache/Csu/Csu-58.1.1/crt.c:272
#4 0x0000234c in start ()
(gdb)
Thanks!
Matthias

MatthiasM escribió:
>
> Thanks. I added the quickdraw.d header file.
Ok. Now I get "make: *** No rule to make target `test/button.o', needed by
`button'. Stop." I guess test/button.d is missing.
>
> If you get a bus error (which is very likely in this early state), it
> would be helpful if you could run 'gdb' on the executable and post the
> first eight or so lines of the traceback. Just enter:
>
Ok, here it is (rev 5288):
(gdb) bt
#0 0xffff8824 in ___memcpy () at
/System/Library/Frameworks/System.framework/PrivateHeaders/ppc/cpu_capabilities.h:189
#1 0x00026bd8 in _adDup (a={length = 2, ptr = 0x0}, szelem=4218832) at
../../../gcc-4.0.3/libphobos/internal/adi.d:576
#2 0x000104a0 in _D2fl6widget9Fl_Widget10copy_labelFAaZv (this=@0x407f80,
a={length = 2, ptr = 0x0}) at fl/widget.d:356
#3 0x00002600 in _Dmain (args={length = 1, ptr = 0x303610}) at test/hello.d:37
#4 0x00028a28 in _d_run_main2goFZv () at
../../../gcc-4.0.3/libphobos/internal/dgccmain2.d:83
#5 0x00028afc in _d_run_main (argc=4218832, argv=0x0, main_func=0x2) at
../../../gcc-4.0.3/libphobos/internal/dgccmain2.d:93
#6 0x00001e7c in _start (argc=1, argv=0xbffffb70, envp=0xbffffb78) at
/SourceCache/Csu/Csu-58/crt.c:272
#7 0x00001d24 in start ()
--
Carlos Santander Bernal

Carlos Santander wrote:
>> Thanks. I added the quickdraw.d header file.
>
> Ok. Now I get "make: *** No rule to make target `test/button.o', needed by
> `button'. Stop." I guess test/button.d is missing.
Gee, where did I leave my brain yesterday? OK, it is added.
> Ok, here it is (rev 5288):
>
> (gdb) bt
Cool. Thanks! That shows that I did not understand slicing, duplicating
and flexible arrays yet ;-)

I had a little more time and managed to port pushhbuttons and keyboard
handling. The "button" demo works pretty well now.
I also ported the standard dialogs (messages, alerts, simple choices),
and apart from the Fl_Input widget, the seem to work.
Group resizing is now implemented as well.
So, just in case you are writing a GUI app on Mac that only needs
pushbuttons in a window, D-FLTK is usable for you ;-)
Matthias
PS: since I don't have the terminating 0 in "D" strings, you will
sometimes see additional letters popping up in labels. This still
requires fixing. The code is in "D/fl/draw.d", called fl_measure and
fl_draw... .
PPS: download is still only via svn from:
http://svn.easysw.com/public/fltk/fltk/branches/branch-D-1.1