Charlie Reinl ha scritto: > >>> my project (from now on called 'the program') >>> use a in gambas2 written component (from now on called 'the >>> component' [which is by it's own, also a executable]). >>> 'the component' is embedded on a form of 'the program'. >>> So the "parent" is known. >>> What I want is calling a Sub/Function, declared in 'the program', out >>> from 'the component' ..... calling back to the caller. >>> >>> Better now ? >>> >>> Charlie >>> >>> > > Salut Doriano & Fabian, > > I attached a (no, two) gambas2 project(s), which does now, all I > expected to find when I started for that. > > Finally what I need is a user "named" Interface which comes back to the > caller which is the users project, who had called my component. > First I planed that the component has to be embedded (for the parents > stuff) but now I found out, I can call back, if the called, knows the > Name of the caller (and the method to call). > > That gives me and the user a lot of freedom. > > The reason, why EVAL work with intern method only if you give the name > of the owner (ME.Name) is an extra job for BenoƮt! > It seems to me that events should be the way to go. You want to notify the main program (notify, or pass some data) from a component: why don't use events? They were invented just for that. You can use a single event, or you can use three for red, green and blue. Arguments to the event can be precise, if the logic dictates they are precise; otherwise you can use a string, and let the main program use tests or "eval" to carry out more sophisticated things.
I didn't run your project, but it seemed to me that things break if you put your component in different position of the hierarchy (ie: directly on a form, or embedded into a frame). Anyway, you solved... even if I didn't fully understand what is the aim. Cheers, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user