Hi, I'm a fairly new lisp user and I wish to create a graphical application. CommonQt seems decent but is there really only one page of documentation? In particular I am struggling to figure out how to use enums, they are not a numeric type and I can't find a way to convert them to numbers. Also Qt defines some useful overloaded operators which I can't access.
Hi! I know nothing about CommonQt, but, some general hints: o know what is *STAR* try (describe '*star*), (describe *star*), use inspector of your lisp IDE etc; Qt reader (#_) _should_ be case sensitive while CL reader is not. Also, it _might_ treat "*" in special way. It is likely to misinterpret *star*, try *STAR* or, better, just give another name to your var:
(defparameter |Star| ...)
On Monday, October 8, 2012 9:21:03 PM UTC-7, budden wrote:
> Hi! I know nothing about CommonQt, but, some general hints: o know what is *STAR* try (describe '*star*), (describe *star*), use inspector of your lisp IDE etc; Qt reader (#_) _should_ be case sensitive while CL reader is not. Also, it _might_ treat "*" in special way. It is likely to misinterpret *star*, try *STAR* or, better, just give another name to your var:
> (defparameter |Star| ...)
> (#_operator+= Star (#_new QSize 3 3))
Thanks for your reply.
The reader macro is for executing foreign functions. I am reasonably sure that it only reads the word following it, which is the name of the C++ method to be called. Overloading += in C++ is done by overloading the function named operator+=. So I assumed it would be the same in commonqt.
It appears that there is a function #_operator, and the += is being evaluated normally as the first argument and of course it is unbound. I have to figure out how to use it. There is no documentation which I can find on #_operator.
On Tuesday, October 9, 2012 11:01:02 PM UTC-7, Eric Eaton wrote:
> On Monday, October 8, 2012 9:21:03 PM UTC-7, budden wrote:
> > Hi! I know nothing about CommonQt, but, some general hints: o know what is *STAR* try (describe '*star*), (describe *star*), use inspector of your lisp IDE etc; Qt reader (#_) _should_ be case sensitive while CL reader is not. Also, it _might_ treat "*" in special way. It is likely to misinterpret *star*, try *STAR* or, better, just give another name to your var:
> > (defparameter |Star| ...)
> > (#_operator+= Star (#_new QSize 3 3))
> Thanks for your reply.
> The reader macro is for executing foreign functions. I am reasonably sure that it only reads the word following it, which is the name of the C++ method to be called. Overloading += in C++ is done by overloading the function named operator+=. So I assumed it would be the same in commonqt.
> It appears that there is a function #_operator, and the += is being evaluated normally as the first argument and of course it is unbound. I have to figure out how to use it. There is no documentation which I can find on #_operator.
...and that is because I probably created it when I used the macro.
On Tuesday, October 9, 2012 11:08:25 PM UTC-7, Eric Eaton wrote:
> On Tuesday, October 9, 2012 11:01:02 PM UTC-7, Eric Eaton wrote:
> > On Monday, October 8, 2012 9:21:03 PM UTC-7, budden wrote:
> > > Hi! I know nothing about CommonQt, but, some general hints: o know what is *STAR* try (describe '*star*), (describe *star*), use inspector of your lisp IDE etc; Qt reader (#_) _should_ be case sensitive while CL reader is not. Also, it _might_ treat "*" in special way. It is likely to misinterpret *star*, try *STAR* or, better, just give another name to your var:
> > > (defparameter |Star| ...)
> > > (#_operator+= Star (#_new QSize 3 3))
> > Thanks for your reply.
> > The reader macro is for executing foreign functions. I am reasonably sure that it only reads the word following it, which is the name of the C++ method to be called. Overloading += in C++ is done by overloading the function named operator+=. So I assumed it would be the same in commonqt.
> > It appears that there is a function #_operator, and the += is being evaluated normally as the first argument and of course it is unbound. I have to figure out how to use it. There is no documentation which I can find on #_operator.
> ...and that is because I probably created it when I used the macro.
I did it! By making some trivial modifications to CommonQt. I feel like I've achieved some kind of hacker cred now XD don't spoil this for me. However I have become somewhat disenfranchised with common lisp and commonqt and I'm considering using clojure instead.
Eric Eaton <zaim...@gmail.com> writes:
> On Monday, October 8, 2012 9:21:03 PM UTC-7, budden wrote:
>> Hi! I know nothing about CommonQt, but, some general hints: o know what is *STAR* try (describe '*star*), (describe *star*), use inspector of your lisp IDE etc; Qt reader (#_) _should_ be case sensitive while CL reader is not. Also, it _might_ treat "*" in special way. It is likely to misinterpret *star*, try *STAR* or, better, just give another name to your var:
>> (defparameter |Star| ...)
>> (#_operator+= Star (#_new QSize 3 3))
> Thanks for your reply.
> The reader macro is for executing foreign functions. I am reasonably sure that it only reads the word following it, which is the name of the C++ method to be called. Overloading += in C++ is done by overloading the function named operator+=. So I assumed it would be the same in commonqt.
> It appears that there is a function #_operator, and the += is being evaluated normally as the first argument and of course it is unbound. I have to figure out how to use it. There is no documentation which I can find on #_operator.
I'm reasonably sure that the reader macro is #_, and the argument is
"operator+=". That is, the reader macro does an FLI lookup of the symbol
named "operator+=", and applies it to the two arguments.
On Wednesday, October 10, 2012 9:36:54 AM UTC-7, Raymond Wiker wrote:
> Eric Eaton <> writes:
> > On Monday, October 8, 2012 9:21:03 PM UTC-7, budden wrote:
> >> Hi! I know nothing about CommonQt, but, some general hints: o know what is *STAR* try (describe '*star*), (describe *star*), use inspector of your lisp IDE etc; Qt reader (#_) _should_ be case sensitive while CL reader is not. Also, it _might_ treat "*" in special way. It is likely to misinterpret *star*, try *STAR* or, better, just give another name to your var:
> >> (defparameter |Star| ...)
> >> (#_operator+= Star (#_new QSize 3 3))
> > Thanks for your reply.
> > The reader macro is for executing foreign functions. I am reasonably sure that it only reads the word following it, which is the name of the C++ method to be called. Overloading += in C++ is done by overloading the function named operator+=. So I assumed it would be the same in commonqt.
> > It appears that there is a function #_operator, and the += is being evaluated normally as the first argument and of course it is unbound. I have to figure out how to use it. There is no documentation which I can find on #_operator.
> I'm reasonably sure that the reader macro is #_, and the argument is
> "operator+=". That is, the reader macro does an FLI lookup of the symbol
> named "operator+=", and applies it to the two arguments.
Yes that seems to be its function, but it was stopping before taking the + character from the stream and normal evaluation resumed on +=. The reader macro processed "operator" and interned a corresponding symbol as a side effect. I assumed this meant that the function actually existed. Changing the reader to accept the character + made everything better.