1. Constant cleaner

Hello everyone,

I have written a new to me program  called Constant Cleaner. IIf anybody is
interested I will post it in the archives.

  If your code looks like this,
global constant aMovCombo = createEx (Combo ,"", Window1, 28, 305, 262 , 240,
 0, 0 )--combo
global constant ararcombo = createEx (Combo ,"", Window1, 28, 415, 262, 60, 0,
 0 )--combo
global constant aparcombo = createEx (Combo ,"", Window1, 28, 440, 262 , 60, 0,
 0 )--combo
global constant a001combo = createEx (Combo ,"", Window1, 28, 465, 262 , 60, 0,
 0 )--combo
global constant amisccombo = createEx (Combo ,"", Window1, 28, 490, 262 , 60,
 0, 0 )--combo
 
 constant ajpg      = createEx (EditText ,"", Window1, 150, 70, 48, 18, 0, 0 )
 constant ajpe      = createEx (EditText ,"", Window1, 150, 86, 48, 18, 0, 0 )
 constant agif      = createEx (EditText ,"", Window1, 150, 102, 48,18, 0, 0 )
 constant abmp      = createEx (EditText ,"", Window1, 150, 118, 48, 18, 0, 0 )
 constant bjpg      = createEx (EditText ,"", Window1, 200, 70, 48, 18, 0, 0 )
 constant bjpe      = createEx (EditText ,"", Window1, 200, 86, 48, 18, 0, 0 )
 constant bgif      = createEx (EditText ,"", Window1, 200, 102, 48, 18, 0, 0 )
 constant bbmp      = createEx (EditText ,"", Window1, 200, 118, 48, 18, 0, 0 )
constant LText_jpg      = createEx (CText, "jpg     ", Window1, 100, 71, 48,
 20, 0, 0 )
constant LText_jpe      = createEx (CText, "jpe     ", Window1, 100, 88, 48,
 20, 0, 0 )
constant LText_gif      = createEx (CText, "gif     ", Window1, 100, 105, 48,
 20, 0, 0 )
constant LText_bmp      = createEx (CText, "bmp     ", Window1, 100, 122, 48,
 20, 0, 0 )
constant LText_jpg_rt      = createEx (CText, "", Window1, 250, 71, 48, 20, 0,
 0 )
constant LText_jpe_rt      = createEx (CText, "", Window1, 250, 88, 48, 20, 0,
 0 )
constant LText_gif_rt      = createEx (CText, "", Window1, 250, 105, 48, 20, 0,
 0 )
constant LText_bmp_rt      = createEx (CText, "", Window1, 250, 122, 48, 20, 0,
 0 )
 
--and you would like it to look like this.

global constant aMovCombo = createEx (Combo ,"", Window1, 28, 305, 262 , 240, 0,
0 ),--combo
ararcombo = createEx (Combo ,"", Window1, 28, 415, 262, 60, 0, 0
                ),--combo
aparcombo = createEx (Combo ,"", Window1, 28, 440, 262 , 60, 0,
                0 ),--combo
a001combo = createEx (Combo ,"", Window1, 28, 465, 262 , 60, 0,
                0 ),--combo
amisccombo = createEx (Combo ,"", Window1, 28, 490, 262 , 60, 0,
                0 )--combo

constant ajpg      = createEx (EditText ,"", Window1, 150, 70, 48, 18, 0, 0 ),
          ajpe      = createEx (EditText ,"", Window1, 150, 86, 48, 18, 0, 0 ),
          agif      = createEx (EditText ,"", Window1, 150, 102, 48,18, 0, 0 ),
          abmp      = createEx (EditText ,"", Window1, 150, 118, 48, 18, 0, 0 ),
          bjpg      = createEx (EditText ,"", Window1, 200, 70, 48, 18, 0, 0 ),
          bjpe      = createEx (EditText ,"", Window1, 200, 86, 48, 18, 0, 0 ),
          bgif      = createEx (EditText ,"", Window1, 200, 102, 48, 18, 0, 0 ),
          bbmp      = createEx (EditText ,"", Window1, 200, 118, 48, 18, 0, 0 ),
LText_jpg      = createEx (CText, "jpg     ", Window1, 100, 71, 48,
          20, 0, 0 ),
LText_jpe      = createEx (CText, "jpe     ", Window1, 100, 88, 48,
          20, 0, 0 ),
LText_gif      = createEx (CText, "gif     ", Window1, 100, 105, 48,
          20, 0, 0 ),
LText_bmp      = createEx (CText, "bmp     ", Window1, 100, 122, 48,
          20, 0, 0 ),
