New topic: 

how to refer to the index of an object

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

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        dewetrongrant          Post subject: how to refer to the index 
of an objectPosted: Sat Dec 29, 2012 7:05 pm                         
Joined: Sat Dec 29, 2012 6:56 pm
Posts: 1                This is going to be the biggest newbie question ever, 
but I just started!

In VB, if I had an array of controls, like a combo box, I could fill them all 
in a loop like this:

for n = 0 to 7
  cboBox(n).additem "Monkey"
  cboBox(n).additem "Wrench"
next n

But when I try this in RealStudio, like this:

  For i=0 to 7
  popEPAD(i).Addrow "EPAD-TH8-J"
  popEPAD(i).Addrow "EPAD-TH8-K"
  popEPAD(i).Addrow "EPAD-TH8-T"
  popEPAD(i).Addrow "EPAD-TH8-C"
  popEPAD(i).Addrow "EPAD-TH8-U"
  popEPAD(i).Addrow "EPAD-V8"
  popEPAD(i).Addrow "EPAD-LA8"
  Next

I just get an error "this method requires fewer parameters than were passed," 
so obviously my (i) with the index in it is failing.
But how can I refer to these 8 arrayed objects? I just don't know the proper 
syntax. 

Thanks!   
                             Top                charonn0          Post subject: 
Re: how to refer to the index of an objectPosted: Sat Dec 29, 2012 7:36 pm      
                           
Joined: Mon Apr 02, 2007 2:08 am
Posts: 1055
Location: San Francisco, CA, USA                popEPAD must be a control 
array: http://docs.realsoftware.com/index.php/ ... On_The_Fly      
_________________
Boredom Software  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 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