• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp5907
r3wp58701
total:64608

results window for this page: [start: 33801 end: 33900]

world-name: r3wp

Group: View ... discuss view related issues [web-public]
james_nak:
31-Oct-2005
This is a view/core issue but I place this here since it's showing 
up in View. I've recently changed hosting companies and not one of 
my apps doesn't like the email authentication like it did before. 
I noticed that a while back there was a discussion about this before 
the esmtp was placed into view (esmtp.r and esend.r + the patch). 
I'm getting this:
** User Error: Server error: tcp 535 auth failure
** Near: smtp-port: open [scheme: 'esmtp]
either only

This is one of those "but it was working before" issues. Perhaps 
one of you has run into this. BTW, both Outlook and webmail seem 
to work OK though even Outlook was a little slower yesterday connecting 
to the server. Thanks as always in advance.
DideC:
31-Oct-2005
A "trace/net on" dump can help to narrow the cause, maybe.
Luca:
2-Nov-2005
Anyone wrote a patch/program to access .htaccess protected urls?
Volker:
2-Nov-2005
or a tool to build such a path?
Luca:
2-Nov-2005
Well, I'd like the HTTP schema to prompt for a user/pass if the webserver 
require them.
Luca:
2-Nov-2005
I mean, like a browser does.
Luca:
2-Nov-2005
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
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
Volker:
4-Nov-2005
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
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.
Henrik:
7-Nov-2005
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?
Graham:
7-Nov-2005
just use a function block attached to the first to copy to the second.
Louis:
7-Nov-2005
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
what is a money field ??
Louis:
7-Nov-2005
Holds money ( for example $1.00), not a string.
Louis:
7-Nov-2005
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.
Louis:
7-Nov-2005
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.
ICarii:
7-Nov-2005
use the feel/engage: func [f a e][if a = 'key [ ....]]
ICarii:
7-Nov-2005
D0-amount: monfld feel [engage: func [f a e][if a = 'key [if e/key 
= #"^M" [Co-amount/text: f/text ....
Graham:
7-Nov-2005
But James, most people tab out of a field :)
Graham:
7-Nov-2005
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
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
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.
DideC:
8-Nov-2005
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]
Louis:
8-Nov-2005
DideC, many many thanks.  I try that and let you know how it works. 
 It may be a day or so, however, as I am traveling in a motorhome, 
and don't always have internet access.  Again thanks!
james_nak:
9-Nov-2005
Has anyone run into a problem with "save" as in save/png where it 
sometimes doesn't want to overwrite a file? THe old file contents 
(in this case an image) is still there.
Anton:
9-Nov-2005
Henrik, can you show us the code (or a cut down demo) of your list 
?
Henrik:
9-Nov-2005
The standard list has a few problems, notably in that you are forced 
to update the entire listview, when you want to refresh a single 
entry. That makes it slow for mouseovers.


The old code was much faster at scrolling and doing mouse overs as 
I could have full control over which part of the list I wanted to 
show, but everything was done manually, but it was not direct pane 
programming.
Henrik:
9-Nov-2005
but the standard list is very elegantly done and allows you to have 
a simple iteration function. It's a bit too simple, but then again 
I can't find proper docs on doing LIST with SUPPLY
Henrik:
9-Nov-2005
(but I seem to be using the word 'but' a lot)
james_nak:
10-Nov-2005
All, FYI, I found out my "save" problem was not setting my words 
to "[]" before a load. SAving was working...the viewing was not! 
When will I remember that little thing about Rebol.
Henrik:
11-Nov-2005
I'm trying to make a button behave like a text field, but I can't 
make it work.


view layout [b: button "Hello" with [flags: [field input return text]]]

what's missing?
Graham:
14-Nov-2005
I've been playing around with Frank's paint.r in the library.  I 
implemented a free hand draw tool but found that a simple line or 
circle takes about 32k of draw instructions :(
Graham:
14-Nov-2005
I wonder if there's a more efficient way to do this than combining 
lots of line draws together?
Ashley:
14-Nov-2005
It's a simple problem of polling frequency. Try changing the code 
so that a new point is not placed unless it is more than (say) 4x4 
away from the previous point.
Henrik:
15-Nov-2005
hmm... how do I set the default entry in a CHOICE at layout time? 
I wanted to do something like this:

view layout [choice "1" "2" "3" with [data: next face/data]]
RobertDumond:
15-Nov-2005
hallo, alls... i have a question regarding view events...  i am testing 
using the following code, which creates two text fields, one of which 
only accepts numerical input...
Henrik:
15-Nov-2005
you need to copy in the original feel from a generic field face into 
your new field along and then add your code to its existing engage 
function
Henrik:
15-Nov-2005
it's a bit of a hassle...
Henrik:
15-Nov-2005
you can copy it out into a separate function, which could be called 
ENGAGE-FUNC and make you alterations.


then you can initialize a normal field with a new ENGAGE function 
in your layout:

the-field: field with [feel/engage: :engage-func]
Henrik:
15-Nov-2005
thanks, I'll give it a try...
Graham:
15-Nov-2005
I want to save my draw commands to a text database field.
Graham:
15-Nov-2005
the question really is, is there a native way to compress blocks 
as a string value ( for saving into a text field )
Volker:
15-Nov-2005
no, but then you have a string. then you can compress. then you can 
write/binary .
Volker:
15-Nov-2005
why do you want to do that, compressed in a field?
Volker:
15-Nov-2005
a sql-field, not a face-field?
Graham:
15-Nov-2005
perhaps we native to compress rebol code and return as a string value, 
and not binary
Volker:
15-Nov-2005
you can convert a binary to a string in place, with 'as-string
Anton:
15-Nov-2005
Henrik, your second example actually does "damage" to the system.

You are modifying the default FEEL object that is MAKEd from every 
time FIELD styles are created by LAYOUT.
It's basically like the following example. Here we set the ENGAGE
function to NONE to disable user interaction to the field:

	view layout [
		field with [feel/engage: none] 
		field
	]


But the second field also does not respond to user activity, nor 
do fields created in new windows:

	view layout [field] ; <- this field also does not respond

It can be confusing.

You have to remember that the FEEL objects are shared by default, 
to save memory.
These two examples may look the same but they are not:


 layout [field feel [engage: none]] ; this one clones and modifies 
 the FEEL


 layout [field with [feel/engage: none]] ; this one modifies the original 
 FEEL


The LAYOUT dialect has a FEEL keyword, and that causes a MAKE of 
the feel (ie. it is cloned
before being modified by your spec block).

The LAYOUT dialect WITH keyword, however, gets you out of the LAYOUT 
dialect and back into "normal" rebol code, but also binding you inside 
the new face object (the field) that is being created by LAYOUT.

So the "feel" inside the LAYOUT spec block and the "feel" inside 
the WITH block are not the same.
Anton:
15-Nov-2005
Robert, towards a solution, we need to look in SYSTEM/VIEW/VID/VID-STYLES/FIELD/FEEL, 
eg, by doing this:

	print mold svv/vid-styles/field/feel


So the first attempt should look like this, just copying the code 
from the console:
Anton:
15-Nov-2005
Oh no! We get an error message! "edit-text has no value".
Where is EDIT-TEXT ? It is not defined in the global context.
If you go looking in the system you will eventually find it here:

	CTX-EDIT/EDIT-TEXT


What happened ? The original EDIT-TEXT word, as found in the FIELD/FEEL, 
is bound to CTX-EDIT 

(it's not found in the global context, open a new console and try 
it), but we only bound our new EDIT-TEXT 
word to a new function context (ie. our ENGAGE).


So how do we keep the original bindings of a function, when making 
a copy of it ?
SECOND gives you the body of a function.

	second get in svv/vid-styles/field/feel 'engage


We should COPY that, which keeps the bindings, then modify that copy. 
*Then* we can create the function:

	; copy the engage function body
	body: copy/deep second get in svv/vid-styles/field/feel 'engage

	; <-- modify the body here

	; make the new function
	engage: func [face act event] body

Let's test that to see which keys we want:
Anton:
15-Nov-2005
view/new layout [
	the-field: field feel [

		use [body at-key-block key-block][

			; copy the engage function body

   body: copy/deep second get in svv/vid-styles/field/feel 'engage


   ; modify the copy to move the block with the EDIT-TEXT word in it
			; to a new IF then-block
			at-key-block: next find select body [switch act] [key]
			key-block: at-key-block/1

   change/only at-key-block compose/only [probe event/key if true (key-block)]

			; make the new function
			engage: func [face act event] body

		]

	]
]
focus the-field
do-events
Anton:
15-Nov-2005
view/new layout [
	the-field: field feel [

		use [body at-key-block key-block][

			; copy the engage function body

   body: copy/deep second get in svv/vid-styles/field/feel 'engage


   ; modify the copy to move the block with the EDIT-TEXT word in it
			; to a new IF then-block
			at-key-block: next find select body [switch act] [key]
			key-block: at-key-block/1
			change/only at-key-block compose/only [
				if find "-0123456789.^H^-" event/key (key-block)
			]

			; make the new function
			engage: func [face act event] body

		]

	]
	new-field: field
]
focus the-field
do-events
Henrik:
16-Nov-2005
is there a good way to do font substitution? I can see that under 
Windows, when I attempt to use the Tahoma font, OSX uses Lucida Grande 
and Linux turns to Courier for some reason. Is there a way to control 
that+
Graham:
16-Nov-2005
I have to supply the font as a word, and lookup the font outside 
the draw block.
Graham:
16-Nov-2005
If this is the case, I suggest that a font dialect be created to 
support fonts inside the draw dialect
Graham:
17-Nov-2005
paint  image [ image! none! ] data [block!]


if given an image as first parameter, it loads it.  If not, it creates 
a canvas of 300x300

if given a data block of draw commands, it applies it to the canvas
Graham:
17-Nov-2005
This is a simplistic tool is to be used to mark up images to point 
out areas of interest in medical images.
Graham:
17-Nov-2005
Frank had a very clever way of creating the draw block, but I found 
I couldn't do it the same way with all the combinations that were 
emerging.
Volker:
17-Nov-2005
A syntax-trick: #[object![a: 123]]
Anton:
17-Nov-2005
Graham, I notice with arrow, undo/redo and circle, it's possible 
to get a circle with an arrow-head on it.
Graham:
17-Nov-2005
that's what I was saying .. arrow is a state
Anton:
17-Nov-2005
DideC, yes, that is a simpler solution to this particular problem. 
I guess I wanted to show a more general way, keeping the original 
binding, instead of guessing what the binding should be.
Anton:
17-Nov-2005
It sounds like arrow should not be a tool, rather a mode that affects 
all/most tools.
Anton:
17-Nov-2005
If it's a mode, then it should be a check-box, not a radio.
Graham:
17-Nov-2005
I did that before I realised it was a state.
Anton:
17-Nov-2005
Actually, even if it's a mode, you should compose the draw block 
like (very pseudo-code):

 compose [ (either arrow-on? [enable-arrow][])  (draw-cmd-eg.line) 
  (either arrow-on? [disable-arrow][])  ]
Graham:
18-Nov-2005
what would it take to have text flow automatically around a rectangular 
image in a area field?
Graham:
18-Nov-2005
probably a rebcode update
Graham:
18-Nov-2005
we've got draw text which can follow a spline .. so why not have 
text that knows the boundary of an image object ?
Pekr:
18-Nov-2005
Second - why ViewTop? and if ViewTop, why we still call desktop a 
Desktop? That is imo inconsistent ...
Pekr:
18-Nov-2005
.... because .... OS does not take so long imo :-)) Isn't it just 
a question to set lower default time-out thant 30 sec, or what was 
the value?
Volker:
18-Nov-2005
WHat does a normal read? also timeout for so long?
Volker:
18-Nov-2005
If the band is bound to a proxy, maybe not.
Volker:
18-Nov-2005
Maybe that 5 sec is worth a rambo-ticket?
Allen:
18-Nov-2005
5 seconds might not be enough time for the first time user to allow 
the user to respond to a software firewall (to add rebol to the allow 
list) and still get a connection.
Volker:
18-Nov-2005
Maybe a requester. "Testing proxy" and choice for seconds
Volker:
18-Nov-2005
Me too. Needs a dialog where you can change and test.
Graham:
18-Nov-2005
So, what's the difficulty in using a non rectangular field to flow 
text ?
Graham:
18-Nov-2005
It's just a calculation, right?
Graham:
18-Nov-2005
Yes, can do oneself .. or ask for more basic support, or a new widget 
that supports this.
Graham:
18-Nov-2005
scrolling an image requires changing the offsets in a pane
Graham:
18-Nov-2005
Say, you wanted to edit in situ text that was running along a curve, 
spline.
Graham:
18-Nov-2005
you would have to detect your mouse click was touching the text somehow 
( so add a feel to the text ) ...and then calculate where it was 
along the text
Volker:
19-Nov-2005
So we dont get a plugin, isntead write our own browser? :))
Pekr:
19-Nov-2005
Why a browser? getting rich-text is not everything you know :-) Who 
would write parsers for all that web "standards" out there, plus 
support for various browser quirk modes? And what would you do about 
java-script? Are we going to reimplement javascript in rebol too? 
:-)
Ashley:
19-Nov-2005
A simple REBOL-based WYSIWYG word processor is possible though. I've 
often contemplated doing one that was CSS2 / XHTML based so you can 
seperate style from content (and get an HTML editor to boot). Should 
be possible,and fast, once REBOL has rich text support.
Graham:
20-Nov-2005
Allen has a nice calendar though he hasn't updated it for a while.
Henrik:
24-Nov-2005
I thought of this little idea regarding the editor: Currently, it's 
depending on running a script from file, if you want to test something. 
But I was wondering if it were possible to edit data directly with 
it and just store it in memory?


Sometimes I like to debug a function without having to save it to 
a file and then run a program stored in a different file to run the 
test, e.g. Ctrl-E is useless.


It would be nice to directly in the editor, create a big function, 
say from a paste and do a few edits, press Ctrl-<something> and have 
that evaluated directly. Then you could quit the editor and use the 
function directly in the console without having to save any files.


Also if you want to re-edit the function, type in something similar 
to:


editor 'my-big-function and the editor would pop up with the function 
source and the word its bound to.
Volker:
24-Nov-2005
why not using a scratch-file?
Henrik:
24-Nov-2005
hmm... and to get this function available at startup? I remember 
a user.r file somewhere...
Henrik:
24-Nov-2005
This is pretty cool! I added do-events at the end of the scratch 
script.


Now I'm running a GUI program, and I can exit to the console though 
a "halt" button in the GUI. I 'SCRATCH the function I need and CTRL-E 
the changes and I can continue working with the GUI program with 
the new changes without quitting the editor. :-)
DideC:
24-Nov-2005
There is not!
(Is this a sufficient reason for you ;-)
Henrik:
24-Nov-2005
could it be a compatibility issue? I'm not sure if binaries are supported 
in the XFree86 clipboard
Graham:
24-Nov-2005
what I want to is right click on an image, copy to clipboard, and 
then paste it into a rebol application.
Volker:
24-Nov-2005
Is there a way with an external app? save clipboard to file?
Henrik:
24-Nov-2005
some apps support it... Directory Opus can paste an image directly 
to a file
Graham:
24-Nov-2005
I am currently pasting urls in .. but I was hoping for a better solution.
Graham:
24-Nov-2005
So, is the lack of binary support a cross platform implementation 
issue rather than a technical one in windows ?
Gregg:
28-Nov-2005
My guess as well. I have some win-clip stuff for images. Nothing 
fancy, but might save you a little effort. Let me know if you're 
interested.
33801 / 6460812345...337338[339] 340341...643644645646647