LWGShane Well-Known Member Licensed User Longtime User Jan 20, 2016 #1 I'm trying to copy a control named "CustomControl1" to whatever the user names the project in my app, the B4X Launcher. When I load the project, B4J displays a "Error Loading Module: CustomControl1".
I'm trying to copy a control named "CustomControl1" to whatever the user names the project in my app, the B4X Launcher. When I load the project, B4J displays a "Error Loading Module: CustomControl1".
Erel B4X founder Staff member Licensed User Longtime User Jan 20, 2016 #2 Not sure that I understand. More information please...
LWGShane Well-Known Member Licensed User Longtime User Jan 20, 2016 #3 I have a custom control project called "CustomControl" with a custom control module called "CustomControl1" in the files tab in my "B4X-Launcher" project. I'm trying to use File.Copy to copy those files to the name the user gives them. However, when I use fx.ShowExternalDocument to launch the project, B4J is unable to recognize the now renamed module. Image is attached. Attachments B4JBug.PNG 304.5 KB · Views: 631
I have a custom control project called "CustomControl" with a custom control module called "CustomControl1" in the files tab in my "B4X-Launcher" project. I'm trying to use File.Copy to copy those files to the name the user gives them. However, when I use fx.ShowExternalDocument to launch the project, B4J is unable to recognize the now renamed module. Image is attached.
LWGShane Well-Known Member Licensed User Longtime User Jan 20, 2016 #4 @Erel - Solved it! I added the following code to my project: Code: Dim POriginal As String = File.ReadString(Path, Name & ".b4j") Dim NewFile As String = POriginal.Replace("Module1=CustomControl1", "Module1=" & Name) File.WriteString(Path, Name & ".b4j", NewFile)
@Erel - Solved it! I added the following code to my project: Code: Dim POriginal As String = File.ReadString(Path, Name & ".b4j") Dim NewFile As String = POriginal.Replace("Module1=CustomControl1", "Module1=" & Name) File.WriteString(Path, Name & ".b4j", NewFile)