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

World: r3wp

[View] discuss view related issues

Henrik
3-May-2010
[9853]
If you don't want to handle resizing manually, you could look at 
the VID Extension Kit.
eFishAnt
3-May-2010
[9854x2]
There might be a better group than View, but I am looking for industry 
literature about UI delays.  I remember something about an IBM paper 
that said 1/10 of a second is the maximum keyboard or UI delay that 
is imperceptible.  I wonder if there is a good whitepaper/publication 
on this that someone can recommend that would be solid enough to 
wack a supplier over the head with who has very slow UI latencies. 
 They are in denial about latency affecting the user experience.
ironic enough, the current 1.2.22 AltME which has noticeable behavior 
changes while sending messages, will cause duplicated messages if 
you try a second time to CTRL-S while waiting for it to go out...so 
I am seeing more duplicated messages...just did one in here...  :-\
Sunanda
3-May-2010
[9856]
a good place to start is Jakob Nielsen's research:
http://www.useit.com/papers/responsetime.html
eFishAnt
3-May-2010
[9857]
PERFECT!  you shine, Sunanda!
Maxim
3-May-2010
[9858x3]
one easy suggestion for improving "responsiveness" is to ALWAYS put 
UI code at the top of any processing.


it takes us quite a long time to react to a change in the ui, so 
that delay can be used to do the processing.
that was one reason the Amiga felt so fast... the gui wasn't managed 
by the application's task, but by the os... independently of the 
application's business.    For example, even if the application was 
processing, the menu would pop up in real time... cause intuition 
(the gui manager) was at a higher priority than most applications.
@ Gregg,


MIN and MAX on pairs right now is extremely usefull to intersect 
and or add up regions.
Paul
4-May-2010
[9861x2]
How you guys use request-file to open only for selection of folders 
(exluding files in the listing)?
I have a method that I use that I don't know of being documented 
anywhere so I'm wondering what others are doing.
james_nak
4-May-2010
[9863]
Just found an interesting behavior. I had a layout that mimics the 
request-password. It is launched via view/new and do-events  If I 
did an unview after the user entered in the password ( apass: field 
hide [unview] , it would close it but later on other requestors or 
view elements would disappear. The app was still running though. 
If I closed the request via a button click it works fine. I just 
wanted it to respond to a CR instead of having the user have to reach 
for the mouse. At this point though, let em reach for the mouse. 
:-)
Graham
4-May-2010
[9864x2]
is it modal?
guess not as you are using view/new ...  are you using unview/only 
?
james_nak
4-May-2010
[9866x3]
Yes, I think I tried that. Of course I think I tried a million ways. 
:-)
Let me check.
You know what they say? I could have sworn I used it... Thanks Graham.
Gregg
5-May-2010
[9869]
Paul, post your method. There wasn't any common dialog for folder 
selection in Windows for a long time, and REBOL still doesn't provide 
direct access to it.
BrianH
5-May-2010
[9870]
for a long time
? I remember using the folder selection dialog in Win3.1 apps...
Maxim
5-May-2010
[9871x2]
windows folder selection dialogs really suck for many reasons... 

one of the most annoying is that you cannot create a folder while 
you are hunting for one.
so if Paul has found a trick that allows us to use the normal file 
requestor so it can pick folders... YAY
Gregg
5-May-2010
[9873x2]
It wasn't a common dialog though, and required callbacks (at least 
the Shell API I knew of). I don't remember it in 16-bit Windows, 
but the duff on the floor of my brain is thick.
Max, not sure what dialogs you're talking about, but the common dialogs 
allow that.
BrianH
5-May-2010
[9875x2]
Maxim, I think that the "New folder" button is an option for the 
folder selection dialog; at least I see it often in programs pre-Vista. 
Vista+ the folder selection dialog is a subset of the Open/Save dialog, 
with most of its abilities.
Gregg, it's possible that the Win3.1 programs that I remember were 
using a custom dialog that served as the inspiration of the later 
common dialog, but they worked the same. The common dialogs themselves 
were a later addition, iirc; not sure whether Windows before 3.0 
had them.
Maxim
5-May-2010
[9877]
was there windows before 3.11?  ;-)
BrianH
5-May-2010
[9878]
Yup. Windows had a 1.0.3 release, just like REBOL but with less memory 
usage :)
Maxim
5-May-2010
[9879]
I was joking, there where many releases before 3.11 ...  ;-)
BrianH
5-May-2010
[9880]
I know, just going with it :)  Though practically, I considered REBOL 
1.0.3 to be more useful than Windows 1.0.3 :)
Maxim
5-May-2010
[9881x2]
hehe, but its funny that windows 1.0.3 actually didn't have windows, 
it was a row/column/grid gui engine.
the OS itself I mean.
Steeve
5-May-2010
[9883]
and it was running with what... less than 1 Mb ?
BrianH
5-May-2010
[9884x2]
Less that 512k - room to spare to run apps even if you only had 640k.
Partly due to the wonders of small screen resolutions and bitdepths 
(which made tiled windows a bad idea). Nowadays I have screen images 
that take more memory than Win 1.0.3 altogether :)
Steeve
5-May-2010
[9886]
I remember that with 3.11 the memory allocated for graphic controls 
of an active window was limited to 64Kb
Maxim
5-May-2010
[9887]
yes people forget that just storing a SINGLE bitmap which is 1280x1024 
in RGBA colors, takes up 5.25 MB of ram.

it adds up very quickly.
BrianH
5-May-2010
[9888]
To be fair Steeve, just about everything in Win3.1 was limited to 
64k - stupid segmented memory. I jumped at Win32s when it came out 
:)
amacleod
13-May-2010
[9889]
trying to use set-face in a loop to assign values to multiple text 
fields...what is wrong here?

fields: [a b c]

foreach field fields [
	set-face field now
]
Maxim
13-May-2010
[9890]
although I never used set-face... 

I'd say you have to do:

	set-face field to-string now
amacleod
13-May-2010
[9891x2]
I tried it with a string ...I was not thinking when I wrote the example
getting this error:
** Script Error: in expected object argument of type: object port
** Where: set-face
** Near: if all [
    access: get in face 'access
    in access 'set-face*
] [
    access/set-face* face value
]
if
Maxim
13-May-2010
[9893x3]
add a show to it... might just not be refresing itself.
ah.
probably just need to 'REDUCE your fields block first.
its not receiving an object as its first parameter

fields: reduce [a b c]

foreach field fields [
	set-face field now
]


btw... use the 'source command whenever you get these types of errors.

>> source set-face
set-face: func [

    {Sets the primary value of a face. Returns face object (for show).}
    face
    value
    /no-show "Do not show change yet"
    /local access
][
    if all [
        access: get in face 'access
        in access 'set-face*
    ] [
        access/set-face* face value
    ]
    if not no-show [show face]
    face
]
amacleod
13-May-2010
[9896x2]
I never use set-face either but I'm tired of setting a bunch of fields 
manually
The fields need to stay as word! 

If I reduce them they will give me their current value...
Maxim
13-May-2010
[9898x2]
remember that even if [a b c] are bound... they will still be passed 
as words to the function in your loop.


another way is to use 'GET directly on the words within the loop, 
but that can have hard to understand binding side-effects, depending 
on how the block was originally created.
example using 'GET

fields:  [a b c]

foreach field fields [
	set-face get field to-string now
]
amacleod
13-May-2010
[9900]
that works...thanks

but I do not fully get it...I look into it.
Maxim
13-May-2010
[9901x2]
GET gives you the value of a word.  


the detail being that the word may or not be bound.  when it isn't 
bound explicitely, it will search for it in the global context (explicitely 
if you give it a lit-word).


which is why its always a good idea to use GUI code within a context, 
so you can be sure any un-explicit binding is local to that context. 
 note that you must explicitely create them within the context (at 
the root level of the context) for that binding to occur.


(note to Lad & Brian..I know I'm over-simplifying the whole concept, 
but that is how basically it works for "mere mortal"  ;-)

ex: 
here .... danger!   [a b c] use isn't bound within the context.

context [
	layout [a: field b: field c: field]

	fields: [a b c]
	foreach field fields [
		set-face get field to-string now
	]
]





while this will be (and protect your global context from being clobbered 
by the field names), plus you are sure that GET will try to use the 
field names locally.

context [
	a: b: c: none

	layout [a: field b: field c: field]

	fields: [a b c]
	foreach field fields [
		set-face get field to-string now
	]
]



if you really wanted to be funky, you could put words in the [a b 
c] block which are bound to other contexts using 'IN.

append fields [] IN other-context 'd


then when the loop runs, the field specified by d in that OTHER context 
will also be set.
hehe... that seems like it was a "Binding 101" tutorial   hehehe