Ah, ok I'll do my homework then.. ;)
I don't think that I want an lfun::`()() that returns a Gazonk-object in Foo.Bar.
I think I'm explaining this wrong. Here is another attempt:
I have a library to which I'm trying to create an interface. The library has a general part and several "submodules".
I want to make the glue so that the user first creates an object Foo() from the program Foo. Then, from Foo(), the user may create other objects which uses the general parts as set up in Foo().
Therefore, the user must not do Foo.Bar() directly. She should only be able to do Foo()->Bar() or something similar such as Foo()->get_bar() to create Bar-objects.
Did that clarify what I wish to do? Using the ID_STATIC flag on the Bar program still shows Bar when doing indices(Foo) but does not allow Foo()->Bar(). Is there a way of solving this?
/ Marcus Agehall (PacketFront)
Previous text:
2004-08-13 13:29: Subject: CMOD questions
What is foo_var_num supposed to be in your second example?
That's the exercise. :-)
Hint: It's a run-time constant similar to get_bar_fun_num.
Also, the ID_STATIC flag was close to what I wanted. When using it, the inner class is invisible to index() when applied to an object but not when doing something like index(Foo.Bar).
?
I would like to get the following:
indices(Foo.Bar);
({ methods ... })
indices(Foo.Bar());
({ Gazonk methods ... })
Ok, so Foo.Bar is an object with an lfun::`()() that returns a Gazonk object?
Ie, the important thing is that when Gazonk is instantiated, there is a surrounding instance which has initialized some things.
I don't see what your example has to do with the above statement.
/ Henrik Grubbström (Lysator)