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

World: r3wp

[!RebGUI] A lightweight alternative to VID

Graham
22-Apr-2007
[6386]
I see that I had an alert based upon your old code but allowing for 
much more text ...hence the no-hide
Ashley
22-Apr-2007
[6387]
So that leaves good, sensible refinements (I'd calss the ones that 
were dropped as "hacks" to get some other functionality working).
Graham
22-Apr-2007
[6388]
Is there a way I can make it so that escape always closes the current 
window?  Or, do I have to put a widget with escape as the key ?
Ashley
22-Apr-2007
[6389]
Build#91 uploaded to SVN with inbuilt ESC handling. The processing 
 logic is:


1) If a widget has focus (e.g. an area or field) let it handle the 
ESC
2) If it's assigned to a widget then do the associated action

3) If a popup (including choose: drop-list, edit-list, menu) is active 
close it

4) Otherwise, treat the ESC as a close event (i.e. invoke close handler, 
check for app exit, etc)
Graham
22-Apr-2007
[6390]
Nice
Graham
23-Apr-2007
[6391]
Any chance of capturing control and shift Function keys?
Pekr
23-Apr-2007
[6392x2]
does Alt work? (for menu)
and I buy a beer to person, who makes ctrl tab, and ctrl shift tab 
working (tab widget) :-)
Graham
23-Apr-2007
[6394]
Also, cursor key to change focus on buttons
Pekr
23-Apr-2007
[6395]
yes ....
Graham
23-Apr-2007
[6396]
In the spell checker, the word you were checking used to remain high 
lighted even if you clicked on one of the suggestions ( I think ). 
 Now it doesn't;
Ashley
23-Apr-2007
[6397]
Any chance of capturing control and shift Function keys?

 I certainly don't want to have 36 function key handlers, but enhancing 
 the function key handler spec to support refinements should be easy 
 enough; so:

	make function! [face] spec

becomes:

	make function! [face /control /shift] spec

does Alt work? (for menu)
 ... see http://www.rebol.com/docs/view-system.html#section-5.9

Short answer, no. But if R3 supports it I will.
Pekr
23-Apr-2007
[6398]
the same goes probably for ctrl plus tab, no? IIRC it is not captured 
by Rebol at all ...
Ashley
23-Apr-2007
[6399]
who makes ctrl tab, and ctrl shift tab working

 ... easy enough to trap these keystrokes. Figuring out what to do 
 with them then is the tough part!

Also, cursor key to change focus on buttons

 ... yep, keyboard focus control is one of those long-standing issues 
 I'd like resolved. But mouse issues come first for me (i.e. until 
 the focus/caret/mouse system is 100% I'm not interested in enhancing 
 the keyboard focus system beyond basic tab support.
Pekr
23-Apr-2007
[6400]
Ashley - really? ctrl plus tab is trappable in rebol view engine?
Ashley
23-Apr-2007
[6401]
word you were checking used to remain high lighted

 ... by virtue of a focal-face bug. I eventually want to do the highlighting 
 with draw.
Pekr
23-Apr-2007
[6402]
what to do is easy - at least in Windows (but I would expect mac 
and linux too), you switch tab focus ... ctrl shift tab goes in reverse 
order ....
Ashley
23-Apr-2007
[6403]
Shift-tab (i.e. back tab) already does that.
Pekr
23-Apr-2007
[6404]
shift tab? for fields etc.
Ashley
23-Apr-2007
[6405]
really? ctrl plus tab is trappable in rebol view engine

 ... I think so. I already trap tab (via event/key) and control is 
 just a state (which is trapped elsewhere). No reason they shouldn't 
 work together.
Pekr
23-Apr-2007
[6406]
but at OS level, when your dialog has tabs, and you want to navigate 
them using keyboard, you use either accelerator keys (we can have 
them, but unless rich-text is available, we can't underline accelerator 
key (the same goes for menu)), you use ctrl tab, ctrl shift tab, 
to change tabs (talking about tab widget) ....
Ashley
23-Apr-2007
[6407]
Ah, you're talking about tab-panel tabs and focus ... I was talking 
about shifting focus with the tab key. Yes, it would be nice if that 
worked.
Cyphre
23-Apr-2007
[6408]
ctrl+tab is not trappable in Rebol (under Windows) at the moment.
Anton
23-Apr-2007
[6409]
Haven't we had this conversation like, 10 times ?
Pekr
23-Apr-2007
[6410x2]
Anton - yes, and? :-)
ctrl tab was mentioned "by the way". But other hot keys can be fixed/added.
Anton
23-Apr-2007
[6412]
Ok, fair enough.
Ashley
23-Apr-2007
[6413]
Yeah, I just got around to testing this and no dice. Ctrl & Shift 
work with function keys though. If you want to see what other combinations 
work then you can use the following script (based on %keycodes.r 
that someone wrote years ago):

	insert-event-func func [f e] [
		all [e/key print [mold e/key e/shift e/control]] e
	]
	print ""
	view layout [text "Start typing"]
