How to Check if objectA has all message as objectB in smalltalk?

144 Views Asked by At

I am using smalltalk - i need to check if objectA has all the messages(methods) that objectB has .

i need to write my own code, how could it be done ?

2

There are 2 best solutions below

0
On BEST ANSWER

You could for example ask the class of an object which selectors it's instances understand:

objectA class allSelectors

Then you could ask different objects and compare the results.

2
On

The solution might be

objectA class allSelectors includesAll: objectB class allSelectors