Using findjobj in R2013a
Mostrar comentarios más antiguos
I am trying to use Yair's FEX:findjobj in R2013a on Linux to basically do what he did in his blog post
desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
jEditor = desktop.getGroupContainer('Editor').getTopLevelAncestor;
jEditor.findjobj
This causes MATLAB to become unresponsive and basically hang. I unfortunately don't have any other versions of MATLAB currently. Can anyone reproduce this?
Respuesta aceptada
Más respuestas (2)
per isakson
el 27 de Sept. de 2013
Editada: per isakson
el 27 de Sept. de 2013
It seems to work fine here: R2013a, 64bit, Win7
>> desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
jEditor = desktop.getGroupContainer('Editor').getTopLevelAncestor;
jEditor.findjobj
ans =
handle: 1-by-1620
>> version
ans =
8.1.0.604 (R2013a)
and the GUI is responsive
1 comentario
Daniel Shub
el 27 de Sept. de 2013
Yair Altman
el 5 de Oct. de 2013
1 voto
You only need to use findjobj without an output (result assignment) value if you want to see an interactive GUI display of all the objects in your analyzed object (in this case Desktop). If your Desktop contains numerous panels/windows/docked figures etc., then there might be so many descendant objects that it would take a long time (and large amounts of memory) to process, which might explain what you see.
If you only need findjobj to get the underlying reference of something, then assign a result (e.g., something=findjobj(...); ) and this should solve the issue. If you want to see the interactive GUI, then consider reducing your Desktop's complexity by closing some panels, or maybe start Matlab when it has access to more physical memory (to prevent virtual memory usage and thrashing).
3 comentarios
Daniel Shub
el 6 de Oct. de 2013
Yair Altman
el 15 de Oct. de 2013
Try setting the desktop layout to the default and retest. Perhaps findjobj gets stuck in some endless loop if id can't find one of the standard Desktop components. If this is the case, you can start peeling off Desktop panels one by one until you get to the culprit.
Daniel Shub
el 16 de Oct. de 2013
Categorías
Más información sobre Environment and Settings en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!