B4XDev Active Member Licensed User Aug 8, 2022 #1 I added a new Sub to the DesignerUtils.B4XLib module, but the Sub I added does not seem to be seen by the IDE. What's the proper way to go about modifying a B4XLib? I tried refreshing the Libraries Manager and closing the IDE and re-opening the project. Neither one caused my new Sub to be seen by the IDE. I tried searching the forum for "modify b4xlib" and "edit b4xlib" and got no useful hits.
I added a new Sub to the DesignerUtils.B4XLib module, but the Sub I added does not seem to be seen by the IDE. What's the proper way to go about modifying a B4XLib? I tried refreshing the Libraries Manager and closing the IDE and re-opening the project. Neither one caused my new Sub to be seen by the IDE. I tried searching the forum for "modify b4xlib" and "edit b4xlib" and got no useful hits.
LucaMs Expert Licensed User Longtime User Aug 9, 2022 #2 [Assuming that you should not modify official libraries - they are created by Anywhere Software and are in the Libraries folder - but if you really want to do it, it is better to make a copy, modify it, change its name and put it in the additional libraries folder (/AdditionalLibs/B4X)]... B4XDev said: What's the proper way to go about modifying a B4XLib? Click to expand... Just as simply as I suppose you did. Unzip the B4XLib file, add your new Public Sub to a code or class module, zip again the library and, if the IDE is open, refresh the Libraries Manager tab. If you don't see the change you made, you probably haven't placed the B4XLib in the right folder. In the case of this DesignerUtils.b4xlib there are 3 copies of it, one for each platform, in the Libraries folder of each installation (but, again, it is much better that you create your own version as I wrote at the beginning of this post ). It is also possible that you have put your modified DesignerUtils.b4xlib in the /AdditionalLibs/B4X folder; in this case in the Libraries Manager tab you would see only the original, internal one, which is prevalent. Last edited: Aug 9, 2022 Upvote 0
[Assuming that you should not modify official libraries - they are created by Anywhere Software and are in the Libraries folder - but if you really want to do it, it is better to make a copy, modify it, change its name and put it in the additional libraries folder (/AdditionalLibs/B4X)]... B4XDev said: What's the proper way to go about modifying a B4XLib? Click to expand... Just as simply as I suppose you did. Unzip the B4XLib file, add your new Public Sub to a code or class module, zip again the library and, if the IDE is open, refresh the Libraries Manager tab. If you don't see the change you made, you probably haven't placed the B4XLib in the right folder. In the case of this DesignerUtils.b4xlib there are 3 copies of it, one for each platform, in the Libraries folder of each installation (but, again, it is much better that you create your own version as I wrote at the beginning of this post ). It is also possible that you have put your modified DesignerUtils.b4xlib in the /AdditionalLibs/B4X folder; in this case in the Libraries Manager tab you would see only the original, internal one, which is prevalent.
hatzisn Expert Licensed User Longtime User Aug 9, 2022 #4 Maybe you should use the tool "b4xlib2XML" to recreate the XML file of the b4xlib (and of course place it where the original is) but it does not seem to be this the case as it is written in the following link: [Tool] b4xlib - XML generation b4xlibs do not require an XML file. The IDE parses the packed code modules. With this tool you can generate the XML from the packed source code. It is useful for documentation purposes as there are tools that expect this XML. For example... www.b4x.com Also make sure you have set the accessibility/scope of the sub to public as @aeric already said. Last edited: Aug 9, 2022 Upvote 0
Maybe you should use the tool "b4xlib2XML" to recreate the XML file of the b4xlib (and of course place it where the original is) but it does not seem to be this the case as it is written in the following link: [Tool] b4xlib - XML generation b4xlibs do not require an XML file. The IDE parses the packed code modules. With this tool you can generate the XML from the packed source code. It is useful for documentation purposes as there are tools that expect this XML. For example... www.b4x.com Also make sure you have set the accessibility/scope of the sub to public as @aeric already said.
klaus Expert Licensed User Longtime User Aug 9, 2022 #5 hatzisn said: Maybe you should use the tool "b4xlib2XML" to recreate the XML file of the b4xlib (and of course place it where the original is) but it does not seem to be this the case as it is written in the following link: Click to expand... No, xml are not needed with b4xlibs ! xml files for b4xlibs are only useful if you use help tools like B4X Help Viewer. You should never copy b4xlibs xml files into any Libaries folder but in a specific folder. By the way, this is the recommended structure for the Additional libraries: The Additional Libraries folder must have following structure: B4A, B4i, B4J and B4J, one folder for each platform. B4X, one folder for the b4xlib libraries. B4XlibXMLFiles, folder for b4xlib XML help files, if used. And in the path configuration only this: D:\B4X\ may be different, it is the parent folder where you defined the AdditionalLibraries folder. The IDEs recognize automatically their platform folder and the B4X folder. Upvote 0
hatzisn said: Maybe you should use the tool "b4xlib2XML" to recreate the XML file of the b4xlib (and of course place it where the original is) but it does not seem to be this the case as it is written in the following link: Click to expand... No, xml are not needed with b4xlibs ! xml files for b4xlibs are only useful if you use help tools like B4X Help Viewer. You should never copy b4xlibs xml files into any Libaries folder but in a specific folder. By the way, this is the recommended structure for the Additional libraries: The Additional Libraries folder must have following structure: B4A, B4i, B4J and B4J, one folder for each platform. B4X, one folder for the b4xlib libraries. B4XlibXMLFiles, folder for b4xlib XML help files, if used. And in the path configuration only this: D:\B4X\ may be different, it is the parent folder where you defined the AdditionalLibraries folder. The IDEs recognize automatically their platform folder and the B4X folder.
teddybear Well-Known Member Licensed User Aug 9, 2022 #6 B4XDev said: I added a new Sub to the DesignerUtils.B4XLib module, but the Sub I added does not seem to be seen by the IDE. What's the proper way to go about modifying a B4XLib? Click to expand... It maybe have 2 reasons: 1.you have 2 DesignerUtils.B4XLib, one is in internal file folder, another is in additional libraries folder, you edited another. 2.as aeric said, you defined the sub is private, you will not see it by ide. Upvote 0
B4XDev said: I added a new Sub to the DesignerUtils.B4XLib module, but the Sub I added does not seem to be seen by the IDE. What's the proper way to go about modifying a B4XLib? Click to expand... It maybe have 2 reasons: 1.you have 2 DesignerUtils.B4XLib, one is in internal file folder, another is in additional libraries folder, you edited another. 2.as aeric said, you defined the sub is private, you will not see it by ide.
B4XDev Active Member Licensed User Aug 9, 2022 #7 LucaMs said: If you don't see the change you made, you probably haven't placed the B4XLib in the right folder. Click to expand... Ah, OK. I had downloaded the library, but there's already an interal library. Unfortunately, I cannot easily edit the internal one because of Windows file system permissions. That's easy enough to work-around, though... LucaMs said: In the case of this DesignerUtils.b4xlib there are 3 copies of it, one for each platform, in the Libraries folder of each installation (but, again, it is much better that you create your own version as I wrote at the beginning of this post ). Click to expand... I'm adding a simple Sub that should be in the library. Maybe it already exists. I'll start another thread about it. Upvote 0
LucaMs said: If you don't see the change you made, you probably haven't placed the B4XLib in the right folder. Click to expand... Ah, OK. I had downloaded the library, but there's already an interal library. Unfortunately, I cannot easily edit the internal one because of Windows file system permissions. That's easy enough to work-around, though... LucaMs said: In the case of this DesignerUtils.b4xlib there are 3 copies of it, one for each platform, in the Libraries folder of each installation (but, again, it is much better that you create your own version as I wrote at the beginning of this post ). Click to expand... I'm adding a simple Sub that should be in the library. Maybe it already exists. I'll start another thread about it.
aeric Expert Licensed User Longtime User Aug 9, 2022 #8 I think an easier quick check is to write your modified library with another version number. Untick the library and tick again. What version number does it show and does it show as Internal or Additional for the Path? Upvote 0
I think an easier quick check is to write your modified library with another version number. Untick the library and tick again. What version number does it show and does it show as Internal or Additional for the Path?
B4XDev Active Member Licensed User Aug 9, 2022 #9 My DesignerUtils.b4xlib version shows 1.03, and online shows 1.04. Not sure how to update an internal library... Is it just a matter of downloading and placing the updated b4xlib in the right place? Upvote 0
My DesignerUtils.b4xlib version shows 1.03, and online shows 1.04. Not sure how to update an internal library... Is it just a matter of downloading and placing the updated b4xlib in the right place?
aeric Expert Licensed User Longtime User Aug 9, 2022 #10 B4XDev said: My DesignerUtils.b4xlib version shows 1.03, and online shows 1.04. Not sure how to update an internal library... Is it just a matter of downloading and placing the updated b4xlib in the right place? Click to expand... Test change the version in manifest.txt as 1.05 and see if the IDE loads it as your version. If not then meaning the IDE is not reading your library or you place the file in the wrong place. Take note the path which give you the hint where the IDE actually load the library from. On the other hand, the online version shows a bigger version mean there is a new version of this library. Upvote 0
B4XDev said: My DesignerUtils.b4xlib version shows 1.03, and online shows 1.04. Not sure how to update an internal library... Is it just a matter of downloading and placing the updated b4xlib in the right place? Click to expand... Test change the version in manifest.txt as 1.05 and see if the IDE loads it as your version. If not then meaning the IDE is not reading your library or you place the file in the wrong place. Take note the path which give you the hint where the IDE actually load the library from. On the other hand, the online version shows a bigger version mean there is a new version of this library.
LucaMs Expert Licensed User Longtime User Aug 9, 2022 #11 B4XDev said: My DesignerUtils.b4xlib version shows 1.03, and online shows 1.04. Not sure how to update an internal library... Is it just a matter of downloading and placing the updated b4xlib in the right place? Click to expand... Yes. Download it from the thread that will be opened by clicking on 1.04. You will find the b4xlib there and as it is an internal library, you will have to copy it to the ....../B4A/Libraries and to ..../ B4J/Libraries and to .../B4I/Libraries. This is because it is a B4XLib that can be used on all three platforms but this is not always the case; it might only be written for one or two platforms or not be a B4XLib and therefore created specifically for one platform (a .jar + .xml file). But don't change that library! If you change it, then when Erel upgrades his to a later version, you will lose your changes! Get it, change its name, add your changes and then put it in the additional libraries folders (....../AdditionalLibs/B4X). Upvote 0
B4XDev said: My DesignerUtils.b4xlib version shows 1.03, and online shows 1.04. Not sure how to update an internal library... Is it just a matter of downloading and placing the updated b4xlib in the right place? Click to expand... Yes. Download it from the thread that will be opened by clicking on 1.04. You will find the b4xlib there and as it is an internal library, you will have to copy it to the ....../B4A/Libraries and to ..../ B4J/Libraries and to .../B4I/Libraries. This is because it is a B4XLib that can be used on all three platforms but this is not always the case; it might only be written for one or two platforms or not be a B4XLib and therefore created specifically for one platform (a .jar + .xml file). But don't change that library! If you change it, then when Erel upgrades his to a later version, you will lose your changes! Get it, change its name, add your changes and then put it in the additional libraries folders (....../AdditionalLibs/B4X).