[parenscript-devel] Problems with new object initalization

Victor bobbie at ua.fm
Tue Apr 2 15:05:00 UTC 2013


On Tue, 02 Apr 2013 17:40:49 +0300, Alessio Stalla <alessiostalla at gmail.com> wrote:

> On Tue, Apr 2, 2013 at 4:33 PM, Victor <bobbie at ua.fm> wrote:
>
>> On Tue, 02 Apr 2013 17:23:30 +0300, Canhua <chencanhua at fudan.edu.cn>
>> wrote:
>>
>>  (defvar my-log-reader (new (chain *yahoo* widget (LogReader "myLogger"))))
>>>
>>
>> Hello Canhua,
>>
>> I tried this code:
>>
>> (who:str (ps:ps (defvar my-log-reader (new (chain *YAHOO* widget
>> (LogReader "myLogger"))))))
>>
>
> That should be (ps:new (ps:chain ...))

Hi Alessio,

You are totally correct. Now this works:

(ps:ps (ps:var my-log-reader (ps:new (ps:chain *YAHOO* widget (*log-reader "myLogger")))))

And produces results that I want.

Thanks a lot!

Victor


>
> Alessio
>
>
>> and have got:
>>
>> var myLogReader = new(chain(YAHOO, widget, logreader('myLogger')));
>>
>> that is obviously different from the intended instructions.
>>
>> I am using Parenscript 2.5 obtained from Quicklisp.
>>
>> Thanks,
>> Victor
>>
>>
>>
>>>
>>> On Tue, Apr 2, 2013 at 10:07 PM, Victor <bobbie at ua.fm> wrote:
>>>
>>>  Hello,
>>>>
>>>> I would like to express following line of code:
>>>>
>>>> var myLogReader = new YAHOO.widget.LogReader('****myLogger');
>>>>
>>>>
>>>> in Parenscript-Lisp. According to the reference manual it might be
>>>> something like:
>>>>
>>>> (defvar my-log-reader (new (@ *yahoo* widget LogReader "myLogger")))
>>>>
>>>> but I get a completely different result.
>>>>
>>>> What is the proper way to express such kind of statements in Parenscript?
>>>>
>>>> By the way, contrary to the reference manual, `var' form is not turned
>>>> into a variable declaration in JavaScript.
>>>>
>>>> Thanks,
>>>> Victor
>>>>
>>>> ______________________________****_________________
>>>> parenscript-devel mailing list
>>>> parenscript-devel at common-lisp.****net <parenscript-devel at common-**
>>>> lisp.net <parenscript-devel at common-lisp.net>>
>>>> http://lists.common-lisp.net/****cgi-bin/mailman/listinfo/**<http://lists.common-lisp.net/**cgi-bin/mailman/listinfo/**>
>>>> parenscript-devel<http://**lists.common-lisp.net/cgi-bin/**
>>>> mailman/listinfo/parenscript-**devel<http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel>
>>>> >
>>>>
>>>>
>>>
>>
>> --
>> Tu ne cede malis, sed contra audentior ito --- LvM
>>
>>
>> ______________________________**_________________
>> parenscript-devel mailing list
>> parenscript-devel at common-lisp.**net <parenscript-devel at common-lisp.net>
>> http://lists.common-lisp.net/**cgi-bin/mailman/listinfo/**
>> parenscript-devel<http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel>
>>
>
>
>


-- 
Tu ne cede malis, sed contra audentior ito --- LvM




More information about the parenscript-devel mailing list