r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[I'm new] Ask any question, and a helpful person will try to answer.

DavidR
16-Nov-2008
[1513x3]
The end game is to create a series of routines that will cut a full 
install of XP from Approx 1.5 gig installed to approx 212 mb's specifically 
geared for diagnostics and repair.
Another approach I have been thinking about but will need to be a 
future project when I get some mileage under my belt so to speak 
is to use rebol/view in a similair manner to Limnor (Limnor is basically 
codeless programming) I know was my mouth out with soap & water However 
for newbie's/Lamers like myself if a gui was presented that had most 
of the functionality of rebol/view like field boxes buttons to create 
standard buttons & other routines etc. on the right of the screen 
would be a editor that as the selections was made would build the 
code automatically thus giving the user an illustration as the code 
progressed. in the bottom below the editor could be a help menu that 
would instruct the user as the code was systematically built. something 
like if the mouse cursor hovered over a gui item it would flag up 
instruct info, a help as you go if you like. The program could be 
nearly full gui leaving the task bar available to the user to continue 
having access to windows items. The 1st item could be a field that 
the user inputted a title then work through the items to build a 
gui interface. It would be no good for the experienced rebol user 
 who needs full control of the coding but would give new users a 
kick start to build confidence. You could call it RoboRebol LOL! 
I'm getting ahead of myself but is a concept idea that I think may 
have merit. You guys would have to advise on the practicalities of 
such a venture. Use Rebol/View gui to semi auto write rebol programming
I think it would be a helpful aid for teaching but would also be 
attractive for the new user He or She would see how the code was 
compiled as they progressed
Gregg
16-Nov-2008
[1516]
A number of REBOLs write code generators and tools for specific purposes 
along those lines. There have been a few forays into REBOL IDEs as 
well, but none have gone too far. The topic never goes away though. 
R3 has more features for Programming-in-the-large, so it will surely 
come up again.
DavidR
16-Nov-2008
[1517]
Kewl others are on the case
Gregg
16-Nov-2008
[1518x2]
EasyVID and EasyDraw are examples of "active documents" that show 
the kind of thing that can be done with REBOL very easily. The Word 
Browser is another. In addition to ROAM, Ammon Johnson and I did 
a prototype system browser based on the way Smalltalk does it. Experiments 
have also been done with popup syntax help and something like Intellisense. 


One of the basic problems is that we don't have a good way to build 
an editor that does syntax highlighting and such. James Marsden(?) 
got the farthest on that I think. Still, we should be able to build 
a really great tool if we feel the need. It seems the need has just 
never been strong enough.
Carl even did a layout editor...must be somewhere.
DavidR
16-Nov-2008
[1520]
Necessity is the mother of invention?
Gregg
16-Nov-2008
[1521]
http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=layout-1.8.r
DavidR
16-Nov-2008
[1522x2]
Cheers!
It's good to look at some of these scripts they can be a source of 
inspiration
DavidR
18-Nov-2008
[1524]
what is the difference between main layout & view layout
Gregg
18-Nov-2008
[1525]
Not sure what you mean. You can create a layout without viewing it, 
and use view/new to open more than one window. If you just do VIEW 
LAYOUT [...], that starts the event loop, and you'll want to use 
view/new to show other layouts.
Henrik
18-Nov-2008
[1526]
LAYOUT produces a tree of objects. Each object is a face. VIEW displays 
that tree of objects.
amacleod
18-Nov-2008
[1527]
Some times people call the main window 'main' but its not part of 
rebol syntax.
Anton
18-Nov-2008
[1528x2]
Yeah, you can call it whatever you want (avoiding other default rebol 
global words, of course).
I usually call the one window in my one-window apps WINDOW. eg.

	window: layout [...]
	view window

which, in simple cases, can be compressed to:

	view window: layout [...]
I split into separate lines because I often want to put stuff in 
between, eg. a window resize handler.
Sunanda
19-Nov-2008
[1530]
Hope I am not adding extra confusion by adding this attempted explanation...

** Many applications will have a single VIEW LAYOUT [...] to display 
everything.

** They can then use SHOW and HIDE to selectively make displayed 
faces visible or not.


** If you have several sets of controls that need to replace each 
other (like when you click a tab) then subpanels within the one VIEW 
is the way to go:

** You have a separate LAYOUT for each subpanel. (You probably got 
the idea that the main view is called MAIN from Carl's subpanel examples. 
It can be called anything).

** To SHOW a subpanel, you set the panel contents to the appropriate 
LAYOUT.


** Finally, as Gregg says, you can have multiple, independent windows 
using VIEW/NEW. Best to work up to that slowly :-)
Reichart
19-Nov-2008
[1531]
Sunanda,  that was pretty usefull, is this written up this clearly 
in a wiki somewhere on the web?
Sunanda
19-Nov-2008
[1532]
Thanks.....Not as far as I know. I think all I was doing is putine 
some context on Car's subpanels how-to:
http://www.rebol.com/how-to/subpanels.html
Reichart
19-Nov-2008
[1533]
Yes, this is why I want all docs in Wikis.

Each person learns differently, which is why it is nice to have different 
approaches to the same issue.


Your simple list of declarative facts is the way I like to learn 
(followed up with some simple examples, and then some complex examples 
afterwards, hopefully with some comments that explains why it is 
complex).
DavidR
19-Nov-2008
[1534x2]
Thanks everyone for your explanations have tried a couple of scenarios 
using the subpanels method have not been successful yet but will 
need to persevere!
Yes amacleod I could not find any rebol reference to main yet it 
was there in some programming code
DavidR
25-Nov-2008
[1536x2]
I'm afraid I do not understand how sub-panels work can someone give 
me a  commented simple illustration (the simpler the better please) 
of how they work, sorry to be so thick but its not working in my 
example?
I keep getting this error also cannot get rid of it?
** Script Error: panel1 has no value
** Where: func [face value][show panel1]
** Near: show panel1
Graham
25-Nov-2008
[1538]
break your code down to the simplest possible and post it
james_nak
25-Nov-2008
[1539]
http://www.rebol.com/how-to/subpanels.html
DavidR
25-Nov-2008
[1540x5]
Thanks james_nak have already looked at that but I still don't get 
it i'm missing something in the structure or mechanics
Graham simplist form will try
afraid I will have to post it all as there is probably lots of mistakes
rebol [Title: "SOS-XP"]
  view layout [
  image center %DT.jpg 768x576 ibevel pewter 6x6
  button gray 50x30 "START" [show panel1]
  at 75x605 button gray 3x30

  at 750x610 text "00:00" rate 1 black ;effect [gradient 0x1 0.0.150 
  0.0.50]
  feel [engage: func [face act] [face/text: now/time  show face]]

]
  
panel1: view layout [
  image center %DT.jpg 768x576 ibevel pewter 6x6
  at 75x605 button gray 3x30

  at 750x610 text "00:00" rate 1 black ;effect [gradient 0x1 0.0.150 
  0.0.50]
  feel [engage: func [face act] [face/text: now/time  show face]]
  at 200x300

  area wrap font-color white {You use this program & batch files entirely 
  at your own risk,
  due to the myriad of hardware/software configurations I cannot

  without any certainty claim that you will not damage your system!

  Always Always Always make a full system backup of your partition
  before attempting to use SOS-XP & that you have tested the back

  up so your are positive in your own mind you can make a recovery!} 
  red bold 
  at 240x410 button "Agree" [show panel2]
  at 450x410 button "Disagree" [QUIT]]
  do-events

panel2: view layout [
image center %DT.jpg 768x576 ibevel pewter 6x6
  button gray 50x30 "START" [show panel3]
  at 75x605 button gray 3x30

  at 750x610 text "00:00" rate 1 black ;effect [gradient 0x1 0.0.150 
  0.0.50]
  feel [engage: func [face act] [face/text: now/time  show face]]

]755x650
it works up to the second window but when the "agree" button is depressed 
it stalls & this error message repeats through the interpretor  ** 
Script Error: panel1 has no value
** Where: func [face value][show panel1]
** Near: show panel1
Graham
25-Nov-2008
[1545]
That's not stripped down ... we don't have your images etc.
btiffin
25-Nov-2008
[1546]
panel2 is not defined when you evaluate panel1 and panel1 is not 
defined when REBOL is evaluating the main face?  No?
Graham
25-Nov-2008
[1547]
the panels need to be defined earlier

panel2: layout [ ... ]
btiffin
25-Nov-2008
[1548]
I think   panel3: layout [ ...]  panel2: layout [ ...]   pane1: layout 
[ ...]   then the main   view layout   would work 

Graham beat me to it.
DavidR
25-Nov-2008
[1549]
Graham what do you mean by stripped down?
Graham
25-Nov-2008
[1550x2]
removed of any code not relevant to the problem at hand.
we couldn't run your code because you referenced images we don't 
have
DavidR
25-Nov-2008
[1552]
I C Sorry!
Graham
25-Nov-2008
[1553]
next time :)
DavidR
25-Nov-2008
[1554]
so according to btiffin I am working back to front (panel3 then panel2 
then panel1 then the main layout)
Graham
25-Nov-2008
[1555x5]
doesn't matter the order
remove the do-events
panel1 ... 3 are objects, which are returned by layout
you must define them before you use them
panel1: view layout [ ] is not defining the layout
DavidR
25-Nov-2008
[1560]
EEK! If I remove the do-events the buttons do not work then, this 
item was suggested by Henrik & it fixed the broken buttons
btiffin
25-Nov-2008
[1561x2]
Yeah DavidR;  the order doesn't really matter as long as the definitions 
come before REBOL has to reduce the value.  REBOL will let you make 
and load values (simply word! at that stage), but these words have 
to have a value when evaluation (reduce, do, ... or show in this 
case) is required.

Next...

Then change the show panel1 to view panel1  after   panel1: layout 
[ ... ] is used to create the face object.
And you still need view on the main   ...  so I take back what I 
just said ... the main view sets up the do-event event handler for 
all the faces.  (not tested so just rambling now)