BlackBox Meta: accessing methods through Meta 
Author Message
 BlackBox Meta: accessing methods through Meta

I'm using BlackBox 1.3, and here is the question:

If I want to get at a procedure in a module through Meta I can use:
(for example, the code below demonstrates a way to do the equivalent
of calling:
Module.ProcedureName("string"); (* a public function that takes a
string argument*)
)

TYPE:
ProcVal = RECORD (Meta.Value) proc*: PROCEDURE (str: ARRAY OF CHAR) END;

PROCEDURE Do;
VAR item: Meta.Item; ok: BOOLEAN; fn: ProcVal;
BEGIN
        Meta.LookupPath("Module.ProcedureName",item);
        IF item.Valid() THEN
                item.GetVal(fn,ok);
                fn.proc("string");
        END;
END Do;

This enables me to call any public function in a module (and even to
call it with arguments... if the procedure didn't have any arguments
then I could just call "item.Call(ok)" after I set up the meta item).

HOWEVER, what happens if I want to call an object's method?  What
happens if I have an object Foo that has a method defined as

PROCEDURE (f: Foo) DoFoo*;

If I have a pointer to an object of type Foo (called f), how do I call
the equivalent of "f.DoFoo" by using Meta?  

In other words, is there a way to call the equivalent of "f.DoFoo"
using Meta in a similar way to how I called "Module.ProcedureName"
using Meta?

Thanks,
-greg



Sat, 22 Apr 2000 03:00:00 GMT  
 BlackBox Meta: accessing methods through Meta

Quote:

> I'm using BlackBox 1.3, and here is the question:

> If I want to get at a procedure in a module through Meta I can use:

> HOWEVER, what happens if I want to call an object's method?  What
> happens if I have an object Foo that has a method defined as

> PROCEDURE (f: Foo) DoFoo*;

> If I have a pointer to an object of type Foo (called f), how do I call
> the equivalent of "f.DoFoo" by using Meta?

> In other words, is there a way to call the equivalent of "f.DoFoo"
> using Meta in a similar way to how I called "Module.ProcedureName"
> using Meta?

AFAIK up to now it ist not ! possible to call Methods thru Meta.
It is under planning by OMI (Oberon-Microsystems) and will be included
in further versions of the BB 1.3.

Werner Braun



Wed, 03 May 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. meta-circular-meta-interpreters (long)

2. #\Meta #\Control #\Meta-Control etc.

3. static methods and meta classes

4. accessing meta information in Python

5. BUG: text <Meta-f> and <Meta-d> bindings in tk8.0a2

6. XP Meta-Documentation approach

7. Wanted: small meta-data language

8. meta-level programming examples

9. Meta Compiler Experience in VW

10. CFP: META '95 at ECOOP '95

11. CFP: META '95 at ECOOP '95

 

 
Powered by phpBB® Forum Software