Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sun Dec 17, 2017 12:31 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: making control array
PostPosted: Sat Feb 23, 2013 1:19 am 
Offline

Joined: Wed Feb 20, 2013 5:54 pm
Posts: 3
I have created a project with several control arrays of radiobuttons. I am trying to create another control array for another feature however am unable to do so. I have tried to create several instances of a radiobutton with the same names but get no message asking if I am trying to create a control array. Nor, when I give several buttons the same name and manually insert sequential index numbers do they act as an array. They are listed separately in the controls section of the code editor with ( ) after their name but appear to be independent. What do I need to do to create another control array?

Thanks,
Brian


Top
 Profile  
Reply with quote  
 Post subject: Re: making control array
PostPosted: Sat Feb 23, 2013 2:09 am 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
Did you use parens and a number as part of the name? If so, don't. Each control has an Index property. Give the controls the exact same name and set the Index property (it's not part of the name).


Top
 Profile  
Reply with quote  
 Post subject: Re: making control array
PostPosted: Sat Feb 23, 2013 7:51 am 
Offline

Joined: Wed Feb 20, 2013 5:54 pm
Posts: 3
Thank you for your reply. No, I didn't use parens in the name. The parens show up after the name in the control palette as a standard feature of the IDE indicating a control array name. And yes, I tried using the same name and setting the index property with sequential numbers but still each instance was listed separately in the control palette with a parens after the name even though I did not put the parens in explicitly.

I did open up a fresh project. When I created two instances of a radio button and gave them the same name, I did get the dialog box asking if I wanted to create a control array. Therefore, it appears that something in my original project is preventing me from creating a new control array either by inserting a new instance of the radio button and giving them the same name or by manually adding the index number to two controls with the same name.

I did discover that duplicating the control with cmd-D did make a new instance with an incremented index that functioned as a control array although I did not get the message asking me if I wanted to create one. I will carry on using cmd-D. If I have further difficulties, I will repost.

Any comments about why the first two methods didn't work would be appreciated.

Brian


Top
 Profile  
Reply with quote  
 Post subject: Re: making control array
PostPosted: Sat Feb 23, 2013 2:35 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
Try saving the project in XML format, restart the IDE and open the XML version of the project. If that fixes the issue, save the project in regular RBP format and move on. If not, examine the XML file for inconsistencies.


Top
 Profile  
Reply with quote  
 Post subject: Re: making control array
PostPosted: Sat Feb 23, 2013 4:05 pm 
Offline

Joined: Wed Feb 20, 2013 5:54 pm
Posts: 3
Tim, I created a long detailed reply and it disappeared before I could post it :| So, I will give you the bottom line. The XML format didn't help. I will have to use the cmd-D duplication method to create additional control arrays in my project as far as I can tell.

Brian


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group