pliroforikos Active Member Licensed User Feb 23, 2021 #1 When we are creating a B4XPage a Root Object declared as B4XView and later in B4XPage_Created it says Root = Root1 and Root1 is also B4XView Can someone explain what Root or Root1 do and why we declare Root and then we say Root = Root1? B4X: Copy Sub Class_Globals Private Root As B4XView Private xui As XUI End Sub Public Sub Initialize End Sub Private Sub B4XPage_Created (Root1 As B4XView) Root = Root1 Root.LoadLayout("MainPage") End Sub
When we are creating a B4XPage a Root Object declared as B4XView and later in B4XPage_Created it says Root = Root1 and Root1 is also B4XView Can someone explain what Root or Root1 do and why we declare Root and then we say Root = Root1? B4X: Copy Sub Class_Globals Private Root As B4XView Private xui As XUI End Sub Public Sub Initialize End Sub Private Sub B4XPage_Created (Root1 As B4XView) Root = Root1 Root.LoadLayout("MainPage") End Sub
Erel B4X founder Staff member Licensed User Longtime User Feb 23, 2021 #2 1. B4XView is the default type for most views, especially when building cross platform solutions. 2. Root is the page's root panel. It needs to be created somewhere. It is created and managed by B4XPagesManager and passed to the page in the Created event. 3. Root = Root1 -> just a simple assignment of the root panel that was injected from B4XPagesManager.
1. B4XView is the default type for most views, especially when building cross platform solutions. 2. Root is the page's root panel. It needs to be created somewhere. It is created and managed by B4XPagesManager and passed to the page in the Created event. 3. Root = Root1 -> just a simple assignment of the root panel that was injected from B4XPagesManager.
pliroforikos Active Member Licensed User Feb 23, 2021 #3 So B4XView is a type not a class? B4XPagesManager is something we can't see just runs in background for as? When we say Root.LoadLayout("page2") we load the page2.bjl file from Files folder?
So B4XView is a type not a class? B4XPagesManager is something we can't see just runs in background for as? When we say Root.LoadLayout("page2") we load the page2.bjl file from Files folder?
Erel B4X founder Staff member Licensed User Longtime User Feb 23, 2021 #4 B4XView is a type (=class) from XUI library. Read more here: https://www.b4x.com/android/forum/threads/b4x-xui-cross-platform-native-ui-library.84359/#content B4XPagesManager is a class from B4XPages. B4XPages is a b4xlib = a library written in B4X. pliroforikos said: hen we say Root.LoadLayout("page2") we load the page2.bjl file from Files folder? Click to expand... Yes. The extension is less important and depends on the platform. [B4X] B4XPages - Cross platform and simple framework for managing multiple pages
B4XView is a type (=class) from XUI library. Read more here: https://www.b4x.com/android/forum/threads/b4x-xui-cross-platform-native-ui-library.84359/#content B4XPagesManager is a class from B4XPages. B4XPages is a b4xlib = a library written in B4X. pliroforikos said: hen we say Root.LoadLayout("page2") we load the page2.bjl file from Files folder? Click to expand... Yes. The extension is less important and depends on the platform. [B4X] B4XPages - Cross platform and simple framework for managing multiple pages
LucaMs Expert Licensed User Longtime User Feb 23, 2021 #5 Erel said: type (=class) Click to expand... Not in B4X; custom types are not classes, of course. pliroforikos said: When we say Root.LoadLayout("page2") we load the page2.bjl file from Files folder? Click to expand... This is what I want: "say" something and my sw writes the source code I will develop an app to get it (Android, because windows in italian would not work)
Erel said: type (=class) Click to expand... Not in B4X; custom types are not classes, of course. pliroforikos said: When we say Root.LoadLayout("page2") we load the page2.bjl file from Files folder? Click to expand... This is what I want: "say" something and my sw writes the source code I will develop an app to get it (Android, because windows in italian would not work)
pliroforikos Active Member Licensed User Feb 23, 2021 #6 LucaMs said: This is what I want: "say" something and my sw writes the source code I will develop an app to get it (Android, because windows in italian would not work) Click to expand... ? It's an expression in Greek and i translated in English. It's called GreekEnglish Language
LucaMs said: This is what I want: "say" something and my sw writes the source code I will develop an app to get it (Android, because windows in italian would not work) Click to expand... ? It's an expression in Greek and i translated in English. It's called GreekEnglish Language