--- Dominique Louis <[EMAIL PROTECTED]> escribió:
> Hi Jesus et al,
> I grabbed last night's snapshot and the error still persists.
>
> Can someone please explain why I need Printer4Lazarus in my Mac OS
> X
> project, especially if I am using Printers and PrinterDlg? Also if
> I
> remove the reference to Printer4Lazarus, it still comes up with the
> same
> error. As I mentioned earlier, this implies that the
> carbonprinters_h.inc is being reference elsewhere.
>
> Thanks,
>
>
> Dominique.
The TPrinter class in LCL printers unit, is not implemented because
lazarus plays with more than windows, so implementation is delegated
to Printer4Lazarus (P4L) package. Using only the lcl printers unit
has the effect of initialize the global object Printer to nil, and
programs that use only printers unit will surely crash.
P4L main unit is OsPrinters which depending on compile target it
creates a instance of TWinPrinter or TCupsPrinter, so Printer is not
nil anymore. TWinPrinter uses windows native api and that's why we
see native dialogs under windows, TCupsPrinter uses the CUPS library
for the same thing, but it doesn't have native dialogs. Carbon
support is planned and so there is a squeleton to fill, the same
could be done for other widgetsets that implement "native".
BTW, Phil's example modify the "other sources" path (compiler option
-Fu) to include the directory where P4L package is located, so it's
pretty much the same than doing a requirement of P4L package, It
works because the program has PrintersDlgs in the uses clause,
PrintersDlgs it's a P4L unit that in turn uses OsPrinters unit which
in the end do the correct intialization.
Jesus Reyes A.
____________________________________________________________________________________
¡Sé un mejor fotógrafo!
Perfecciona tu técnica y encuentra las mejores fotos.
http://mx.yahoo.com/promos/mejorfotografo.html
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives