[futurebasic] RE: [FB] Folder Inclusion in an FB Project

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : August 2011 : Group Archive : Group : All Groups

From: "Edwards, Waverly" <Waverly.Edwards@...>
Date: Mon, 22 Aug 2011 13:17:46 -0500
While the files may be included, the order of the inclusion is important if they are not independent of each other.


W.


-----Original Message-----
From: futurebasic@... [mailto:futurebasic@...] On Behalf Of Robert Purves
Sent: Sunday, August 21, 2011 8:15 PM
To: futurebasic@...
Subject: Re: [FB] Folder Inclusion in an FB Project


Max Taylor wrote:

> While working on a project this morning I came up with what I though was a great idea (or so I thought).
> 
> I had about ten+ files that I wanted to include within an FB Project without having to create a file, type in all of the INCLUDE "TheFileNames" and then add more or take some out depending upon my current requirements, or to manually add each of them into the project window.
> 
> So, I created a folder, named it something like "MyIncludes" so I could just put all the files I wanted included into the folder and then just add the folder as a single entry into the Project.
> 
> Well, after doing the above, I was surprised only to find out that you can not add a folder to a project.

You can add a folder to an FB project window, but its contained files are not treated as source. Instead, at build time the entire folder gets copied to the app's Contents/Resources. Many projects make use of this feature.

Given the state of the editor code, introducing a new way to process folders, no matter how useful, would be nontrivial.


There is a way to have source inside subfolders. We use this in Headers to reduce the clutter of CoreGraphics and CoreText header files.

Suppose some file included in the project has contents:
include "MyFolder:A.incl"
include "MyFolder:B.incl"
include "MyFolder:C.incl"
include "MyFolder:D.incl"

If the project source folder has a folder MyFolder with the appropriate source files inside:
  MyFolder
     A.incl
     B.incl
     C.incl
     D.incl
then the paths will be correctly resolved by FB5. Note that MyFolder must not itself be directly included in any way, merely physically present.

Robert P.



--
To unsubscribe, send ANY message to: futurebasic-unsubscribe@...
To access the list archives, go to:  http://freegroups.net/groups/futurebasic/