Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #8570

ifdef question

From Martin <Martin@spam.spam>
Newsgroups comp.lang.clipper.visual-objects
Subject ifdef question
Date 2015-10-28 10:05 +0000
Organization A noiseless patient Spider
Message-ID <n0q6gl$has$1@dont-email.me> (permalink)

Show all headers | View raw


Hello all

I am writing code to handle different entry formats and I am trying to 
minimise the code bases.

I am writing numeric handling for people who do not know that the rest 
of the world uses mm.

So I have written a class to replace all mm entry fields, but the class 
has two forms with different INHERITS.

      Base
+------+------+
|             |
|             inch control code
|             |
|             inch formatting code
mm format     |
|             |
my numeric field class

So I want my bottom class in this to be ifdefed rather than via comments

               EnterCallback
     |               InchEdit
SLE_N4              SLE_NIWH
               SLE_WH


Current example code

CLASS SLE_WH		INHERIT SLE_N4					//	Top level class for width & height
//	CLASS SLE_WH	INHERIT SLE_NIWH

CLASS SLE_N4		INHERIT SLE_EnterCallBack		//	mm class for width & height



CLASS SLE_NIWH		INHERIT SLE_InchEdit			//	inch class for width & height
CLASS SLE_InchEdit	INHERIT SLE_EnterCallback


CLASS SLE_EnterCallback	INHERIT SingleLineEdit


And I have not been able to use ifdef in the class definition for SLE_WH

Is this possible?

Thanks Martin

Back to comp.lang.clipper.visual-objects | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

ifdef question Martin <Martin@spam.spam> - 2015-10-28 10:05 +0000
  Re: ifdef question "Wolfgang Riedmann" <wriedmann@gmail.com> - 2015-10-28 14:45 +0100

csiph-web