Need help with simple event framework
Tano Sakaria
tanojoshu at yahoo.de
Sat Nov 19 05:18:31 PST 2011
Hello guys,
I need some help regarding a (very) basic Event handling framework I
just started on today.
Please note that I'm still fairly new to programming itself and that
I might not know things that seem obvious to others.
The attached file is my work so far. I have a class called Backbone
which houses 2 pointers for a linked list. Every linked list member
contains 2 private pointers (one forward and one backward), the
associated public functions to acces them, a string for the Event_ID
and a function pointer to the function that shall be called, if an
event with the corresponding Event_ID is invoked.
I also have a simple test class with exactly one function to test
whether the function is indeed called.
I can compile without problems, but I get a runtime error "Access
Violation: Read at address 0x4E4". This runtime error gets thrown
once I call the function getNext() through a pointer, but I honestly
have no idea why.
I am using D1 and Tango, though Tango is only for the line printing
and can easily be converted to Phobos.
I hope you can help me!
begin 644 Backbone.d
M__YI`&T`<`!O`'(`=``@`'0`80!N`&<`;P`N`&D`;P`N`%,`=`!D`&\`=0!T
M`#L`#0`*``T`"@!V`&\`:0!D`"``;0!A`&D`;@`H`"D`#0`*``D`>P`-``H`
M#0`*``D`0@!A`&,`:P!B`&\`;@!E`"``=`!H`&4`0@!A`&,`:P!B`&\`;@!E
M`"``/0`@`&X`90!W`"``0@!A`&,`:P!B`&\`;@!E`"@`*0`[``T`"@`)`%0`
M90!S`'0`0P!L`&$`<P!S`"``9`!E`'(`(``]`"``;@!E`'<`(`!4`&4`<P!T
M`$,`;`!A`',`<P`[``T`"@`)`'0`:`!E`$(`80!C`&L`8@!O`&X`90`N`'(`
M90!G`&D`<P!T`&4`<@!%`'8`90!N`'0`2`!A`&X`9`!L`&4`<@`H`"``(@!T
M`&4`<P!T`%\`10!6`$4`3@!4`"(`+``@`"8`9`!E`'(`+@!T`&4`<P!T`"``
M*0`[``T`"@`)`&(`;P!O`&P`(`!B`&P`80`@`#T`(`!F`&$`;`!S`&4`.P`-
M``H`"0!B`'D`=`!E`%L`8P!H`&$`<@!;`%T`70!;`%T`(`!D`&4`<@!P`#L`
M#0`*``D`=`!H`&4`0@!A`&,`:P!B`&\`;@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`
M"0`)`'0`:`!I`',`+@!E`'8`90!N`'0`1`!A`'0`80`@`#T`(`!E`'8`90!N
M`'0`1`!A`'0`80`[``T`"@`)`'T`#0`*``D`#0`*``D`8P!H`&$`<@!;`%T`
M(`!G`&4`=`!)`$0`*``I``T`"@`)`'L`#0`*``D`"0!R`&4`=`!U`'(`;@`@
M`&4`=@!E`&X`=`!?`&D`9``[``T`"@`)`'T`#0`*``D`#0`*``D`8P!H`&$`
M<@!;`%T`(`!G`&4`=`!3`&\`=0!R`&,`90`H`"D`#0`*``D`>P`-``H`"0`)
M`'(`90!T`'4`<@!N`"``<P!O`'4`<@!C`&4`.P`-``H`"0!]``T`"@!]````
`
end
More information about the Digitalmars-d-learn
mailing list