Am 12.07.2012 04:48, schrieb Tim E. Real:
> On July 8, 2012 4:29:20 PM Tim E. Real wrote:
>> On July 8, 2012 9:05:15 PM Robert Jonsson wrote:
>>> Hi,
>>>
>>> Some bugs in 2.0
>>>
>>> Making some recordings here, found a pecular bug. Moving an effect in
>>> the plugin rack causes parameter editing to go haywire. Most seem to
>>> be reset to 0 and many are not possible to change after that even
>>> though the track has automation OFF.
>>
>> Sounds like my department. Some changes there recently. Will check.
>> Tim.
> 
> Crud. I broke it. As usual. 
> 
> I wanted to override class CtrlList's insert, erase, clear, operator=  etc.
>  so that I could absolutely catch all operations requiring gui updates,
>  so that I wouldn't have to hunt down every last piece of code using them
>  and manually add a gui update command.
> 
> It worked sort of:
> 
> My override of map::operator= is not working. None of the members are
>  being transferred.
> 
> Declaration:
> ===================
> class CtrlList : public std::map<int, CtrlVal, std::less<int> > {
> ...
>       CtrlList& operator=(const CtrlList&);
> ...
> }
> 
> Definition:
> ====================
> CtrlList& CtrlList::operator=(const CtrlList& cl)
> {
>       //
>       // THIS CALL IS NOT WORKING. HELP - HOW TO DO IT? 
>       //
>   std::map<int, CtrlVal, std::less<int> >::operator=(cl);
> 
> ...
> }
> 
> How can I call the base (std::map) class's operator= ?
> 
> I tried several variations of the above line but no luck.
> It works if I remove my entire overriding method and let
>  std::map do the work.
> 
> Also I thought that adding these overrides would ultimately actually
>  /allow/ me to hunt down every piece of code using them and then 
>  remove these overrides.
> Almost, but not with operator= :
> KDevelop does not show me usages such as here (which is where the
>  swapping of rack items happens): 
> 
> audiotrack.cpp  : AudioTrack::swapControllerIDX()
> {
> ...
>       newcl = new CtrlList();
>       *newcl = *cl; 
> ...
> }
> 
> And yet my operator= routine is in fact called there. 
> 
> Any suggestions?

is the function called at all? maybe some casting issue between map and
CtrlList?

though i actually would like to find the mistake, as an (even cleaner)
workaround you could make CtrlList not derive from map, but _contain_ a
map instead, and then "forward" most function calls. this ensures nobody
can call a map's member you haven't thought of and thus not overridden.

greetings
flo

> 
> Tim.
> 
>>
>>> Also as reported by Pavel Fric, the right click menu with the editor
>>> tools is not possible to translate, it doesn't use tr() but the
>>> TR_something_NOOP macro, something to do with that I guess...
>>> There are some texts in the file dialog that also are not
>>> translatable, seem to be inherited from the Qt component, wierd that
>>> they don't obey translation, or maybe it's just that we don't have the
>>> string..
>>>
>>> /Robert
>>>
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Lmuse-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/lmuse-developer
> 


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Lmuse-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lmuse-developer

Reply via email to