Board index » delphi » IDE - User-defined types in units with non-visual functions

IDE - User-defined types in units with non-visual functions

IDE - User-defined types in units with non-visual functions

I am missing the "New unit" function from D1. I store certain
formula functions in these units, they have no forms associated
with them in particular.

The formulas uses enumerated types, which I must define somewhere,
like this:

Type TMwScaleType = (stHigh,stMedium,stLow);

The D3 IDE offers no menu where one might create such a unit. For
example, I want a unit called mycalcs.pas.  Do they propose that
one uses TDataModule, I read about that in the D3 help, but I don't
seem to get the point.

Q1. How does one create single units, I can't see it in the IDE.
Q2. Where is the best place to define enumerated types for a
    large application.
Q3. Any improvement on the example quoted below.

Example:
--------

unit MyCalcs;

interface

uses DB, DBTables, classes, SysUtils, Forms,
  WinTypes, WinProcs, Messages, Graphics, Controls,
  StdCtrls, DBCtrls, DBGrids, Grids, Mask, ExtCtrls,
  Tabs, ClipBrd, Menus, Buttons, Dialogs;

{Function header names go here}

Type TMyScaleType = (stHigh,stMedium,stLow);

implementation

uses MyMain, MyDateFunc;

{Function code goes here,
 Functions use TMyScaleType}

end.

Please email me. I thankfully reply.
--------------------------------------------
M...@lottery.powernet.co.uk
--------------------------------------------
Sorry, I do not have a return address in my message header to avoid
the email gathering robots. Please cut and paste my email from here
thanks. M...@lottery.powernet.co.uk

Please email me. I thankfully reply.
--------------------------------------------
M...@lottery.powernet.co.uk
--------------------------------------------
Sorry, I do not have a return address in my message header to avoid
the email gathering robots. Please cut and paste my email from here
thanks. M...@lottery.powernet.co.uk

 

Re:IDE - User-defined types in units with non-visual functions


Im Artikel <374f1...@news.power.net.uk>,
PleaseSeeAddr...@TheBottom.OfMyMessage.co.uk (Hello) schreibt:

Quote
>Q1. How does one create single units, I can't see it in the IDE.

I'm using D4, and have added the "New Unit" command to the toolbar. Since no
picture is available for this command, it's displayed only as a string.

Quote
>Q2. Where is the best place to define enumerated types for a
>    large application.

Any unit ;-)
This unit must be included into every other unit which needs these
declarations. If you already have such a 'common' unit, add the declarations
there, otherwise create a new unit.

DoDi

Re:IDE - User-defined types in units with non-visual functions


In article <19990530040655.13701.00004...@ngol06.aol.com>, vb...@aol.com

Quote
(VBDis) writes:
>>Q1. How does one create single units, I can't see it in the IDE.

>I'm using D4, and have added the "New Unit" command to the toolbar. Since no
>picture is available for this command, it's displayed only as a string.

In D3 it's File>New and you do get a pretty picture <g>

Gordon.

http://members.aol.com/mgcsoft/  (the function junction equation editor)
http://members.aol.com/delphistuf/delphstf.htm   (Delphi bits and bobs and a
few links)

MGCSoft

Other Threads