i needed a while before i found out how it works.
a change goes

$sci->AddRefDocument( $oldpointer );
$sci->SetDocPointer( $newpointer );
$sci->ReleaseDocument( $newtabpointer );

and if you create a new instance

you just $sci->CreateDocument;
and then change to it

hope it helps a lot

cheers
herbert aka lichtkind


Carsten Zandecki schrieb:
> Hi there,
> just installed Wx 0.96 and realized some strange behaviour of STC.
> If I work with multiple documents and try to change doc pointer nothing
> happens.
> 
> Creating the STC Control returns the following doc pointer:
> 49024440
> 
> Creating a new Document with:
> $self->{Editor}->CreateDocument;
> returns this doc pointer :
> 49220272
> 
> Seems ok, so far ... but
> my $doc=$self->{Editor}->GetDocPointer;
> always returns the first doc pointer (49024440). Should be 49220272 after
> calling "CreateDocument" ...
> 
> Maybe there is an error in GetDocPointer, cause it always returns
> the first doc pointer of the STC instance, so it's not possible to swap
> documents.
> 
> Has something changed since Wx 0.91 or is this a bug?
> With Wx 0.91 everything works fine before.
> 
> WinXP SP3
> ActiveStatePerl 5.10.0 (1004)
> 
> Thanx for help,
> Greetz Carsten
> 

Reply via email to