It would certainly help if you could provide an example of something that 
causes the error, or at the very least a stacktrace of the error.

On Saturday 23 March 2024 at 18:04:59 UTC rainonthescare...@gmail.com wrote:

> Hi,
> i ve been working for quite some time now and occasionally bumped into 
> this C++ "unfamous" error. Normally, when found occasionally, ive been able 
> to fix it by using the widget's "self.findChild"/"self.findChildren" which 
> i believe keeps the C++ reference count of the object's pointer alive. Fair 
> enough!
> So, instead of storing the C++ widget in a python bound object, i would 
> retrieve it from the parent-child hierarchy, provided the widget has been 
> added firstly to the layout.
>
> Well, we have a snippet of code in our project that relies heavily on the 
> publish-subscriber/observer pattern and i wouldnt like to rewrite it 
> because of this C++ infernal error. So here is my question: what's the best 
> policy to try to avoid this RuntimeError "forever and after"? Ideally, i 
> would be tempted to use a "template" tool class that would register all the 
> widgets automatically in its __init__ method and perform a 
> MQtUtil.findControl/MQtUtil.findLayout, but i am still encountering this 
> error somewhere else.....
>
> I dont want to solve this punctually but rather establish a good coding 
> policy to avoid "forever" this!.
> So, what is your policy trying to avoid this error? Have you found a 
> permanent solution to this?
>
> Thanks in advance,
> My name is Juan Cristóbal Quesada
> and i work as senior pipeline TD in Spain.
>
> Kind Regards,
> JC
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/ea8d4cdc-d206-4492-bd54-d7ca3f2c5e23n%40googlegroups.com.

Reply via email to