Mattias Gaertner wrote:
On Fri, 02 Nov 2007 18:59:26 -0300
Luiz Americo Pereira Camara <[EMAIL PROTECTED]> wrote:

Luiz Americo Pereira Camara wrote:
# There is no real need for conditional options for units
Maybe there's already a solution to this case and i'm missing
something.
In fact, i already found a workaround that i implemented in another package. I added a dummy unit to the package that uses the required units by OS something like:

{$ifdef windows}
Uses
  WinUnits;
{$endif}
{$ifdef unix}
Uses
  UnixUnits;
{$endif}

"WinUnits" and "UnixUnits" are not used i the package but are i the unit search path of the package

With this trick, "WinUnits" is compiled only under windows and "UnixUnits" under unixes.

It's no trick - it's pascal.
The IDE will never get that flexible. That's why I think, this case
does not need any special IDE magic.
Yes. I'm fine with this workaround but this has a side effect (maybe just a bug in IDE/Debugger):
- I use a unit inside "units\$(LCLWidgetType)\"
- This unit is compiled for all widgetsets/oses (no problem here)
- The codetools find this file
- A breakpoint is set in that unit
- When the breakpoint is hit the debugger ask for the location of that unit

PS: The cited package is the virtualtreeview-unstable and the unit is virtualpanningwindow

Luiz

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to