Re: structure

new topic     » goto parent     » topic index » view thread      » older message » newer message

Try this instead of the OnPaint method....

--------------
procedure SetupARF020()
integer id

for i = 1 to 99 do
 if screen[i][1] = 99 then
   exit
 end if
 x = screen[i][1]*9-8
 y = screen[i][2]*18-45
 xt = x + length(screen[i][3])*9-10
 yt = y
 if screen[i][8]>0 then
   fl = screen[i][8]*9+9
 else
   fl = 0
 end if
 id = create(LText, screen[i][3],ARF020,x,y, 200, 25, 0)
 setFont(id, "Courier New",9,0)
 lbl = append(lbl,id )
 if fl > 0 then
   id = create(EditText,"",ARF020,xt,yt,fl,20,0)
   setFont(id, "Courier New",8,0)
   sle = append(sle, id)
 end if
end for
end procedure
-- Setup SFM name

SetupARF020()
WinMain(ARF020,Normal)
 -----------

This only creates the controls once and does run every time the window needs
repainting.

----- Original Message -----
From: <gwalters at sc.rr.com>
To: "EUforum" <EUforum at topica.com>
Sent: Friday, July 27, 2001 12:29 AM
Subject: Re: structure


>
>
> interesting...i'll think on it some..
>
> ..george
>
> ----- Original Message -----
> From: <irvm at ellijay.com>
> To: "EUforum" <EUforum at topica.com>
> Sent: Thursday, July 26, 2001 10:21 AM
> Subject: Re: structure
>
>
> >
> >
> > On Thursday 26 July 2001 09:35, gwalters at sc.rr.com wrote:
> >
> > > irv, you've hit it. each one can have a different length...problem is
> fixed
> > > now..thanks all for your input..
> >
> > That, of course, is one of Euphoria's advantages - you can pack
> > pretty much anything you want into a sequence, without any arbitrary
> > limits or having to pre-define the space.
> >
> > As an example, the 'normal' way to implement an A/R system is with
> > two files: a customer file containing name, addr, balances, etc.
> > and a transaction file, with current txns.
> >
> > With Euphoria, I tend to use just one file, which contains:
> > (hope my indentation makes it thru EuForum intact)
> >
> > customer key
> >   -- customer info
> >        -- name
> >        -- addr
> >        -- balances
> >             -- current
> >             -- 30
> >             -- 60
> >             -- 90
> >   -- customer txns (zero or more)
> >         -- inv #
> >         -- date
> >         -- amt...
> >
> > As customer makes purchases, the new purchase is just appended to
> > his/her txns sequence.
> >
> > Number of transactions can be obtained by calling length(customer[txns])
> > Customer totals are computed by looping 1... length(txns), etc.
> >
> > This eliminates a lot of lookups and searching, since everything related
> > is located within the one file. It also simplifies things such as
deleting
> > a customer account:
> > if length(txns) > 0
> > or balance != 0 then
> >   error("Can't delete active account!")
> >
> > Backups are simple - one file to copy, as are statements.
> > Reviewing a customer's account is verrry quick, as well.
> >
> > EOM reports are less quick, because you have to loop thru all
> > customers and consolidate the data. Usually you're printing these
> > reports, so there's plenty of time for processing while the printer
> > chugs along.
> >
> > Starting a new period is just a matter of adjusting the 30/60/90,
> > and then setting customer[x][txns] = {}
> >
> > You could keep the entire sequence of customers 'in-memory',
> > but it's better to store these in a EDS database, since EDS will
> > handle the lookup logic for you and ensure the use of unique keys
> > automatically.
> >
> > Regards,
> > Irv
> >
> >
> >
> >
> >
>
>
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu