- 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:
2019-11-12 22:17:26 +00:00
parent f610d2930e
commit f6ae6d5e16
4 changed files with 19 additions and 13 deletions
+4 -3
View File
@@ -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);