Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Curl Docs
08-25-2011, 12:01 AM, (This post was last modified: 08-25-2011, 12:23 AM by RobertShiplett.)
#1
Curl Docs
With Curl 8 we have an opportunity to evolve the Curl documentation through an iteration.

Here is an example from Curl 7 live docs for MultiTabAccordion in the Documentation Viewer:

Code:
{let list:ListBox = {ListBox "A", "B", "C"}}
{let f:Frame = {Frame "empty"}}
{MultiTabAccordion
{TabPane
label="Row",
{HBox spacing=4pt, "A", "B", "C"}
},
{TabPane
label="Column",
{VBox spacing=4pt, "A", "B", "C"}
},
{TabPane
label="List",
first-active-control = list,
{VBox "Choose One", list}
}
}
{value f}
With one small change the layout flips:
Code:
{let list:ListBox = {ListBox "A", "B", "C"}}
{let f:Frame = {Frame {paragraph "empty or more goes here"}}}
{MultiTabAccordion
{TabPane
label="Row",
{HBox spacing=4pt, "A", "B", "C"}
},
{TabPane
label="Column",
{VBox spacing=4pt, "A", "B", "C"}
},
{TabPane
label="List",
first-active-control = list,
{VBox "Choose One", list}
}
}
{value f}

But what is more of a concern for new users of Curl is the use of {value } and when it is required.
Compare this alternative:

Code:
{def listbox = {ListBox "A", "B", "C"}}
{def framed-msg = {Frame {paragraph "empty area for Fill or more goes here"}}}
{VBox height=100pt,
{MultiTabAccordion  || -------- here is the accordion declaration
{TabPane
label="Row",
{HBox spacing=4pt, "A", "B", "C"}
},
{TabPane
label="Column",
{VBox spacing=4pt, "A", "B", "C"}
},
{TabPane
label="List",
first-active-control = listbox,
{VBox "Choose One", listbox}
}
},  || --------------- end of accordion declaration
{Fill height=8pt},    
framed-msg
}

Gone is the single-character name "f" variable and the listbox is not named "list".
With proper indentation in place (seemingly not possible in this post format), I think that this is an improvement.
Robert Shiplett, Curlr
Fredericton NB

Canada


Messages In This Thread
Curl Docs - by RobertShiplett - 08-25-2011, 12:01 AM
RE: Curl Docs - by c-s - 08-25-2011, 09:26 AM
RE: Curl Docs - by tdeng - 08-25-2011, 12:32 PM
RE: Curl Docs - by RobertShiplett - 08-26-2011, 12:14 AM

Possibly Related Threads...
Thread Author Replies Views Last Post
Brick Curl macros introduction (part 1) RobertShiplett 4 6,993 04-25-2015, 05:28 PM
Last Post: glennmcgrath
  server-side Curl issue : TocDocument RobertShiplett 3 5,691 02-09-2015, 02:11 PM
Last Post: Sumeraxe
  Curl with HTML widget + CintaNotes RobertShiplett 0 4,444 09-08-2014, 07:42 AM
Last Post: RobertShiplett
  Curl for the new Kodansh kanji books RobertShiplett 0 3,032 09-07-2014, 08:51 PM
Last Post: RobertShiplett
  Curl on Facebook - another page RobertShiplett 0 3,737 02-01-2014, 02:29 AM
Last Post: RobertShiplett
  Curl for CoffeeScript folks RobertShiplett 0 4,758 06-29-2013, 02:52 AM
Last Post: RobertShiplett
  Curl JavaScript bytecodes RobertShiplett 0 4,939 06-19-2013, 10:33 PM
Last Post: RobertShiplett
  jinja2 templates for Curl RobertShiplett 0 4,147 06-14-2013, 08:33 AM
Last Post: RobertShiplett
  Curl and QNX RobertShiplett 0 4,932 04-24-2013, 11:38 PM
Last Post: RobertShiplett
  WikizPad Curl personal wiki RobertShiplett 0 4,115 03-11-2013, 01:09 AM
Last Post: RobertShiplett
Forum Jump:


Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('234')