Android Question sender and tag problem with NiceSpinner

mohammadreza hosseinzadeh

Member
Licensed User
hi there
i use this library and it is not working with tag and sender

i use to set tag in view coding
and in item click event i want to use sender but an error apear and said
B4X:
Compiling debugger engine code.    (2.00s)
Compiling generated Java code.    Error
B4A line: 245
Dim spin As NiceSpinner=Sender
javac 1.8.0_51
src\com\simurgh\parparouk\matn.java:1271: error: cannot find symbol
_spin.setObject((main.java.org.angmarch.views.NiceSpinner)(anywheresoftware.b4a.keywords.Common.Sender(mostCurrent.activityBA)));
                     ^
  symbol:   class java
  location: class main
and here is my sub
B4X:
dim spiner as nicespinner
spiner.Initialize("spiner")
spiner.Tag=i

Sub spiner_item_clicked
  Dim spin As NiceSpinner=Sender
    Log(spin.SelectedIndex)
End Sub
tnx for helping:):)
 

DonManfred

Expert
Licensed User
I think you may have a spelling error. Should "spin" in the subroutine actually be "spiner"?
No. You can name it like you want if you just getting a reference to the original Object with Sender. The Object itself is important, not it´s variablename when defined.
 

mohammadreza hosseinzadeh

Member
Licensed User
I think you may have a spelling error. Should "spin" in the subroutine actually be "spiner"?
No. You can name it like you want if you just getting a reference to the original Object with Sender. The Object itself is important, not it´s variablename when defined.
tnx for answers
but when i do this i get this error
its not my first time to do tag and sender
i thing the nice spinner wrapper in lib has some problem
it would be great if anyone fix this or help me how to figure it out
 
Top