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

World: r3wp

[View] discuss view related issues

Terry
1-Nov-2005
[3074]
Why is it when I run this code using  rebview1350031.exe, i get the 
rebol "working" logo spinning continuously?

view/new layout [box 100x100 blue]
Graham
1-Nov-2005
[3075]
you shouldn't get any thing since you have started the wait
Terry
1-Nov-2005
[3076]
Im DOing it from an older script that uses async.. I think it's messed 
it up somehow
Graham
1-Nov-2005
[3077x2]
the rebol working logo went long ago.
but I recall sometimes it attached to new windows rather than staying 
with the original window
Terry
1-Nov-2005
[3079x3]
yeah, that's what's happening.
Can't unview either.
Looks like an extensive debugging/rewrite... ack.
Luca
2-Nov-2005
[3082]
Anyone wrote a patch/program to access .htaccess protected urls?
Volker
2-Nov-2005
[3083x2]
http://user:[pass-:-server]
or a tool to build such a path?
Luca
2-Nov-2005
[3085]
Well, I'd like the HTTP schema to prompt for a user/pass if the webserver 
require them.
Volker
2-Nov-2005
[3086]
AH. Do not know how to do that.
Luca
2-Nov-2005
[3087]
I mean, like a browser does.
Volker
2-Nov-2005
[3088]
I understand. but i do not now how to trap that question.
Luca
2-Nov-2005
[3089]
I wrote a small patch to the HTTP schema to read urls protected by 
basic authentication.

It works for me but I don't know if it works with each webserver 
configuration.

Since it writes your %user.r to make the patch permanent, be careful 
to have a look at it before to execute it.

Any suggestion is appreciated: http://www.truffarelli.it/rebol/view/http-patch.r
Gabriele
3-Nov-2005
[3090x3]
I would do it this way:

1) Attempt to read the URL, with a TRY

2) if there's an error, check if it is an authorization required 
error
3) if so, ask the user for credentials
4) go back to 1
Asking the user should not be done on the protocol side, but on the 
application side.
the protocol should make it easier for the user to figure out what 
kind of error is when one happens, though. http:// surely needs improvements 
on this front.
Luca
3-Nov-2005
[3093x2]
I agree with you. I thougth to modify the schema because I need to 
access files (basic auth protected) from the /view desktop. So I 
don't have any application running yet, probably I have to modify 
the ctx-viewtop insteed.
insteed=instead :-)
Volker
4-Nov-2005
[3095]
IMHO passwords belong into the protocol. 

- If possible they should never be exposed to the application. More 
like browsers do, with a password-manager. Unfortunally that is not 
really possible with rebol.

- urls go thru multiple layers. after read-thru you dont have any 
error-information.
Luca
4-Nov-2005
[3096]
Actually the 401 error (Unauthorized) and the HTTP Authentication 
are mentioned in the RFC 2616 - Hypertext Transfer Protocol. So maybe 
the HTTP should manage it, and it actually manages ithem a call to 
http://user:[pass-:-server] works fine: However, in my opinion, would 
be very useful if /View would manage user/pass when it access authorization 
required urls.
Volker
4-Nov-2005
[3097]
I use http://polly.rebol.it/test/test/desktop/test-desktop.rfor 
my own site, there you can specify passwords for base-urls. but all 
hardwired still.
Henrik
7-Nov-2005
[3098]
I'm trying to solve a performance problem with lists that uses a 
supply function. Mouseovers are dog-slow because every time the mouse 
gets over a row, the entire list view is regenerated by the supply 
function. the supply function redraws the list and truncates values 
so they fit in cells, paints backgrounds according to cell contents, 
etc. Lots of stuff and slow.

I'm looking for a way to discern between that I want to show the 
entire list and when I'm just doing a mouse over, so the supply function 
only changes the colors of the affected rows. Ideas?
Louis
7-Nov-2005
[3099]
I have two money fields in the same view window. I would like for 
the contents of the first field to be automatically be copied to 
the second field. But the second field must then be able to be changed 
if necessary without affecting the first field.  Would someone please 
show me how?
Graham
7-Nov-2005
[3100]
just use a function block attached to the first to copy to the second.
Louis
7-Nov-2005
[3101]
Been trying for an hour or so to do that with no success. With a 
text field I can do it, but I haven't been able to get it to work 
for a money field. A simle example is what I need, I think.
Graham
7-Nov-2005
[3102]
what is a money field ??
Louis
7-Nov-2005
[3103]
Holds money ( for example $1.00), not a string.
Graham
7-Nov-2005
[3104]
fields only hold text strings.  so, you are doing it already.
Louis
7-Nov-2005
[3105]
Ok. Thanks! I had forgotten that.
Graham
7-Nov-2005
[3106]
Thank Socrates :)
Louis
7-Nov-2005
[3107x6]
Socrates wasn't a very good rebol programmer and could not have helped. 
Besides, he is dead and you are alive. At least I hope you're still 
alive since I still need more help.
refresh: func [/local amount total][ ;Anton's function
    total: 0
    foreach face out/pane [
        if face/style = 'monfld [ ; only money fields
            amount: any [attempt [to-money face/text] $0.00]
            if any [
                amount <> $0.00
                not empty? face/text
            ][
                face/text: form amount
            ]
            total: total + amount
        ]
    ]
    total-debits/text: form total
    show out ; updates all sub-faces at once
]
Hold on, more code to come.
style monfld field [refresh] 80x24
        style monfld2 field [refresh2] 80x24

        D0-amount: monfld 
        C0-amount: monfld2
the refresh2 function is just like refresh except 'monfld is replaced 
by 'monfld2
Now, how can D0-amount be copied into C0-amount automatically?
ICarii
7-Nov-2005
[3113x2]
you can use the feel / engage events to detect key presses and call 
an update function..
or do you mean at init?
Louis
7-Nov-2005
[3115x2]
I mean that upon manually enter a dollar amount into the D0-amount 
field I want the same amount automatically entered into the C0-amount 
field.
enter = entering
ICarii
7-Nov-2005
[3117x2]
use the feel/engage: func [f a e][if a = 'key [ ....]]
most people wait for the enter key then call an update to set the 
value in appropriate fields
Graham
7-Nov-2005
[3119x2]
I wouldn't use the style and just stick the function in the action 
block and do the copy there.
makes it too complicated, and then you don't remember what's going 
on.
ICarii
7-Nov-2005
[3121x2]
D0-amount: monfld feel [engage: func [f a e][if a = 'key [if e/key 
= #"^M" [Co-amount/text: f/text ....
i reall y should avoid shorthand :(
Graham
7-Nov-2005
[3123]
But James, most people tab out of a field :)