| Did you know ... | Search Documentation: |
| hyper->unlink_from |
<-from
(hyper->unlink_from)
or the hyper<-to
(hyper->unlink_to)
side of the hyper is being destroyed. Both methods simply destroy the hyper
object.
These methods may be redefined, but always should destroy the hyper
by calling free/1. The
example below defines a subclass between a whole and a part,
where destruction of the whole automatically destroys the part.
:- pce_begin_class(part_hyper, hyper).
unlink_from(H) :->
get(H, to, Part),
free(Part),
free(H).
:- pce_end_class.
A simple example using the code above:
?- send(new(V1, view(hello)), open), send(new(P1, picture(world)), open), new(_, part_hyper(V1, P1, part, whole)). V1 = <pce>(0x7f9c3a41b0,window) P1 = <pce>(0x7f9c3a5d20,window)
Now the following call will delete both windows:
?- send(V1, free).