/* * Custom widget Demo * * * File : Main.cpp * Purpose : main of the program * Author : JLV * Creation : 10/19/04 * Last Update : 10/26/04 * * (C) hexaZem 2004 * * This file is part of a demo application for Zinzala. It can be * used, distributed and modified without limitation. * */ #include #include #include #include #include using namespace zSDK::Cincinella; int main(tInt32 aArgc,const tChar **aArgv) { tErr lErr; cDApplication lApp; if(!(lErr = lApp.GetFault())) { // if there is args on the command line, // extract them and give them to the app if(aArgc>1) { cCan lCan(0); if(!cCan::Verify(&lCan)) { sArgs::SetCan(&lCan); sArgs::Extract(aArgc,aArgv); // Start the app if(!(lErr = lApp.Run())) // and wait for it's end lApp.WaitEnd(); else sEnv::PrintToStream("The application failed to run : %s\n", sEnv::ErrorToString(lErr)); } else sEnv::PrintToStream("The application failed to run : %s\n", sEnv::ErrorToString(kErrOutOfMemory)); } else sEnv::PrintToStream("No skin specified.\n"); } else sEnv::PrintToStream("The application construction failed : %s\n", sEnv::ErrorToString(lErr)); }