Wiki

Ticket #274: bug.cobra

File bug.cobra, 1.0 KB (added by torial, 14 years ago)

Most basic set of source code to reproduce the error.

Line 
1%% args -ref:System.Xml -ref:System.Drawing
2
3use System.Windows.Forms #from "System.Windows.Forms"
4use System.Xml #from "System.Xml"
5use System.Text.RegularExpressions
6use System.Drawing
7use Alsing.SourceCode from "Alsing.SyntaxBox"
8use Alsing.Windows.Forms
9
10class DataExtractor inherits Form
11    var _syntaxDocument as SyntaxDocument #
12    #var _properties as PropertyGrid #
13   
14    cue init
15        base.init
16        .text = 'SFX'
17        .width = 800
18        .height = 600
19       
20        #THIS LINE CAUSES:
21/#
22error: COBRA INTERNAL ERROR / TargetException / Non-static field requires a target.
23Compilation failed - 1 error, 0 warnings
24Not running due to errors above.
25#/
26
27        #EVEN HAPPENS WHEN type is SET TO SyntaxDocument?
28        _syntaxDocument = SyntaxDocument(nil,maxUndoBufferSize=1000,modified=false,syntaxFile="Cobra.syn",undoStep=0)
29 
30       
31
32
33class Program
34
35    def main is shared
36        has STAThread
37        Application.run(DataExtractor())