New topic: 

Upgraded - Code Stopped Working

<http://forums.realsoftware.com/viewtopic.php?t=47677>

         Page 1 of 1
   [ 5 posts ]                 Previous topic | Next topic          Author  
Message        TrakSoft          Post subject: Upgraded - Code Stopped 
WorkingPosted: Tue Apr 23, 2013 12:52 pm                         
Joined: Tue Apr 12, 2011 6:32 am
Posts: 8                I started an app a few days ago, but was on RB version 
11r2.  I just upgraded to the latest and greatest 2012r2.1 and now a piece of 
the code won't work.  I put some breakpoints in, identified what is now not 
working, and not sure why.  Any help will be greatly appreciated.

Here is the code:
Dim BuildFile As FolderItem, SourceStream As TextInputStream
BuildFile = GetFolderItem("TCL.BF")
If BuildFile <> Nil AND BuildFile.Exists Then......


The file is in place.  I can see it.  In debug mode, the path and the file 
shows up, but the if statement comes back as false.  Prior to upgrading it 
worked fine.  Is there something in the new version that changed thes calls?

Thanks,

Gary   
                             Top                Dale          Post subject: Re: 
Upgraded - Code Stopped WorkingPosted: Tue Apr 23, 2013 3:23 pm                 
                
Joined: Thu Mar 01, 2007 2:02 pm
Posts: 234
Location: Sunny (generally!) Southern California                Two 
suggestions. 

First, try separating the DIM statement into two statements. I've always been 
leery of declaring different variable types in the same DIM statement.

Second, you are probably getting bit by order of execution in the IF statement. 
Try enclosing the "BuildFile <> Nil" in parentheses.

- Dale      
_________________
-----
Real Studio 2012r1 on Windows 7 (64 bit)
-----
It has been said that politics is the second oldest profession. 
I have learned that it bears a striking resemblance to the first.
 - Ronald Reagan  
                             Top                TrakSoft          Post subject: 
Re: Upgraded - Code Stopped WorkingPosted: Tue Apr 23, 2013 3:43 pm             
            
Joined: Tue Apr 12, 2011 6:32 am
Posts: 8                Dale,

Thanks for the suggestions, but they didn't work.  When I put the statements in 
quotes, I got a type mismatch error.  I think you meant parenthesis.  I put 
them in parenthesis and the type mismatch error went away.  But, my if 
statement still does not work.  I reverted back to the original code and 
reverted back to my old version of RB 2011r2, and it works great.  I move back 
to the new version, and it does not work.  I do not see why upgrading my RB to 
a new version would cause this to stop working unless I was using deprecated or 
removed functions.  I checked and this is not the case.  I don't think it is 
the code.  I'm kind of thinking that this is a bug in the new RB.  Do you know 
if the RB techs check out the forums, or should I submit a bug report?

Again, thanks for the suggestions.

Gary

Dale wrote:Two suggestions. 

First, try separating the DIM statement into two statements. I've always been 
leery of declaring different variable types in the same DIM statement.

Second, you are probably getting bit by order of execution in the IF statement. 
Try enclosing the "BuildFile <> Nil" in parentheses.

- Dale   
                             Top                kermit          Post subject: 
Re: Upgraded - Code Stopped WorkingPosted: Tue Apr 23, 2013 4:28 pm             
            
Joined: Mon May 30, 2011 12:56 am
Posts: 673                isnt this just that the debug app is being built in 
the builds folder.
Which does not have your file in it.

The file may be local to the app in release mode, but debug gets a brand new 
folder every build.
You need to copy the file in while the build is paused.
Or better, have application support files held in the applicationSupport 
folder, where both debug and release can find them at runtime.   
                             Top                TrakSoft          Post subject: 
Re: Upgraded - Code Stopped WorkingPosted: Tue Apr 23, 2013 4:41 pm             
            
Joined: Tue Apr 12, 2011 6:32 am
Posts: 8                Hi Kermit,

I read your reply and then slapped my head and said "I could have had a V8".  
You are right on the money.  I guess the reason I didn't think of this before 
was that it didn't do that in the older version when I debugged it.  Thank you 
very much for the enlightenment.  I will be able to sleep tonight.

Best,

Gary

kermit wrote:isnt this just that the debug app is being built in the builds 
folder.
Which does not have your file in it.

The file may be local to the app in release mode, but debug gets a brand new 
folder every build.
You need to copy the file in while the build is paused.
Or better, have application support files held in the applicationSupport 
folder, where both debug and release can find them at runtime.   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 5 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]

Reply via email to