Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: How dynamic can we be?

From: g:santilli:tiscalinet:it at: 24-Nov-2002 2:22

Hi Gregg, On Sunday, November 24, 2002, 12:17:30 AM, you wrote: GI> That's very impressive indeed! A few minutes after that post, it was already more evolved. I couldn't stop playing with it. :-) view lay: layout code: [ Do [trebuchet: [name: "Trebuchet MS" size: 14]] Style Button Btn font trebuchet font-size 16 bold -1x28 Banner center 600 font trebuchet font-size 38 bold yellow "The REBOL evolving GUI" Text right 600 font trebuchet font-size 16 "by Gabriele Santilli" Pad -10 Text right 600 font trebuchet italic "(original idea by Baron R.K. Von Wolfsheild)" Text 600 font trebuchet {Maybe I'm just crazy, but this is so much fun! It is amazing to see how easy I can be amazed by these short things... I wonder if any other language could do this in so few lines of code, and with this readability...} Across Text font trebuchet right 50 "Title:" Pad -8 tit: Field either value? 'window-title [window-title] ["Evolving GUI"] 550 font trebuchet Return a: Area para [] font trebuchet 583x300 (mold/only code) Pad -8 Scroller 17x300 [ tsize: size-text a a/para/scroll/y: 280 - tsize/y * face/data show a ] Return Button "Update" 255.200.50 [ attempt [ window-title: tit/text lay2: layout code: any [attempt [load a/text] code] lay/pane: lay2/pane lay/size: lay2/size lay/feel/detect: func [face event] [ if event/type = 'scroll-line [ a/para/scroll/y: event/offset/y * -15 + a/para/scroll/y show a ] event ] show lay lay/text: window-title lay/changes: 'text show lay ] ] Button "Copy" 50.240.100 [ write clipboard:// join "view lay: layout code: " mold code ] Button "Send to [giesse--rebol--it]" [ send/subject [giesse--rebol--it] mold code join "[Evolving GUI] " window-title ] ] (Has mouse wheel, sending via email...) GI> With the recent talk about patching GI> encapped scripts, we don't want to forget that code is data. If you GI> encap the main portion of your script, but then allow external files GI> to be used for mods to the encapped "data", your updates could be very GI> dynamic indeed. :) Yup, as long as you don't allow the user to execute REBOL code... Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: