View discussion [27 posts] | View script | License |
Download script | History | Other scripts by: crazyaxe |
30-Apr 13:21 UTC
[0.121] 15.017k
[0.121] 15.017k
Archive version of: rebolide.r ... version: 10 ... crazyaxe 13-Jan-2011Rebol [ Title: "Rebolide" File: %rebolide.r Author: "Massimiliano Vessi" Date: 2010-12-31 Version: 1.1.8 email: maxint@tiscali.it Purpose: {A Rebol IDE for beginners that helps learning Rebol} Library: [ level: 'intermediate platform: 'all type: [tool demo ide] domain: [all] tested-under: [view 2.7.7.3.1 Windos Linux ] support: maxint@tiscali.it license: 'gpl see-also: none ] ] ;thanks to Graham, Nick Antonaccio, Semseddin Moldibi, Zoltan Eros yv1: to-block { label "Words" return label "Blocks" return label "Functions" return label "Objects"} ; function to find object, function, etc. in source findall: func [ a_findall /local temp temp2] [ funzioni: copy [] oggetti: copy [] blocchi: copy [] parole: copy [] b_findall: parse/all a_findall ":" temp2: none foreach item b_findall [ temp: first (parse item none) ;valore if temp2 [ if temp = "func" [ append funzioni temp2 ] if temp = "make" [ append oggetti temp2 ] if temp = "[" [ append blocchi temp2 ] if not ( any [ temp = "func" temp = "make" temp = "[" ]) [ append parole temp2 ] ] temp2: last (parse item none) ;variabile ] sort funzioni sort oggetti sort blocchi sort parole return (reduce [ "functions" funzioni "objects" oggetti "blocks" blocchi "words" parole]) ] ;functio to insert text in the source area inni: func [testo2 ] [ set-text/caret a testo2 ] filep: none ;file path and name ;save as file function saveas: func [] [ filen: request-value "File name?" filed: to-file request-dir filep: to-file rejoin [ filed filen] salva ] ;save file function salva: func [] [ if filep = none [ saveas ] write filep a/text set-text testo reform ["Saved as " filep ] ] ;to launch soirce or examples lancia: func [ temp /local corpo ] [ corpo: copy temp insert corpo "Rebol [] " write %temp.r corpo launch (clean-path %temp.r) ;clean-path is necessary on Linux ] ;che if not (exists? %rebgui.r) [ Alert "Rebgui not found, I'll try to download it" read-thru/expand/update/to http://www.dobeash.com/RebGUI/rebgui.r %rebgui.r ] do %rebgui.r display "Rebolide" [ menu data [ "File" [ "Open" [filep: to-file request-file temp: read filep set-text a temp set-text testo reform ["Opened " filep ] ] "Save (CTRL+D)" [ salva ;it save the source text ] "Save as... (CTRL+SHIFT+D)" [ saveas write filep a/text ] ] "Modify" [ "Try" [lancia a/text ] "Modify colors" [ request-ui] ] "Help" [ "About" [display "about" aboutpage] "Shortcuts" [display "Shortcuts" shortcuts] "Core" [ alert "I'll try to launch your browser, if it doesn't work, please email me: maxint@tiscali.it" browse http://www.rebol.com/docs/core23/rebolcore.html if system/version/3 = 4 [ ;it's Linux! browsers: [ "firefox" "mozilla" "konqueror" "opera" "epiphany" "galeon" "seamonkey" "dillo" "midori" "netsurf" "lynx"] foreach bro in browsers [ call (reform [ bro http://www.rebol.com/docs/core23/rebolcore.html ] ) ] temp3: question "Is your browser showing the docs?" if not temp3 [ display "Sorry" [ text "If your browser didn't show the page" return link "http://www.rebol.com/docs/core23/rebolcore.html" return text "please write the executable name in the field below" return text italic "(It must be in your $PATH)" return sorry: field return button -1 "OK" [ temp4: read %rebolide.r replace temp4 {"firefox"} (reform [{"firefox" "} sorry/text { "} ]) write %rebolide.r temp4 unview ] ] ] ] ] "VID" [ if not exists? %nyc.jpg [ attempt [ temp: read/binary http://www.rebol.com/view/nyc.jpg write/binary %nyc.jpg temp ] ] display "VID Guide" guida_vid ] "VID events" [ display "Vid events guide" guida_handler] "DRAW" [ display "DRAW dialect guide" guida_DRAW] "SHAPE" [ display "SHAPE dialect guide" guida_shape ] ] ] button -1 "Try it!" [ lancia a/text] return a: area 90x113 on-key [ if event/key = #"^D" [ salva] if (event/key = #"^D") and event/shift [ saveas] true] tab-panel data [ "Core" [ scroll-panel 80x100 data [ button -1 "Example" [ inni {Rebol [] print "Hello word!"} ] tip "Example" return group-box "Comparison" data [ button -1 "<" [ inni "< " ] tip "Returns TRUE if the first value is less than the second value" button -1 "<=" [ inni "<= " ] tip "Retu Notes
|