Welcome! Log In Create A New Profile

Advanced

Resources in subdirectories of main project directory

Posted by Sohan 
Hi,

I created a style sheet for all the tables of my app. This style uses 2 images, one for the magnifier, sort icon und such, and one for the rollover effect. I like the images to be in a subdirectory of the main project directory, in C:\MyProject\Images instead of the main project directory itself - C:\MyProject. So the images in the style sheet refer to C:\MyProject\Images.

When I create a new table and make it use the style, Windev decides that the images found in the style, both located in C:\MyProject\Images should be in C:\MyProject. It fysically copies the images to C:\MyProject, and makes the new table refer to them instead of the original images in C:\MyProject\Images.

It looks like Windev regards every location other than the main project directory itself, to be not a part of the project, and therefore 'imports' the resources into the project. Every attempt on my part to clean up the mess in the main project directory (by moving resources to subdirectories) is frustrated by this behaviour. Is there a way around this?

/sohan
Jimbo
Re: Resources in subdirectories of main project directory
October 01, 2008 08:25AM
Hi, there is no separate directory for images in a WinDev project. Therefore, images have to be stored in the prject's directory. Sorry. Guenter
Hi Sohan

Quote
Sohan

I created a style sheet for all the tables of my app. This style uses 2 images, one for the magnifier, sort icon und such, and one for the rollover effect. I like the images to be in a subdirectory of the main project directory, in C:\MyProject\Images instead of the main project directory itself - C:\MyProject. So the images in the style sheet refer to C:\MyProject\Images.

When I create a new table and make it use the style, Windev decides that the images found in the style, both located in C:\MyProject\Images should be in C:\MyProject. It fysically copies the images to C:\MyProject, and makes the new table refer to them instead of the original images in C:\MyProject\Images.

It looks like Windev regards every location other than the main project directory itself, to be not a part of the project, and therefore 'imports' the resources into the project. Every attempt on my part to clean up the mess in the main project directory (by moving resources to subdirectories) is frustrated by this behaviour. Is there a way around this?

/sohan

Totally understand where you are coming from.
Include files without a path only seem to be found in C:\WinDev 12\Personal\External

I am toying with the settings in Tools..WinDev Options..Directories tab which gives the user the option of specifying some fixed folders eg. Goodies, Blocks of Code. etc

Would be nice if there was an Add Path/Folder option here to add some custom paths for shared files.

I have also come across WinDevs desire to copy everthing when playing around with various methodologies to share/reuse code in libraries/components etc and have been less than successful.

Oh well, I'll let you know if I come across anything

Cheers

Malc




Too bad.

I am really annoyed by this. I do not know a single developer who would allow the organising of project files to become such a mess. I have not yet seen many Windev projects made by others, but the ones that I have seen, all have a main project directory littered with all sorts of stuff. Now I know why.

I think I will suggest to PC SOFT to change this. I imagine that their developers should be sensitive to it. Maybe they should try it - take all the neatly organised project resources and throw them all into a single folder. I don't think they would like it.

/sohan
Marc De Swert
Re: Resources in subdirectories of main project directory
October 02, 2008 03:19PM
Yo Yohan,
I hate a mess in the project directory also and have a work around like this:

What i do is create in the main directory of the project subfolders like Reports, Screens, Pics, Querys..and so on

When we create a new window we save it in the subfolder Screens, by creating reports they will be saved in the sub Reports..., querys in...Querys folder

You can open an existing screen and save it in the new folder direction an than delete the original screen, also for reports as well

When you have a control or button and you would like to have it an image, you can than selected it from the folder Pics, but when you add a new pic it goes to the main folder, grab it and move it to the pics folder and than selected it again from the correct folder.

It's a litte bit work but when all is set, selecting pics that exist are no problemo

My directory is always clean, no mess inhere

Why Windev not automatically set up some directory is a shame

You can also create an direcory outside the project where you sets stuff, and par project you can link ti it

Marc.:cool:
Hi Marc,

The problem is that the reference to the image is inside a style sheet. It refers to a subdirectory of the project directory. Whenever the style is used or applied, Windev does not respect this directory. It always assumes that the image should be in the project directory, and physically copies the image file if it is not there allready. I tried everything I can think of, but it seems that there is no way around this.

The majority of the images used in my app are dynamically assigned to the controls. No problems there - I can organise them in directory structures any way I want. Some images cannot be assigned dynamically though, like rollover images and icons for a table's sort icon, magnifier and such. I am forced to assign them directly in the style sheet. This is where the problem lies.

Thanks for your reply.

Cheers,
/sohan
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: