golem.cpp Aggiustato DDE Server

maskfld.cpp  Sostituita TString80 con TSTring
msksheet.cpp Corretta chiamata alla off_cell_handler nella on_key
prefix.cpp   Corretta ricerca nome tabelle
sheet.cpp    Sostituita una select con set_focus_rec


git-svn-id: svn://10.65.10.50/trunk@2981 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1996-06-10 15:41:53 +00:00
parent 4d963df585
commit 7013930383
7 changed files with 32 additions and 11 deletions

View File

@ -340,6 +340,13 @@ bool TDDE::execute(const char* cmd) const
return PostMessage((HWND)_server, WM_DDE_EXECUTE, (WPARAM)_hwnd, MAKELPARAM(0, hg)); return PostMessage((HWND)_server, WM_DDE_EXECUTE, (WPARAM)_hwnd, MAKELPARAM(0, hg));
} }
bool TDDE::start_server()
{
CHECK(_old_hook == NULL, "Non puoi iniziare due connessioni DDE");
_old_hook = xvt_vobj_get_attr(NULL_WIN, ATTR_EVENT_HOOK);
xvt_vobj_set_attr(NULL_WIN, ATTR_EVENT_HOOK, (long)hook);
return TRUE;
}
void TDDE::terminate() void TDDE::terminate()
{ {

View File

@ -118,6 +118,9 @@ public:
// @cmember Chiude la connessione // @cmember Chiude la connessione
void terminate(); void terminate();
// @cmember Inizia a fornire i servizi di DDE server
bool start_server();
word hwnd() const { return _hwnd; } word hwnd() const { return _hwnd; }
// @cmember Costruttore // @cmember Costruttore

View File

@ -2188,7 +2188,7 @@ KEY TBrowse::run()
_cursor->read(_isgteq); _cursor->read(_isgteq);
const TLocalisamfile& f = _cursor->file(); const TLocalisamfile& f = _cursor->file();
TString80 caption(prefix().description(f.name())); TString caption(prefix().description(f.name()));
if (!isalnum(caption[0])) if (!isalnum(caption[0]))
caption = "Selezione"; caption = "Selezione";

View File

@ -1812,7 +1812,7 @@ void TSheet_field::select(int r, bool scrollto)
bool TSheet_field::on_key(KEY k) bool TSheet_field::on_key(KEY k)
{ {
if (k == K_TAB) if (k == K_TAB && items() > 0)
{ {
if (focusdirty()) if (focusdirty())
{ {
@ -1821,7 +1821,6 @@ bool TSheet_field::on_key(KEY k)
return FALSE; return FALSE;
} }
else else
if (items() > 0)
select(0); select(0);
} }

View File

@ -368,10 +368,22 @@ const char* TPrefix::description(
if (fexist(name.lower())) if (fexist(name.lower()))
{ {
TScanner m(name); TScanner m(name);
while (m.line().left(2) != "PA"); // Find PAGE bool ok = TRUE;
const int apicia = m.token().find('"')+1; while (ok)
const int apicic = m.token().find('"', apicia); {
n = m.token().sub(apicia, apicic); const TString& l2 = m.line().left(2);
if (l2.empty())
ok = FALSE;
else
if (l2 == "PA")
break;
}
if (ok)
{
const int apicia = m.token().find('"')+1;
const int apicic = m.token().find('"', apicia);
n = m.token().sub(apicia, apicic);
}
} }
else n.cut(0); else n.cut(0);
} }

View File

@ -61,7 +61,7 @@ TString& TScanner::line(
_line++; _line++;
_token << __tmp_string; _token << __tmp_string;
_token.trim(); _token.trim();
} while (_token.empty() && good()); } while (_token.empty() && !eof());
_pushed = FALSE; _pushed = FALSE;

View File

@ -990,7 +990,7 @@ KEY TCursor_sheet::run()
{ {
_records = _cursor->items(); _records = _cursor->items();
_cursor->freeze(TRUE); _cursor->freeze(TRUE);
select(_cursor->pos()); post_select(_cursor->pos());
const KEY k = TSheet::run(); const KEY k = TSheet::run();
_cursor->freeze(FALSE); _cursor->freeze(FALSE);
return k; return k;