Graham
23-Apr-2007
[6414]
So, we can include code to assign the control/shift function keys?
Ashley
23-Apr-2007
[6415]
Yes, I'm adding this to the next build.
Ashley
24-Apr-2007
[6416]
Build#92 uploaded to SVN. Adds event support to function code handlers 
as follows:

	ctx-rebgui/on-fkey/f3: make function! [face event] [
		prin "f3 "
		if event/control [prin "Ctrl "]
		if event/shift [prin "Shift "]
		print ""
	]
Graham
24-Apr-2007
[6417]
This is going to be tricky.  Have to create some intermediate function 
to then call the appropriate function ( normal control or shifted 
)
Pekr
24-Apr-2007
[6418x2]
is it possible to have progress as a part of the UI, not separate 
window? (as with Calednar)
ah, request-progress uses progress widget, forget it ....
Ashley
25-Apr-2007
[6420]
Build#93 released and available. Includes all fixes from builds#83-93 
plus a new on-edit action handler. Release notes available here:

	http://www.dobeash.com/RebGUI/release.html#section-9
Graham
25-Apr-2007
[6421]
on-edit is like a dirty? face  ?
Ashley
25-Apr-2007
[6422]
Yes. Technical difference between it and on-key is that on-key is 
called prior to keystroke processing, whereas on-edit is only called 
if the keystroke actually changed the text (including a change in 
capitalization ... i.e. it does a strict-not-equal? comparison).
Ammon
2-May-2007
[6423]
.
Graham
3-May-2007
[6424]
Doesn't seem to be able to highlight text going from right to left 
( it loses it instantly ).  Only works reliably from left to right.
Ashley
3-May-2007
[6425]
Huh? Are we talking about highlighting in general or a specific widget/case?
Graham
4-May-2007
[6426x2]
I think I see the problem.   If you highlight from right to left 
in a field, where the word you are highlighting is left aligned, 
then if your mouse pointer leaves the widget, the highlight disappears 
immediately.  If you highlight from left to right in a field, where 
the word is left aligned, you are more likely to stay within the 
widget, and the highlight sticks.  if however, your mouse drifts 
outside the field, it will also then lose the highlight.
Also, the caret should move to the beginning of the word you are 
attempting to highlight
Graham
7-May-2007
[6428]
Ashley, possible to improve the highlighting so that it works as 
well as in Altme?
Ashley
7-May-2007
[6429]
It's doable, but note that caret placement does not work as described 
above (either in RebGUI or AltME). Remember that RebGUI also supports 
double-click highlighting (which might make the above request a moot 
point).
Graham
8-May-2007
[6430]
but double click highlighting only works on one word .. and not when 
spaces separate words.
Robert
11-May-2007
[6431x3]
FYI: Lad and I have done a regression test environment for RebGUI. 
With this you can write test cases and have the environment run them 
for you. With logging etc.
drop-list: I face the same problem as with check-group, where I need 
an ID for the entries. For example:
	- I have a drop-list with country names
	- My app supports DE and EN language

 - Depending on the language, the drop-list has different data and 
 shows different texts

 - to avoid a database lookup, internal LUT, I would like to get back 
 an ID of the entry
	- this frees me to use the (changing) text representation
As last time, my radio-group change wasn't liked. We will derive 
a special kind of drop-list.
Anton
11-May-2007
[6434x2]
Robert, how would you like your drop-list strings to be associated 
with your id's ?
1)
	data: ["apples" "bananas" "cherries"]
	ids: [3 15 220]
or
2)
	data: [ [3 "apples"] [15 "bananas"] [220 "cherries"] ]
or
3)
	data: [ ["apples" "bananas" "cherries"] [3 15 220] ]

or something else?
Couldn't the data block *index* of the currently shown string be 
stored in an attribute of the drop-list face ? When the action is 
called, you could then access the index and refer to your list of 
ids which you maintain separately (and however you like).