World: r3wp
[!RebGUI] A lightweight alternative to VID
older newer | first last |
Graham 19-Apr-2007 [6212x2] | 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 |
Ashley 20-Apr-2007 [6242] | That's a bug. |
Pekr 20-Apr-2007 [6243] | Will menu be corrected? It takes to clicks to open adjacent menu, while it should take zero clicks ... |
Ashley 20-Apr-2007 [6244] | On the list. (when I get a moment or two I'll actually add this list to the Trac Wiki; that approach works better than tickets for me). |
Graham 20-Apr-2007 [6245x5] | Until caret handling is fixed, I suggest that set-text/caret insert text at the tail if face/caret is none. Otherwise, you end up erasing existing text. |
Something like: set 'set-text make function! [ "Set and show a widget's text attribute." face [object!] "Widget" text [any-type!] "Text" /caret {insert at cursor position} /no-show "Don't show" /focus ][ unless string? face/text [exit] insert either all [ caret face/caret ][ at face/text face/caret ][ either caret [ tail face/text ][ 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]] ] | |
If you have a large left box, how do you then align the following widgets so that 'return aligns to the left large widget? In VID you set a ruler thingy ... | |
How to programmatically change the date displayed in a calendar widget that is currently being displayed? | |
tried setting the widget/data: now/date and doing an 'init | |
Ashley 20-Apr-2007 [6250] | Like the set-text change (and code re-factoring). Not sure about the alignment question, have an example in VID of what you're trying to do? Calenday quetion is easy: cal/date: 1-Feb-2006 poke cal/options 1 1-Feb-2006 show cal data is the currently selected date options/1 the default date |
Graham 20-Apr-2007 [6251x3] | That's okay about the alignment .. I just used a panel to do what I wanted. |
I had a calendar widget1 return widget2 and I wanted widget2 to align with the right border of the calendar so now I have calendar panel blue data [ widget1 return widget2 ] | |
typo :) cal/data: 1-Feb-2006 poke cal/options 1 1-Feb-2006 show cal | |
Ashley 20-Apr-2007 [6254x2] | Note that in your panel example you can make it act like a positioning widget with something like: panel none data [margin 0x0 area return area] |
Remember how we wrapped current-word and caret handling in attempt blocks? Well, I've had plenty of caret errors to track down but not a single current-word error. Then I recall you had that problem where you set face/text to a non-string value ... could the current-word problems you experienced be related to that? | |
Graham 20-Apr-2007 [6256x4] | I don't think so ... but it's hard to remember all of this now. |
trap and forget ... | |
I would have posted the error messge here .. let me reset my search parameters for Altme | |
here it was: make object! [ code: 303 type: 'script id: 'expect-arg arg1: 'find arg2: 'series arg3: [series! port! bitset!] near: [s: any [all [s: find/reverse str s next s] head str] set [ns]] where: 'current-word ] | |
Ashley 20-Apr-2007 [6260] | I'm trapping and writing these errors out to %rebgui.log, does your log file contain any current-word errors? (search for "word trap" if there are lots of entries)? |
Graham 20-Apr-2007 [6261] | just lots of 19-Apr-2007/18:18:20+12:00 Caret trap password origin: 2x2 margin: 2x2 indent: 0x0 tabs: 0 wrap?: false scroll: 0x0 |
older newer | first last |