rokucommunity / vscode-brightscript-language

A Visual Studio Code extension for Roku's BrightScript language
MIT License
110 stars 41 forks source link

Work with the component Library in Visual Studio #288

Closed M-VINOTH closed 3 years ago

M-VINOTH commented 3 years ago

Hello All,

Work with the component library in Visual Studio

I started to use the VS Code for development, here I have some doubt about ComponentLibrary and componentLibrariesPort.

CreateObject("roSGNode","LOCAL_COMPONENT_LIBRARY_ID:COMPONENT_NAME"),

it's throwing an error: BRIGHTSCRIPT: ERROR: roSGNode: Failed to create roSGNode with type FormFields invalid

  1. How to access the local ComponentLibrary in a development project? do we have a way to load the component library? or always need to host the zip file on the server?

  2. What about the componentLibrariesPort? how does it work in VS Code?

TwitchBronBron commented 3 years ago

Component library support in the extension is limited to debugging entirely local copies of the component library. The workflow in the extension is something like this:

  1. package the main app
  2. package each component library as specified by the componentLibraries object
  3. start up an http server, and serve up the component libraries from the local packages

With this approach, you need to explicitly reference the component libraries using http://localhost:${whateverPortIsSpecifiedInComponentLibrariesPort}/${nameofComponentLibrary} in your main app code.

@chrisdp can help better troubleshoot your issues since he's one of the primary contributors of the component library features.

TwitchBronBron commented 3 years ago

Closing due to lack of activity.