Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 GUI problem - "Assert Condition is False"
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wiltongrove




PostPosted: Tue Jun 12, 2007 4:15 pm   Post subject: GUI problem - "Assert Condition is False"

I'm making a program for computers class similar to text twist. The point of this program is that we are supposed to use GUI buttons for the user to interact with. The problem that I have is after I enter a few words a GUI turing file opens and says the assert condition is false and the program crashes. in my program it says Dispose: widget id number "0" not found. also it seems to sometimes randomly switch the keyboard shortcuts on my buttons.

i have attached my turing file and the accompanying text file for you to look at, any help here would really be appreciated.



textwist.txt
 Description:

Download
 Filename:  textwist.txt
 Filesize:  1.34 KB
 Downloaded:  278 Time(s)


textwist2.t
 Description:

Download
 Filename:  textwist2.t
 Filesize:  6.49 KB
 Downloaded:  209 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Valderino




PostPosted: Fri Feb 01, 2013 3:35 pm   Post subject: Re: GUI problem - "Assert Condition is False"

Posted Image, might have been reduced in size. Click Image to view fullscreen.

I have this issue too.

Posted Image, might have been reduced in size. Click Image to view fullscreen.
Tony




PostPosted: Fri Feb 01, 2013 4:43 pm   Post subject: RE:GUI problem - "Assert Condition is False"

Does that "put message" provide any useful context? If you have trouble seeing where that put is going, try replacing that line with writing "message" to a log file instead.

Failing that, you'd need to figure out from where AssertFailed function is called.

That use of XKCD was perfect!
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Dreadnought




PostPosted: Fri Feb 01, 2013 4:51 pm   Post subject: Re: GUI problem - "Assert Condition is False"

The AssertFailed is called by the RemoveWidget procedure (line 250 in Turing X.X.X > Support > lib > gui). The function is apparently trying to remove the widget (gui element) with id 0 which does not exist. I second Tony's suggestion, try to figure out where you are in your code when this happens.
Valderino




PostPosted: Mon Feb 25, 2013 11:48 am   Post subject: RE:GUI problem - "Assert Condition is False"

My code appeared to work fine on other computers, so I've just changed the AssertFailed to True, not false on the advice of my teacher. Everything seems fine thus far, but I don't feel comfortable modifying Turing.
Dreadnought




PostPosted: Mon Feb 25, 2013 6:38 pm   Post subject: Re: GUI problem - "Assert Condition is False"

Well I've played around with the code you posted and can reproduce the problem.

1) Click a letter
2) Click Submit
3) Click a letter
4) click another letter

At this point I get the error.

Maybe this will help you figure out the cause.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: