> > Thought your problem was you did not get the changed signal in the
> > MediaFragments builder when an AudioFragment changed, so you
> > want to add this new code. My objection is that you already should get the
> > signal without the adding of your new code. If you have an AudioFragment
> > builder extending the MediaFragment builder then the current code calls
> > AudioFragmnet.nodeXXXchanged. Without adding of your new code this
> > already should pass through the MediaFragment builder. Two possible 
> > routes: If the AudioPart builder overrides the changed methods then it is 
> > responsible for calling the MediaFragment nodeChanged methods. If the
> > AudioFragment builder does not overide it, then the current code calls the
> > inherited method of the MediaFragments base class, either way, in the
> > current setup without the adding of the new code, the MediaBuilder
> > should already recieve the signal. If it does not something else might be
> > wrong?
> >
> I am speaking about extending builders (the configuration files), not 
> about extending MMObecjtBuilder (the java files).
> 
> Lets start simple:
> We have two builders, the fist one is the objects builder, and the other 
> one is a people builder. Both are not using java classes, thus both are 
> plain MMObjectBuilders. In this example the builder people extends 
> builder objects (the MMBase1.6 way). Now I add an observer that is 
> listning to the objects builder. This builder should get nodeChanges 
> when a people object is changing, because a people is an object. This is 
> not the case in the current situation.
MMObjectBuilder being the base class of all objects does in the current
situation already get a signal for all node changes. If a people node is
changed, MMObjectBuilder, being the parent of the People builder,
does already gets a notification. Your proposal would mean it would get
it twice, once with builder param People and once with builder Param
MMObject? 

> Now your case. If I have a mediafragment.java that extends 
> mmobjectbuilder.java and a audiofragment.java that extends 
> mediafragment.java. If I add an observer to the mediafragment builder i 
> also want to receive changes when an audiofragment is changing, this 
> because an audiofragment is a mediafragment. Regardless if the java 
> files are extending the nodeXXXXChanged, as long as they invoke they 
> super.nodeXXXXCanged this will work. Calling the super is already needed 
> otherwise the caching system will not work good. So when the 
> AudioFragment.nodeXXXXChanged (builder=audiofragment) is invoked this 
> will invoke the MediaFragment.nodeXXXCanged (builder=audiofragment), 
> this will invoke the MMObjectBuilder.nodeXXXXChanged 
> (builder=audiofragment). The MMObjectBuilder will check if it is 
> extending another builder, and that is the case the audiofragment 
> builder is extending the mediafragment builder, and thus the 
> MediaFragment.nodeXXXChanged (builder=mediabuilder) will be invoked etc.etc.
The MediaFragment.nodeXXXChanged has already been invoked, I don't like it to
invoke it again with only the builder param changed. We more than double the number
of  signals if we fix it this way. The only nice solution I can come up with is to
pass the builder param as MMObjectBuilder instead of passing it as a string, so you
can easily use the isinstanceof operator. Is your problem fixed when inside your
listener you get the builder object and use the isinstanceof operator to select the
builders you want to listen to?

Wilbert.


Wilbert.





Reply via email to