[futurebasic] Re: [FB] FBToC and UserDialog events crash

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2009 : Group Archive : Group : All Groups

From: Brian Stevens <bstevens33@...>
Date: Mon, 1 Jun 2009 22:16:31 -0700
On Jun 1, 2009, at 9:00 PM, Robert Covington wrote:

> The below, which worked fine in FB normal, crashes badly in FB5.

Haven't run your posted code because I'm working on tracking down  
another issue.

I can tell you that the dialog statement (i.e. dialog = some value you  
expect to intercept in your DoDialog fn ) translates to just a call to  
the user DoDialog fn, so there is virtually no FBtoC runtime code  
involved. Personally, I don't use the dialog function and have never  
used the dialog statement ( please note how the FBtoC help for the  
dialog function says "dialog() function is not recommended. Use  
CarbonEvents instead" ). The method in the code of repetitively  
calling DoDialog until the tickcount set in the global is achieved  
seems inefficient at first glance. Maybe consider other methods for  
handling the splash screen. BTW: it is possible to post your own  
events in carbon events using CreateEvent(). Maybe set a lower  
threshold for the tickcount so the test is true earlier ( if Fn  
Tickcount > gSplashTicks ) and run it through the gdb debugger to find  
the crash.

Brian S.