New topic: 

What is happening to my variables

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

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        IamKJVonly          Post subject: What is happening to my 
variablesPosted: Fri Dec 14, 2012 11:02 am                         
Joined: Sun Oct 01, 2006 8:13 am
Posts: 49                Here is the 4 lines of code I have with nothing in 
between them:

It looks to me like something is reading the variables as soon as I assign them 
a value or when the message box reads them.  I've never run across this before.

  str__RecordType = "New_Record--CODE_Is: #7_7_7"
  int__Record_ID = 84
  
  MsgBox " Record Type is " +str__RecordType 
  MsgBox "record ID is: " + str(int__Record_ID)
  

The first message gives me "xNeed" 
The second message gives me  83

Any idea what is going on. The variables are "Dim"  in a module and appear to 
be universal variables.

I'm dead in the water until I figure it out.

Thanks for any help you can give me.
Dave      
_________________
I'm using windows 7 (64 bit) and Real Studio 2012,r1.2 (Romans 10:9-10)  
                             Top                DaveS          Post subject: 
Re: What is happening to my variablesPosted: Fri Dec 14, 2012 11:33 am          
                       
Joined: Sun Aug 05, 2007 10:46 am
Posts: 4332
Location: San Diego, CA                these four lines appear JUST LIKE THIS 
(as in there is NO OTHER code between them)

str__RecordType = "New_Record--CODE_Is: #7_7_7"
int__Record_ID = 84

MsgBox " Record Type is " +str__RecordType
MsgBox "record ID is: " + str(int__Record_ID)


or do the first two lines appear elsewhere, and you EXPECT this to be the 
result?

If so, do you DIM those two variables in MORE than one place? (ie.  two 
modules?  or a module and inside a subroutine?)  Scope is very important... and 
if those lines are not adjacent to one another then you may not be looking at 
the scope level that you think you are.      
_________________
Dave Sisemore
MacPro, OSX Lion 10.7.4 RB2012r1
Note : I am not  interested in any solutions that involve custom Plug-ins of 
any kind  
                             Top                IamKJVonly          Post 
subject: Re: What is happening to my variablesPosted: Fri Dec 14, 2012 12:23 pm 
                        
Joined: Sun Oct 01, 2006 8:13 am
Posts: 49                Dave

I didn't know what to call it but scope is a good word to use and I'm sure that 
is the problem.  I just don't know how to find it.

What I did is send a querry to my sql data base(actually it's a realbasic sql 
db that I created) and any db records that matach the querry I put in a list 
box and the data I'm getting in the message box is the data that was in the 
last matching record.

BTW these variables are filled when I read a db record.  They hold the data 
from 2 of the fields in a db record.

The 4 lines are together there is no gap in them. FYI the data showing up is 
the data that was in the variables the last time read a db record.

As far as I can tell they are only dim in one place but I agree that is what it 
looks like.  any Idea on how  I can find it.  using the find function doesn't 
find anything when I ask it to find all for "DIM int__Record_ID"

Dave




      
_________________
I'm using windows 7 (64 bit) and Real Studio 2012,r1.2 (Romans 10:9-10)  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 3 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