Skip to content
This repository was archived by the owner on Mar 4, 2018. It is now read-only.

Commit 0d19672

Browse files
committed
Show error messages when member save fails
1 parent 42a8fbb commit 0d19672

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

Forms/cmdBindings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEve
8181
public void runCommands(string[] commands, string[] errDsp)
8282
{
8383
IBMi.RunCommands(commands);
84-
if (Main.CommandWindow != null) Main.CommandWindow.loadNewCommands();
84+
if (Main.CommandWindow != null) Main.CommandWindow.loadNewOutput();
8585

8686
if (errDsp != null)
8787
{

Forms/commandEntry.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ private void textBox1_KeyUp(object sender, KeyEventArgs e)
3838
public void runCommands(string[] commands)
3939
{
4040
IBMi.RunCommands(commands);
41-
loadNewCommands();
41+
loadNewOutput();
4242
}
4343

44-
public void loadNewCommands()
44+
public void loadNewOutput()
4545
{
4646
Invoke((MethodInvoker)delegate
4747
{

Forms/errorListing.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private void onSelectError(string File, int Line, int Col)
8282
}
8383
}
8484

85-
if (Main.CommandWindow != null) Main.CommandWindow.loadNewCommands();
85+
if (Main.CommandWindow != null) Main.CommandWindow.loadNewOutput();
8686

8787
MessageBox.Show("Unable to open error. Please open the source manually first and then try again.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
8888
}

Forms/openMember.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ private void button1_Click(object sender, EventArgs e)
5151
}
5252

5353
string resultFile = IBMiUtilities.DownloadMember(textBox1.Text, textBox2.Text, textBox3.Text);
54-
if (Main.CommandWindow != null) Main.CommandWindow.loadNewCommands();
54+
if (Main.CommandWindow != null) Main.CommandWindow.loadNewOutput();
5555

5656
if (resultFile != "")
5757
{

Forms/selectMember.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void UpdateListing(string Lib, string Obj)
6161
else
6262
{
6363
listView1.Items.Add(new ListViewItem("No members found!", 1));
64-
if (Main.CommandWindow != null) Main.CommandWindow.loadNewCommands();
64+
if (Main.CommandWindow != null) Main.CommandWindow.loadNewOutput();
6565

6666
toolStripLabel2.Text = "0 members";
6767
}
@@ -73,7 +73,7 @@ private void OpenMember(string Lib, string Obj, string Mbr, Boolean Editing)
7373
{
7474
Thread gothread = new Thread((ThreadStart)delegate {
7575
string resultFile = IBMiUtilities.DownloadMember(Lib, Obj, Mbr);
76-
if (Main.CommandWindow != null) Main.CommandWindow.loadNewCommands();
76+
if (Main.CommandWindow != null) Main.CommandWindow.loadNewOutput();
7777

7878
if (resultFile != "")
7979
{

Forms/uploadMember.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private void button1_Click(object sender, EventArgs e)
5959
}
6060
else
6161
{
62-
if (Main.CommandWindow != null) Main.CommandWindow.loadNewCommands();
62+
if (Main.CommandWindow != null) Main.CommandWindow.loadNewOutput();
6363
MessageBox.Show("Failed to save " + this._Member.GetMember() + ". Please check the Command Entry output.");
6464
}
6565
}

IBMiTools/IBMiCommandInstaller.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ internal static void InstallRemoteLib(string library = "QGPL")
3838
}
3939
IBMiUtilities.DebugLog("InstallRemoteLib - DONE!");
4040

41-
if (Main.CommandWindow != null) Main.CommandWindow.loadNewCommands();
41+
if (Main.CommandWindow != null) Main.CommandWindow.loadNewOutput();
4242
});
4343
thread.Start();
4444
}

LanguageTools/NppFunctions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ public static void HandleTrigger(SCNotification Notification)
100100
bool UploadResult = IBMiUtilities.UploadMember(member.GetLocalFile(), member.GetLibrary(), member.GetObject(), member.GetMember());
101101
if (UploadResult == false)
102102
{
103-
IBMi.AddOutput("Failed to upload source to member!");
103+
System.Windows.Forms.MessageBox.Show("Failed to upload to " + member.GetMember() + " on " + member.GetSystemName() + ".");
104104
}
105105
}
106106
else
107107
{
108-
IBMi.AddOutput("Cannot save to member as not connected to correct system.");
108+
System.Windows.Forms.MessageBox.Show("Unable to upload to " + member.GetMember() + ". You must be connected to " + member.GetSystemName() + " in order to save this file.");
109109
}
110-
if (Main.CommandWindow != null) Main.CommandWindow.loadNewCommands();
110+
if (Main.CommandWindow != null) Main.CommandWindow.loadNewOutput();
111111
});
112112
gothread.Start();
113113
}

0 commit comments

Comments
 (0)