World: r3wp
[Cookbook] For http://www.rebol.net/cookbook/requests.html
older newer | first last |
DideC 7-Jul-2005 [22x6] | On extending config with new values, I usally just use : |
config: construct/with load config-file standard-config | |
where config-file hold the config values as a block. If it's stored as an object, you can use 'third to have the block. | |
standard-config is your config-object. | |
I use 'construct for security reason, but it's most understandable with 'make : | |
config: make standard-config load config-file | |
Sunanda 7-Jul-2005 [28] | DideC -- your method is similar to Henrik's, and has the same limitation: sub-objects fields do not propagate as you'd expect.....No f2-2 field in 'config here: standard-config: make object! [f1: 1 f2: make object! [f2-1: 21 f2-2: 22] f3: 3] config-file: make object! [f1: 88 f2: make object! [f2-1: 99]] probe config: construct/with third config-file standard-config |
Ammon 7-Jul-2005 [29] | Henrik, I'm getting a 403 Forbidden error from your link... |
Henrik 7-Jul-2005 [30] | ammon, should be fixed now |
Colin 7-Jul-2005 [31] | I'm still gettting forbidden |
Henrik 7-Jul-2005 [32] | stupid FTP client... try again :-) |
Colin 7-Jul-2005 [33] | works! thanks. |
Graham 7-Jul-2005 [34] | Henrik, it's nice, but I think the person who looks at a cookbook example doesn't necessarily have the skills to do the exercises to complete those parts left to the reader. I'd prefer complete examples rather than leaving something up to the reader. |
Henrik 7-Jul-2005 [35] | well, I can remove them and make a part 2 tutorial? such as it is now, the code is pretty usable, I think. But it's far from perfect in terms of capability, so do we want perfect code across a few examples or just this one tutorial? |
Graham 7-Jul-2005 [36x4] | There's never any such thing as perfect code .. better to get something up, and let others build on it .. paraphrasing Isaac Newton |
I've set up mediawiki at http://compkarori.com/rebolwiki/index.php/Main_Page and will see how it goes. Currently there's a sql error on updating or creating a page, but you can ignore that it seems as the page changes are made. | |
The advantage over Vanilla is that changes can be rolled back using the mysql database ... | |
PS: mediawiki is used to drive wikipedia. | |
Henrik 7-Jul-2005 [40] | I know mediawiki, as I use it for the Amiga AWeb Webbrowser. be careful with spammers.... |
Graham 7-Jul-2005 [41x2] | that's why I have made logging in obligatory to edit pages |
otherwise I have found scripts generating spam | |
Henrik 7-Jul-2005 [43] | yes, they can get pretty nasty, destroying contents and things like that |
Graham 7-Jul-2005 [44] | spam search bots create lots of junk in the Vanilla sites |
Henrik 8-Jul-2005 [45] | I think my panes cookbook example is ready for one last review: http://hmkdesign.dk/rebol/panescookbook.html I've removed some unnecessary bits about styles and I've added references to the User preferences window in the rebol/view 1.3 desktop |
DideC 8-Jul-2005 [46x2] | One point that would make it simpler : you didn't used 'of keyword for your tog style. 'of keyword allow to group toggle, radio or checkbox in order to reset others while you set one. Like this you don't need 'update-tabs functions : |
main: layout [ space 2 origin 4 across style pane-tog tog of 'panels ; Just to avoid puting {of 'panels} in each tog lines below pane1-tab: pane-tog 100x30 "Pane 1" [show-pane pane1] pane2-tab: pane-tog 100x30 "Pane 2" [show-pane pane2] pane3-tab: pane-tog 100x30 "Pane 3" [show-pane pane3] return content-pane: box 300x200 return btn white "Save" ; Save and Apply are used here for decorative purposes btn orange "Apply" btn sky "Close" [unview] ] | |
Henrik 8-Jul-2005 [48x2] | amazing! I never knew this. I will rewrite it immediately. |
how do you set the default pane? | |
DideC 8-Jul-2005 [50x2] | We learn something each day :) |
add "data true" to the default tog | |
Henrik 8-Jul-2005 [52x3] | works. bleh. >/( |
:-) | |
I vote for getting VID stuff into the dictionary :-) | |
DideC 8-Jul-2005 [55] | :) |
Henrik 8-Jul-2005 [56] | tutorial updated now. 15% code reduction |
DideC 8-Jul-2005 [57x5] | Another comment : it's better to remove the offset at the pane creation rather than each time you show one. So use : |
pane1: layout/offset [ across text "Setting 1" field return text "Setting 2" field ] 0x0 ... | |
You forget et remove the 'update-tabs call in the 'show-pane function. | |
(you did it in the full code, but not before) | |
The note talk about layout/TIGHT, but you did not use it before !!!! | |
[unknown: 5] 8-Jul-2005 [62x4] | where does the function show-pane come from? |
I never knew of this word "of" - is that documented somewhere? | |
I see where the show-pane function came from so nevermind that question | |
its in the document | |
DideC 8-Jul-2005 [66] | 'of : If its documented, I don't remember where! |
Chris 8-Jul-2005 [67] | 'of sets face/related |
Henrik 8-Jul-2005 [68] | hmm... this will mean that the layout/offset is not the same as contents-pane/pane/offset |
[unknown: 5] 8-Jul-2005 [69] | Chris do you know where that is documented at? I though 'with was for setting face values. |
Chris 8-Jul-2005 [70] | I'm not certain if it is documented, I may have picked it up from eg. an IOS reblet. But if you -- probe svv/facet-words -- you can see how it is used... |
[unknown: 5] 8-Jul-2005 [71] | thanks Chris |
older newer | first last |