Computer Science Canada Reference through nil pointer? |
Author: | facultyofmusic [ Mon Dec 22, 2008 12:56 pm ] | ||||
Post subject: | Reference through nil pointer? | ||||
I'm doing my ISP and i have this piano keyboard I have to make work. This part of the program is for the black piano buttons:
The problem is that when I run it, it Widget thingy pops up and shows me a error. Which says "reference through nil pointer". What does this mean? What part of the program is wrong? Thanks for your help Mod Edit: Remember to use syntax tags! Thanks ![]()
|
Author: | octopi [ Mon Dec 22, 2008 3:01 pm ] | ||||
Post subject: | Re: Reference through nil pointer? | ||||
If you try to access an object which hasn't been created yet, then you'll get this error. I'm not too familiar with Turing, and I can't find the error in your code, does the program point to a certain line as the cause of the problem? Can you access a procedure without putting ()'s on the end of it? playBlackResponse() Also...
should be: shouldn't it?
Sorry I can't be more help, I really don't know Turing, perhaps another user can help you out more. btw: those syntax tags are pretty touchy... |
Author: | Clayton [ Mon Dec 22, 2008 3:36 pm ] |
Post subject: | RE:Reference through nil pointer? |
Think of it this way, if no event has happened yet, then how could GetEventWidgetID possibly have any sort of value? You need to include that in your action procedure from the button. |