Ok thanks for the two answers. They helped me a lot. I just started to read the current
snapshot version of the pharo by example book which clarified some open points too. So I
think I can proceed now.
Best regards
Meinert
Am 11.07.2016 um 14:17 schrieb Alexandre Bergel
<alexandre.bergel(a)me.com>om>:
Hi Meiner!
For instance, I want to get all packages for all
classes of the argouml showcase. I do this like this:
1. Select "All classes"
2. Look in the Meta-Panel which methods are available
3. Enter "self allPackages" in evaluator and execute "Do it and Go"
4. => The result shows 0
In Moose, for Java application, a package is called a namespace. So, look for namespaces
and not packages.
The same for allModelPackages.
I wonder what's the difference between allPackages and allModelPackages and why both
return a result of zero. I would expect to get of all the packages the classes are in.
allPackages are all the packages _defined_ and _used-but-not-defined_ of your
application.
Same for classes and model classes.
If your application is:
public class MyGreatApp extends Object {
public static void main(String[] args) {
System.out.println(“Hello World”);
}
}
then all model classes will give you the class MyGreatApp. However, allClasses will give
you, at least, Object, String, System since your application use these classes, but they
are not defined in your application.
If I do the same for the methods:
1. Select "All classes"
2. Look in the Meta-Panel which methods are available
3. Enter "self allMethods" in evaluator and execute "Do it and Go"
4. => The result shows 23k methods
Okay!
5. Now I wanted to look at meta panel which
methods are available but I don't see any method related except
averageNumberOfInvocations and so on. The reason seems to be that the result is of type
FAMIXMethodGroup. How to get from the group to the model for the methods so that I can
access the parameter list of the methods and so on?
Can you take a screenshot? I am not sure what are you looking at.
So how do you know which methods you can call, do
you use the meta panel as well? Why do some methods return an empty result (like
allPackages) even though they seem to be valid and should return a result? How to get to
the content of a group?
Is there a more efficient way to work with moose or is this the way you work with it? How
do you investigate these problems if you get some unreasonable return result?
I am also online, on Slack, if you wish to have a chat.
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.