How can I find Document or View of

hi,
I am developing a small test application, I Created a class “
ActivityNode: GoIconicNode” and a propertie-page " ActivityNodePrtForm:
System.Windows.Forms.Form, IButtonControl " for access it. It worked
well. I use the routine " MakeUniqueName " to avoid collisions of names.

To tie the ports of each in I use a class " FlowLink: GoLabeledLink " and
a propertie-page " FlowLinkPrtForm: System.Windows.Forms.Form,
IButtonControl " that works well except for the routine " MakeUniqueName "
that doesn’t work because " FlowLink.Document == null ".

How can I find " Document " or View " of a " GoLabeledLink "?

thanks.

the problem is solved.
i put my cod in document class

protected override void OnChanged(GoChangedEventArgs evt)
{
base.OnChanged (evt);
switch (evt.Hint)
{
case GoLayer.InsertedObject:
{
// added a FlowLink to the document
FlowLink n = evt.Object as FlowLink;
if ( n != null )
{
n.Text = n.MakeUniqueName( n.Text );
}
break;
}
}
}

and all is ok.