I'm pretty new to the the forum. I think this would be my first post in as long as I've been here. I'm having problems accessing a List of custom tabs that I extended from the TabPage class. It didn't throw a wobbler until I changed a piece of code at which point my Visual Studio decided to throw a wobbler and die as well, so I lost the ability to undo/redo. It worked well until I changed the code to pass it another integer (which I initially made a reference to the "allBrowserTabs" list but then thoguht, I'll stick to something simple) but still couldn't get it to compile.
The error I get is:
Error 1 Inconsistent accessibility: parameter type 'System.Collections.Generic.List
I've read a number of articles on this and got the general gist of what's wrong, but in my own code I can't work out what's causing the difference in levels of accessibility. Is it anything to do with the fact that "allDevTabs" is a static variable in RootForm? It shouldn't be because it compiled before trying to send a second list through the constructor...
CLASS A:
namespace Spring_Map_Generator
{
public partial class SimpleMessageForm : Form
{
// Required for adding a new tab to the main form.
List
int browserListSize = 0;
System.Windows.Forms.TabControl TabControl;
// Set up the form. (Constructor)
public SimpleMessageForm(List
{
allDevTabs = devTabs;
browserListSize = newBrowserListSize;
TabControl = newTabControl;
InitializeComponent();
}
}
}
CLASS B:
namespace Spring_Map_Generator
{
public partial class RootForm : Form
{
// Create static vars
FileManagement ioManager = new FileManagement();
DefinitionLibrary defs = new DefinitionLibrary();
int OptionsPanelWidth = 120;
bool changesMade = false;
// Add a list of all the currently open TabPages
List
List
// Constructor
public RootForm()
{
InitializeComponent();
defs.SetOutput(Output);
}
...
...
// Open up a new form in order to create a new file (and a new DevTab)
private void fileToolStripMenuItem1_Click(object sender, EventArgs e)
{
SimpleMessageForm createNewFileForm = new SimpleMessageForm(allDevTabs, allBrowserTabs.Count, TabControl);
createNewFileForm.Show();
}
}
}
Any ideas as to what I've done?
Gareth MorrisPosted Aug 11, 2006, 3:35 AM
public class DevTab : System.Windows.Forms.FileTab{
}
Lovely :)