J J12345T Member Licensed User Oct 21, 2008 #1 Hi, I have compiled a project which runs perfectly well under B4PPC and compiles without error. When trying to execute the file however, I get the following error:- Unable to cast object of type 'del1' to type 'del0'. Any ideas? Thanks. JT
Hi, I have compiled a project which runs perfectly well under B4PPC and compiles without error. When trying to execute the file however, I get the following error:- Unable to cast object of type 'del1' to type 'del0'. Any ideas? Thanks. JT
Erel B4X founder Staff member Licensed User Longtime User Oct 21, 2008 #2 Can you upload your source code?
agraham Expert Licensed User Longtime User Oct 22, 2008 #4 It's this line Code: AddEvent("Imagebuttonsearch",click,"search") Event Subs cannot have parameters, that's the del0 bit. Your event Sub has one parameter, that's the del1 bit. You are trying to use a del1 type of Sub where a del0 type is expected.
It's this line Code: AddEvent("Imagebuttonsearch",click,"search") Event Subs cannot have parameters, that's the del0 bit. Your event Sub has one parameter, that's the del1 bit. You are trying to use a del1 type of Sub where a del0 type is expected.
Erel B4X founder Staff member Licensed User Longtime User Oct 22, 2008 #5 Event Subs cannot have parameters Click to expand... Just a small correction. The "added" event sub must have the same number of parameters as a similar event sub that was added by the designer. For most events there are no parameters at all.
Event Subs cannot have parameters Click to expand... Just a small correction. The "added" event sub must have the same number of parameters as a similar event sub that was added by the designer. For most events there are no parameters at all.
agraham Expert Licensed User Longtime User Oct 22, 2008 #6 Erel said: Just a small correction. The "added" event sub must have the same number of parameters as a similar event sub that was added by the designer. Click to expand... :signOops: I forgot that some "built-in" events did have parameters. I'm too used to dealing with events, mainly from libraries, that don't have parameters and need a different data passing mechanism (properties).:sign0013:
Erel said: Just a small correction. The "added" event sub must have the same number of parameters as a similar event sub that was added by the designer. Click to expand... :signOops: I forgot that some "built-in" events did have parameters. I'm too used to dealing with events, mainly from libraries, that don't have parameters and need a different data passing mechanism (properties).:sign0013:
J J12345T Member Licensed User Oct 23, 2008 #7 OK Thanks, I removed the (airline) parameter and it works now. JT