iOS Question [solved] b4xpages class module is missing!

AymanA

Active Member
Licensed User
Hi All,

I have created b4xpages project, and I have the three folders with no problem following the tutorial; however when I try to create a new b4xPages class module I can not find an option to do this!

I tried to open the B4J and B4A file and I can see the b4xpages class module with no problem, so I am not sure why I can not see the same on B4i:

1603149266763.png


My current version is 6.80

1603149303084.png
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
That's true. The template is missing due to a (current) technical limitation.

The template is very simple. Add a regular class and set the code to:
B4X:
Sub Class_Globals
    Private Root As B4XView 'ignore
    Private xui As XUI 'ignore
End Sub

'You can add more parameters here.
Public Sub Initialize As Object
    Return Me
End Sub

'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    'load the layout to Root
    
End Sub

'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Class templates are text files stored inside the library jars. Usually there are no jars in B4i. If you take a look in the internal libraries folder you will see a few jars. These are containers for templates. The problem here is that the library itself is a b4xlib so this workaround doesn't work.
It can of course be solved in many other ways. It will be solved in the next version.
 
Upvote 0
Top