I've been struggling with this for over half an hour now and I'm sure that it's somthing REALLY simple (which makes it even worse).
I've created a table and wish to add a new row each time a message is received. This is difficult to test and so for the time being I'm triggering the sub manually and just adding some values myself.
But this is where the problem starts.
Here's the snippet of code containing the problem...
As you can see, I've commented out sections that would normally grab the incoming SMS.Value and instead used some different variables.
Whenever I try to populate the table with any values other than null, the program errors.
WHY? What am I doing wrong?
I've even changed all the columns to cString which made no difference!
Attached is the full code which is most deffinately a work in progress.
Thanks,
RandomCoder
I've created a table and wish to add a new row each time a message is received. This is difficult to test and so for the time being I'm triggering the sub manually and just adding some values myself.
But this is where the problem starts.
Here's the snippet of code containing the problem...
B4X:
Sub Intercept_MessageReceived
[COLOR="Lime"]'Catch incoming messages
'SMS.Value = Intercept.ReceivedMessage
'TblSMSInbox.AddRow( SMS.DateReceived , SMS.From , SMS.Body )
'Added just for test purposes[/COLOR]
Received=Time(Now)
From="Joe Blogs"
Body="Hello"
TblSMSInbox.Visible=True
Msgbox(Received & " , " & From & " , " & Body )
[COLOR="lime"]'TblSMSInbox.AddRow( Received , From , Body ) [/COLOR] [COLOR="Red"]'THIS DOESNT WORK????????????[/COLOR]
TblSMSInbox.AddRow( "" ) [COLOR="red"]'THIS WILL WORK[/COLOR]
ShowSMS
End Sub
As you can see, I've commented out sections that would normally grab the incoming SMS.Value and instead used some different variables.
Whenever I try to populate the table with any values other than null, the program errors.
WHY? What am I doing wrong?
I've even changed all the columns to cString which made no difference!
Attached is the full code which is most deffinately a work in progress.
Thanks,
RandomCoder