root/functions/append-widget.r

Revision 111, 493 bytes (checked in by ashley, 10 months ago)

Split requestors off into %rebgui-requestors.r
Requestors and functions now appear in their respective parent objects
Added new on-resize handler
tab-panel.r and chat.r fixes
RebDOC.r enhancements

Line 
1append-widget: make function! [
2        "Append a custom widget to widgets context."
3        spec [block!] "Widget spec"
4        /local word
5] [
6        ;       Is widget word already in use?
7        all [
8                find words word: to word! first spec
9                gui-error reform [word "is already in use"]
10        ]
11        ;       append widget to widgets context
12        widgets: make widgets spec
13        ;       Is widget derived from another widget?
14        all [
15                find words third spec
16                widgets/:word/type: third spec
17        ]
18        ;       register new widget
19        insert tail words word
20]
Note: See TracBrowser for help on using the browser.