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

World: r3wp

[View] discuss view related issues

Duke
18-Oct-2011
[10641]
Well there you go!!! That's like comparing aplles and oranges, right! 
 You ARE fluent in REBOL. No worries for there you! I'm NEW to REBOL 
- so I have to make a decision .....
Henrik
18-Oct-2011
[10642]
True, but I'm not fluent in it, because Carl, the original creator 
of REBOL, was around. I'm fluent in it, because there are many extremely 
talented and helpful users in here, who know just about every single 
advantage and limitation in REBOL and know what type of programs 
can be developed in it.


Should Carl decide to abandon REBOL, there is a legacy in the shape 
of Orca, Red and Topaz and I'm sure there would be even more focus 
on these efforts by then. I stick around, not just because I have 
built my development infrastructure around it, but because I dearly 
love the language and I can be much more productive in it than anything 
else, I've tried, and that won't go away for a long time for me, 
because there is no indication to me that there will be anything 
around anytime soon, that will surpass it.
BrianH
18-Oct-2011
[10643]
Also, while Carl was the original creator or REBOL, he isn't the 
only creator. A lot of the work was delegated or done for hire by 
others, and (especially for recent releases) most of those others 
are still here to answer questions and help people.
Duke
18-Oct-2011
[10644]
@Henrik @BrianH -- all excellent points, guys!! Thanks!! I'm going 
to give it another shot.
Which group here is best suited for general noob questions?
Henrik
18-Oct-2011
[10645]
Check out the "I'm new" and "Rebol School" groups.
Duke
18-Oct-2011
[10646]
Thanks ...
Endo
18-Oct-2011
[10647]
Also check those web sites:
http://rebolforum.com/
http://synapse-ehr.com/forums/forumdisplay.php?3-Rebol
http://rebol.org
http://stackoverflow.com/questions/tagged/rebol
Duke
18-Oct-2011
[10648]
@Endo  -- Much obliged for the links!
amacleod
23-Oct-2011
[10649]
I'm trying to launch an "alert" window with an animated image while 
downloading a file. I've tried using "View/new" but the animation 
does not animate. What's a good way to get this effect?
GrahamC
23-Oct-2011
[10650]
You need to use async http
amacleod
23-Oct-2011
[10651]
I want to display it during an "insert"  using mysql-protocol....I 
guess its not happening
GrahamC
23-Oct-2011
[10652]
How long does a single insert take??
amacleod
23-Oct-2011
[10653]
There could be some number of image binaries so it takes as long 
as 10's of seconds to a minute....long enough to make user think 
program as frozen!
GrahamC
23-Oct-2011
[10654]
the mysql protocol is sync, and not async asfaik, so you can't out 
of the box.  if view could display animated gifs then you could but 
it can't
Kaj
23-Oct-2011
[10655]
You could do the animation in a separate process and kill it when 
the transfer is done
Endo
23-Oct-2011
[10656]
or do the insert in a separate process and check the result while 
showing the animation.
amacleod
23-Oct-2011
[10657]
I'm using Christopher Ross-Gill's animation style. I wrote a little 
function to convert an animated gif to an image file that the style 
can use....

Kaj, I thought about doing something like that but how do you kill 
the process from rebol?
Kaj
23-Oct-2011
[10658]
I guess that's system dependent. You could also keep a status info 
or transfer process running and communicate with it via 0MQ
james_nak
24-Oct-2011
[10659x2]
Re: animation, Nick wrote a cool example using "anim" in rebol.org
BTW, this function, anim, seems to be one of the least documented 
ones. Anton has done the best explanation I could find. http://www.mail-archive.com/[rebol-bounce-:-rebol-:-com]/msg00604.html
Duke
1-Nov-2011
[10661]
What "help" command to I need to issue in order to see what value 
are accepted by a refinement? e.g.
  view layout [
     button  ????
     size  ????

help layout/styles - didn't work
help layout styles - nope!
help layout styles button - nope!

So what is it?  :)
Sunanda
1-Nov-2011
[10662]
There is no built-in help to get the settings for the LAYOUT dialect 
(other than SOURCE LAYOUT....and a lot of code reading :).
Easiest starting point may be the user guide:
    http://www.rebol.com/docs/view-guide.html
Izkata
1-Nov-2011
[10663x3]
Just did a bit of poking:
>> layout [X: button]
>> ? X/doc
X/DOC is an object of value: 
   info            string!   "rectangular, rendered buttons" 
   string          block!    length: 2 
   image           block!    length: 2 
   logic           none!     none 
   integer         string!   "width of button" 
   pair            string!   "width and height of button" 
   tuple           block!    length: 2 
   file            none!     none 
   url             none!     none 
   decimal         none!     none 
   time            none!     none 
   block           block!    length: 2 
   keywords        none!     none 

>> ? X/doc/block

X/DOC/BLOCK is a block of value: ["execute when clicked" "execute 
when alt-clicked"]
>> view layout [button [print "clicked"][print "alt-clicked"]]
clicked
alt-clicked
Rebol 2.7.6, so hopefully it holds in newer versions  =)
Duke
2-Nov-2011
[10666]
@izkata -- Much obliged!! BTW, works great with REBOL/Core 2.7.8.4.2 
(2-Jan-2011)

Just so I learn a bit more, can you tell me exactly what your code 
snippets are doing, please. Like:
layout [X: button]  ??

? X/doc => you're asking for help about the word X with the "doc" 
refinement

Where did the /doc come from?
Geomol
2-Nov-2011
[10667]
? layout

tells you, what LAYOUT is. By knowing what layout is, you may see, 
what the layout call does in the example. An effect is, that X is 
being defined.

? x

tells you, what X is. Look near the bottom, and you see DOC as being 
part of X. DOC is an abject within X, which also is an object. So
? x/doc
simple ask info about doc within x.
Endo
2-Nov-2011
[10668x2]
Duke: You can use dump-face function to get list of styles in your 
layout.

>> win: layout [bt: button 30x20 "Hello" lb: label "Test"]
>> dump-face win
Style: none Offset: 50x50 Size: 72x87 Text: none
     Style: button Offset: 20x20 Size: 30x20 Text: Hello
     Style: label Offset: 20x48 Size: 32x19 Text: Test
Or write your own:
>> win: layout [bt: button 30x20 "Hello" label "Test" led red]
>> foreach p win/pane [print bind [var text style offset size] p]
bt Hello button 20x20 30x20
none Test label 20x48 32x19
none none led 20x75 12x12
Duke
2-Nov-2011
[10670x2]
@Geomol: Where do you X in ? layout ???

If I'm learning, how would I ever "guess" to do an ? X or ? X/doc 
???

Sure ! It's being defined by "layout" - but how is a noob suppose 
to know that? 


Originally, I wanted to get help with the "layout" refinements. To 
me, it seems intuitive to simply do:

? layout/styles

But I guess that's too easy :))
@Endo: Thanks ....
Izkata
2-Nov-2011
[10672]
More poking around:

>> foreach [name style] system/view/VID/vid-styles [? name]
NAME is a word of value: face
NAME is a word of value: blank-face
NAME is a word of value: IMAGE
NAME is a word of value: BACKDROP
NAME is a word of value: BACKTILE
NAME is a word of value: BOX
.....more...
Geomol
2-Nov-2011
[10673]
Duke, it's maybe not the easiest task to try to understand the graphical 
parts of REBOL as the first thing. Maybe get a feeling for how objects, 
functions and the other parts of the language works first?
Izkata
2-Nov-2011
[10674]
For my previous snippet:

>> layout [X: button]

X is just a generic variable name I use when I need a throwaway, 
like others use "foo", "bar", and so on.  Layout is just assigning 
the button object to the word X, which I'm exploring in the next 
few lines like Geomol explained.


I explored system in the same way to find view, then VID, then vid-styles. 
 vid-styles is a block containing a series of alternating names and 