LText_jpg_rt      = createEx (CText, "", Window1, 250, 71, 48, 20, 0,
          0 ),
LText_jpe_rt      = createEx (CText, "", Window1, 250, 88, 48, 20, 0,
          0 ),
LText_gif_rt      = createEx (CText, "", Window1, 250, 105, 48, 20, 0,
          0 ),
LText_bmp_rt      = createEx (CText, "", Window1, 250, 122, 48, 20, 0,
          0 )


Tested works. I would like to know if there are any problems.


Don Cole

new topic     » topic index » view message » categorize

2. Re: Constant cleaner

don cole wrote:
> 
> Hello everyone,
> 
> I have written a new to me program  called Constant Cleaner. IIf anybody is
> interested I will post it in the archives.
> 
>   If your code looks like this,
> }}}
<eucode>
> 
>  global constant aMovCombo = createEx (Combo ,"", Window1, 28, 305, 262 , 240,
>  0, 0 )--combo
>  global constant ararcombo = createEx (Combo ,"", Window1, 28, 415, 262, 60,
>  0, 0 )--combo
>  global constant aparcombo = createEx (Combo ,"", Window1, 28, 440, 262 , 60,
>  0, 0 )--combo
>  global constant a001combo = createEx (Combo ,"", Window1, 28, 465, 262 , 60,
>  0, 0 )--combo
>  global constant amisccombo = createEx (Combo ,"", Window1, 28, 490, 262 , 60,
>  0, 0 )--combo
>  
>  constant ajpg      = createEx (EditText ,"", Window1, 150, 70, 48, 18, 0, 0 )
>  constant ajpe      = createEx (EditText ,"", Window1, 150, 86, 48, 18, 0, 0 )
>  constant agif      = createEx (EditText ,"", Window1, 150, 102, 48,18, 0, 0 )
>  constant abmp      = createEx (EditText ,"", Window1, 150, 118, 48, 18, 0, 0
>  )
>  constant bjpg      = createEx (EditText ,"", Window1, 200, 70, 48, 18, 0, 0 )
>  constant bjpe      = createEx (EditText ,"", Window1, 200, 86, 48, 18, 0, 0 )
>  constant bgif      = createEx (EditText ,"", Window1, 200, 102, 48, 18, 0, 0
>  )
>  constant bbmp      = createEx (EditText ,"", Window1, 200, 118, 48, 18, 0, 0
>  )
>  constant LText_jpg      = createEx (CText, "jpg     ", Window1, 100, 71, 48,
>  20, 0, 0 )
>  constant LText_jpe      = createEx (CText, "jpe     ", Window1, 100, 88, 48,
>  20, 0, 0 )
>  constant LText_gif      = createEx (CText, "gif     ", Window1, 100, 105, 48,
>  20, 0, 0 )
>  constant LText_bmp      = createEx (CText, "bmp     ", Window1, 100, 122, 48,
>  20, 0, 0 )
>  constant LText_jpg_rt      = createEx (CText, "", Window1, 250, 71, 48, 20,
>  0, 0 )
>  constant LText_jpe_rt      = createEx (CText, "", Window1, 250, 88, 48, 20,
>  0, 0 )
>  constant LText_gif_rt      = createEx (CText, "", Window1, 250, 105, 48, 20,
>  0, 0 )
>  constant LText_bmp_rt      = createEx (CText, "", Window1, 250, 122, 48, 20,
>  0, 0 )
>  
> --and you would like it to look like this.
> 
> global constant aMovCombo = createEx (Combo ,"", Window1, 28, 305, 262 , 240,
> 0, 0 ),--combo
>                 ararcombo = createEx (Combo ,"", Window1, 28, 415, 262, 60, 0,
>                 0 ),--combo
>                 aparcombo = createEx (Combo ,"", Window1, 28, 440, 262 , 60,
>                 0, 0 ),--combo
>                 a001combo = createEx (Combo ,"", Window1, 28, 465, 262 , 60,
>                 0, 0 ),--combo
>                 amisccombo = createEx (Combo ,"", Window1, 28, 490, 262 , 60,
>                 0, 0 )--combo
> 
> constant ajpg      = createEx (EditText ,"", Window1, 150, 70, 48, 18, 0, 0 ),
>           ajpe      = createEx (EditText ,"", Window1, 150, 86, 48, 18, 0, 0
>           ),
>           agif      = createEx (EditText ,"", Window1, 150, 102, 48,18, 0, 0
>           ),
>           abmp      = createEx (EditText ,"", Window1, 150, 118, 48, 18, 0, 0
>           ),
>           bjpg      = createEx (EditText ,"", Window1, 200, 70, 48, 18, 0, 0
>           ),
>           bjpe      = createEx (EditText ,"", Window1, 200, 86, 48, 18, 0, 0
>           ),
>           bgif      = createEx (EditText ,"", Window1, 200, 102, 48, 18, 0, 0
>           ),
>           bbmp      = createEx (EditText ,"", Window1, 200, 118, 48, 18, 0, 0
>           ),
>           LText_jpg      = createEx (CText, "jpg     ", Window1, 100, 71, 48,
>           20, 0, 0 ),
>           LText_jpe      = createEx (CText, "jpe     ", Window1, 100, 88, 48,
>           20, 0, 0 ),
>           LText_gif      = createEx (CText, "gif     ", Window1, 100, 105, 48,
>           20, 0, 0 ),
>           LText_bmp      = createEx (CText, "bmp     ", Window1, 100, 122, 48,
>           20, 0, 0 ),
>           LText_jpg_rt      = createEx (CText, "", Window1, 250, 71, 48, 20,
>           0, 0 ),
>           LText_jpe_rt      = createEx (CText, "", Window1, 250, 88, 48, 20,
>           0, 0 ),
>           LText_gif_rt      = createEx (CText, "", Window1, 250, 105, 48, 20,
>           0, 0 ),
>           LText_bmp_rt      = createEx (CText, "", Window1, 250, 122, 48, 20,
>           0, 0 )
> 
> </eucode>
{{{

> 
> Tested works. I would like to know if there are any problems.
> 
> 
> Don Cole

Don,

Just an observation/suggestion:

It can sometimes be more useful to have constants declared as follows,
for ease in ADDING more as need arises:

global constant aMovCombo = createEx (Combo ,"", Window1, 28, 305, 262 , 240,
 0, 0 )--combo
,ararcombo = createEx (Combo ,"", Window1, 28, 415, 262, 60, 0,
                0 )--combo
,aparcombo = createEx (Combo ,"", Window1, 28, 440, 262 , 60, 0,
                0 )--combo
,a001combo = createEx (Combo ,"", Window1, 28, 465, 262 , 60, 0,
                0 )--combo
,amisccombo = createEx (Combo ,"", Window1, 28, 490, 262 , 60,
                0, 0 )--combo
 

this way new constants can be added by just starting a new line with a comma.

Dan Moyer

new topic     » goto parent     » topic index » view message » categorize

3. Re: Constant cleaner

Dan Moyer wrote:
> 
> don cole wrote:
> > 
> > Hello everyone,
> > 
> > I have written a new to me program  called Constant Cleaner. IIf anybody is
> > interested I will post it in the archives.
> > 
> >   If your code looks like this,
> > }}}
<eucode>
> > 
> >  global constant aMovCombo = createEx (Combo ,"", Window1, 28, 305, 262 ,
> >  240, 0, 0 )--combo
> >  global constant ararcombo = createEx (Combo ,"", Window1, 28, 415, 262, 60,
> >  0, 0 )--combo
> >  global constant aparcombo = createEx (Combo ,"", Window1, 28, 440, 262 ,
> >  60, 0, 0 )--combo
> >  global constant a001combo = createEx (Combo ,"", Window1, 28, 465, 262 ,
> >  60, 0, 0 )--combo
> >  global constant amisccombo = createEx (Combo ,"", Window1, 28, 490, 262 ,
> >  60, 0, 0 )--combo
> >  
> >  constant ajpg      = createEx (EditText ,"", Window1, 150, 70, 48, 18, 0, 0
> >  )
> >  constant ajpe      = createEx (EditText ,"", Window1, 150, 86, 48, 18, 0, 0
> >  )
> >  constant agif      = createEx (EditText ,"", Window1, 150, 102, 48,18, 0, 0
> >  )
> >  constant abmp      = createEx (EditText ,"", Window1, 150, 118, 48, 18, 0,
> >  0 )
> >  constant bjpg      = createEx (EditText ,"", Window1, 200, 70, 48, 18, 0, 0
> >  )
> >  constant bjpe      = createEx (EditText ,"", Window1, 200, 86, 48, 18, 0, 0
> >  )
> >  constant bgif      = createEx (EditText ,"", Window1, 200, 102, 48, 18, 0,
> >  0 )
> >  constant bbmp      = createEx (EditText ,"", Window1, 200, 118, 48, 18, 0,
> >  0 )
> >  constant LText_jpg      = createEx (CText, "jpg     ", Window1, 100, 71,
> >  48, 20, 0, 0 )
> >  constant LText_jpe      = createEx (CText, "jpe     ", Window1, 100, 88,
> >  48, 20, 0, 0 )
> >  constant LText_gif      = createEx (CText, "gif     ", Window1, 100, 105,
> >  48, 20, 0, 0 )
> >  constant LText_bmp      = createEx (CText, "bmp     ", Window1, 100, 122,
> >  48, 20, 0, 0 )
> >  constant LText_jpg_rt      = createEx (CText, "", Window1, 250, 71, 48, 20,
> >  0, 0 )
> >  constant LText_jpe_rt      = createEx (CText, "", Window1, 250, 88, 48, 20,
> >  0, 0 )
> >  constant LText_gif_rt      = createEx (CText, "", Window1, 250, 105, 48,
> >  20, 0, 0 )
> >  constant LText_bmp_rt      = createEx (CText, "", Window1, 250, 122, 48,
> >  20, 0, 0 )
> >  
> > --and you would like it to look like this.
> > 
> > global constant aMovCombo = createEx (Combo ,"", Window1, 28, 305, 262 ,
> > 240, 0, 0 ),--combo
> >                 ararcombo = createEx (Combo ,"", Window1, 28, 415, 262, 60,
> >                 0, 0 ),--combo
> >                 aparcombo = createEx (Combo ,"", Window1, 28, 440, 262 , 60,
> >                 0, 0 ),--combo
> >                 a001combo = createEx (Combo ,"", Window1, 28, 465, 262 , 60,
> >                 0, 0 ),--combo
> >                 amisccombo = createEx (Combo ,"", Window1, 28, 490, 262 ,
> >                 60, 0, 0 )--combo
> > 
> > constant ajpg      = createEx (EditText ,"", Window1, 150, 70, 48, 18, 0, 0
> > ),
> >           ajpe      = createEx (EditText ,"", Window1, 150, 86, 48, 18, 0, 0
> >           ),
> >           agif      = createEx (EditText ,"", Window1, 150, 102, 48,18, 0, 0
> >           ),
> >           abmp      = createEx (EditText ,"", Window1, 150, 118, 48, 18, 0,
> >           0 ),
> >           bjpg      = createEx (EditText ,"", Window1, 200, 70, 48, 18, 0, 0
> >           ),
> >           bjpe      = createEx (EditText ,"", Window1, 200, 86, 48, 18, 0, 0
> >           ),
> >           bgif      = createEx (EditText ,"", Window1, 200, 102, 48, 18, 0,
> >           0 ),
> >           bbmp      = createEx (EditText ,"", Window1, 200, 118, 48, 18, 0,
> >           0 ),
> >           LText_jpg      = createEx (CText, "jpg     ", Window1, 100, 71,
> >           48, 20, 0, 0 ),
> >           LText_jpe      = createEx (CText, "jpe     ", Window1, 100, 88,
> >           48, 20, 0, 0 ),
> >           LText_gif      = createEx (CText, "gif     ", Window1, 100, 105,
> >           48, 20, 0, 0 ),
> >           LText_bmp      = createEx (CText, "bmp     ", Window1, 100, 122,
> >           48, 20, 0, 0 ),
> >           LText_jpg_rt      = createEx (CText, "", Window1, 250, 71, 48, 20,
> >           0, 0 ),
> >           LText_jpe_rt      = createEx (CText, "", Window1, 250, 88, 48, 20,
> >           0, 0 ),
> >           LText_gif_rt      = createEx (CText, "", Window1, 250, 105, 48,
> >           20, 0, 0 ),
> >           LText_bmp_rt      = createEx (CText, "", Window1, 250, 122, 48,
> >           20, 0, 0 )
> > 
> > </eucode>
{{{

> > 
> > Tested works. I would like to know if there are any problems.
> > 
> > 
> > Don Cole
> 
> Don,
> 
> Just an observation/suggestion:
> 
> It can sometimes be more useful to have constants declared as follows,
> for ease in ADDING more as need arises:
> 
>  global constant aMovCombo = createEx (Combo ,"", Window1, 28, 305, 262 , 240,
> 0, 0 )--combo
>                 ,ararcombo = createEx (Combo ,"", Window1, 28, 415, 262, 60,
> 0, 0 )--combo
>                 ,aparcombo = createEx (Combo ,"", Window1, 28, 440, 262 , 60,
> 0, 0 )--combo
>                 ,a001combo = createEx (Combo ,"", Window1, 28, 465, 262 , 60,
> 0, 0 )--combo
>                 ,amisccombo = createEx (Combo ,"", Window1, 28, 490, 262 , 60,
> 0, 0 )--combo
>  
> 
> this way new constants can be added by just starting a new line with a comma.
> 
> Dan Moyer

   Thanks Dan,

  I can do that with the output but I always can't change the input.

Don Cole

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu