Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 32172 invoked by uid 500); 28 Sep 2001 07:45:10 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 32162 invoked from network); 28 Sep 2001 07:45:10 -0000 Message-ID: <013001c147f1$c89912d0$6501a8c0@GILAMONSTER> From: "Erik Hatcher" To: Cc: References: <3.0.32.20010927141649.00cf87e0@zbl6c008.corpeast.baynetworks.com> <055401c14787$8a79a6f0$6501a8c0@GILAMONSTER> <20010928004629.ULCV13193.mss.rdc2.nsw.optushome.com.au@there> <00c701c147d1$af210bc0$6501a8c0@GILAMONSTER> <3BB43142.603504F8@home.com> <002b01c147e1$8078ab10$6501a8c0@GILAMONSTER> Subject: Re: [PATCH] Script enhancement to standardize the "project" object exposed Date: Fri, 28 Sep 2001 00:47:11 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.3018.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Actually I just tried "this" and it doesn't work.... it must be a special BSF auto-provided object which contains all the other objects that Script.java exposed (a "for each in" gave me that info). I modified it to be "me", like below: beans.put("me", this); and it all worked well. So anything other than "this" would be fine. What is the best choice? "me"? "task"? "thisTask"? Here is my example script now: I'm sure there is a better way to get output, but I'm just using the method shown in the documentation for now. The above outputs this which shows that "me" is a Task and has access to all the methods and member variables: [echo] getTaskName [echo] location [echo] taskName [echo] notifyAll [echo] runtimeConfigurableWrapper [echo] project [echo] setLocation [echo] setTaskName [echo] setProject [echo] getRuntimeConfigurableWrapper [echo] setSrc [echo] log [echo] execute [echo] setDescription [echo] addText [echo] getDescription [echo] equals [echo] notify [echo] class [echo] perform [echo] wait [echo] setOwningTarget [echo] toString [echo] hashCode [echo] description [echo] init [echo] setLanguage [echo] getProject [echo] maybeConfigure [echo] getOwningTarget [echo] getClass [echo] owningTarget [echo] getLocation I'll gladly submit an updated patch once we decide the best name for the task and if we want to expose the Project directly, although I'm inclined to only expose the Task and let the script get at the project reference if it wants. If a committer patches it, please make sure to modify the documentation patch to match the actual name chosen and to reflect that its a Task object now rather than a Project. Erik ----- Original Message ----- From: "Erik Hatcher" To: "ant-dev" Cc: Sent: Thursday, September 27, 2001 10:50 PM Subject: Re: [PATCH] Script enhancement to standardize the "project" object exposed > I'm all for "target" being added also. Actually if we just add "this":: > > beans.put("this", this); > > it would give access to the instance of the > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > From: "Peter Donald" > > > To: > > > Sent: Thursday, September 27, 2001 5:01 PM > > > Subject: Re: Javascript errors > > > > > > > On Fri, 28 Sep 2001 05:06, Erik Hatcher wrote: > > > > > This problem actually could be alleviated with a patch to the >