- handle full path names
git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@661 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -46,6 +46,7 @@ MainComponent::MainComponent (const String prjname)
|
||||
, m_trainingIndex(0)
|
||||
, m_weightIndex(0)
|
||||
, m_toolTipWindow(this)
|
||||
, m_file(prjname)
|
||||
{
|
||||
addAndMakeVisible (trainButton = new TextButton ("Train button"));
|
||||
trainButton->setButtonText (TRANS("Train"));
|
||||
@@ -116,7 +117,7 @@ MainComponent::MainComponent (const String prjname)
|
||||
createButton->addListener (this);
|
||||
|
||||
addAndMakeVisible (projectNameLabel = new Label ("Project Name label",
|
||||
prjname));
|
||||
m_file.getFileNameWithoutExtension()));
|
||||
projectNameLabel->setFont (Font (15.00f, Font::plain));
|
||||
projectNameLabel->setJustificationType (Justification::centred);
|
||||
projectNameLabel->setEditable (true, true, false);
|
||||
@@ -517,7 +518,7 @@ void MainComponent::buttonClicked (Button* buttonThatWasClicked)
|
||||
int numHid = numHiddenLabel->getText().getIntValue();
|
||||
if (!m_stack)
|
||||
{
|
||||
m_stack = new Stack(std::string(projectNameLabel->getText().getCharPointer()));
|
||||
m_stack = new Stack(m_file.getParentDirectory().getFullPathName().toStdString(), std::string(projectNameLabel->getText().getCharPointer()));
|
||||
}
|
||||
m_stack->addLayer(onConstruct("Layer", next_index, numVisX, numVisY, numHid));
|
||||
m_rbmSelect->addItem(String(next_index), next_index+1);
|
||||
@@ -527,7 +528,7 @@ void MainComponent::buttonClicked (Button* buttonThatWasClicked)
|
||||
else if (buttonThatWasClicked == loadButton)
|
||||
{
|
||||
//[UserButtonCode_loadButton] -- add your button handler code here..
|
||||
m_stack = new Stack(std::string(projectNameLabel->getText().getCharPointer()));
|
||||
m_stack = new Stack(m_file.getParentDirectory().getFullPathName().toStdString(), std::string(projectNameLabel->getText().getCharPointer()));
|
||||
m_stack->load(this);
|
||||
m_stack->loadWeights();
|
||||
m_rbmSelect->clear(dontSendNotification);
|
||||
|
||||
Reference in New Issue
Block a user