[new feature] Generate 'Create Type' Sub

Erel

B4X founder
Staff member
Licensed User
Longtime User
1hITEYnYZ4.gif
 

AnandGupta

Expert
Licensed User
Longtime User
Now that the B4A ide is becoming so powerful, the text editor I use is becoming irrelevant.
But I have this habit of key shortcuts from it.

So my idea/suggestion: "Key mapping" feature so that I may map bookmarking to different keys, as is my habit.

Regards,

Anand
 

stevel05

Expert
Licensed User
Longtime User
If the Type contains a map or List, will they be initialized? It can't know about our own Classes, will it refuse to create the sub if the type contains classes not in the core or other Types, or will it initialize then and leave us to fill in default data required?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Nothing needs to be initialized as all the fields are set. It also doesn't need to know too much about the fields types:
B4X:
Type TTT (X As Map, Ser As B4RSerializator)

B4X:
Public Sub CreateTTT (X As Map, Ser As B4RSerializator) As TTT
   Dim t1 As TTT
   t1.Initialize
   t1.X = X
   t1.Ser = Ser
   Return t1
End Sub

You can of course modify this sub as you need. For example if you want to remove some parameters and set them with default values.
 

stevel05

Expert
Licensed User
Longtime User
Ah yes of course, silly me.
 
Top