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
19-Apr-2007
[6192]
I guess the point is that one should always use the accessors
Ashley
19-Apr-2007
[6193]
Assigning a non-string value to face/text is not a good practice. 
It just means more work for View (which has to dynamically form the 
value) and might break several things that depend on face/text being 
none! or string!
Graham
19-Apr-2007
[6194x3]
otoh, it makes less work for users not to have to form dates and 
numbers being displaying them in widgets
and let the accessor do the job
Looking at my code, it's a form that loads the data from a database, 
and then uses a routine to go through all the widgets and set the 
data.  Just need to add a 'form to it.
Pekr
19-Apr-2007
[6197]
it is curious how each of us think differently about priorities. 
E.g. dictionaries - I never thought I could use them in my db "apps". 
Are you guys really using the features so much?
Graham
19-Apr-2007
[6198]
you mean spelll checking dictionaries ?
Pekr
19-Apr-2007
[6199x2]
Well, 1.0 is aproaching, and I am getting feeling it will miss on 
some very important styles. But that is also about how each of us 
is used to code his apps. I would like to know, what are you e.g. 
Graham missing mostly with your rebgui based CRM?
yes .... that is feature I turn off even with emailers, Word, etc. 
:-) Well, spell-checking is ok for me, but I hate auto-corrections, 
as those engines are not smart enough imo - they always screw my 
text somehow, thinking that I wanted to write something differently 
:-)
Graham
19-Apr-2007
[6201x2]
I'm pretty much set if everything works
A tree widget is not necessary for me but would be nice
Pekr
19-Apr-2007
[6203]
some time ago I posted two screenshots of possible widget additions, 
which could allow more robust app design - UI wise. I wonder what 
ppl miss in general ...
Graham
19-Apr-2007
[6204]
and I would like to be able to set colors on rows of a table.
Pekr
19-Apr-2007
[6205x3]
Yesterday I saw interesting widget - kind of tree combined with list-view. 
You simply had tree-view as basic view, but when you uncollapsed 
the node, list-view (table) appeared ... interesting - It allowed 
to logically nest into subcategories, e.g. company, orders, companies 
- list of orders in table style ...
it is a pity Cyphre is busy. I asked him to adapt grid, and he also 
promissed to extract tree out from drop-tree. But otoh I am glad 
he works on some parts of View for R3 :-)
Graham - why e.g. Chat widget appeared? Do you use it? I will have 
to look, how it communicates :-) btw - why there is the distortion 
to initial display of the widget?
Graham
19-Apr-2007
[6208x2]
Yes, I am using it.
I don't get the initial distortion of the widget
Pekr
19-Apr-2007
[6210]
I will recheck, sync latest release ...
Graham
19-Apr-2007
[6211x3]
What I mean is, if I use the chat widget and build a window with 
it, I don't get the distortion.  I do if I use tour.r
Found my table error ... I was bringing up a modal window to delete 
a row, and once I deleted it, I did a unview/only face/parent-face 
on the on the button when I should have done a hide-popup.  This 
completely killed the events system.
It wasn't apparent before, but appeared in rebgui beta-2
Ashley
19-Apr-2007
[6214x2]
spellcheck ... it's certainly something I miss in ALtME!
why e.g. Chat widget appeared?
 Carl asked for it first.


Graham, back to your modal windows and BEER compatibility issues 
... does this still happen with Beta 2? The reason I ask is that 
the initial modal window implementation was poor (in large part to 
get around REBOL/View limitations); but since REBOL/View 1.3 the 
View popup system has been completely rewritten (by Gabriele I think), 
and the RebGUI implementation is now simple and "standard" (in that 
it uses the same functions as VID). It may in fact have fixed the 
issues you were having.
wasn't apparent before, but appeared in rebgui beta-2

 ... a symptom of modal windows now actually working the way they 
 are supposed to! ;)
Ladislav
19-Apr-2007
[6216x2]
I answer instead of Graham: he has got a fix from me, which he claims 
is OK, but he does not want to change his approach
(i.e. everything is supposed to work, but he doesn't want to "take 
the risk")
Pekr
19-Apr-2007
[6218]
users ara taking the risk, not programmers :-)
Ladislav
19-Apr-2007
[6219x3]
Ashley: the suggestion: "Replace: error? try [] With: attempt [] 
is an error (in http://www.dobeash.com/RebGUI/design-guide.html)
(should be the other way around)
you probably won't believe, but this version of AS-PAIR looks like 
being 20% faster than the current one:

as-pair: func [
    "Combine X and Y values into a pair."
    x [number!] y [number!]
] [
	1x0 * x + y: 0x1 * y
]
Maxim
19-Apr-2007
[6222x3]
so argument passing is THAT slow?
(for those who didn't check), normal as-pair code is:  

add 1x0 * x 0x1 * y
stange I would not have thought that 'ADD and + would have any speed 
differences.
Ashley
19-Apr-2007
[6225]
Designer's Guide

 updated with a few minor corrections & clarifications (mostly to 
 do with Beta 2 changes).
Ladislav
19-Apr-2007
[6226]
TRIM may be used instead of REPLACE sometimes
Ashley
19-Apr-2007
[6227]
I noticed 'switch is native! in the latest beta.
Ladislav
19-Apr-2007
[6228]
yes
Maxim
19-Apr-2007
[6229x2]
yes  :-)  and supports all  :-) very cool
as in switch/all  :-)
Graham
19-Apr-2007
[6231x2]
Regarding the action block on a tab panel.  It seems to me that it 
must complete before the panel is displayed.  Can there be an option 
to display the panel first, and then perform the action?
I have an async routine that displays all the chat messages in table 
on a panel.  This triggers in the action field of the panel, but 
even though it is async, it takes a finite time, and so slows down 
the display of the panel.
Maxim
19-Apr-2007
[6233]
yep, refresh is paramout, always... often, the time the user focuses 
on the display changes, is enough time for the action to occur... 
so from the user's point of view, everything seems instantaneous 
 :-)
Graham
19-Apr-2007
[6234x3]
Just wondering if we need a refinement for set-text/insert where 
we are inserting text at the caret.
well, not /insert .. perhaps /ins

set 'set-text make function! [
	"Set and show a widget's text attribute."
	face [object!] "Widget"
	text [any-type!] "Text"
	/ins
	/no-show "Don't show"
	/focus
][
	unless string? face/text [exit]
	either all [ ins face/caret ][
		insert skip head face/text face/caret form text
	][	
		insert clear face/text form text
	]
	all [
		face/para
		face/para/scroll: 0x0
		all [face/type = 'area face/pane/data: 0]
	]
	face/line-list: none
	unless no-show [either focus [set-focus face] [show face]]
]
insert skip head face/text max 0 face/caret - 1 form text
Ashley
19-Apr-2007
[6237x2]
Worthy addition, although I'd call it /caret and the following line 
should suffice:

	insert at face/text face/caret form text


Not that 'at treats values less than 0 as head and values greater 
than length of string as tail.
I've also changed clear-text from:

	if f/text ...

to:

	if string? f/text

in light of the issue you had.
Graham
19-Apr-2007
[6239]
good to know about 'at ... does it deal with 'none as well?
Ashley
19-Apr-2007
[6240]
No, but "either all [caret face/caret]" will catch that.
Graham
20-Apr-2007
[6241]
display "" [ a: area "This is a test string" button "dump" [ probe 
a/caret ]] do-events


seems the caret is only set when you tab out of the area.  other 
ways of changing focus such as using the mouse do not  preserve the 
area's caret value