From: <csa...@co...> - 2005-01-31 14:20:42
|
Hello Timothy, 1) Could You tell me when the TODO mentioned will be released in some future = build? 2) Is there any possibility in Costello to enable the behaviour that every = single component-class explored by the reflection process of Costello=20 should be added into the reference-hierarchy and there should not be any=20 matching and reusing of some already existing components? Thanks a lot! Csaba Timothy Wall <tw...@us...> 01/21/2005 01:07 PM =20 To: csa...@co... cc: abb...@li... Subject: Re: Component.setName() method You should invoke Component.setName from your java code, not from your=20 test code. You can access the component finder and hierarchy through an expression=20 step, so you could potentially write a few custom lookups and invoke=20 setName from your script, but that's rather kludgy. Alternatively, you can pick out a component reference that is being=20 used (incorrectly) for two different components, duplicate it in the=20 XML, change the new one's ID, then incrementally tweak it until it=20 properly matches. you can remove its parent ref id and concentrate on=20 getting its parent dialog to match (maybe first start by getting two=20 unique dialog crefs to work). On Jan 21, 2005, at 5:55 AM, csa...@co... wrote: > > Hello Timothy, > > one more question to the Component.setName() method: > how can I get the required component and reference to it in costello=20 > scripts? > > There is a method : Container.getComponents() and I should scroll=20 > through all child-components and see the getName() result - so I might=20 > write an expression or java call which would do that component-search? > > Or is there any other possibility to do this easily in Costello? > > And how are the components in a script context called concerning their=20 > name attributes? They are the names which are given in the original=20 > sources (and those are retrieved by reflection) or those are just=20 > automatic names given by Costello? > > Thank You! > > Kind regards, > > Csaba Szucs > > > > > > > Timothy Wall <tw...@us...> > > 01/21/2005 12:34 AM > > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 To: =A0 =A0 =A0 =A0c...@co... > =A0 =A0 =A0 =A0 cc: =A0 =A0 =A0 =A0a...@li... > =A0 =A0 =A0 =A0 Subject: =A0 =A0 =A0 =A0Re: [abbot-users] incorrect compo= nent=20 > references > > > > The best way to ensure exact matches is to use Component.setName on > components of interest. > > In general, the editor attempts to match existing references before > creating a new one. =A0So if you have an inexact match that's close, it > may be used rather than creating a new one (there's a TODO item to be > more particular about when fuzzy matches are accepted, and to provide > more feedback within the editor for correcting close matches). =A0I=20 > don't > recall offhand what kind of threshold there is for the re-use/create > decision. > > See if you can come up with a simple test case (perhaps two similar > buttons on separate dialogs) which exhibits this behavior. =A0If I have = > a > concrete case I can see what's going wrong with the matching. > > On Jan 20, 2005, at 8:23 AM, csa...@co... wrote: > > > > > Hello Timothy, > > > > I have some problems with the component references of my GUI > > application: > > > > This GUI applicaiton is not complicated though has some two or three > > level deep GUI hierarchies. I mean there is for example a dialog=20 > which > > has a button and pressing it an open standard dialog comes up etc. > > maybe there is another button, pressing it another dialog comes up. > > > > And when I record a script doing some things in such component > > context, the component references in the steps are not correct and=20 > the > > script aborts. The component reference is still incorrect if I > > previously make a reference to that component in the editor through > > pressing alt+shift+f1. > > > > When I run the script, the reference is another one which is not the > > meant one. (I am talking about a textfield widget) > > > > What can I do in this case? How can I force Costello to make a right > > reference to the wished component for me? > > > > I tried to insert component reference xml lines manually, but it did > > not help me, after a while I got confused with those lines. > > > > It seems to me that in some circumstances Costello MIGHT use the=20 > same > > component reference more times, I mean, for different components,=20 > and > > it does not create a single reference for each component in the=20 > whole > > gui application. > > > > Thank You for Your help in advance! > > > > =A0Kind regards, > > > > =A0Csaba Szucs > > > > > |