Code Monkey home page Code Monkey logo

Comments (9)

ruddfawcett avatar ruddfawcett commented on May 24, 2024 1

@curtisbacon It should be on master. Let me check out what's happening with this one sec.

from notepad.

ruddfawcett avatar ruddfawcett commented on May 24, 2024

Is your usage a simple import and then trying to initialize?

from notepad.

curtisbacon avatar curtisbacon commented on May 24, 2024

That is correct

from notepad.

curtisbacon avatar curtisbacon commented on May 24, 2024

Also, you know if the commit 319710a regarding the cocoapods theme loading was pushed to the master branch? Or is it part of a different branch? Thanks a lot btw.

from notepad.

ruddfawcett avatar ruddfawcett commented on May 24, 2024

Hey, @curtisbacon, can you send me some more details about your usage?

from notepad.

curtisbacon avatar curtisbacon commented on May 24, 2024

Hi @ruddfawcett sorry for getting back late.

  • Working with Swift 3.3
  • Running cocoapods 1.5.3 (the Latest version I believe)
  • Using Notepad (0.2.4)

` var editor: UITextView!

override func viewDidLoad() {
    super.viewDidLoad()
    
    editor = Notepad(self.boundsView.bounds, themeFile: "one-dark")
    editor.backgroundColor = Constants.kDarkGrayBackgroundColor
    editor.layer.borderWidth = 1
    editor.layer.borderColor = Constants.userTypeBasedColor().cgColor

    self.boundsView.addSubview(editor)

This usage promotes the error

initializer is inaccessible due to 'internal' protection level

Also, I cannot access the themeFile as requested in commit 319710a regarding the cocoapods theme loading. So the initialisation of the one-dark theme does not work.

I have temporarily fixed these issues by editing the pod files directly, but obviously, this isn't a long-term solution.

from notepad.

curtisbacon avatar curtisbacon commented on May 24, 2024

It doesn't look like the latest release 0.2.4 contains the changes mentioned in the above commit - Theme.swift still contains:
if let path = Bundle(for: object_getClass(self)).path(forResource: "Notepad.framework/themes/\(name)", ofType: "json") { if let data = convertFile(path) { configure(data) } }

Rather than:

`
let bundle = Bundle(for: object_getClass(self))

    let path: String
    
    if let path1 = bundle.path(forResource: "Notepad.framework/themes/\(name)", ofType: "json") {
        
        path = path1
    }
    else if let path2 = bundle.path(forResource: "Notepad.framework/\(name)", ofType: "json") {
        
        path = path2
    }
    else {
        
        print("[Notepad] Unable to load your theme file.")
        
        return
    }
    
    if let data = convertFile(path) {
        
        configure(data)
    }`

from notepad.

ruddfawcett avatar ruddfawcett commented on May 24, 2024

@curtisbacon thanks for this. I am out this week, so do you think you can open a PR? I can review and merge in remotely.

from notepad.

curtisbacon avatar curtisbacon commented on May 24, 2024

@ruddfawcett Sorry for the delay! I believe master is up to date with the changes. You just need to submit a new release

from notepad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.