Is there a way to determine "who" called "me" in a method? Or would doing this just be bad form?<br><br>I have a method in an object that creates another object FOR the sender. Rather than pass a parameter, it seemed like it would be nice to just "know" who was asking for the component.<br>
<br>For example, rather than<br><br>MyObject>>doSomething<br> WidgetBuilderSubclass buildComponentForObject: self anObject.<br><br>it would be nice to just<br><br>MyObject>>doSomething<br> WidgetBuilderSubclass buildComponent<br>
<br>and have<br><br>WidgetBuilderSubclass>>buildComponent<br> | obj widget |<br> obj := self thisMessageSender anObject.<br> ...<br> ^widget<br><br>I am probably asking a question that shows just how much I don't understand "the Smalltalk way!"<br>
<br>Thanks,<br><br>Rob<br><br>