简体   繁体   English

如何找到引用myObject的所有对象?

[英]How can I find all objects that reference myObject?

I have an object myObject and I'm not sure who's holding references to it. 我有一个对象myObject ,我不确定是谁持有它的引用。 (I want to know because I'm reverse engineering something.) (我想知道,因为我正在逆向工程。)

I found the button "Objects pointing to this value" in the inspector, but it doesn't bring up anything, even if I make another object that's pointing, like this: 我在检查器中找到了“指向此值的对象”按钮,但它没有显示任何内容,即使我创建另一个指向的对象,如下所示:

OrderedCollection new add: self ; inspect

Clearly, that button is broken! 很明显,那个按钮坏了! So, how can I get all referencing objects? 那么,我如何获得所有引用对象?

I'm using the Moose 4.6 image. 我正在使用Moose 4.6图像。

PointerExplorer openOn: myObject works in Pharo, but it's slightly broken in Moose 4.6. PointerExplorer openOn: myObject在Pharo中工作,但在Moose 4.6中略有不同。 For a quick fix revert ObjectExplorerWrapper >> icon to the previous version (AlainPlantec 12/6/2009 22:13) 快速修复将ObjectExplorerWrapper >> icon恢复到以前的版本(AlainPlantec 12/6/2009 22:13)

In Pharo/Squeak, you can use: 在Pharo / Squeak中,您可以使用:

myObject pointersTo

在Pharo / Squeak中,您可以使用:myObject pointersTo

In Squeak 4.5 在吱吱声4.5

PointerFinder pointersTo: myObject

and

PointerExplorer new openExplorerFor: myObject

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我如何找到对myObject的引用? - How do I find out references to myObject? 什么是VHTML? 这个怎么运作? 在哪里可以找到有关它的信息? - What is VHTML? How it works? Where can I find information about it? 如何获得协议中的所有方法? - How can I get all the methods in a Protocol? Pharo Smalltalk-如何列出类别中的所有类(又名“包装”或“标签”)? - Pharo Smalltalk - How can I list all the classes in a Category (aka Package or Tag)? 如何从 Squeak Smalltalk 图像中转储所有源代码? - How can I dump all the source code from a Squeak Smalltalk image? "如何在 Smalltalk 中找到所有可用的方法并按名称搜索?" - How to find all methods available in Smalltalk and search by name? 如何获取表单所有字段的值? - How do I get the values of all the fields of a form? 在哪里可以找到Pharo + Seaside3 + Magritte图像来尝试“海滨入门”一书? - Where can I find a Pharo+Seaside3+Magritte image for experimenting with the “An Introduction to Seaside” book? 如何在pharo中关闭logToTranscript? - How can I turn off the logToTranscript in pharo? Smalltallk - 如何在类的对象(当前实例)中获取所有实例变量的数组(或集合)? - Smalltallk - How can I get an Array (or Collection) of the all the Instance variables in an Object (the current Instance) of a Class?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM