Matt Emson wrote:
[...]
2) use the following trick in your local code:
type TMyclashingType = UnitIWantToUse.TMyClashingType;
so in your case:
type PicHandle = common.PicHandle;
Solution 1 is more favourable though. Solution 2 will only work if luck is
on your side and you do not require
Not a perfect solution, but the following solutions work:
1) create a unit for all clashing types to live in. Move all types that
clash to this central point and then use this unit anywhere that the clash
occurs.
2) use the following trick in your local code:
type TMyclashingType = UnitIWantToU
On 14 jun 2005, at 10:45, Alain Vitry wrote:
I know about unit propagation.
Note that FPC at this time does not support uses propagation, so only
the types exported directly by the units in the uses clauses of the
current compilation unit are visible.
PicHandle is first defined in MacW
Alain Vitry wrote:
Thanks for the answer.
But is that by design ?
Let' look at this case (not the best design, but big legacy):
File common.pas:
uses StandardFile, MacWindows;
...
var MaPict: array[WPictWind_1..WPictWind_3] of PicHandle;
File utils.pas:
uses commons, MacWindows, SegLoad, Qu
Thanks for the answer.
But is that by design ?
Let' look at this case (not the best design, but big legacy):
File common.pas:
uses StandardFile, MacWindows;
...
var MaPict: array[WPictWind_1..WPictWind_3] of PicHandle;
File utils.pas:
uses commons, MacWindows, SegLoad, Quickdraw, StandardFil
On 14 jun 2005, at 09:52, Alain Vitry wrote:
You must switch the order of the units, because you get the
'oldlinux' types which
you try to use in 'baseunix' functions.
This unit order trick is a bit of a wizardery to me.
It's simply: the last included unit overrides all previously include
Alain Vitry wrote:
Le 14 juin 05, à 09:46, Michael Van Canneyt a écrit :
You must switch the order of the units, because you get the 'oldlinux'
types which
you try to use in 'baseunix' functions.
This unit order trick is a bit of a wizardery to me. It quickly get very
messy in a large en
Le 14 juin 05, à 09:46, Michael Van Canneyt a écrit :
You must switch the order of the units, because you get the 'oldlinux'
types which
you try to use in 'baseunix' functions.
This unit order trick is a bit of a wizardery to me. It quickly get
very messy in a large enough program to swap
On Tue, 14 Jun 2005, Koenraad Lelong wrote:
> Hi,
> Anyone has suggestions why I can't compile the following :
>
> unit test1;
>
> interface
>
> function ReadCOM(portnum : integer; inlen : integer; var inbuf : array of
> byte) : integer;
>
> implementation
>
> uses baseunix, oldlinux;
You