PDA

View Full Version : Dictionary class tutorial


CW.Allen-Poole
08-13-2008, 06:44 AM
I just finished a tutorial which needs be reviewed.
Many thanks.

CyanBlue
08-13-2008, 02:59 PM
Thanks for the tutorial, CW... I have approved the tutorial... :)

Something funky is going on with the AS tag... Not sure why it's not rendering the code properly... Well... B tag does not render properly either...

CW... I see several threads of yours and some have AS tag working fine and some are not... and I don't see it happening on other tutorials that I have skimmed through... Can you think of the difference when posting those tutorials???
http://www.actionscript.org/resources/articles/793/1/Basic-debugging-functionality----Part-1/Page1.html
http://www.actionscript.org/resources/articles/800/1/Basic-debugging-functionality----Part-1b-the-Console/Page1.html

Cota
08-13-2008, 03:22 PM
I noticed the < p > tags are showing up in the AS tags. Was the code copy and pasted from MS Word or something like that?

CW.Allen-Poole
08-13-2008, 08:20 PM
I noticed the < p > tags are showing up in the AS tags. Was the code copy and pasted from MS Word or something like that?

(I don't own Word.)

I generally try to paste this as plain text but I'm having a lot of difficulty copying and pasting in general. I could have accidentally clicked "Word" instead, but I don't know. Often, I'll try to paste something in to have it simply not appear in the edit section. Live Preview also doesn't seem to parse the [as] tags, so there is no way for me to check this without it being published.

CyanBlue
08-13-2008, 08:25 PM
I guess we'll have to wait for Jesse or Strok... Let's see what they find out... :)

ASWC
08-13-2008, 08:33 PM
It's just a flow in the system. When I publish I try to go through the html code and remove all the bad tags but that's a pain and like CW said, there's no efficient preview available so we have to publish to find out what's wrong.

Cota
08-13-2008, 10:12 PM
Think this may be a jess or strok issue, but it seems like a problem with the render engine for the CMS, which means, it may not really be fixable.

Jesse
08-17-2008, 07:06 PM
The problem is a really annoying one and comes from the syntax highlighter itself. I have tried to fix it a few times but without success.

The highlighter is an open source one which we custom hacked into the CMS so that it renders code as the page loads. The problem is that the highlighter ispicky about HTML We can set it to obliterate all HTML tags but then it will kill all the tutorials o how to use CSS in text fields, and the like, which have legtimate HTML tags in them.

The solution that I have found works best is this: for code blocks, I always copy and paste the whole thing into a plainn text editor like Notepad, then paste it from there into the WYSIWYG editor in the CMS. That seems to do the trick. If you still end up with occasional <p> tags, it could be that you have multiple blank lines between lines of code. The editor sometimes registers these as paragraph breaks and puts in the <p> tag, which the highlighter then gladly highlights.

So the trick is ultimately to make sure that there is no HTML other than line breaks in the WYSIWYG editor bewteen the opening and closing [ as ] and [ / as ] tags... Let me try it on one of the offending passages now...

Jesse
08-17-2008, 07:16 PM
OK so if I go to this URL http://www.actionscript.org/resources/articles/793/1/Basic-debugging-functionality----Part-1/Page1.html I see a problem with the first code block. When I edit the article in the CMS, I can see in the WYSIWYG editor that the issue is due to there being <p> tags between the [ as ] and [ / as] tags. (Check it out in the Source tab of the editor to see all the tags int he source.)

To fix it up, I switch back to the Edit tab, and copy and paste the whole first code block, from the opening [ as ] to the closing [ /as ]. I paste this into Notepad. Then I copy it from there and paste it back over the old code in the Edit tab of the WYSIWYG editor.

... or at least I would do that if I were on a machine with copy and paste enabled in Firefox, but I'm not at the moment, and I need to run... So I didn't fix anything but hopefully this explaination empowers everyone know how to fix the problem

If not, let me know and I'll try a etter way of describing it it.

CyanBlue
08-17-2008, 08:13 PM
Yeah... I did what you said and fixed them... Man... It's kinda painful way to edit the articles though... Oh, well... I'll live with it... Thanks, Jesse... ;)

While we talk about the AS tag, the AS tag in the forum makes the code block in variable size... If I remember correctly, it was fixed width just like the CODE tag, but I often see very wide AS code blocks... Any idea why???

CyanBlue
08-17-2008, 08:18 PM
Hm... Why am I not able to edit the article in FireFox3??? I had to do it in IE7...

It seems like [ as] does work, but [ AS] does not...

Jesse
08-18-2008, 05:34 AM
Yeah it is a bit painful. I need to make new tutorials on how to use the CMS, which include that step when pasting code...

Thanks for fixing them.

The code is probably variable width because the forums are. Have you tried IE and FF? It might be a CSS thing. If you can find a page which demontrates a code block which is too wide, let me know and I'll fiddle with it.