sc?.cpp Aggiunto exit(1) in caso d'errore

sc?.url     Tolti menu inutili
sc0100.*    Derivata da TSkeleton_application


git-svn-id: svn://10.65.10.50/trunk@5825 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1997-12-30 14:11:31 +00:00
parent d83fa45e15
commit 1682e22e4a
13 changed files with 49 additions and 100 deletions

View File

@ -14,9 +14,12 @@ int main(int argc,char** argv)
switch(n) switch(n)
{ {
case 0: case 0:
sc0100(argc,argv); break; sc0100(argc,argv);
break;
default: default:
error_box(usage); error_box(usage);
exit(1);
break;
} }
return 0; return 0;
} }

View File

@ -1,17 +1,2 @@
#include <default.url> #include <default.url>
MENU TASK_MENUBAR
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(1)
MENU MENU_BAR(1)
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(2)
MENU MENU_BAR(2)
SUBMENU MENU_FILE "~File"

View File

@ -1,9 +1,11 @@
#include <stdarg.h> #include <stdarg.h>
#define XVT_INCL_NATIVE
#define STRICT
#include <colors.h> #include <colors.h>
#include <config.h> #include <config.h>
#include <mask.h> #include <mask.h>
#include <urldefid.h>
#include "sc0100.h" #include "sc0100.h"
#include "sc0100a.h" #include "sc0100a.h"
@ -11,7 +13,6 @@
HIDDEN bool gruppo_handler(TMask_field& f, KEY key) HIDDEN bool gruppo_handler(TMask_field& f, KEY key)
{ {
static bool ignore = FALSE; static bool ignore = FALSE;
if (key == K_TAB && f.focusdirty()) if (key == K_TAB && f.focusdirty())
{ {
if (!ignore) if (!ignore)
@ -55,16 +56,14 @@ bool TSaldaconto_app::create()
"la gestione del saldaconto attivata!", get_firm()); "la gestione del saldaconto attivata!", get_firm());
} }
return TSkeleton_application::create();
dispatch_e_menu(MENU_ITEM(1));
return TRUE;
} }
bool TSaldaconto_app::destroy() bool TSaldaconto_app::destroy()
{ {
delete _msk; delete _msk;
close_files(); close_files();
return TRUE; return TSkeleton_application::destroy();
} }
void TSaldaconto_app::open_files(int logicnum, ...) void TSaldaconto_app::open_files(int logicnum, ...)
@ -86,7 +85,7 @@ void TSaldaconto_app::on_config_change()
TPartita::carica_allineamento(); TPartita::carica_allineamento();
} }
bool TSaldaconto_app::menu(MENU_TAG) void TSaldaconto_app::main_loop()
{ {
TMask& m = curr_mask(); TMask& m = curr_mask();
@ -103,7 +102,6 @@ bool TSaldaconto_app::menu(MENU_TAG)
_allow_firm = TRUE; _allow_firm = TRUE;
} }
} }
return 0;
} }
void TSaldaconto_app::load_colors() void TSaldaconto_app::load_colors()

View File

@ -14,7 +14,7 @@ class TMask;
class TMask_field; class TMask_field;
#endif #endif
class TSaldaconto_app : public TApplication class TSaldaconto_app : public TSkeleton_application
{ {
TMask* _msk; TMask* _msk;
TArray _file; TArray _file;
@ -29,7 +29,7 @@ class TSaldaconto_app : public TApplication
protected: // TApplication protected: // TApplication
virtual bool create(); virtual bool create();
virtual bool destroy(); virtual bool destroy();
virtual bool menu(MENU_TAG tag); virtual void main_loop();
virtual bool firm_change_enabled() const { return _allow_firm; } virtual bool firm_change_enabled() const { return _allow_firm; }
virtual void on_config_change(); virtual void on_config_change();

View File

@ -13,11 +13,15 @@ int main(int argc,char** argv)
switch(n) switch(n)
{ {
case 0: case 0:
sc1100(argc,argv); break; sc1100(argc,argv);
break;
case 1: case 1:
sc1200(argc,argv); break; sc1200(argc,argv);
break;
default: default:
error_box(usage); error_box(usage);
exit(1);
break;
} }
return 0; return 0;
} }

View File

@ -1,17 +1,4 @@
#include <default.url> #include <default.url>
MENU TASK_MENUBAR
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(1)
MENU MENU_BAR(1)
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(2)
MENU MENU_BAR(2)
SUBMENU MENU_FILE "~File"

View File

@ -13,15 +13,21 @@ int main(int argc,char** argv)
switch(n) switch(n)
{ {
case 0: case 0:
sc2100(argc,argv); break; sc2100(argc,argv);
break;
case 1: case 1:
sc2200(argc,argv); break; sc2200(argc,argv);
break;
case 2: case 2:
sc2300(argc,argv); break; sc2300(argc,argv);
break;
case 3: case 3:
sc2400(argc,argv); break; sc2400(argc,argv);
break;
default: default:
error_box(usage); error_box(usage);
exit(1);
break;
} }
return 0; return 0;
} }

View File

@ -1,26 +1,2 @@
#include <default.url> #include <default.url>
MENU TASK_MENUBAR
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(1)
MENU MENU_BAR(1)
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(2)
MENU MENU_BAR(2)
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(3)
MENU MENU_BAR(3)
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(4)
MENU MENU_BAR(4)
SUBMENU MENU_FILE "~File"

View File

@ -13,9 +13,12 @@ int main(int argc,char** argv)
switch(n) switch(n)
{ {
case 0: case 0:
sc3100(argc,argv); break; sc3100(argc,argv);
break;
default: default:
error_box(usage); error_box(usage);
exit(1);
break;
} }
return 0; return 0;
} }

View File

@ -1,29 +1,16 @@
#include <default.url> #include <default.url>
#define MENU_FILE_ALT TASK_MENUBAR+4000 MENUBAR MENU_BAR(0)
MENU MENU_BAR(0)
#define M_FIL1_NEW MENU_FILE_ALT+101 SUBMENU M_FILE "~File"
#define M_FIL1_OPEN MENU_FILE_ALT+102 SUBMENU M_EDIT "~Modifica"
#define M_FIL1_SAVE MENU_FILE_ALT+103
#define M_FIL1_SAVEAS MENU_FILE_ALT+104
#define M_FIL1_QUIT MENU_FILE_ALT+105
MENU MENU_FILE_ALT
ITEM M_FIL1_NEW "~Nuovo"
ITEM M_FIL1_OPEN "~Apri"
ITEM M_FIL1_SAVE "~Salva"
ITEM M_FIL1_SAVEAS "Salva ~con Nome"
ITEM M_FIL1_QUIT "~Fine"
SEPARATOR
ITEM M_FILE_ABOUT "~Informazioni"
MENU TASK_MENUBAR
SUBMENU MENU_FILE "~File"
SUBMENU BAR_ITEM(1) "~Dati" SUBMENU BAR_ITEM(1) "~Dati"
SUBMENU BAR_ITEM(2) "~Testa" SUBMENU BAR_ITEM(2) "~Testa"
SUBMENU BAR_ITEM(3) "~Corpo" SUBMENU BAR_ITEM(3) "~Corpo"
SUBMENU BAR_ITEM(4) "~Piede" SUBMENU BAR_ITEM(4) "~Piede"
SUBMENU BAR_ITEM(5) "~Sfondo" SUBMENU BAR_ITEM(5) "~Sfondo"
SUBMENU M_HELP "~Help"
MENU BAR_ITEM(1) MENU BAR_ITEM(1)
ITEM MENU_ITEM(11) "~Relazione" ITEM MENU_ITEM(11) "~Relazione"

View File

@ -170,9 +170,9 @@ bool TForm_EC_editor::ccodes_handler(TMask_field& f, KEY k)
bool TForm_EC_editor::clngs_handler(TMask_field& f, KEY key) bool TForm_EC_editor::clngs_handler(TMask_field& f, KEY key)
{ {
TMask& m = f.mask();
if (key==K_TAB) if (key==K_TAB)
{ {
TMask& m = f.mask();
TString base(m.get(F_CBASE)); TString base(m.get(F_CBASE));
TString code(m.get(F_CCODES)); TString code(m.get(F_CCODES));
code << f.get(); code << f.get();
@ -269,9 +269,9 @@ bool TForm_EC_editor::cpy_handler(TMask_field& f, KEY k)
bool TForm_EC_editor::code_handler(TMask_field& f, KEY key) bool TForm_EC_editor::code_handler(TMask_field& f, KEY key)
{ {
TMask& m = f.mask(); if (key==K_TAB && !f.empty())
if (key==K_TAB && f.get().not_empty())
{ {
TMask& m = f.mask();
TString base(m.get(F_BASE)); TString base(m.get(F_BASE));
TString code(f.get()); TString code(f.get());
code << m.get(F_CODEL); code << m.get(F_CODEL);

View File

@ -12,7 +12,7 @@ TSelection_mask::TSelection_mask(const char* name)
_clifo_rel = new TRelation(LF_CLIFO); _clifo_rel = new TRelation(LF_CLIFO);
TRectype filter(LF_CLIFO); TRectype filter(LF_CLIFO);
filter.put("TIPOCF", "C"); filter.put(CLI_TIPOCF, "C");
_cli_cur_k1 = new TCursor(_clifo_rel, "", 1, &filter, &filter); _cli_cur_k1 = new TCursor(_clifo_rel, "", 1, &filter, &filter);
_cli_cur_k2 = new TCursor(_clifo_rel, "", 2, &filter, &filter); _cli_cur_k2 = new TCursor(_clifo_rel, "", 2, &filter, &filter);
@ -23,7 +23,7 @@ TSelection_mask::TSelection_mask(const char* name)
if (id2pos(SC_CLIFO) >= 0) if (id2pos(SC_CLIFO) >= 0)
{ {
filter.put("TIPOCF", "F"); filter.put(CLI_TIPOCF, "F");
_for_cur_k1 = new TCursor(_clifo_rel, "", 1, &filter, &filter); _for_cur_k1 = new TCursor(_clifo_rel, "", 1, &filter, &filter);
_for_cur_k2 = new TCursor(_clifo_rel, "", 2, &filter, &filter); _for_cur_k2 = new TCursor(_clifo_rel, "", 2, &filter, &filter);
_for_sh_k1 = new TCursor_sheet(_for_cur_k1, " |CODCF|RAGSOC", "Selezione fornitori per codice", _for_sh_k1 = new TCursor_sheet(_for_cur_k1, " |CODCF|RAGSOC", "Selezione fornitori per codice",

View File

@ -5,10 +5,6 @@
#include <assoc.h> #include <assoc.h>
#endif #endif
#ifndef __CONTO_H
class TBill;
#endif
#ifndef __MASK_H #ifndef __MASK_H
#include <mask.h> #include <mask.h>
#endif #endif
@ -21,12 +17,16 @@ class TBill;
#include <sheet.h> #include <sheet.h>
#endif #endif
#ifndef __CLIFO_H
#include <clifo.h>
#endif
#ifndef __SCSELMSK_H #ifndef __SCSELMSK_H
#include "scselmsk.h" #include "scselmsk.h"
#endif #endif
#ifndef __CLIFO_H #ifndef __CGLIB01_H
#include <clifo.h> #include "..\cg\cglib01.h"
#endif #endif
class TSelection_mask : public TMask class TSelection_mask : public TMask