From c806351e61ed3b13274c3bfc54207b66bc4da5be Mon Sep 17 00:00:00 2001 From: fcolin Date: Tue, 21 Jun 2011 09:36:53 +0000 Subject: verification des parametres Ivy Appname et ready message ajout valeur par defaut si vide "$AppName READY" --- Ivy/Ivy.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Ivy/Ivy.cxx b/Ivy/Ivy.cxx index 1640b45..6484236 100644 --- a/Ivy/Ivy.cxx +++ b/Ivy/Ivy.cxx @@ -61,8 +61,17 @@ Ivy::Ivy(const char* name, const char * ready, IvyApplicationCallback *callback, synchronous = Synchronous; IvySynchroWnd::Init(synchronous); - ready_message = ready; - ApplicationName = name; + // check for empty application name + if ( name == NULL || strlen( name ) == 0 ) + ApplicationName = "LazyDevelopper"; + else + ApplicationName = name; + + // check for empty ready message + if ( ready == NULL || strlen( ready ) == 0 ) + ready_message = ApplicationName + " READY"; + else + ready_message = ready; binding_callback = NULL; application_callback = synchronous ? new IvySynchronousApplicationCallback(callback) : callback; -- cgit v1.1