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

World: r3wp

[View] discuss view related issues

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 :)
ICarii
7-Nov-2005
[3124x2]
lol
rebol/view is my refuge from the evils of Oracle and SQL Server development 
:)
Graham
7-Nov-2005
[3126x2]
what's the freebie oracle like?
Louis, I would add a refinement to the refresh function, which refers 
to a face.  And on that refinement, copy the data to the other face.
ICarii
7-Nov-2005
[3128]
dunno.. use 10g Enterprise at work... now if only view had some fast 
professional looking widgets to act as a front end.. :(
Louis
7-Nov-2005
[3129]
Graham, this sentence can have two meanings: "I wouldn't use the 
style and just stick the function in the action block and do the 
copy there." Would you please reword it?
Graham
7-Nov-2005
[3130x4]
perhaps that won't work.
Anyway, I don't use styles myself ... too lazy.
Anyway, ICarii's solution doesn't catch tabs ( you can add that ), 
and also clicking to get out of the field.
now that we have rebcode, are we going to see your editor reborn?
Louis
7-Nov-2005
[3134]
I think styles are necessary in this case.  I have two colums of 
field (a debit column and a credit column). As data is entered into 
a column it has to be added to a total field at the bottom.
Graham
7-Nov-2005
[3135]
Was it Terakahi or flounder or something...s
Louis
7-Nov-2005
[3136x2]
ICarii and Graham, I need an example. I don't know much about view.
ICarii, please replace "...." with the rest of what you had in mind.
DideC
8-Nov-2005
[3138x2]
As Graham Point out, its not good to use 'style facet because you 
can have several faces of the same style.

What you want is to "link" style together : this is the role of the 
'related facet.
You usually use it with check/radio/toggle to group them.
To specifie a group, you use the 'of keyword in VID :

 View layout [radio of 'one radio of 'one radio of 'two radio of 'two 
 radio of 'two]
So just change your refesh function to test the face/related facet 
instead of style.

This way you can have some fileds in the 'debit group and others 
in the 'credit group
Louis
8-Nov-2005
[3140]
DideC, thanks. I'll do some studying and see if I can figure out 
what you mean. Problem is that I haven't been getting to do much 
programming during this past year, and I have forgotten much of what 
litte I knew.  :>(
james_nak
8-Nov-2005
[3141]
When scaling an image, other than using the "effect: [aspect]", are 
there other controls for the anti-aliasing?
Henrik
8-Nov-2005
[3142]
AA scaling currently only works with DRAW, afaik
james_nak
8-Nov-2005
[3143]
Thanks. Now I need to check out Draw.
DideC
8-Nov-2005
[3144]
Louis: an example of what I say. I hope its what you need: