[ltk-user] why MAKE-INSTANCE not exported

Matus Kmit simply.nitaai at gmail.com
Mon Jun 27 21:06:29 UTC 2011


Hi Peter

Thanks for the advice. It is working now as you described.

Matus

On Mon, Jun 27, 2011 at 9:43 AM, Peter Herth <herth at peter-herth.de> wrote:
> Hi Matus,
>
> the common lisp package system is indeed a bit confusing at the
> beginning. Took me years to really master the details of it.
> In doubt, restart your lisp session to get a clean environment. The
> fail-safe environment is having your code in your own package and set
> up like this:
>
> (in-package :cl-user)
> (defpackage :my-package-name
>  (:use :common-lisp :ltk)
>  (:export
>     #:my-function))
>
> (in-package :my-package-name)
>
> (defun my-function ()
>   ...)
>
> in this case you should be able to just use (make-instance 'frame ...)
> as frame is imported from the LTk package. If you are not using the
> LTk package you can alwas access its symbols with the package prefix,
> here ltk:frame.
> If you get any error, please paste the exact error message into the
> mail, this sometimes helps with debugging :)
>
> Peter
>
> On Mon, Jun 27, 2011 at 8:30 AM, Matus Kmit <simply.nitaai at gmail.com> wrote:
>> Thanks for the swift answer.
>>
>> Let me correct myself: make-instance seems to be correctly exported by
>> CL package (SBCL), but when i try to, let's say create an instance of
>> a frame object in my user-defined package the interpreter signals a
>> name colision between the FRAME symbols of LTK and my package,
>> although i never defined any symbol with that name. i am simply using:
>>
>> (make-instance 'frame :master nil ...)
>>
>> i think the error refers to this "frame* class designator.. Do i have
>> to qualify it somehow and if yes how does one do that?
>>
>> That said, i have to admit, that i am still learning how to properly
>> use lisp package system.
>>
>> Thanks for any advice,
>> Matus
>>
>>
>> On Sun, Jun 26, 2011 at 10:54 PM, Peter Herth <herth at peter-herth.de> wrote:
>>> Hi Matus,
>>>
>>> it should be exported from the common-lisp package. Which lisp are you using?
>>>
>>> Peter
>>>
>>> On Sun, Jun 26, 2011 at 10:44 PM, Matus Kmit <simply.nitaai at gmail.com> wrote:
>>>> Hi
>>>>
>>>> Sorry i am a newbie, but i have a question: What is the reason that
>>>> MAKE-INSTANCE is not exported from the LTK package?
>>>>
>>>> Thank you
>>>> matus
>>>>
>>>> _______________________________________________
>>>> ltk-user site list
>>>> ltk-user at common-lisp.net
>>>> http://common-lisp.net/mailman/listinfo/ltk-user
>>>>
>>>
>>> _______________________________________________
>>> ltk-user site list
>>> ltk-user at common-lisp.net
>>> http://common-lisp.net/mailman/listinfo/ltk-user
>>>
>>
>> _______________________________________________
>> ltk-user site list
>> ltk-user at common-lisp.net
>> http://common-lisp.net/mailman/listinfo/ltk-user
>>
>
> _______________________________________________
> ltk-user site list
> ltk-user at common-lisp.net
> http://common-lisp.net/mailman/listinfo/ltk-user
>




More information about the ltk-user mailing list