Table of Contents

Class Errors

Namespace
Alternet.Scripter.Debugger.UI
Assembly
Alternet.Scripter.Debugger.UI.v9.dll

Displays list of compiler errors and warnings.

[ToolboxBitmap(typeof(Errors), "Images.Errors.Icon.bmp")]
public class Errors : UserControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl, IUpdate
Inheritance
Errors
Implements

Examples

Here is how to declare a Errors and handle its events from the C# code:

public partial class Form1 : Form
{
    private void Form1_Load(object sender, EventArgs e)
    {
        var errorsControl = new Alternet.Scripter.Debugger.UI.Errors();
        errorsControl.Dock = System.Windows.Forms.DockStyle.Fill;
        errorsControl.Debugger = debugger;
        errorsControl.ErrorClick += ErrorsControl_ErrorClick;
    }

    private void ErrorsControl_ErrorClick(object sender, Alternet.Scripter.Debugger.UI.ErrorClickEventArgs e)
    {
        System.Windows.Forms.MessageBox.Show(e.Error.Message);
    }
}

Here is how to declare a Errors and handle its events from the Visual Basic code:

Partial Public Class Form1
    Inherits Form

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
        Dim errorsControl = New Alternet.Scripter.Debugger.UI.Errors()
        errorsControl.Dock = System.Windows.Forms.DockStyle.Fill
        errorsControl.Debugger = debugger
        AddHandler errorsControl.ErrorClick, AddressOf ErrorsControl_ErrorClick
    End Sub

    Private Sub ErrorsControl_ErrorClick(ByVal sender As Object, ByVal e As Alternet.Scripter.Debugger.UI.ErrorClickEventArgs)
        System.Windows.Forms.MessageBox.Show(e.[Error].Message)
    End Sub
End Class

Remarks

Errors is a visual control that displays a list of compilation errors when compiling the script.

The most important properties of the Errors are:

The Debugger property defines the ScriptDebugger instance, which compilation errors are displayed by the Errors control.

The SelectedError property represents the currently selected syntax error.

Constructors

Errors()

Initializes a new instance of the Errors class with default settings.

Fields

lvErrorList
sslErrors
sslWarning
statusStrip1
toolStripStatusLabel1

Properties

Debugger

Gets or sets IScriptDebuggerBase which errors will be displayed by this user control.

SelectedError

Gets currently selected error.

UpdateCount

When implemented by a class, keeps track of calls to BeginUpdate and EndUpdate so that they can be nested.

Methods

AddCompilerError(ScriptCompilationDiagnostic)

Adds specified error to the error's collection.

AddCompilerErrors(ScriptCompilationDiagnostic[])

Adds specified errors to the error's collection.

BeginUpdate()

Prevents updating until calling EndUpdate method.

Clear()

Clears error list.

DisableUpdate()

Prevents updating until calling EnableUpdate method.

Dispose(bool)

Clean up any resources being used.

EnableUpdate()

Re-enables object state updating, that was turn of by calling DisableUpdate method. Using DisableUpdate/EnableUpdate to prevent notifying about updating the object state.

EndUpdate()

Re-enables updating, that was turn of by calling BeginUpdate method.

Localize()

Localizes string resources.

Reset()

Resets user control to it's default state.

Update()

When implemented by a class, updates an object state.

Events

ErrorClick

When implemented by a class, occurs when a user clicks on the compiler error or warning.