BPak Active Member Licensed User Longtime User Jan 31, 2014 #1 I have an error with inconvertible type when trying to call a sub for CloseRequest. MainForm_CloseRequest(Me) 'src\b4j\example\main.java:106: error: inconvertible types MainForm_CloseRequest B4X: Sub ExitMnu_Action MainForm_CloseRequest(Me) ' inconvertible types End Sub Sub MainForm_CloseRequest (EventData As Event) DM.SQL1.Close MainForm.Close End Sub What would be the correct Param to use with MainForm_CloseRequest(?)
I have an error with inconvertible type when trying to call a sub for CloseRequest. MainForm_CloseRequest(Me) 'src\b4j\example\main.java:106: error: inconvertible types MainForm_CloseRequest B4X: Sub ExitMnu_Action MainForm_CloseRequest(Me) ' inconvertible types End Sub Sub MainForm_CloseRequest (EventData As Event) DM.SQL1.Close MainForm.Close End Sub What would be the correct Param to use with MainForm_CloseRequest(?)
Daestrum Expert Licensed User Longtime User Feb 1, 2014 #2 Could you not just make a new sub called CloseMain and call that. I don't think 'Me' is an Event, which could explain the message. ie. B4X: Sub CloseMain DM.SQL1.Close MainForm.Close End Sub Upvote 0
Could you not just make a new sub called CloseMain and call that. I don't think 'Me' is an Event, which could explain the message. ie. B4X: Sub CloseMain DM.SQL1.Close MainForm.Close End Sub
BPak Active Member Licensed User Longtime User Feb 1, 2014 #3 Yes. It could be called from both the event and the ExitMnu_Action. Thank you. Upvote 0