Patch level : 10.0 312
Files correlati : ve2.exe Ricompilazione Demo : [ ] Commento : 0001306: Selezione articolo da ricerca righe listini/offerte Se sulle righe dei listini e/o offerte, effettuo una ricerca (pulsante toolbar) e quindi selezione una riga della griglia l'applicazione ritorna in testata ed esce l'errore di windows del ve2.exe git-svn-id: svn://10.65.10.50/trunk@18913 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0f6a750f34
commit
66ddbab714
@ -2743,7 +2743,7 @@ KEY TBrowse::run()
|
||||
ef.set_focus();
|
||||
k = K_F9;
|
||||
if (m.is_running())
|
||||
m.send_key(k, id);
|
||||
m.send_key(k, id, &ef); //m.send_key(k, id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -3811,7 +3811,7 @@ bool TEdit_field::on_key(KEY key)
|
||||
if (_browse) k = _browse->run();
|
||||
else beep();
|
||||
|
||||
if (k != K_F9)
|
||||
if (k != K_F9 && active())
|
||||
set_focus();
|
||||
|
||||
if (k == K_ENTER)
|
||||
|
@ -598,7 +598,7 @@ bool TRelation_application::search_mode()
|
||||
else
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
HIDDEN bool delete_handler(TMask_field& f, KEY k)
|
||||
|
@ -1001,13 +1001,6 @@ TSheet::TSheet(short x, short y, short dx, short dy,
|
||||
: TMask(title, 1, dx, dy, x, y, parent),
|
||||
_sheet(NULL), _select_row(-1), _parked(-1)
|
||||
{
|
||||
#ifdef OLD_FASHIONED_BROWSE
|
||||
if (sht_y > 0) // Crea notebook se TBrowse_sheet
|
||||
{
|
||||
create_book(false); // Crea notebook e poi ...
|
||||
create_page(title, 0); // ... la sua prima pagina
|
||||
}
|
||||
#endif
|
||||
create_bar(1); // Crea toolbar in alto
|
||||
|
||||
TQuery_field* qf = new TQuery_field(this);
|
||||
@ -1782,16 +1775,6 @@ void TBrowse_sheet::handler(
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#if OLD_FASHIONED_BROWSE
|
||||
case E_CONTROL:
|
||||
if (ep->v.ctl.ci.type == WC_NOTEBK)
|
||||
{
|
||||
const int new_search = ep->v.ctl.ci.v.notebk.tab_no;
|
||||
on_key(K_CTRL+K_F1+new_search);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1799,7 +1782,6 @@ void TBrowse_sheet::handler(
|
||||
TCursor_sheet::handler(win, ep);
|
||||
}
|
||||
|
||||
#ifndef OLD_FASHIONED_BROWSE
|
||||
bool lst_handler(TMask_field& lst, KEY k)
|
||||
{
|
||||
if (k == K_SPACE)
|
||||
@ -1813,13 +1795,9 @@ bool lst_handler(TMask_field& lst, KEY k)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
void TBrowse_sheet::create_key_selector(TToken_string& ca)
|
||||
{
|
||||
#ifdef OLD_FASHIONED_BROWSE
|
||||
set_tab_buttons(ca); // Non funziona piu' bene: cambiamo strada
|
||||
#else
|
||||
const int items = ca.items();
|
||||
if (items > 1)
|
||||
{
|
||||
@ -1830,17 +1808,12 @@ void TBrowse_sheet::create_key_selector(TToken_string& ca)
|
||||
TList_field& lst = add_list(69, 0, PR("Ordinamento per "), 1, 0, 16, "", co, ca);
|
||||
lst.set_handler(lst_handler);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void TBrowse_sheet::update_key_selector(int sel)
|
||||
{
|
||||
#ifdef OLD_FASHIONED_BROWSE
|
||||
show_page(sel);
|
||||
#else
|
||||
if (id2pos(69) >= 0) // Has been created?
|
||||
set(69, sel, 0); // Don't fire any events!
|
||||
#endif
|
||||
}
|
||||
|
||||
TBrowse_sheet::TBrowse_sheet(TCursor* cursor, const char* fields,
|
||||
@ -1883,11 +1856,7 @@ TBrowse_sheet::TBrowse_sheet(TCursor* cursor, const char* fields,
|
||||
}
|
||||
|
||||
TEditable_field* e = NULL;
|
||||
#ifdef OLD_FASHIONED_BROWSE
|
||||
int y = 0;
|
||||
#else
|
||||
int y = 1;
|
||||
#endif
|
||||
|
||||
bool first = true;
|
||||
|
||||
|
@ -270,7 +270,7 @@ void TEvent_manager::pop()
|
||||
if (cw != NULL_WIN)
|
||||
{
|
||||
TWindow* w = (TWindow*)xvt_vobj_get_data(cw);
|
||||
CHECK(w != NULL, "Can't idle NULL window");
|
||||
if (w != NULL)
|
||||
w->on_idle();
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <checks.h>
|
||||
#include <xvt.h>
|
||||
|
||||
extern int ve2100(int argc, char* argv[]); // tabelle sconti (di riga/di documento/incondizionati)
|
||||
@ -9,15 +8,14 @@ extern int ve2600(int argc, char* argv[]); // relazioni articoli livelli di gia
|
||||
|
||||
int main( int argc, char** argv)
|
||||
{
|
||||
const int r = (argc>1)?(atoi(&argv[1][1])):(-1);
|
||||
const int r = argc>1 ? (argv[1][1]-'0') : 0;
|
||||
switch (r)
|
||||
{
|
||||
case 0: ve2100(argc, argv); break;
|
||||
case 1: ve2200(argc, argv); break;
|
||||
case 2: ve2300(argc, argv); break;
|
||||
case 3: ve2400(argc, argv); break;
|
||||
case 5: ve2600(argc, argv); break;
|
||||
default: error_box("Sintassi: %s -[0 [R|D|I] | 1 [L|C|O] | 2 [L|C|O] | 3]", argv[0]); break;
|
||||
default: ve2100(argc, argv); break;
|
||||
}
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -7,8 +7,6 @@
|
||||
#include "ve2300.h"
|
||||
#include "veconf.h"
|
||||
|
||||
#define MAX_REAL "9999999999.99999" //mmmhh..
|
||||
|
||||
static void key_hide(TMask & m, short id, int key = 1)
|
||||
{
|
||||
((TEditable_field &)m.field(id)).reset_key(key);
|
||||
@ -59,8 +57,8 @@ class TRighe_condizioni_vendita: public TRelation_application
|
||||
static bool handle_qta(TMask_field &, KEY); // handler della quantita' limite per scaglione
|
||||
static bool handle_sca(TMask_field &, KEY); // handler dello scaglione
|
||||
static void fill_rec(TRectype& r, TMask& m);
|
||||
static real find_prev_qta(TRectype& r);
|
||||
static real find_next_qta(TRectype& r);
|
||||
static real find_prev_qta(const TRectype& r);
|
||||
static real find_next_qta(const TRectype& r);
|
||||
static const char* look_codiva(char tipo, TString& cod);
|
||||
virtual int write(const TMask &); // metodo usato per scrivere il record sul file
|
||||
virtual int rewrite(const TMask &); // metodo usato per aggiornare il record sul file
|
||||
@ -502,10 +500,10 @@ const char* TRighe_condizioni_vendita::look_codiva(char tipo, TString& cod)
|
||||
return "";
|
||||
}
|
||||
|
||||
real TRighe_condizioni_vendita::find_prev_qta(TRectype& r)
|
||||
real TRighe_condizioni_vendita::find_prev_qta(const TRectype& r)
|
||||
{
|
||||
TLocalisamfile f(LF_RCONDV);
|
||||
real qta = 0.0;
|
||||
real qta = ZERO;
|
||||
f.curr() = r;
|
||||
int nscagl = r.get_int("NSCAGL");
|
||||
f.put("NSCAGL", nscagl-1);
|
||||
@ -514,10 +512,10 @@ real TRighe_condizioni_vendita::find_prev_qta(TRectype& r)
|
||||
return qta;
|
||||
}
|
||||
|
||||
real TRighe_condizioni_vendita::find_next_qta(TRectype& r)
|
||||
real TRighe_condizioni_vendita::find_next_qta(const TRectype& r)
|
||||
{
|
||||
TLocalisamfile f(LF_RCONDV);
|
||||
real qta(MAX_REAL);
|
||||
real qta(1e10);
|
||||
f.curr() = r;
|
||||
int nscagl = r.get_int("NSCAGL");
|
||||
f.put("NSCAGL", nscagl+1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user