+10-05-2004 :
+ - wxbTableParser : wxHashMap replaced by wxArray
+
09-05-2004 :
- wxbMainFrame : reconnecting/disconnecting implemented
- wxbMainFrame : Added menus to allow the user to change his config
Win32 : Crash when quitting while trying to connect
-Mac OS X : Problem if config file in Mac file format (new line = ASCII 13).
-
Mac OS X : "You must first get a unique identifier for your application,
a so called creator, a four letter constant. All you need to know about
this step is at http://developer.apple.com/dev/cftype/" (wxWiki)
wxbRestorePanel : When cancelling, check for commands results
-general : Do not quit when configuration file not found.
-
wxbRestorePanel : Add a way to cancel restore when building tree
(needs director modifications)
the tree view window and the file view window so that the
width of the tree view can be changed?
-general : Implement dis/reconnecting
-
wxbRestorePanel : Use ".default job=RestoreFiles" to get defaults parameters
when changing a restore parameter fails.
-wxbDataParser : Add a boolean in the constructor to avoid storing data is
+wxbDataParser : Add a boolean in the constructor to avoid storing data which
will not be used.
-wxbTableParser : Replace wxHashMap by wxArray
-
wxbRestorePanel : Check if commands ran successfully (cd, mark, mods...).
GTK : Improve look
int tot = 0;
long l;
- for (i = 0; i < tableparser->size(); i++) {
+ for (i = 0; i < tableparser->GetCount(); i++) {
str = (*tableparser)[i][2];
str.Replace(",", "");
if (str.ToLong(&l)) {
if (((*dt)[lastindex].Find("Building directory tree for JobId ") == 0) &&
((i = (*dt)[lastindex].Find(" ...")) > 0)) {
str = (*dt)[lastindex].Mid(34, i-34);
- for (i = 0; i < tableparser->size(); i++) {
+ for (i = 0; i < tableparser->GetCount(); i++) {
if (str == (*tableparser)[i][0]) {
str = (*tableparser)[i][2];
str.Replace(",", "");
wxDateTime jobtime;
- if (jobname == (*tableparser)[tableparser->size()-1][1]) {
- wxStringTokenizer jtkz((*tableparser)[tableparser->size()-1][2], " ", wxTOKEN_STRTOK);
+ if (jobname == (*tableparser)[tableparser->GetCount()-1][1]) {
+ wxStringTokenizer jtkz((*tableparser)[tableparser->GetCount()-1][2], " ", wxTOKEN_STRTOK);
if ((jobtime.ParseDate(jtkz.GetNextToken()) != NULL) && // Date
(jobtime.ParseTime(jtkz.GetNextToken()) != NULL)) { // Time
if (jobtime.IsLaterThan(currenttime)) {
- jobid = (*tableparser)[tableparser->size()-1][0];
+ jobid = (*tableparser)[tableparser->GetCount()-1][0];
cmd << jobid << "\n";
delete tableparser;
cancel->Enable(true);
WaitForPrompt("6\n");
wxbTableParser* tableparser = CreateAndWaitForParser(configPanel->GetRowString("Client") + "\n");
- for (int i = tableparser->size()-1; i > -1; i--) {
+ for (int i = tableparser->GetCount()-1; i > -1; i--) {
wxString str = (*tableparser)[i][3];
wxDateTime datetime;
const char* chr;
#include "wxbmainframe.h"
+#include <wx/arrimpl.cpp>
+
+WX_DEFINE_OBJARRAY(wxbTable);
+
+wxbArrayString::wxbArrayString(int n) : wxArrayString(), wxObject() {
+ Alloc(n);
+}
+
+wxbArrayString::~wxbArrayString() {
+
+}
+
/*
* wxbTableParser constructor
*/
-wxbTableParser::wxbTableParser() : wxbTable(5), wxbDataParser(true) {
+wxbTableParser::wxbTableParser() : wxbTable(), wxbDataParser(true) {
separatorNum = 0;
- tableHeader = wxbTableRow(5);
+ tableHeader = wxbArrayString();
}
/*
/*
* Returns table header as an array of wxStrings.
*/
-wxbTableRow* wxbTableParser::GetHeader() {
- return &tableHeader;
+const wxbArrayString& wxbTableParser::GetHeader() {
+ return tableHeader;
}
/*
wxStringTokenizer tkz(str, "|", wxTOKEN_STRTOK);
if (separatorNum == 1) {
- int i = 0;
while ( tkz.HasMoreTokens() ) {
- tableHeader[i++] = tkz.GetNextToken().Trim(true).Trim(false);
+ tableHeader.Add(tkz.GetNextToken().Trim(true).Trim(false));
}
}
else if (separatorNum == 2) {
- wxbTableRow tablerow(tableHeader.size());
- int i = 0;
+ wxbArrayString tablerow(tableHeader.GetCount());
while ( tkz.HasMoreTokens() ) {
- tablerow[i++] = tkz.GetNextToken().Trim(true).Trim(false);
+ tablerow.Add(tkz.GetNextToken().Trim(true).Trim(false));
}
- (*this)[size()] = tablerow;
+ Add(tablerow);
}
}
}
#include "wxbutils.h"
-#include <wx/hashmap.h>
+#include <wx/dynarray.h>
-/* int-indexed array of wxString, used for one line */
-WX_DECLARE_HASH_MAP( int, wxString, wxIntegerHash, wxIntegerEqual, wxbTableRow );
-/* int-indexed array of wxbTableRow, contains the whole table */
-WX_DECLARE_HASH_MAP( int, wxbTableRow, wxIntegerHash, wxIntegerEqual, wxbTable );
+/*
+ * Allow the use of Object Array (auto-deletion, object returned as themselves
+ * and not as pointers)
+ */
+class wxbArrayString: public wxArrayString, public wxObject {
+ public:
+ wxbArrayString(int n = 1);
+ virtual ~wxbArrayString();
+};
+
+WX_DECLARE_OBJARRAY( wxbArrayString, wxbTable );
/*
* Class used to parse tables received from director. Data can be accessed with
/*
* Returns table header as an array of wxStrings.
*/
- wxbTableRow* GetHeader();
+ const wxbArrayString& GetHeader();
private:
- wxbTableRow tableHeader;
+ wxbArrayString tableHeader;
/*
* 0 - Table has not begun