You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a user puts an outside module (not built with the addin) into the modules subfolder, and the Attribute VB_Name is not the same as the file (or is missing in some odd cases), the build will fail.
Example:
User adds new module modSomething.bas into /modules/
Module has the `Attribute VB_Name = "modSomeThingElse"
User then builds.
Build will fail with Error 2489: "The Object 'modSomething' is not open within IDbComponent_Import
I'm not sure how best to deal with this; as fixing it would require parsing the header name and detecting a difference; we could add Catch(2489) to ask the user which name to use?
The text was updated successfully, but these errors were encountered:
That is an interesting scenario to consider. The average user may not realize that they can't simply rename the file and expect it to work in the build process. I do like the idea of trapping the error and providing them with an error message that clarifies how they need to fix it. It wouldn't be too hard to read the first few lines of the file and verify that the name matches before importing.
In my opinion, the user needs to make the decision on which name needs to be corrected, and we should leave that responsibility to them to prepare files in the proper format for importing.
I want to call out one subtle bug from mismatching file names. Git is case-sensitive while Windows isn't, which will then cause weird mismatches. For example, modCOMAddin aka modComAddin will not be handled correctly which can result in losing changes. We should definitely throw a warning if the lettercasing do not match.
If a user puts an outside module (not built with the addin) into the modules subfolder, and the
Attribute VB_Name
is not the same as the file (or is missing in some odd cases), the build will fail.Example:
modSomething.bas
into/modules/
IDbComponent_Import
I'm not sure how best to deal with this; as fixing it would require parsing the header name and detecting a difference; we could add Catch(2489) to ask the user which name to use?
The text was updated successfully, but these errors were encountered: