I got the solution, it works the same way, actually I was doing a little
stupid, Thanks all for your patience



> I am trying conditional compilation like the example here, for debugging
> purpose I need to turn off some function calls, I do not want to comment
aay
> code but I just want some maco like thing to be defined somewhere and upon
> found some variable defines the compiler would simply ignore those lines
of
> code like they have been commented out. but it does not work here, please
> somebody explain this and suggest any wayouts.
>
> typedef struct FieldType
> #ifdef ALLOW_ACCESS_TO_INTERNALS_OF_FIELDS // These fields will not be
> available in the next OS release!
> {
>  UInt16    id;
>  RectangleType  rect;
>  FieldAttrType  attr;
>  Char      *text;     // pointer to the start of text string
>  MemHandle   textHandle;    // block the contains the text string
>  LineInfoPtr   lines;
>  UInt16    textLen;
>  UInt16    textBlockSize;
>  UInt16    maxChars;
>  UInt16    selFirstPos;
>  UInt16    selLastPos;
>  UInt16    insPtXPos;
>  UInt16    insPtYPos;
>  FontID    fontID;
>  UInt8     maxVisibleLines;  // added in 4.0 to support
> FldSetMaxVisibleLines
> }
> #endif
> FieldType;
>
>
> what I did is defines like this in main header file of the project: -
>
> #ifndef GremlinLavelSync
> #define GremlinLavelSync
> #endif
>
> #ifndef GremlinLavelLogin
> #define GremlinLavelLogin
> #endif
>
> or simply
>
> #define GremlinLavelSync
> #define GremlinLavelLogin
>
> and somewhere in other source file I wrote
>
>     case MainMenuLogOffButton:
>     {
>      #ifdef GremlinLavelLogin
>      FrmGotoForm(LoginForm);
>      handled=true;
>      #endif
>     break;
>     }
>
>
>
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to