Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Posting code

Engaged ,
Jul 13, 2009 Jul 13, 2009

I have just spent an exceedingly frustrating half-hour trying to post a few lines of JS to help out an Indesign user. I originally

tried via email; this worked, up to a point, except that some of the spaces used to format the code legibly appeared as HTML codes

at the forum and in the email notification. I then tried to edit the post and could not get the edit box to show what I put there. I

gave up and attached the code as a txt file.

Does anyone have a foolproof method of posting code at the forum?

Noel

8.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 13, 2009 Jul 13, 2009

save it to a text file and attach it? or better, host it on your own site and link to it. then you don't have to wait for it to sit queued.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 13, 2009 Jul 13, 2009

did you try posting in the html view surrounding your code with <pre> tags?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 13, 2009 Jul 13, 2009

testing:

function popup() {
   alert("hello world");
}
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 13, 2009 Jul 13, 2009

did you try posting in the html view surrounding your code with <pre> tags?

That's what Insert > Syntax Highlighting > Java does; creates a

<pre class="jive_text_macro jive_macro_code" jivemacro="code" ___default_attr="java"><p> </p></pre>

section, so I tried just pasting the text between the <p></p> pair, but the results were entirely unpredictable. Sometimes the code just got truncated half way through, and sometimes what came after the </pre> found its way into the code section.

I see that where it did work (posted via email) in the Testing forum yesterday,

http://forums.adobe.com/thread/460973

the code block is partitioned off by different tags:

<pre class="jive-pre"><code class="jive-code"> </code></pre>

and I could copy this and paste it without getting a load of & n b s p ; in the middle.

So why what worked yesterday doesn't today remains a mystery.

Noel

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 13, 2009 Jul 13, 2009

but the results were entirely unpredictable.

exactly. <sigh>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 13, 2009 Jul 13, 2009

Well you have to admit this jived up forum is consistent.

Its predictably unpredictable.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 13, 2009 Jul 13, 2009

Don't worry about troubleshooting all this technically, if it doesn't work, it doesn't work.  It's total crap, I've seen the same problem posting Java code with nbsp strings all over the place.  I think I could get it to do it consistently but I forgot how, because it's not my damned job to fix it.

We can't fix JiveBugs© or even provide troubleshooting that anyone will read, so why bother? All we can do is complain about the damn things being broken, don't waste your time going further. They don't deserve the help.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 13, 2009 Jul 13, 2009

save it to a text file and attach it?

That's what I ended up doing... It shouldn't be necessary, though. I just can't seem to get the order of clicking things right at

the forum.

Noel

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 13, 2009 Jul 13, 2009
It shouldn't be necessary, though.

agreed. if it's code (and you specifically tell the system it's code!) then they shouldn't touch it!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 13, 2009 Jul 13, 2009

that seemed to work, and retain spaces (3 spaces before the indented "alert" statement).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 13, 2009 Jul 13, 2009

Instructions how to post code have also been discussed in this topic http://forums.adobe.com/message/2061677

class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); // Display the string.
    }
}
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 14, 2009 Jul 14, 2009

pwillener wrote:

Instructions how to post code have also been discussed in this topic http://forums.adobe.com/message/2061677

class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); // Display the string.
    }
}
 

Thanks, Pat. I'd forgotten about that thread.

To get what I've now got, I had to

(a) Select 'Show Full Editor'

(b) Click twice on the 'Quote' icon to get your post to appear in its own box

(c) Click on the 'Insert' icon and select Syntax Highlighting > Java

(d) Click twice on the resulting box to get a cursor inside it.

(e) Paste (Ctrl-V on my Windows system) to place the contents of the clipboard inside the box.

It was these dual clicks that were frustrating me. There is no indication at all that a click has done anything, and so many things at this site take so long to get processed that I've learnt to wait several seconds to see if something happens before doing anything else.


class HelloWorldApp {     public static void main(String[] args) {         System.out.println("Hello World!"); // Display the string.     } }

Now I'll have to submit this to see whether copying from the code box produces plain text or text with embellishments. I think I'm getting there.

Noel

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 14, 2009 Jul 14, 2009

Ildhund wrote:


Now I'll have to submit this to see whether copying from the code box produces plain text or text with embellishments.

No, copying from a post will copy all the formatting.

I just clicked on the insert.png button, then selected Syntax Highlighting -> Java.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 14, 2009 Jul 14, 2009

-Ildhund's alter ego here-

OK, now I've established that at the website, copying those two chunks of code (one in a 'quote' box and the other in a 'code' box)

gives identical plain text results, with no extra HTML codes. I'll try again in the testing forum later with something a bit more

complicated like deeper indentation and problematical characters like angle brackets and plus signs.

In the email notification, the code in the quote box is useless. Each line is preceded by &gt;, and the blue highlighting is

simulated by using asterisks. Code in the code box looks pristine. Again, a test with more complicated code might reveal other

faults.

Noel

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 14, 2009 Jul 14, 2009

Ildhund wrote:

(a) Select 'Show Full Editor'

(b) Click twice on the 'Quote' icon to get your post to appear in its own box

(c) Click on the 'Insert' icon and select Syntax Highlighting > Java

(d) Click twice on the resulting box to get a cursor inside it.

(e) Paste (Ctrl-V on my Windows system) to place the contents of the clipboard inside the box.


A 5-steps of instructions to post a block of _______ code?  Why am I not surprised? (Jive?)  Does this even fix the formatting bug?  What is 'Show Full Editor'?  Why is clicking twice needed anywhere?  There isn't a quote icon if you're starting a new thread, is this for replies only?  Why do all this? 

All I want to be able to do is paste a **** block of code without having to edit out html garbage manually, is this too much to ask?

Nevermind, I'll just resort to not posting any code help for any of Adobe's customers at all, like before. Thanks Jive Software, you tools.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 14, 2009 Jul 14, 2009

Come on, be fair. It doesn't take five steps to post code. I was just pointing out that when I wanted to quote Pat's little piece of code*, I had to click twice on the quote button. Not exactly intuitive, and as I said in another post, things usually take so long to process in these forums, I've got used to waiting a bit before deciding that nothing's going to happen.

There's not a word in the FAQ about how to use the styling features like pretty code - or even how to change the font in a post. It's certainly not intuitive or comparable to other situations where you apply formatting. I'm sure there are newcomers who've given up and gone away without posting because it's all so daunting.

Dave gets should get his 5 for introducing me to the use of <pre> tags. I still want to be able to post via email and take advantage of the formatting features the forum offers. I'd forgotten that Mark Boyd had pointed out the dangers of using lots of tabs in code, and that seems to have helped, too.

* This was to find out whether a quoted code block would be usable when copied and pasted, both from the website and from an email notification. It's not, without massage.

Thanks, everybody

Noel

Edited because I can't see how to dish out Dave's reward - no stars or ticks anywhere. Why not, I wonder?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 14, 2009 Jul 14, 2009

You have to mark the thread "as a question" for the Jive gods to grant you such powers.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 14, 2009 Jul 14, 2009

You have to mark the thread "as a question" for the Jive gods to grant you such powers.

Aha! How do I do that by email? Noel

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 14, 2009 Jul 14, 2009

Ildhund wrote:

You have to mark the thread "as a question" for the Jive gods to grant you such powers.

Aha! How do I do that by email? Noel

Heh. Hadn't thought of that. Umm... pray to the Jive gods?

Put a question mark at the end of the subject? (lol if that works...) That's how the planet Earth marks something as a question, but on the planet Jive, yep, it's a checkbox.

I think that's +1 missing/bad Jive features, although at least it's only a missing feature in support of a useless feature, so maybe it won't count towards Jive's time in purgatory.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 14, 2009 Jul 14, 2009

Ansury wrote on 2009-07-14 19:17:

Put a question mark at the end of the subject? (lol if that works...)* That's how the planet Earth marks something as a question, but on the planet Jive, yep, it's a checkbox.*

I like it so I put in a feature request at Jive.

Jochem

--

Jochem van Dieten

http://jochem.vandieten.net/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 14, 2009 Jul 14, 2009
LATEST

jochemd wrote:

Ansury wrote on 2009-07-14 19:17:

Put a question mark at the end of the subject? (lol if that works...)* That's how the planet Earth marks something as a question, but on the planet Jive, yep, it's a checkbox.*

I like it so I put in a feature request at Jive.

Jochem

--

Jochem van Dieten

http://jochem.vandieten.net/

heh heh heh... We should charge those Jives a fee for finding solutions to and discovering their bugs and flaws.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 14, 2009 Jul 14, 2009

sorry, but going back to my post 3 copying and pasting that code out to wordpad reveals unformatted text and it pastes clean with no extra chars. so i stand by my easy (easier) answer: click to get the html editor, surround your code with <pre></pre> and you're done.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 14, 2009 Jul 14, 2009

wait a second! there's no points available for this thread! now i'm all demotivated, don'tchaknow. so ignore everything i've said here... or post a new thread with some shiny points and i'll post it again...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 14, 2009 Jul 14, 2009

Quick, edit your posts and delete the answers so you can hold the information hostage to redeem for points!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines