Patch level : 12.0 no-patch
Files correlati : Commento : - Aggiunto custom_box, permette di creare messaggi con al massimo 3 bottoni customizzati - Modificato costruttore TDate(int,int,int) adesso passando come giorno 31 mette in automatico l'ultimo del mese - Aggiunto commento esplicativo alle variabili della funzione FOR_EACH_SHEET_ROW in msksheet.h - recset & variant: corretto problema che poteva dare crash git-svn-id: svn://10.65.10.50/branches/R_10_00@23876 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
92a00f4d80
commit
55cbe98cd1
@ -153,6 +153,24 @@ int noyesall_box(
|
||||
return r == RESP_DEFAULT ? K_YES : (r == RESP_2 ? K_NO : K_SPACE);
|
||||
}
|
||||
|
||||
// @msg custom_box | Crea una finestra di RICHIESTA con il relativo messaggio
|
||||
int custom_box(
|
||||
const char* fmt, // @parm Messaggio da stampare nella finestra
|
||||
const char* buttons, // Bottone Sinistra
|
||||
const char* buttonc, // Bottone Centro
|
||||
const char* buttond, // Bottone Destra
|
||||
...) // @parmvar Uno o piu' parametri corrispondenti ai codici in <p fmt>
|
||||
{
|
||||
buildmsg();
|
||||
if (__batch)
|
||||
{
|
||||
__errors.add(msg);
|
||||
return K_NO;
|
||||
}
|
||||
ASK_RESPONSE r = xvt_dm_post_ask(buttons, buttonc, buttond, msg);
|
||||
return r == RESP_DEFAULT ? K_YES : (r == RESP_2 ? K_NO : K_SPACE);
|
||||
}
|
||||
|
||||
// @doc EXTERNAL
|
||||
// @msg yesno_box | Crea una finestra di RICHIESTA con il relativo messaggio
|
||||
bool yesno_box(
|
||||
|
@ -17,6 +17,7 @@ extern "C" {
|
||||
bool fatal_box(const char* fmt, ...);
|
||||
bool noyes_box(const char* fmt, ...);
|
||||
int noyesall_box(const char* fmt, ...);
|
||||
int custom_box(const char* fmt, const char* buttons, const char* buttonc, const char* buttond, ...);
|
||||
bool yesno_box(const char* fmt, ...);
|
||||
int yesnoall_box(const char* fmt, ...);
|
||||
int yesnocancel_box(const char* fmt, ...);
|
||||
|
@ -854,6 +854,9 @@ static void cfg2file(int which_config, TFilename& file)
|
||||
break;
|
||||
case CONFIG_SSA:
|
||||
file = "ssa.ini";
|
||||
break;
|
||||
case CONFIG_SERVICE:
|
||||
file = "server/service.ini";
|
||||
break;
|
||||
default:
|
||||
NFCHECK("Chi usa questo strano .ini?");
|
||||
|
@ -29,6 +29,8 @@ class TConfig;
|
||||
#define CONFIG_OEM 9
|
||||
// file parametri SSA (ssa.ini)
|
||||
#define CONFIG_SSA 10
|
||||
// file parametri CampoService (server/service.ini)
|
||||
#define CONFIG_SERVICE 11
|
||||
|
||||
// Callback per for_each_paragraph
|
||||
typedef int (*CONFIG_CALLBACK)(TConfig& cfg, void* jolly);
|
||||
|
@ -106,7 +106,13 @@ TDate::TDate(const char* s)
|
||||
TDate::TDate(int day, int month, int year)
|
||||
{
|
||||
if (day >= 1 && day <= 31 && month >= 1 && month <= 12 && year > 0)
|
||||
_val = makedata(day, month, year);
|
||||
{
|
||||
// 01/06/07 Tolla: Se passo il giorno 31 sicuramente voglio l'ultimo! Così passando 31/02/xx mi torna
|
||||
if(day == 31)
|
||||
_val = makedata(last_day(month,year), month, year);
|
||||
else
|
||||
_val = makedata(day, month, year);
|
||||
}
|
||||
else
|
||||
_val = NULLDATE;
|
||||
}
|
||||
|
@ -305,6 +305,11 @@ public:
|
||||
virtual ~TSheet_field();
|
||||
};
|
||||
|
||||
/* FOR_EACH_SHEET_ROW(__sheet, __r, __riga)
|
||||
* __sheet: variabile di tipo TSheet_field& dello sheet
|
||||
* __r: numero riga
|
||||
* __riga: variabile TToken_string* contenente la riga
|
||||
*/
|
||||
#define FOR_EACH_SHEET_ROW(__sheet, __r, __riga) \
|
||||
TString_array& sheetof##__riga = (__sheet).rows_array(); \
|
||||
FOR_EACH_ARRAY_ROW(sheetof##__riga, __r, __riga)
|
||||
|
@ -579,7 +579,11 @@ const TVariant& TRecordset::get_var(const char* name) const
|
||||
bool TRecordset::set_var(const char* name, const TVariant& var, bool create)
|
||||
{
|
||||
bool ok = false;
|
||||
TVariant* old = (TVariant*)_var.objptr(name);
|
||||
|
||||
TVariant* old = NULL;
|
||||
if(_var.is_key(name))
|
||||
old = (TVariant*)_var.objptr(name);
|
||||
|
||||
if (old != NULL)
|
||||
{
|
||||
*old = var;
|
||||
|
@ -5,7 +5,7 @@
|
||||
// TVariant
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
const TVariant NULL_VARIANT;
|
||||
const TVariant NULL_VARIANT = "";
|
||||
|
||||
void TVariant::set_null()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user