Code line numbers - causing paste problems

Reply

Join Date: Feb 2002
Posts: 12,057
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 129
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: Code line numbers - causing paste problems

 
0
  #11
Feb 6th, 2007
Still investigating a solution. In the meantime, I've confirmed the problem is not with the web browser but rather with your editor. When using Firefox 2 and Windows Vista, I was able to copy/paste just fine into Notepad but I got line numbers when copy/pasting into Zend PHP Studio.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 3,127
Reputation: WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of 
Solved Threads: 283
Moderator
WaltP's Avatar
WaltP WaltP is offline Offline
Posting Sensei

Re: Code line numbers - causing paste problems

 
0
  #12
Feb 6th, 2007
FireFox1.5 into VEdit -- line numbers.
FireFox1.5 into Notepad -- line numbers
Firefox1.5 into Wordpad -- line numbers

IE7 into VEdit -- one line, no formatting
IE7 into Notepad -- one line, no formatting
IE7 into Wordpad -- no formatting

Opera9 -- seems to work.

I see no reason for line numbers either. I doubt it's worth the trouble to track down the solution. And it would be too presumptuous to require a specific browser.

It would also be beneficial IMO to put back the label "code" and the lines above and below the code. Don't have to change the code format, just the head and tail.
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,057
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 129
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: Code line numbers - causing paste problems

 
0
  #13
Feb 6th, 2007
I went ahead and implemented the same workaround DevShed uses that Dave suggested. Of course it's not that elegant ... but let's see.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,648
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1498
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Code line numbers - causing paste problems

 
0
  #14
Feb 6th, 2007
I like that change -- now we can turn line numbers on and off as we please. Hope you keep this feature.
Last edited by Ancient Dragon; Feb 6th, 2007 at 9:12 am.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,057
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 129
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: Code line numbers - causing paste problems

 
0
  #15
Feb 6th, 2007
Thanks Ancient!
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,051
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 332
Team Colleague
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: Code line numbers - causing paste problems

 
0
  #16
Feb 6th, 2007
I second that. It wasn't that the line numbers were bad, but if they interfere with my ease of copying and pasting, then it becomes more a nuisance. This solution is great.
"Technological progress is like an axe in the hands of a pathological criminal."

All my posts may be freely redistributed under the terms of the MIT license.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,057
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 129
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: Code line numbers - causing paste problems

 
0
  #17
Feb 6th, 2007
I went ahead and implemented this in our code snippet library as well. Here is an example:

http://www.daniweb.com/code/snippet582.html

You'll notice that with the line numbers, when code is too long for the line, it very cleanly wraps around with the line number indicating it's just a wrap around. I think this is a lot nicer than the messy horizontal scrollbars, especially with very long snippets.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 3,127
Reputation: WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of 
Solved Threads: 283
Moderator
WaltP's Avatar
WaltP WaltP is offline Offline
Posting Sensei

Re: Code line numbers - causing paste problems

 
0
  #18
Feb 7th, 2007
Originally Posted by Ancient Dragon View Post
I like that change -- now we can turn line numbers on and off as we please. Hope you keep this feature.
I think this will work. Can you tell how many line are in the code block? If so, could you please add the toggle to the top of the block also if the block is greater than, say, 30 lines? If not, just add the toggle to the top. Many times people post 2 or more (window) pages of code and if we see something we wish to comment on at the top, we have to scroll all the way down, then all the way back up. This would also delineate the block nicely.
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,057
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 129
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: Code line numbers - causing paste problems

 
0
  #19
Feb 7th, 2007
I actually went ahead and decided to allow the code to be as long as it needs to be. I found the scrollbars incredibly annoying. I prefer to read code the same way that I do everyday in my IDE ... by utilizing the full height of my monitor, as opposed to being forced to only see a couple of lines of code at a time. I think it has something to do with me not having a photographic memory.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,649
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 474
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Code line numbers - causing paste problems

 
0
  #20
Feb 7th, 2007
Originally Posted by joeprogrammer View Post
The new line numbers inserted when using syntax coloring code tags is causing me problems when copying and pasting code.
Click on the link "toggle plain text" which appears below the code snippet and then try copy-pasting. It works out to be fine.
I don't accept change; I don't deserve to live.

Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the DaniWeb Community Feedback Forum


Views: 4382 | Replies: 22
Thread Tools Search this Thread



Tag cloud for DaniWeb Community Feedback
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC