Curl Global Community
{do } versus plain code expression - Printable Version

+- Curl Global Community (https://communities.curl.com)
+-- Forum: Blogs (https://communities.curl.com/forumdisplay.php?fid=17)
+--- Forum: Tech blog (https://communities.curl.com/forumdisplay.php?fid=18)
+---- Forum: Robert blog (https://communities.curl.com/forumdisplay.php?fid=20)
+---- Thread: {do } versus plain code expression (/showthread.php?tid=512)



{do } versus plain code expression - RobertShiplett - 05-31-2012

Today I was working inside a PlainDocument and added a second loop to pass through some data.

Between the two loops, I decided to place a blank row of empty strings.

So I dropped in some code to do just that between two {for } iterator expressions.

Boom! Busted applet. Could not add my Visual to a PlainDocument which already held an object.

Hmmm ....

And there it was: adding a row-prototype to that table was returning a value !

Answer: wrap that expression in a {do } expression.

Bong ! Working applet.

You can see the result at http://www.aule-browser.com/kanji/poets/basho-ka-ume.html

and there a few rows down is that blank row ...

And, yes, this is a PlainDocument ... the links at the bottom of the page are in the HTML wrapper ... for now.