chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Qt egg - understanding it


From: Arthur Maciel
Subject: Re: [Chicken-users] Qt egg - understanding it
Date: Tue, 24 Aug 2010 14:04:17 -0300

Dear Felix, can I access this devel Qt egg from a devel branch?

I really don't have much expertise with FFI, but I believe I can copy/paste/adapt code to support other widgets.

I really consider we could rename (or create new names to maintain compatibility with previous versions) procedures relating them to widgets.

Like qt:add and qt:insert: their names do not mention to which widgets they relate to. It is easy to check on wiki now, but if the egg expands, it will be pretty difficult to establish this relation.

I suggest long names for it: qt:list-widget-add-item, qt:text-edit-insert-text, etc. It is intuitive for me, but for GUI programming I really prefer long and clear names. If you don't like it I suggest an abbreviation table like (LW = list widget, TE = text edit), but this sounds like Windows programming to me.

Indeed I prefer to directly relate Scheme procedures to C++ widget procedures. This would promote more flexibility to the programmer. If he or she needs a procedure to abstract some utilities (like qt:insert that copies the pointer of a QTextEdit, gets its cursor, and insert code at it), it would be implemented on Scheme code, not on C++ one. Probably I'm missing a lot of gaps between one language and the other, but that's my humble opinion.

Thanks for the enlightenment!
Arthur

2010/8/24 Felix <address@hidden>
From: Arthur Maciel <address@hidden>
Subject: [Chicken-users] Qt egg - understanding it
Date: Mon, 23 Aug 2010 23:15:04 -0300

>
> Isn't it possible to directly map every procedure/slot of a Qt widget into
> an equivalent Scheme code?

Unfortunately not without generating a huge pile of wrapper code (see
"Smoke", which does that for PyQt). The qt egg we currently have takes
advantage of the fact that properties can be dynamically changed, but
(currently) only explicitly wrapped methods can be invoked.  Some
widget-classes are available directly for convenience, though, but the
selection is (currently) more or less arbitrary.


cheers,
felix


reply via email to

[Prev in Thread] Current Thread [Next in Thread]