Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7825279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:54:40+00:00 2026-06-02T08:54:40+00:00

I have an objc program and i would like to use a widget that

  • 0

I have an objc program and i would like to use a widget that is written in objc++ (namely https://launchpad.net/scintilla-cocoa). How do i go about this? Basically i want a new window controller object to interface with this objc++ library to define a scintilla text editor widget. Simply creating a new ‘objc class’ and accessing the library from there generates a bunch of errors related to the C++ class keyword and so on.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T08:54:41+00:00Added an answer on June 2, 2026 at 8:54 am

    Since I’m the one who put you into the (hopefully rewarding :-)) trouble of using Scintilla, here I am.


    Let’s say we create a ScintillaView subclass, named ppScintillaEditor.
    The file should have an .mm extension (e.g. ppScintillaEditor.mm)

    The code would be roughly like this…

    Interface

    #import "Scintilla/ScintillaView.h"
    
    @interface ppScintillaEditor : ScintillaView
    {
        // your iVars
    }
    
    // your properties / methods / whatever
    

    Now, as for the implementation part, remember to put some initialization method to set up the view properly (as in the example accompanying Scintilla-cocoa; I mean the Test project)


    Sidenote : Of course, you can create subclasses, categories or whatever on top the ScintillaView class, pretty much based on what you need – I, for example, have create a separate Category just in order to group there some ScintillaView specific commands (sooner or later, you’ll notice that for some more advanced Scintilla manipulations, although it’s there, it may need some polishing to be a bit more cocoa-friendly, so here you go…)


    Now, last but not least…

    To resolve the "bunch of errors related to the C++ class keyword and so on", as I’ve shown in my other video-response to your comment, all you have to do is :

    • Go to your project’s Build Settings
    • Under Apple LLVM Compiler 3.0 – Preprocessing
    • Option Preprocessor Macros
    • Add to both Debug and Release :

      SCI_NAMESPACE SCI_LEXER
      

    And that’s it. 🙂


    Hint : The above are defined by Scintilla to avoid clashes between C and non-C elements, like above… so, all it takes is to notify the preprocessor and the rest is taken care of….

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this bug in Obj-C that is caused because the program is trying
Do I have to use CoreAudio for this? Is there any simple way that
I have a client and server program (both in Obj-C) and I am transferring
I am trying to remake a program I have made in C# in OBJ-C.In
I received a crash. I have a very interesting exceptions. What is it? objc[4841]:
I have several obj-c classes, each of which require a number of constants that
I've taught myself Obj-C, and have been self-teaching Cocoa, but adding Core Data to
Have just started converting an existing job tracking system into an ASP.NET MVC application.
Without any preamble I want to show you problem I have in my program,
I am using Xcode to create an Objective-C, cocoa, mac app. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.