From: John L. <jla...@gm...> - 2013-01-23 04:18:23
|
On Sun, Jan 20, 2013 at 1:27 AM, Paul K <pau...@ya...> wrote: > Hi All, > > Does anyone have an example of how multiple views can be used in > wxlua? I looked at the documentation here > http://www.yellowbrain.com/stc/mult_views.html, but even a simple code > like this crashes the app: > > local pointer = ed:GetDocPointer() > ed:ReleasePointer(pointer) You need to increase the ref count of the doc pointer. AddRefDocument(origEditor->GetDocPointer()); SetDocPointer(origEditor->GetDocPointer()); and then release it before the refed editor is destroyed. ReleaseDocument(GetDocPointer()); Hope this helps, John |