World: r3wp
[!RebGUI] A lightweight alternative to VID
older newer | first last |
Ashley 17-Apr-2007 [6135] | Checks that face/text is in fact a string and has a length greater than one char. We don't really want to spellcheck an empty string or one with a single character in it. Why, is it causing a problem? |
Graham 17-Apr-2007 [6136] | How come you don't need an 'if in front of that? |
Ashley 17-Apr-2007 [6137] | getting a 5 second delay Got it. Hard to believe, but: write file form sort unique dict is about a hundred times slower than: write file form dict Sorting isn't so bad, but unique absolutely grinds it to a halt. Timings are: parse 00:00.2 plus sort 00:00.8 plus unique 00:05 |
Graham 17-Apr-2007 [6138x2] | Isn't the dictionary already unique ? |
Why check it again? | |
Ashley 17-Apr-2007 [6140x2] | Doh! Thanks, that's now two errors I need to fix in spellcheck. Will upload fix in a few minutes. |
Uploaded build#82 with above changes. Note also that the request-spellcheck function now has a /anagram refinement (don't ask). | |
Graham 17-Apr-2007 [6142x3] | :) |
Do you have a utility for us to build our own dictionaries? Or is it just a collection of unique words? | |
What do you think about my question on disabling the action block? | |
Ashley 17-Apr-2007 [6145] | The dictionary files are just a collection of sorted unique space separated words (all on one line, no carriage returns). I extracted them from the latest Abiword dictionary files. No utility as such, but the trick to generating them in REBOL is to get a block of strings then do a: write %my-dict.dat form sort unique my-block-of-strings As for the button disabling question, I thought it was specifically related to the spellcheck taking 5 seconds. But, more generally, I'm against that type of thing. Far better to pop up an alert or progress bar for actions that will take time. Pressing a button should provide *immediate* feedback or results. |
Graham 17-Apr-2007 [6146x3] | Ok, how about ghosting a button then? |
or other face ... | |
instead of unless any [ (length? word) < 2 how about unless any [ 1 = length? word | |
Ashley 17-Apr-2007 [6149] | Button and many other widgets have an 'info option already. Any solution to disable a widget dynamically would have to be generic and done via functions like: set-disable set-enable On a related note, I'm thinking a request-progress function might be handy. Would have the following format: request-progress 10000 [foreach f read %. [...]] request-progress/cancel 10000 [foreach f read %. [...]] [...] Advantage would be that it is modal and provides useful feedback. The /cancel block provides a "cleanup" routine if the window is closed the cancel button is pressed. Without the refinement no window close button would be present and no cancel button. Useful? |
Graham 17-Apr-2007 [6150x4] | A progress function would be useful .. but less useful for me, because modal windows can disrupt BEER async communications |
hence I strive to avoid any modal windows if I can | |
I don't know if this applies to the async protocol in general as well | |
async tcp ie. | |
Ashley 17-Apr-2007 [6154] | All the request-* functions are modal. (length? word) < 2 ... I think that was guarding against the empty string case as well. But can be expressed better as "2 > length? word" anyway. Or just drop the condition entirely. After all, "a" is a valid "word" "z" is not. |
Graham 17-Apr-2007 [6155] | yes, I know about the modal request functions, and I have to write my own non-modal ones |
Ashley 17-Apr-2007 [6156] | What a pain :( |
btiffin 17-Apr-2007 [6157] | Spell checking 'a' and 'I', note uppercase only, would be handy. Then math gets in the way :) I'd be 'either or' on that one. No vote. Wait, I take that back. I haven't been in a math class for 25+ years now. :) I vote yes on one-letter words, IFF those words are a, A and I. |
Ashley 17-Apr-2007 [6158x2] | write my own non-modal ones ... what do you do about drop-list and edit-list then? |
if those words are a, A and I ... is that an [English] language assumption? | |
btiffin 17-Apr-2007 [6160x2] | Correct. Damn Canadians :) I should know the French words as well. J, J' |
Am I ever glad there are more thorough people in the REBOL community than your's truly. I'll shut up now, and then try and figure out how much I weigh in kilograms. :) | |
Graham 17-Apr-2007 [6162] | There's a particular combination of events that kills BEER. I think it is mainly when you are in the callback phase of a BEER async function that using a modal requester causes problems. |
Pekr 18-Apr-2007 [6163x3] | as for request-progress - I propose the same usage as with Calendar! Not every time you want a dialog box, which is stupidly blocking your UI. |
those who want to pop-up dialog-box, still can. | |
set-disable, set-enable - I welcome it. Some time ago I wrote disable-face, enable-face, which simply put transparent face with whatever effect block in front of widget you wanted to "disable". It did not block the keyboard, but Anton fixed it IIRC, and those two small functions are on rebol.org. | |
Anton 18-Apr-2007 [6166x2] | Those were handy, but I don't recommend that approach anymore. I now recommend that each widget have a "ghosted" flag. Depending on whether the flag is set, the widget draws itself differently and also responds differently to events. |
It's more work, but only the widget really knows how to do these things properly. | |
Ashley 18-Apr-2007 [6168] | Agreed, but it's not high on my list of things to do. |
Pekr 18-Apr-2007 [6169] | Ashely - as you mentioned "to do", what is your prioritisation towards RebGUI? Just curious ... |
Ashley 18-Apr-2007 [6170] | Like RebDB and the SQLite Driver I want to get it to the point where "it just works", and fixes/enhancements are rarely required. Currently it does most of what *I* need it to do, so I'm focusing on nailing the few remaining bugs and getting the documentation up to scratch for a 1.0 release. I'm envisaging a lot of changes once R3 is released so this won't happen until after that. |
Pekr 18-Apr-2007 [6171x2] | Is the tree widget review part of the equation? |
as for R3 - we don't know for sure, but maybe View will not contain any significant changes. My opinion is, that VID and desktop should be separate packages, and that View should contain only general gfx functionality ... | |
Ashley 18-Apr-2007 [6173] | A simple tree widget, suitable for request-dir, is in development. I hope that R3 splits VID off as an optional dialect (much like the SDK already does), leaving View as the raw graphics engine to which many domain specific dialects can be written (e.g. an animation dialect, a gaming dialect, an HTML dialect, etc). I'm hoping R3 introduces at least these View changes at a minimum: Rich Text Support Different face types (e.g. min-face, text-face, draw-face, image-face, etc) Fixes the long-standing detect face bug (or defines the current behaviour as being correct) |
Pekr 18-Apr-2007 [6174x3] | Different face types - who knows, maybe that is what GOB (graphics object) is supposed to be for ... |
I wonder what does it mean "simple" tree widget :-) it will not be full-blown tree? Will automatic scroll bars, hilite, keyboard navigation as in OS? I will ask Cyphre if he was successfull in extracting tree widget from drop-tree ... | |
nice thing about RebGUI is, that styles are self-contained. Anyone can create new. I am with Anton here towards widget containing each its own implementation (method) of particular functionality, e.g. already mentioned set-disable, set-enable, as each widget (its author) knows best, how to implement it for the particular widget. | |
Ashley 18-Apr-2007 [6177] | Build #83 Released. For more information see: http://www.dobeash.com/RebGUI/release.html#section-8 and: http://www.dobeash.com/RebGUI/user-guide.html Includes changes from builds 73-83, plus new dictionary files. |
Mchean 18-Apr-2007 [6178] | Wow impressive documentation |
Graham 18-Apr-2007 [6179x3] | in request-spellchecker/next-word .. is this clearer removing the double negative ? if all [ init word ][ ; update dialog txt/text: fld/text: word show [txt fld] insert clear lst/data edit/lookup-word word lst/redraw ; hilight word view*/focal-face: face view*/caret: none edit/hilight-text start end show face ] none? word |
oops .. last line should be word? word | |
If I resize a window containing a chat widget, it corrupts the widget. Can I link to the resize event to do a show on the chat widget? | |
Ashley 18-Apr-2007 [6182x3] | You're on the right track. Code can be refactored as: unless any [ empty? word find ignore word ... ] ... ] if all [none? init word] [ ... ] string? word ] if next-word/init [ |
If you look at the source code for chat.r you'll see a commented out show face/pane/1 and show pane/1. Uncommenting either of these will fix all display problems for chat, BUT, subsequent widgets will not render correctly as the show "eats" subsequent resize events. You can see this with the following code: display "" [ after 1 button "One" chat #HW data ["a" none "b" none 1-Mar-2007/10:00:00] button "Two" ] where button 2 is not drawn correctly. | |
Build #85 uploaded with above spellcheck changes and an improved anagram algorithm (about 10 times faster). | |
older newer | first last |