Hi Curtis, > A FormComponenet service implements both the XIndexContainer and > XNameContainer interfaces. Normally a script programmer wants to use the > control name to initially find the control, and the control reference > from that point on. However, the XEventAttacherManager methods require > the index of the control rather than the control reference. > > If you have the control name, is there any way to get the index of that > named control in the form. If you are forced to sequentially loop > through the indexed container looking for a name match, you lose the > efficiency of the hashed name lookup.
Sadly: yes, your right, and no, there is no other way :( Feel feel to submit an request for enhancement in IssueZilla, requesting introduction of an efficient index retrieval. Component "database access", owner [EMAIL PROTECTED] (that's me). > The XEventAttacherManager methods ought to take a FormComponent argument > instead of an index so you could find the control in whatever manner > works best for your script arguments. Uh. If we go to extend the event attaching API for form controls, I am not sure I would continue using the XEventAttacherManager interface (except for legacy reasons). It has some disadvantages (such as handling attached scripts at the parent of an object, not at the object itself, which imposes structural limitations), so I would probably like to get rid of it. Also, OOo's API features at least three different concepts of assigning scripts to certain events on certain objects, and if we're going to renew one of them, we should simply use (and perhaps improve) one of the other ones, if appropriate. Ciao Frank -- - Frank Sch�nheit, Software Engineer [EMAIL PROTECTED] - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Database http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
