Re: Module import incompatibility

2021-08-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/31/21 11:17 AM, Paul Backus wrote: On Tuesday, 31 August 2021 at 14:09:01 UTC, Steven Schveighoffer wrote: Are you sure this is the problem? `PdfSurface` is not a valid identifier here except for the class. In order to access the package, you need to use `cairo.PdfSurface`. Must've cha

Re: Module import incompatibility

2021-08-31 Thread frame via Digitalmars-d-learn
On Tuesday, 31 August 2021 at 14:09:01 UTC, Steven Schveighoffer wrote: Are you sure this is the problem? `PdfSurface` is not a valid identifier here except for the class. In order to access the package, you need to use `cairo.PdfSurface`. Tango was full of stuff like this, and it worked f

Re: Module import incompatibility

2021-08-31 Thread frame via Digitalmars-d-learn
On Tuesday, 31 August 2021 at 13:03:54 UTC, Paul Backus wrote: On Tuesday, 31 August 2021 at 12:57:33 UTC, frame wrote: No, it has one, eg: ```d module cairo.PdfSurface; ``` but the filename is PdfSurface.d and class name also :\ You can use a selective import: ```d import cairo.PdfSurface

Re: Module import incompatibility

2021-08-31 Thread Paul Backus via Digitalmars-d-learn
On Tuesday, 31 August 2021 at 14:09:01 UTC, Steven Schveighoffer wrote: Are you sure this is the problem? `PdfSurface` is not a valid identifier here except for the class. In order to access the package, you need to use `cairo.PdfSurface`. Must've changed since you last checked: ```d // mai

Re: Module import incompatibility

2021-08-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 8/31/21 8:57 AM, frame wrote: On Tuesday, 31 August 2021 at 12:37:51 UTC, bauss wrote: On Tuesday, 31 August 2021 at 12:26:28 UTC, frame wrote: I'm sure it was asked before but can't find the thread: How to deal best with an older library that uses the same class name as module name? I ge

Re: Module import incompatibility

2021-08-31 Thread Paul Backus via Digitalmars-d-learn
On Tuesday, 31 August 2021 at 12:57:33 UTC, frame wrote: No, it has one, eg: ```d module cairo.PdfSurface; ``` but the filename is PdfSurface.d and class name also :\ You can use a selective import: ```d import cairo.PdfSurface: PdfSurface; ```

Re: Module import incompatibility

2021-08-31 Thread frame via Digitalmars-d-learn
On Tuesday, 31 August 2021 at 12:37:51 UTC, bauss wrote: On Tuesday, 31 August 2021 at 12:26:28 UTC, frame wrote: I'm sure it was asked before but can't find the thread: How to deal best with an older library that uses the same class name as module name? I get a lot of `Error: module ABC fro

Re: Module import incompatibility

2021-08-31 Thread bauss via Digitalmars-d-learn
On Tuesday, 31 August 2021 at 12:26:28 UTC, frame wrote: I'm sure it was asked before but can't find the thread: How to deal best with an older library that uses the same class name as module name? I get a lot of `Error: module ABC from file ...ABC.d must be imported with 'import ABC'` Do

Module import incompatibility

2021-08-31 Thread frame via Digitalmars-d-learn
I'm sure it was asked before but can't find the thread: How to deal best with an older library that uses the same class name as module name? I get a lot of `Error: module ABC from file ...ABC.d must be imported with 'import ABC'` Do I need to rename all modules?