Comment code 
Author Message
 Comment code

Is there a way to put a comment box around a piece of code.  e.i. if I
modify a small portion of a vi and want the next programmer to see exactly
where I made my changes I can add a comment but, I would like to surround
the entire change.  Any ideas.

Thanks,
mickey



Tue, 28 Sep 2004 04:53:52 GMT  
 Comment code
Sorry, I spoke to soon.  That doesn't work as the comment box does not
move behind the data flow lines and continues to obscure them.  Excuse
me.


Tue, 28 Sep 2004 06:07:44 GMT  
 Comment code
You can enter your comments directly on the diagram window by clicking
on the 'whitespace' of the diagram with the 'edit text' cursor
selected and then input your comments.  Afterwards, you can resize the
comment box by dragging a corner of it with the 'position/size/select'
cursor selected, shade it with the 'set color' cursor and relegate it
to the background by using the 'reorder' tools on the menu bar.


Tue, 28 Sep 2004 06:00:13 GMT  
 Comment code
The only problem that prevents this technique to be really useful is
that the comment box hides the wires beneath it even when put in
background.

Another option is to copy a box (made transparent)or a frame from the
front panel decoration menu and resize it to enclose your code
snippets.



Tue, 28 Sep 2004 06:14:12 GMT  
 Comment code
Jean-Pierre-

You are brilliant (as always).  I never new you could put front panel
decorations on the diagram.  Many times I have wished for an arrow
decoration on the diagram.  If your front panel is smaller than your
diagram page you can actually drop the decoration straight onto the
diagram once you have picked it from the front panel controls toolbox.
Do you think this is 'issue free' as far as app builder, version
recompiling or VI server functionality?

It seems that the old style frame decoration would be his best choice
as it would give the thickest border that is colorable.

It seems that another posssibility that would allow for a colored
background without obscuring the wires is to use a sequence structure
without adding any additional frames.  I'm not sure if this would be
issue free in terms of performance and all possibilities of diagram
wiring.

Thanks for your input.



Tue, 28 Sep 2004 07:01:24 GMT  
 Comment code
*blush*

Spaz,

I am not aware of any issue when copying pictures and decorations on
the diagram. For the application builder, VIs diagrams are removed so
any picture within vanishes in the virtual void.

The sequence works too but it is very thick. You must state that the
structure is solely for comment purposes because it is usually used
for coding. Otherwise, sequences have no performance issues: they
force execution order on the compiler but the code execute at the same
speed.



Tue, 28 Sep 2004 07:46:00 GMT  
 Comment code

Quote:
>The sequence works too but it is very thick. You must
><b><i>state</I></b> that the structure is solely for comment
>purposes because it is usually used for coding.
>Otherwise, sequences have no performance issues: they
>force execution order on the compiler but the code
>execute at the same speed.

State?  Do you mean 'state' in the description and tip?  (No need to
reply if this is what you mean.)

!!!Thanx!!!



Tue, 28 Sep 2004 08:11:32 GMT  
 Comment code
Thank you for the decoration tip.


Tue, 28 Sep 2004 14:09:50 GMT  
 Comment code


Quote:
> Sorry, I spoke to soon.  That doesn't work as the comment box does not
> move behind the data flow lines and continues to obscure them.  Excuse
> me.

If you set the bacgkground of the comment box transparent it works,
(remember to set the foreground color to black or another color or the
frame will disappear) but then again, it's not possible to make a fancy
background color.


Tue, 28 Sep 2004 16:51:54 GMT  
 Comment code
Yes you can see the wires but you can't select them to move or edit
them. They are still *under* the comment box.


Tue, 28 Sep 2004 19:01:27 GMT  
 Comment code


Quote:
> Yes you can see the wires but you can't select them to move or edit
> them. They are still *under* the comment box.

You are correct:

A comment box with transparent background will show wires but it is not
possible to select them.

but:
I get the same behaviour when using decorations copied from the front panel

(Labview 6.0.2)

Regards
Rolf



Tue, 28 Sep 2004 19:36:58 GMT  
 Comment code
You are right. Then we can only use frame decoration to enclose code
and keeping the wire edition functional. I wonder why wires are
forcedd to be below any other object on the diagram.


Tue, 28 Sep 2004 20:23:05 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. Pre- and post-conditions (was Commenting code)

2. Commenting code

3. Commenting code

4. "How to Comment Code"

5. Question regarding commenting code

6. commenting code well

7. commenting code well

8. Commented code causing problems

9. Indenting source code and commenting with Dolphin

10. delete commented out code

11. Embedded source code comments not being generated

12. Comment Smalltalk Code?

 

 
Powered by phpBB® Forum Software