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

Custom Module Resolver #251

Open
furesoft opened this issue Jul 29, 2021 · 1 comment
Open

Custom Module Resolver #251

furesoft opened this issue Jul 29, 2021 · 1 comment
Labels

Comments

@furesoft
Copy link

I want to create my own module resolver to allow people to import different application objects. So do I have to use the export table or the module.Context property to make it available for importing from other scripts?

@nilproject
Copy link
Owner

You do not need to use Context.Module directly because of it is just one of context values uses for some internal purposes. But available for public access because of why not.
The central object of improt/export mechanism is ExportTable, but it has no public setter (there are some reasons for this).
Simple way to do this is create a module with "application objects" defined in its Context, then write (or generate) a script with lines like "export Forms; export Web; Export BlaBla;". One per each defined object. After this you can return this module as result of TryGetModule.
Also see this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants