您的位置:首页 > 移动开发 > Objective-C

Re:Method does not have the same signature as delegate

2008-06-30 17:01 537 查看

Re:Method does not have the same signature as delegate

Here is the issue:
OsaJobCompleteEventArgs
EventArgs

You need to match by tweaking one side or the other. Either the event args
in the delegate needs to be less specific or the handler needs to be more
specific.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"vishakha.ganjoo@gmail.com" wrote:

Quote

' C Sharp function - Start
' private void id_ok_Click(object sender, EventArgs e)
'{
' try
' {
' _job = new
OsaScanJob((OsaSessionState)Session[OsaSessionState.MFPSession]);
' _job.Create();
' _job.Completed += new
Osa.BusinessObjects.Job.OsaJobCompleteEventHandler(job_Completed);

' _job.SetElements((Osa.Components.Metadata.MetadataCollection)Session["ScanSettingsMetadata"]);
' _job.Execute();
' }
' catch(Exception ex)
' {
' System.Diagnostics.Trace.Write("Error: " + ex.Message +
"innerException: " + ex.InnerException + "Stack trace: " +
ex.StackTrace);
' ShowTopLevelScreen();
' }
'}
' C Sharp function - End

Private Sub id_ok_Click(ByVal sender As Object, ByVal e As
EventArgs)
Try
_job = New
OsaScanJob(CType(Session(OsaSessionState.MFPSession), OsaSessionState))
_job.Create()
AddHandler _job.Completed, AddressOf Me.job_Completed
_job.SetElements(CType(Session("ScanSettingsMetadata"),
Osa.Components.Metadata.MetadataCollection))
_job.Execute()
Catch ex As Exception
System.Diagnostics.Trace.Write("Error:" + ex.Message +
"innerException:" + ex.InnerException.ToString() + "Stack trace:" +
ex.StackTrace)
ShowTopLevelScreen()
End Try
End Sub

It is giving me an error stating
Method 'Private Sub job_Completed(sender As Object, e As
System.EventArgs)' does not have the same signature as delegate
'Delegate Sub OsaJobCompleteEventHandler(sender As Object, e As
Osa.BusinessObjects.Job.OsaJobCompleteEventArgs)'...

Please let me know how can I rectify this error.

-

110630: drop down box and submit button on a form
110631: INSERT syntax using DRW
110632: How to avoid downloading a file directly from webserver ?
110633: User Control in a Placeholder
110634: FrontPage 2002 error message
110635: Publishing speed
110636: allow scripts or programs to run" button unavailable
110637: problem with outputstreaming
110638: Dim a dynamic name
110639: DataRow Collection?
110640: IIS is not serving aspx pages
110641: ASP.NET transactional framework
110642: Any forum / web site on how to create an online registration form?
110643: Errors installing FP2003 on XP SP2
110644: System.ComponentModel
110645: Change Namespace in ASP.Net 2.0
110646: Yahoo! Host and FP2003 Feedback Form
110647: Quick Newbie Question
110648: Cannot Publish Web In FP 2000
110649: error Default Web Site (stopped)
110650: Invicta Corduba Chronograph Mens Watch 3960
110651: Hyphens in URLs are rendered as "%2D" in IIS6
110652: Display an html or aspx page in front of all sites
110653: [urgent] how to output image in place
110654: basic-- server-side validation
110655: web service 401 unauthorized
110656: Themes and Hyperlink Colors
110657: how to import excel spreadsheet with formulas into frontpage 2002
110658: Form Variables
110659: New to tables
110660: Need Help With IIS / ASP / FPSE - New Visual Studio User
110661: Getting row data from listbox event in repeater.
110662: windows authentication and putting queried data into session state
110663: Block requests based on referrer?
110664: important query:::::
110665: FrontPage Publishing Security
110666: ASP.NET (thread safe? ) Page / DTS Package execution.
110667: http link alias
110668: Known MTX.EXE leak?
110669: Validation occurs when trying to clear a form!?
110670: Freeze Table Headers.
110671: deployment problems
110672: Importing site from Publisher
110673: WOW! I just won $1.000.000 dollars!!!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