definitions, which the foreach loop is simply going over
Duke
3-Nov-2011
[10675]
@Izkata:  I understand your X now!  If /doc is simply a refinement 
to "help", then that fact is not showing up when "help" is entered 
by itself.

bottom line: I simply wanted to use the "help" system to explore 
 what's available in "layout" and how to use each component. I was 
assuming that the "help" system was a comprehensive reference. It 
may not have been designed as such.
Henrik
3-Nov-2011
[10676x3]
You are being thrown off, because LAYOUT processes a dialect, which 
HELP has no chance of understanding.
It helps to understand, what LAYOUT is doing: As you may know, VID 
is a dialect, which is a parsed collection of words, numbers, strings, 
etc. in a specific format, essentially a sub-domain language, within 
REBOL. The job of LAYOUT is to parse the dialect block and convert 
that into a face tree (a face is just an object, try typing FACE 
in the console). The face tree can then be fed to the VIEW function, 
so the layout can be displayed, so:

VID -> layout -> view -> window displays with content


You can also create a face tree manually, but that's far more laborious, 
which is why VID is there.


When LAYOUT creates a face, it does so in accordance with a style 
from Izkata's shown style list, such as IMAGE or FIELD. A style is 
essentially a prototype face.
VID is however quite sparse, as it was written in a week, by Carl, 
a decade ago. There are some extensions and replacements available.
Endo
3-Nov-2011
[10679]
as it was written in a week, by Carl
 is that true? Cool or pity :)
Henrik
3-Nov-2011
[10680]
That's what he told me some years ago. It was only meant to be a 
demo of View.
Gabriele
3-Nov-2011
[10681]
the initial version, yes. but, vid has been worked on after that...
Kaj
3-Nov-2011
[10682]
Wasn't R3 going to add help for dialects?
Duke
3-Nov-2011
[10683]
@Henrik:  I now understand the "hoops" that need to be jumped into 
in order to get graphics to happen in REBOL. 
Is REBGUI an extension/replacement for VID? 

I sure hope that the answer to Kaj's question is "yes" - cuz that 
would make the "help sytem" much more useful, IMO.
Thanks for the input!
GrahamC
4-Nov-2011
[10684]
Rebgui is an alternative to vid ... it has more widgets but is less 
flexibles
Henrik
4-Nov-2011
[10685]
Kaj, I think Carl is still thinking about that. The R3 GUI will provide 
some documentation.
Pekr
4-Nov-2011
[10686]
In the past I proposed help to use a refinement, e.g. /custom, /dialect, 
and the format would then be:

help/custom dialect-name "button"


It is a problem right now, as 'help uses just one argument. But maybe 
it could just accept more types, e.g. a block, and then we could 
have a dialect to help us with dialect help :-)
Henrik
4-Nov-2011
[10687]
I think one solution is to add a uniform domain based dictionary 
(one domain for styles, one for VID, one for other dialects), that 
help understands, but it can unfortunately not make dialects themselves 
self documenting. Possibly there would be automated dictionary builders, 
but these take a lot of time to run during startup, so maybe they 
should be some sort of callbacks from help to get just-in-time help 
on a domain.

Then you could use:

>> help/on styles

to get a dictionary on the styles, based on a dictionary builder.
Duke
4-Nov-2011
[10688x2]
@GrahamC:  Thanks for clearing that up in a nutshell.
@Henrik  & Pekr:  IMHO, enhancing the "help" system as you suggest, 
is the greatest form of advocacy that the REBOL community can undertake. 
let the "help system" be as comprehensive as possible - whatever 
form it takes, so that REBOL novices are not faced with yet another 
source of stress and uncertainty - especially if they come from a 
non-Forthish or LISPish background. If a novice can solve - by himself, 
using the "help system" - what he perceives to be an ambiguity, already 
that is a success  which can only give impetous to continueing his 
exploration of REBOL.
Henrik
10-Nov-2011
[10690]
Question:


If you have a window face and SHOW it, does it perform a different 
kind of SHOW, if the window face /CHANGES is set to TEXT or ACTIVATE? 
I have some problems refreshing a table along with changing the window 
title during the same SHOW.