Re: [scintilla] Scintilla OS X issues

45 views
Skip to first unread message

Neil Hodgson

unread,
Aug 12, 2012, 8:55:52 PM8/12/12
to scintilla...@googlegroups.com
Fred:

> - refcount isn't correct when the scintilla component has been created. We had to add '[Scintilla relase];' after the creation to have the component released automatically when the window closes. I don't know where the object is retained in the scintilla sources.

Looks like the problem is that there is a circular reference: ScintillaView has a reference to its InnerView and the InnerView has a reference back to the ScintillaView. Since its the ScintillaView that is the object owned by the app, the InnerView should only have a weak reference back to the ScintillaView. The @property declaration in ScintillaView.h can be changed from (retain) to
@property (weak) ScintillaView* owner;
However, this requires 10.7 and we still want to support 10.5 so (weak) should be (assign) for now.

Neil

Neil Hodgson

unread,
Aug 13, 2012, 7:58:26 AM8/13/12
to scintilla...@googlegroups.com
Fred:

> Sounds like the problem. May be you can turn the @property into a regular get/set without retain for this particular case ?

(assign) works well enough.

> About the OS X10.5 support, I have compiled scintilla on OS X10.5 and it needed some adjustements to work. CAGradientLayer is OSX10.6 only, so I replaced it with a regular one color CALayer.

There's some ifdefs to turn off the animated find indicator to avoid CAGradientLayer - it isn't an essential feature. If a CALayer can be substituted easily then that would be good but its not worth adding much complexity.

> There was another little thing, but I can't remember for now (I can investigate if you need to).

10.6 support is much more important although it is good to avoid breaking 10.5. With Apple going to yearly releases there's going to be many people using older versions.

Neil

Neil Hodgson

unread,
Aug 13, 2012, 7:29:02 PM8/13/12
to scintilla...@googlegroups.com
Changes to break the reference cycle and drop notifications committed.

Neil

Reply all
Reply to author
Forward
0 new messages