Show
Ignore:
Timestamp:
05/24/08 08:20:56 (6 months ago)
Author:
pmoura
Message:

Improved the "complements" example, moving the category initialization goal to the beggining of the example source file.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/examples/complements/complements.lgt

    r3965 r4274  
     1 
     2:- initialization(define_events(before, employee, _, _, employee)). 
     3 
    14 
    25:- object(employee). 
     
    1114 
    1215 
    13  
    1416:- category(logging, 
    1517    implements(monitoring), 
    1618    complements(employee)). 
    17  
    18     % add a simple logging functionality by defining a "before" event and  
    19     % the corresponding event handler (implies that the category must be  
    20     % loaded *after* the object due to the define_events/5 goal): 
    21  
    22     :- initialization(define_events(before, employee, _, _, employee)). 
    2319 
    2420    before(_, Message, Sender) :-