- project name is first argument on command line
git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@658 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
+12
-3
@@ -30,7 +30,7 @@ public:
|
||||
void initialise (const String& commandLine) override
|
||||
{
|
||||
// Add your application's initialisation code here..
|
||||
mainWindow = new MainWindow;
|
||||
mainWindow = new MainWindow(commandLine);
|
||||
}
|
||||
|
||||
void shutdown() override
|
||||
@@ -62,11 +62,20 @@ public:
|
||||
class MainWindow : public DocumentWindow
|
||||
{
|
||||
public:
|
||||
MainWindow() : DocumentWindow ("RBM Gui",
|
||||
MainWindow(const String& commandLine) : DocumentWindow ("RBM Gui",
|
||||
Colours::lightgrey,
|
||||
DocumentWindow::allButtons)
|
||||
{
|
||||
setContentOwned (new MainComponent(), true);
|
||||
StringArray token;
|
||||
token.addTokens(commandLine, " ");
|
||||
std::cout << token[0] << std::endl;
|
||||
|
||||
String name = token[0];
|
||||
if (name.isEmpty())
|
||||
{
|
||||
name = "test";
|
||||
}
|
||||
setContentOwned (new MainComponent(name), true);
|
||||
|
||||
centreWithSize (getWidth(), getHeight());
|
||||
setVisible (true);
|
||||
|
||||
Reference in New Issue
Block a user