i have :
:- use_module(library(logtalk)).
:- {buffer}.
:- initialization(main).
main :-
create_object(env,[instantiates(buffer)],[],[]),
it works but every time I re-consult the file it barks an error because the object already exists.
Is there a way to check if the object already exists and skip recreating it ?
more code:
:- use_module(library(logtalk)).
:- consult(utils).
%% :- initialization((
%% logtalk_load([buffer,env]).
%% )).
:- {buffer}.
:- initialization(main).
main :-
%% create_object(env,[instantiates(buffer)],[],[]),
env::set(uid,0), env::set(name,"").
this worked :
:- initialization((
logtalk_load([buffer])
)).
i.e. no dot and no "env"