iOS Question [SOLVED ?] - Copy and paste designer elements between B4A and B4I platforms

Sergio Haurat

Active Member
Licensed User
Longtime User
No matter which option I enter in the application, whenever it wants to load a new B4XPage in B4I, the execution breaks


*** frmxedituser: B4XPage_Created [mainpage]
Error occurred on line: 467 (AS_TextFieldAdvanced)
Target is null. Method called: _initialize:::

*** frmxfilter: B4XPage_Created [mainpage]
Error occurred on line: 53 (B4XComboBox)
Target is null. Method called: _initialize:::

Complete log error:
 
Solution
I finally got it working. This is my analysis, it is speculative and should be corroborated by trying to simulate what I write below in some other project.

If you start your development in B4A and need to make your version in B4I (or B4J), you can copy and paste all the components (text box, panel, image and other compatible elements) of a B4XPage, and thus not perform this design task twice.

You can click in the abstract designer area and press the key combination on the keyboard Control + A to "select all" and Control + C to "copy" to the clipboard.

You must go to the designer in B4I and in its B4XPage version press Control + V to “paste” the contents of the clipboard. As you can see in image 1, it selects all...

Sergio Haurat

Active Member
Licensed User
Longtime User
You can easily check this by clicking on a custom view and if the type does not contain the name of the view, but "Panel", then you know that something was wrong when you inserted it.
@Alexander Stolte, thanks for your answers and especially for your valuable time. I am currently trying to directly delete the .bil file from the disk and start over with one of the B4XPage pages since I cannot find, neither in the code nor in the designer, any difference beyond those of each operating system.
 
Last edited:
Upvote 0

Sergio Haurat

Active Member
Licensed User
Longtime User
Have you already tried B4XPages.AddPageAndCreate ?
Yes, I've tried that too. I'm already finishing rebuilding one of the B4XPages from scratch. Surely I didn't do something right and when I get stuck, I start again step by step, if I have already spent a lot of time trying to solve something that I can't.
 
Upvote 0

Sergio Haurat

Active Member
Licensed User
Longtime User
I finally got it working. This is my analysis, it is speculative and should be corroborated by trying to simulate what I write below in some other project.

If you start your development in B4A and need to make your version in B4I (or B4J), you can copy and paste all the components (text box, panel, image and other compatible elements) of a B4XPage, and thus not perform this design task twice.

You can click in the abstract designer area and press the key combination on the keyboard Control + A to "select all" and Control + C to "copy" to the clipboard.

You must go to the designer in B4I and in its B4XPage version press Control + V to “paste” the contents of the clipboard. As you can see in image 1, it selects all components, but not those that are inherited within a panel. Pasting into B4I shows all components, including unselected ones inherited in the panels. Visually you can also see them in B4I ?

I repeat, and only because my opinion is free and can be 100% invalid, I say that something is not copied to clipboard

To make it work in my case, as you can see in image 2, I had to go to the View Tree panel and press Control+A twice to select all the rows except the first one, Activity. Next, I deleted all the content of the page in B4I and then pasted using Control+V on the keyboard, the contents of the clipboard.




Image 1: Control+A (select all) from Abstract Designer


Image 2: Double Control+A from Views Tree
 
Upvote 0
Solution
Cookies are required to use this site. You must accept them to continue using the site. Learn more…