RejectedSoftware Forums

Sign up

Re: subfolders

On Mon, 18 Feb 2013 07:36:05 +0100, Sönke Ludwig wrote:

Am 18.02.2013 07:31, schrieb Alexsej Skripnichenko:

Hello, I have a problem. I need to use the subfolders for templates .dt
For example:
views/default
views/default/forms
views/default/navigation
views/default/page
views/default/page/components
views/default/page/elements
views/default/page/layouts

How to do it

That unfortunately is a limitation with they way string imports work
right now. I would recommend to just put the files into the same folder
and use '.' as a "path" separator. That way they are still grouped
together and look somewhat like D module names when used.

Can we hope that this limit will change over time

Re: subfolders

Am 18.02.2013 12:04, schrieb Alexsej Skripnichenko:

On Mon, 18 Feb 2013 07:36:05 +0100, Sönke Ludwig wrote:

Am 18.02.2013 07:31, schrieb Alexsej Skripnichenko:

Hello, I have a problem. I need to use the subfolders for templates .dt
For example:
views/default
views/default/forms
views/default/navigation
views/default/page
views/default/page/components
views/default/page/elements
views/default/page/layouts

How to do it

That unfortunately is a limitation with they way string imports work
right now. I would recommend to just put the files into the same folder
and use '.' as a "path" separator. That way they are still grouped
together and look somewhat like D module names when used.

Can we hope that this limit will change over time

Only if the language adds support for it. In particular DMD just
searches the "views" directory shallowly for an exactly matching file
name whenever a string import is made. So even if the file name to
import includes a path separator, it will not match anything, because
the sub folders are not searched for a match.

You could try to file an enhancement request in D's bugzilla to see what
the DMD devs think about this, but I think there is nothing that can be
done in the library.

Re: subfolders

You could try to file an enhancement request in D's bugzilla to see what
the DMD devs think about this, but I think there is nothing that can be
done in the library.

I found a bugzilla entry. It seems this was disabled on Windows because of security reasons. It works on Linux, at least for me.

http://d.puremagic.com/issues/show_bug.cgi?id=3420

Best regards,

Robert