Wish Things that are better if it is

alirezahassan

Member
Licensed User
hi all,
1. I think it would be better if such a thing happened (new CallSubDelayed): for ex.
B4X:
CallSubDelayed(M_Main,"Refresh",array as object(ImageView,1,"Titel"))
...M_Main
sub Refresh(img as ImageView,kind as int, text as string)

end sub

2. The B4J Log is better look like a b4a log
B4j

2021-10-08_12-09-12.png

B4a
2021-10-08_12-14-19.png


3. I think this is a bug
B4X:
    Dim PNL As Pane
    PNL.Initialize("")
    MainForm.RootPane.AddNode(PNL,0,0,30dip,30dip)
    Log(PNL.Width) ' log -> 0 !
 

behnam_tr

Active Member
Licensed User
hi all,
1. I think it would be better if such a thing happened (new CallSubDelayed): for ex.
B4X:
CallSubDelayed(M_Main,"Refresh",array as object(ImageView,1,"Titel"))
...M_Main
sub Refresh(img as ImageView,kind as int, text as string)

end sub

in customview i use this code
B4X:
#Event: SelectedChanged3 (Result as MySubType)

Sub Class_Globals
    Private mEventName As String 'ignore
    Private mCallBack As Object 'ignore
    Public mBase As B4XView
    
    Type MySubType (index As Int, ItemTex As String, ItemValue As Object)

End Sub

Private Sub RaiseEvent

    Dim p As MySubType
    p.Initialize
    p.index = Index
    p.ItemTex = Item
    p.ItemValue = mmapValues.Get(Item)
    
    CallSubDelayed2(mCallBack, mEventName & "_SelectedChanged3", p)
    
End Sub

'in B4x
Private Sub Eventname_SelectedChanged3 (Result As MySubType)
    Log(Result.index)
    Log(Result.ItemTex)
    Log(Result.ItemValue)
End Sub
 

ilan

Expert
Licensed User
hi all,
1. I think it would be better if such a thing happened (new CallSubDelayed): for ex.
B4X:
CallSubDelayed(M_Main,"Refresh",array as object(ImageView,1,"Titel"))
...M_Main
sub Refresh(img as ImageView,kind as int, text as string)

end sub

2. The B4J Log is better look like a b4a log
B4j

View attachment 120039
B4a
View attachment 120040

3. I think this is a bug
B4X:
    Dim PNL As Pane
    PNL.Initialize("")
    MainForm.RootPane.AddNode(PNL,0,0,30dip,30dip)
    Log(PNL.Width) ' log -> 0 !

use PrefWidth instead of Width

B4X:
    Dim PNL As Pane
    PNL.Initialize("")
    MainForm.RootPane.AddNode(PNL,0,0,30dip,30dip)
    Log(PNL.PrefWidth) ' log -> 30 !

1634211357711.png
 
Top