New topic: Finding the Cause for Startup Beep Sound
<http://forums.realsoftware.com/viewtopic.php?t=29344> Page 1 of 1 [ 9 posts ] Previous topic | Next topic Author Message rbasic20091005153 Post subject: Finding the Cause for Startup Beep SoundPosted: Sun Aug 02, 2009 2:47 am Joined: Sat Apr 04, 2009 5:10 pm Posts: 183 Hola. I'm currently building an application, which is almost complete except... When the application starts up and Window 1 springs up, a system beep sound goes. It's traced to a private method (labeled ReadSettings) that is placed at the very bottom of App. The following is the code. Code:// dFdr2 is a FolderItem that is declared globally Dim SourceStream As TextInputStream If dFdr2<>Nil Then // A value... If Not dFdr2.Exists Then // It doesn't exist Exit Sub Else SourceStream=dFdr2.OpenAsTextFile While Not SourceStream.EOF Preferences01=SourceStream.ReadLine + EndOfLine // Preferences01 As String, declared globally If Preferences01="" Then WindowP.PositionField1.Text="480" Else WindowP.PositionField1.Text=Str(Preferences01) End if Preferences02=SourceStream.ReadLine + EndOfLine // Preferences02 As String, declared globally If Preferences02="" Then WindowP.PositionField2.Text="360" Else WindowP.PositionField2.Text=Str(Preferences02) End if Preferences03=Val(SourceStream.ReadLine + EndOfLine) // Preferences03 As Integer, declared globally If Preferences03=0 Then WindowP.CheckBox1.Value=False Elseif Preferences03=1 Then WindowP.CheckBox1.Value=True End if WindowP.EditFieldA.Text=Str(Preferences03) // See EnableMenuItems for Window1 Preferences04=Val(SourceStream.ReadLine + EndOfLine) // Preferences04 As Integer, declared globally If Preferences04=0 Then WindowP.CheckBox2.Value=False Elseif Preferences04=1 Then WindowP.CheckBox2.Value=True End if WindowP.EditFieldB.Text=Str(Preferences04) Wend SourceStream.Close End if End if Exception err Basically, the application reads settings like the position of Window1 that are set by the user and loads them into Preferences01, ..., Preferences04 from a text file (preferences file in 'Documents') with 4 lines and then to Editfields in WindowP, a preferences window. If I remove the entire method, there will be no more beeping. If I remove the entire While clause, there will be no beeping. Can anybody kindly suggest what's likely to be the cause of this startup beep and advise me of a measure for preventing it? I tried to treat the entires (0 or 1) in the 3rd and 4th lines in the preference file as string. But the app doesn't put them into Preferences03 and Prefences04. That's why I treat them as Integer. Thank you for your advice. Tom _________________ Mac OS X 10.5.6/REALBasic 2008 R4 I say 'no' to MBS plug-ins. I boycott them. Top mjh Post subject: Re: Finding the Cause for Startup Beep SoundPosted: Sun Aug 02, 2009 3:18 am Joined: Sun Feb 19, 2006 3:10 pm Posts: 282 Location: Hamburg, Germany First I would check where in your code you are calling Beep at all â not in ReadSettings obviously. In ReadSettings you are setting the Value of CheckBoxes and the Text of EditFields; this will trigger their Action or TextChange events, respectively. Maybe there is an event handler causing those beeps? _________________ Michael J. HuÃmann http://digicam-experts.de Top rbasic20091005153 Post subject: Re: Finding the Cause for Startup Beep SoundPosted: Sun Aug 02, 2009 4:02 am Joined: Sat Apr 04, 2009 5:10 pm Posts: 183 Thanks, Mr. HuÃmann. Umm... I would agree. But I don't have Code:Beep anywhere. I've checked App and Window 1 (controls, event handlers, methods, menu handlers) many times. To be honest, I placed it somewhere once to see how it works but removed it. It would be nice if RB has a global search function. And I can't see how a hidden beep code, if there is, could be triggered by ReadSettings. This is a small nightmare. I'm sure I've removed it, but I'll keep searching it per your advice. Grrr... _________________ Mac OS X 10.5.6/REALBasic 2008 R4 I say 'no' to MBS plug-ins. I boycott them. Top mjh Post subject: Re: Finding the Cause for Startup Beep SoundPosted: Sun Aug 02, 2009 5:20 am Joined: Sun Feb 19, 2006 3:10 pm Posts: 282 Location: Hamburg, Germany rbasic20091005153 wrote:It would be nice if RB has a global search function. But it has! Choose Edit/Find/Find Allâ¦, then select âFind in: Projectâ. _________________ Michael J. HuÃmann http://digicam-experts.de Top rbasic20091005153 Post subject: Re: Finding the Cause for Startup Beep SoundPosted: Sun Aug 02, 2009 8:45 am Joined: Sat Apr 04, 2009 5:10 pm Posts: 183 Code:But it has! Choose Edit/Find/Find Allâ¦, then select âFind in: Projectâ. GGGGG... I didn't know. Thank you, Mr. HuÃmann. And no... There's no Beep found anywhere! _________________ Mac OS X 10.5.6/REALBasic 2008 R4 I say 'no' to MBS plug-ins. I boycott them. Top mjh Post subject: Re: Finding the Cause for Startup Beep SoundPosted: Sun Aug 02, 2009 8:51 am Joined: Sun Feb 19, 2006 3:10 pm Posts: 282 Location: Hamburg, Germany Have you tried stepping through ReadSettings in the debugger? _________________ Michael J. HuÃmann http://digicam-experts.de Top ZULU Post subject: Re: Finding the Cause for Startup Beep SoundPosted: Sun Aug 02, 2009 9:01 am Joined: Mon Jul 31, 2006 1:44 am Posts: 974 Try this: Disable the Incremental Compilation in the REALbasic Preferences-Build Process and then do a new Build/Compile of your project. _________________ ------------------------------------ Top rbasic20091005153 Post subject: Re: Finding the Cause for Startup Beep SoundPosted: Sun Aug 02, 2009 11:28 am Joined: Sat Apr 04, 2009 5:10 pm Posts: 183 Thanks for your advice, ZULU. But I still get a beep when Window 1 first springs up after turning off 'Enable Incremental Compilation.' _________________ Mac OS X 10.5.6/REALBasic 2008 R4 I say 'no' to MBS plug-ins. I boycott them. Top computerfreaker Post subject: Re: Finding the Cause for Startup Beep SoundPosted: Sun Aug 02, 2009 2:52 pm Joined: Thu Mar 05, 2009 1:03 pm Posts: 1154 Location: USA Step through your code and see what line triggers the beep - post that line here. _________________ Learn something new every day, and the rest will take care of itself. Life is a journey, not a destination. Enjoy the trip! Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 9 posts ]
-- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
