I just submitted a code snippet for the competition here. I entered my description/documentation, then entered the code after clicking on "Code" and pasting in the code window. I submitted the post and was then presented with another window saying "a fully working code snippet must be entered". So I pasted the code into that window. Now the post has two copies of the code. I had to go back and edit the post to remove the duplicate code. Isn't this just a tad confusing?

Recommended Answers

All 4 Replies

I don't see anything confusing about it. When you write a code snippet there are clearly two sections when creating the post, a section for the text and one for the code. As for being able to also put code in the text section, well that can be useful for a separate piece of code (like the test harness) or for explaining the code with extracts from it.

It didn't show that way when I entered the post. I didn't get the "Enter code snippet" window until later. I'll chalk that up to my continuing network problems while here at the cottage. There are several which can't be DaniWeb problems because if they were someone else would have noticied as well.

The code box should appear above the text box immediately after you switch the type of article to "Code Snippet". If that doesn't happen for you, then it is either a problem on your side or a bug in the page. For me (Chrome, and Linux), it is all right.

It appeared when I started another code snippet (which I did not submit because it was only a test). But it failed to appear the first time. As I said, I have been experiencing very odd behaviour which I am attributing to problems with my ISP here at the cottage. I never have these problems at home so I'll just put up with them until September.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.