iOS Question B4IPanelWrapper.......class is not key value coding-compliant

GEoffT

Member
Licensed User
I am getting _
[<B4IPanelWrapper 0x145e06e0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key bi.
This occurs on the return statement at the end of this block of code.

When I| take this code out into a small test program it works ok, but not in my app. Any help greatly apprieciated as Ive just started to convert my app from B4A.

B4X:
Sub cliLabel(text As String,text2 As String, text3 As String) As Panel
   Dim p As Panel
   p.Initialize("")
   p.Color=Colors.DarkGray
   p.Left = 0%x
   p.Top= 0%y
     Dim l As Label
     l.Initialize("")
     l.text = text
     l.SizeToFit
     l.TextColor = Colors.Yellow
     p.AddView(l,38%x,1dip,8%x,25dip)
     Dim l2 As Label
     l2.Initialize("")
     l2.text = text2
     l2.SizeToFit
     l2.TextColor = Colors.Yellow
     p.AddView(l2,82%x,1dip,8%x,25dip)
     Dim l3 As Label
     l3.Initialize("")
     l3.text = text3
     l3.SizeToFit
     l3.TextColor = Colors.Yellow
     p.AddView(l3,90%x,1dip,8%x,25dip)
   Return p
  
End Sub
 
Last edited:

GEoffT

Member
Licensed User
Thanks Erel,

Complete log:

Copying updated assets files (23)
Application_Start
Application_Active
sql1 is initialized = true
04 11 2016
2016
Error occurred on line: 620 (ScoringX10)
[<B4IPanelWrapper 0x15544d20> valueForUndefinedKey:]: this class is not key value coding-compliant for the key bi.
Stack Trace: (
CoreFoundation <redacted> + 154
libobjc.A.dylib objc_exception_throw + 38
CoreFoundation <redacted> + 0
Foundation <redacted> + 262
Foundation <redacted> + 200
ToxToolBox -[B4IShell getField] + 160
ToxToolBox -[B4IShell raiseEventImpl:method:args::] + 2168
ToxToolBox -[B4IShellBI raiseEvent:event:params:] + 1442
ToxToolBox +[B4IDebug delegate:::] + 52
ToxToolBox -[b4i_scoringx10 _show] + 658
ToxToolBox -[b4i_chooseround _btncontinue_click] + 796
CoreFoundation <redacted> + 68
CoreFoundation <redacted> + 282
ToxToolBox +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1784
ToxToolBox -[B4IShell runMethod:] + 574
ToxToolBox -[B4IShell raiseEventImpl:method:args::] + 2212
ToxToolBox -[B4IShellBI raiseEvent:event:params:] + 1442
ToxToolBox __33-[B4I raiseUIEvent:event:params:]_block_invoke + 74
libdispatch.dylib <redacted> + 10
libdispatch.dylib <redacted> + 22
libdispatch.dylib <redacted> + 254
CoreFoundation <redacted> + 8
CoreFoundation <redacted> + 1300
CoreFoundation CFRunLoopRunSpecific + 522
CoreFoundation CFRunLoopRunInMode + 106
GraphicsServices GSEventRunModal + 138
UIKit UIApplicationMain + 1136
ToxToolBox main + 106
libdyld.dylib <redacted> + 2
)
 

GEoffT

Member
Licensed User
B4X:
Public Sub Show
   'Do not forget to load the layout file created with the visual designer. For example:
   If pg.IsInitialized = False Then
     pg.Initialize("pg")
     pg.RootPanel.LoadLayout("ScoringX10")
   End If
   
   Main.Navcontrol.NavigationBarVisible = True
   Main.NavControl.ShowPage(pg)
   If Main.rID <7 Then
     clv1.Add(cliLabel("ET","ET","DZ"),24dip,"")
   Else
     If Main.rID = 7 Then
       clv1.Add(cliFieldLabel("Total","RT", "5s", "6s"),24dip,"")
     Else
       clv1.Add(cli3DLabel("Target","RT", "Arrow1 - Kill", "- Wound"),24dip,"")
     End If
   End If
   
   listEndArrowValues.Initialize
   listArrowValues.Initialize
 
Top