Welcome! Log In Create A New Profile

Advanced

Delete Unused Local Procedures

Posted by Malc 
Malc
Delete Unused Local Procedures
July 15, 2008 06:05PM
Hi Guys

OK, I defined a window and created local procedures to do some processing, which I have now moved out to work in a class. Therefore the local procedures are no longer required.

However, on right-click in the project treeview, there is no delete option, only "edit this code".
Similarly, pressing the delete key on the item does nothing.

Is this a "feature"? Are local procedures indestructible? Anyone got kryptonite?


Regards


Malc
Malc
Re: Delete Unused Local Procedures SUSSED
July 15, 2008 06:14PM
Aha!

Found the K!

Though it's the Kouglof rather than debris from Supermans home planet

Seems more logical to do it from the project tree though.

Perhaps I should mention this to PC Soft.


Regards

Malc


Leo Voet
Re: Delete Unused Local Procedures
July 15, 2008 08:37PM
From the dashboard, you can click in the optimization pane on 'detecting dead code'
If all's well, you'd see all unused procedures in the list. (if not, press F5)
Leo.

PS and be happy you recently stepped into the WD story : a few versions ago local procedures were undestructable indeed !
The only alternative then was to recreate the window...



Edited 1 time(s). Last edit at 07/15/2008 08:44PM by Leo Voet.
Al
Re: Delete Unused Local Procedures
July 15, 2008 11:41PM
Hello Malc

I have never used the project tree in this manner, in fact I only accidentally found out that the controls and procs were available from it a few months ago, but I am so used to the kougloff that I never edit code or controls from the project tree, I just open the window and edit it.

I think dual screens are the only way to program efficiently in Windev. I use a couple of 22" monitors with the main Windev window on one and the kougloff and project pane on the other.

I can't say I recall any problem with deleting local code, in any version, but even if there was, commenting out the code would do the trick. (CtrlA Ctrl /)

The dashboard seems to be a pointless exercise to simply provide a graphic interface and I find the project graph utterly useless and a waste of resources. On a large project, the graph is just a series of tiny blobs and the first thing I do is shrink it out of the way, I have asked PCSoft a few times how to get rid of it totally but to no avail.

I set up folders in the project pane to group windows into meaningful sections. If you choose this method you need to temporarily set sole control of the project to yourself before you can drag and drop windows into folders and sometimes the move does not work, because the move process has been broken ever since the folders were introduced, but it still produces a clean and quick interface for using the project pane.

Regards
Al



Edited 1 time(s). Last edit at 07/15/2008 11:56PM by Al.
Paul Turner
Re: Delete Unused Local Procedures
July 16, 2008 06:41AM
Hi Al

I find the opposite to you with respect to the project graph. Simply create sub-folders within the graph to set-up usable size collections.

Rgds
Paul
Al
Re: Delete Unused Local Procedures
July 16, 2008 09:56AM
Hello Paul

Thanks for the thought.
I did try doing that but it was still too cluttered, hard to read, slow to load and slower to use than the project pane. The graphical sub folders use the ones you have created for the project pane and by the time you have set up 20+ of them in the graphical interface they are quite small and the text labels run vertically making them hard to read.

There are over a 1000 windows in this project but I have a reasonably strict naming convention so within the folders in the project pane, everything is in alphabetical order and grouped nicely so it is much quicker to select and edit a window rather than wading through a set of graphical blobs arranged according to window links rather than alpha order. The project pane, being a tree structure also allows you to compress the folder list
into main sections which does not happen on the graphical interface.

It comes down to a matter of personal preference so it is good that Windev can cater to both our work styles and I guess I am not a graphical perception person. What is that left or right brain dominant ?

Regards
Al
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: