Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State up front that there are two products #81

Open
ayrtonsoftware opened this issue Nov 2, 2023 · 1 comment
Open

State up front that there are two products #81

ayrtonsoftware opened this issue Nov 2, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@ayrtonsoftware
Copy link

ayrtonsoftware commented Nov 2, 2023

When I try to compile the code, I get:

Cannot find type 'TextLocated' in scope

`
import SwiftUI
import CodeEditorView

struct MyCodeEditorView: View {
@State private var text: String = "My awesome code..."
@State private var position: CodeEditor.Position = CodeEditor.Position()
@State private var messages: Set<TextLocated> = Set()

@Environment(\.colorScheme) private var colorScheme: ColorScheme

var body: some View {
  CodeEditor(text: $text, position: $position, messages: $messages, language: .swift)
    .environment(\.codeEditorTheme,
                 colorScheme == .dark ? Theme.defaultDark : Theme.defaultLight)
}

}
`

@mchakravarty
Copy link
Owner

The package includes two products: (1) CodeEditorView and (2) LanguageSupport. The missing symbol is located in the second product — i.e., you need to import that, too.

This needs to be better explained in the documentation. I will keep this issue open to remind me of that. (I'll also rename it.) Thanks for the feedback!

@mchakravarty mchakravarty changed the title Compile Errors: TextLocated not found State up front that they are two products Nov 5, 2023
@mchakravarty mchakravarty added the documentation Improvements or additions to documentation label Nov 5, 2023
@mchakravarty mchakravarty changed the title State up front that they are two products State up front that there are two products Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants