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.

Henrik
16-Nov-2008
[1479x2]
in your code, you are writing button "Start" [disclaim], but there 
is no actual face set to that word.
I guess what you need there is:

disclaim: panel [at ...]

not:

disclaim: [at...]
DavidR
16-Nov-2008
[1481]
ahh so panel is a function to kick start the reamining block of text 
+ Buttons?
Sunanda
16-Nov-2008
[1482]
Henrik is just ahead of me --- you have disclaim as block.

Also, maybe when getting started, dont worry about the absolute positionings 
(they'd need to be adjusted according to screen resolution anyway). 
This simplification of your code works for me: (note the unview/all 
to remove any previous instances):


  rebol [Title: "SOS-XP"]
  unview/all
  view layout [
  across
  
  disclaim: 

  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 
   return
   button "Agree"
  return button "Disagree"]
  return
  button gray 50x30 "START" [disclaim]

  ; this is a small vertical button to make the xP start button look 
  more realistic.
  return button gray 3x30

  ; this is a digital clock to simulate the destop clock bottom right 
  on screen.

  return 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]
]
DavidR
16-Nov-2008
[1483]
I cobbled this together from the beginners tutorial stuff & glued 
it together
Sunanda
16-Nov-2008
[1484]
Copying is sometimes the best way.

There are some stray ]s in the code I just posted.....Sorry. This 
below really does work:


  rebol [Title: "SOS-XP"]
  unview/all
  view layout [
  across
  
  disclaim: 

  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 
   return
   button "Agree"
  return button "Disagree"
  return
  button gray 50x30 "START" [disclaim]

  ; this is a small vertical button to make the xP start button look 
  more realistic.
  return button gray 3x30

  ; this is a digital clock to simulate the destop clock bottom right 
  on screen.

  return 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]]

]
DavidR
16-Nov-2008
[1485x3]
Yes sunanda that is nearly there but I am trying to retain all the 
background stuff/Gui the discalimer box pops up on depressing the 
[start] button in fact the discalimer stuff overlays the previous 
gui stuff
I copied your code into rebol/view & ran it to see?
I thought the XP simulated look & feel would make it easy for users 
to use the program
Sunanda
16-Nov-2008
[1488]
Sorry about messing you UI up! As Henrick says, you need a pane and 
to work with swapping between different panes.
Tutorial here:
http://www.rebol.com/how-to/subpanels.html
DavidR
16-Nov-2008
[1489x4]
I used the postioning to force the overlay effect is that the right 
way of doing things?
Kewl much oblighed
I will read up on "panel" also
Many thanks Henrik
Henrik
16-Nov-2008
[1493]
no problem
Sunanda
16-Nov-2008
[1494]
<I copied your code into rebol/view & ran it to see?>

A possibly simpler way is to copy it into the Windows clipboard, 
then this line in the View console:
     do read clipboard://
DavidR
16-Nov-2008
[1495x7]
yes thanks
tried with the a combination of panel & unview/all then in this line 
of code:

button gray 50x30 "START" [view disclaim] -> inserted view but the 
start button is pushed to the top right of the screen/Window the 
[Start] button now closes the XP lookalike gui, opens the discalim 
area in a black box?
half off the page
or monitor screen should I say
but at least the [Start] button now works kewl
I will just have a read of the subpanel info link you have provided 
Sunanda BRB
(they'd need to be adjusted according to screen resolution anyway) 
this is interesting so waht  could be ok on my screen setup could 
be completely different on someone elses Umm
Sunanda
16-Nov-2008
[1502]
Screen resolution is easy to get.....And it may be your first foray 
into the 'system object:
      print system/view/screen-face/size
Henrik
16-Nov-2008
[1503]
(easy to get, hard to find :-))
Sunanda
16-Nov-2008
[1504]
True ....I looked at the code when I last used it, otherwise, it 
would have been a long trek through the system object to remember 
the location :-)
DavidR
16-Nov-2008
[1505]
IC type the  print system/view/screen-face/size into the Rebol/view 
interpretor & spits back at you your screen res
Henrik
16-Nov-2008
[1506]
David, you should take some time to explore the SYSTEM object. It 
is huge, but contains valuable information regarding the REBOL runtime 
environment.
DavidR
16-Nov-2008
[1507x2]
K is that info in the begineers tutorial as I do not recollect seeing 
or remebering it
found this http://www.rebol.com/faq.html
Henrik
16-Nov-2008
[1509]
You can explore it with a small application called ROAM in the Desktop
DavidR
16-Nov-2008
[1510]
I am going to have to disapear for a while dogs need walking again 
& wife wants shopping from town groan domestic choars LOL! Henrik 
thanks!
Sunanda
16-Nov-2008
[1511]
A good learning curve, David, might be to adapt the subpanels example.

Once you have sets of controls appearing in the subpanel to your 
satisfaction, you could then go on to do the set dressing:
-- styles and absolute positioning to mimic Win XP
-- default size depending on user's monitor
Then start adding the real functionality!
DavidR
16-Nov-2008
[1512x4]
LO tis me back
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
[1528]
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 [...]