REBOL

REBOL3 - !RebGUI (A lightweight alternative to VID [web-public])

Return to Index Page
Most recent messages (300 max) are listed first.

#UserMessageDate
8977Gabrielemost of the times, you can put that in a .htaccess file.6-Jan 9:58
8976Ashley... if you have control over that ;)6-Jan 7:21
8975GabrieleOr just enable Indexes in apache.5-Jan 10:23
8974MaxV<?

$path = "."; $dir_handle = @opendir($path) or die("Error opening $path"); echo "Directory content: <br/>"; while ($file = readdir($dir_handle)) { if($file!="." && $file!="..") echo "<a href='$file'>$file</a><br/>"; } closedir($dir_handle); ?>

4-Jan 12:04
8973MaxVOr better:4-Jan 12:01
8972MaxVYou can create the following file index.html: <?php function getDirectoryList ($directory) { // create an array to hold directory list $results = array(); // create a handler for the directory $handler = opendir($directory); // open directory and walk through the filenames while ($file = readdir($handler)) { // if file isn't this directory or its parent, add it to the results if ($file != "." && $file != "..") { $results[] = $file; } } // tidy up: close the handler closedir($handler); // done! return $results; } ?>4-Jan 11:57
8971AshleyDidn't require one in the past, server config has probably changed.1-Jan 21:23
8970KajDoes it have an index.html? Does the web server redirect to it?1-Jan 4:33
8969AshleyOdd, the directory has 755 so should be readable ... anyway the files can be accessed directly:

http://www.dobeash.com/RebGUI/dictionary/American.zip

and:

British.zip Czech.zip Dansk.zip Deutsch.zip Espanol.zip Francais.zip Italian.zip

30-Dec 21:52
8968GrahamCA dictionary is just a series of words. You can make your own30-Dec 10:31
8967MaxVNo, I mean that: pressing CTRL+S on a field, RebGUI make he spellcheck of that field, but you must download your language dicctionary from http://www.dobeash.com/RebGUI/dictionary/ Did somebody move that page?30-Dec 9:24
8966nvehttp://www.dobeash.com/rebgui.html28-Dec 11:28
8965nvehttp://www.dobeash.com/RebGUI/widgets.html28-Dec 11:27
8964nvehttp://www.dobeash.com/RebGUI/functions.html28-Dec 11:27
8963MaxVthe RebGUI doc says to download the dictioanries from that page. What is the correct page for RebGUI dictionaries?28-Dec 11:26
8962AshleyWhat page has that link on it?23-Dec 23:29
8961HenrikI get "Forbidden".23-Dec 16:29
8960MaxVHello everybody, I can't reach http://www.dobeash.com/RebGUI/dictionary/ , is it normal?23-Dec 15:42
8959Endodisplay "Test" [d: drop-list 30x4 "Black" data ["Red" "Green" "Blue"] box 40x40] do-events after crash when I type d/picked into console, it gives the error. error happens in on-click, on the line "result: .... first picked"16-Nov 10:10
8958EndoDoesn't change the result, still crash. display "Test" [drop-list 30x4 "Black" data ["Red" "Green" "Blue"] box 40x40] do-events Should I report this as a bug on codeplex?16-Nov 10:07
8957GrahamCI normally specify a size for the drop-list15-Nov 19:28
8956EndoThis line give error when you select an item in drop-list, I tested on latest svn version (218): Is it a known bug? (same error for edit-list) do %rebgui.r display "Test" [drop-list "Black" data ["Red" "Green" "Blue"]] do-events15-Nov 9:42
8955EndoThank you. New UI looks very nice. It would be nice if table widget supports mouse wheel scrolling.11-Nov 12:52
8954Ashleyb117 is the latest stable release. The b2xx series is a rewrite that is 95% complete.11-Nov 11:43
8953EndoI downloaded the source codes for RebGUI but it looks it is not the latest version. Many of the functions & styles are totally different in rebgui-92396.zip (source from codeplex) and in B117 (from dobeash website). Is there any more recent version somewhere?11-Nov 8:18
8952EndoGot it, thanks.10-Nov 10:08
8951GrahamCcodeplex10-Nov 10:07
8950EndoWhere to download the latest RebGUI source codes? Sorry I found it a few days ago but cannot find now.10-Nov 10:03
8949GrahamCyou have to do this:

insert clear head gui-table/data a-block gui-table/redraw

as there is a reference to the data block elsewhere

1-Nov 17:52
8948EndoThis shows the problem more clear:

gui-table/add-row ["a" "b" "c"] gui-table/redraw ;works ok

b: copy gui-table/data

clear gui-table/data gui-table/redraw ;clears the table

gui-table/data: copy b gui-table/redraw ;shows nothing

There is something related directly to the DATA block inside TABLE functions I think.

1-Nov 11:15
8947EndoWhen I add rows to a TABLE using the following code works well: append my-table/data a-block my-table/redraw

But when I make a block of data then set my-table/data to it, it doesn't work (nothing appears in my-table) b: [] append b a-block my-table/data: b my-table/redraw

and the using my-table/add-row is also doesn't work. Am I doing something wrong?

1-Nov 11:13
8946RobertGrahamC "Are the RebGUI widgets being released?" - No, as our internal RebGUI is a fork long time ago and I think it developed quite far away from the official version of RebGUI. So, not sure if it's useful for others.26-Sep 12:44
8945AwiSorry Graham, I was in vacation recently. Yes, now I have write access to the repo. I will need to clean up a bit before posting my changes though.7-Sep 3:58
8944GrahamCAwi ... do you now have write access to the repo?26-Aug 20:30
8943GrahamCOk, made you a developer .. hope that works23-Aug 9:21
8942AwiOk, I already following the project in codeplex23-Aug 7:49
8941GrahamCAwi ... I started that repository. Join up and I'll see if I can grant you write access.23-Aug 6:11
8940AwiAshley, if you give me access, I would be more than glad to submit the changes back to the repository (including some other widgets that I might have fixed along the way)23-Aug 4:38
8939AwiI found the bug, it's in the rebgui-widgets.r -> face-iterator font: either 'left = aligns/:i [default-font] [make default-font [align: aligns/:i]] should be replaced with font: either 'left = aligns/:i [make default-font []] [make default-font [align: aligns/:i]] otherwise, selecting a line will change default-font/color to white, thus any widgets using default-font shown thereafter will appear blank23-Aug 4:32
8938AwiI tried to fix the bug that selecting the third row brings up an empty alert window (no text). I've played with face-iterator and table widget source code, but don't know where to look further. If anyone can give a hint I would really appreciate it.23-Aug 3:36
8937Awibuild#218: do %rebgui.r display "test scroll panel" [ mytable: table options ["id" left .2 "name" right .8 ] data [1 "A" 2 "B" 3 "C"] [alert "see me?"] ] do-events23-Aug 3:34
8936HenrikThanks14-Jul 7:05
8935Ashleytable/data table/widths table/aligns13-Jul 22:27
8934HenrikI need to copy the entire state of a rebgui table for an undo system. Any idea how to do that? Deep copying the face object is far too slow, so I guess I need to access particuar values in the table that will then update the table properly when calling REDRAW.13-Jul 10:00
8933Henrikthanks4-May 7:37
8932Ashleybuild#218:

display "test" [ box red #HW return button #Y "resize" [ var: face/parent-face var/size: 300x300 show var ] ]

4-May 4:15
8931Henrikis there a simple/proper way to resize a rebgui window?3-May 11:37
8930GrahamCI'll give that a go ...17-Apr 17:10
8929AshleyHow about checking stats/evals periodically (accounting for the calls that this in itself generates)?17-Apr 11:46
8928GrahamCDo I have to track every event?17-Apr 0:01
8927GrahamCAshley, any suggestions on how to detect inactivity so that I can log a user out of the application?17-Apr 0:01
8926AwiOn the timer topic, I needed a recurring event that fires every second, where I can do some processing, without blocking the main thread while waiting until the next event. In .Net I can achieve that using a timer object.24-Mar-11 5:17
8925AwiThat solved this issue, thanks for the hint.24-Mar-11 5:10
8924GabrieleTimers are not really related to multithreading. If you only need a timer, you can just use WAIT with a time! or integer! value. Also, one way to work around problems that may happen when using WAIT inside a face action is to disable the event port, then WAIT, then enable it again. Eg, in your above code, replace the WAIT 0 with:

saved: system/ports/wait-list system/ports/wait-list: [] wait 0 system/ports/wait-list: saved

It may be better though to add the serial port to the wait list and handle things differently - I can't say without knowing more about your program.

24-Mar-11 4:03
8923AwiWhat I needed is actually only the timer action of a face to process an internal command queue, and while doing this I read some data from serial port. If rebol had a timer object, I don't need the face anymore. But afaik there is no timer in rebol, since it does not support multithreading yet, with exception of the face timer.21-Mar-11 14:31
8922AwiThanks for the information Gabriele, I've been using this inside vid face action to wait for a data from serial port. Until now I have not encountered any issue. But maybe I'm just lucky.21-Mar-11 14:11
8921Gabrielecalling WAIT inside a vid face action is not really supported by REBOL. In practice, there are cases where you may need to do this, but it is always a bit tricky.21-Mar-11 12:13
8920Awiit's b21825-Feb-11 6:52
8919Awiwhen a button does some activities, in this case 'wait', the button's color changed to the pushed state, but never gets back to it's original color.25-Feb-11 6:52
8918Awianother minor bug in rebgui, I just mentioned it here so it's not lost: REBOL []

do %rebgui.r counter: 0 muline: copy "" display "button color not reset" [ btn "start timer" [ if tgl/text = "wait" [wait 0] print "hi" ] tgl: toggle data ["wait" "no-wait"] ] do-events

25-Feb-11 6:51
8917Awiyes :-)18-Feb-11 3:03
8916GrahamCindonesian?17-Feb-11 6:36
8915AwiI forgot, you will need to add #include %widgets/slim-chat.r in rebgui-widgets.r17-Feb-11 6:24
8914AwiTo use this, just save it as slim-chat in rebgui/widgets, and then do create-distribution.r. It's fully syntax-compatible with the existing chat widget.17-Feb-11 6:22
8913AwiAnd here is a screenshot: http://uploadpad.com/files/Chat.png17-Feb-11 6:20
8912AwiI just want to share my modifications of the chat widget in b177, I needed a slimmer chat. It should also fix the resize issue: REBOL [] slim-chat: make baseface [ options: { USAGE: chat2 120 data ["Bob" blue "My comment." yello 14-Apr-2007/10:58]

DESCRIPTION: Three column chat display as found in IM apps such as AltME. Messages are appended, with those exceeding 'limit not shown.

OPTIONS: [limit n] where n specifies number of messages to show (default 100) [id n] where n specifies id column width (default 10) [user n] where n specifies user column width (default 15) [date n] where n specifies date column width (default 25) } size: 200x100 pane: [] data: [] edge: default-edge action: make default-action [ on-resize: make function! [face] [ poke face/pane/2/para/tabs 2 face/pane/1/size/x - sizes/slider - (sizes/cell * any [select face/options 'date 25]) face/redraw/no-show ] ]

height: 0 ; actual pixel height of all messages (-1 ensures first message is offset to hide it's edge rows: 0 ; number of messages limit: none ; last n messages to display

append-message: make function! [ user [string!] user-color [tuple! word! none!] msg [string!] msg-color [tuple! word! none!] date [date!] /no-show row /local p y t1 t2 t3 ] [ ; cache current tab stops p: self t1: pick pane/2/para/tabs 1 t2: pane/1/size/x - sizes/slider - (sizes/cell * any [select p/options 'date 25])

p: self ; get height of message y: max sizes/line 4 + second size-text make baseface [ size: as-pair p/size/x - sizes/slider + 1 10000 text: msg font: default-font para: para-wrap ]

insert tail pane/1/pane reduce [ make baseface [ offset: as-pair -1 height - 1 size: as-pair t2 21 span: all [p/span find p/span #W #W] text: user edge: make default-edge [size: 0x1] font: make font-top [color: either word? user-color [get user-color] [user-color] style: 'bold] color: either word? msg-color [get msg-color] [msg-color] ] make baseface [ offset: as-pair -1 height - 1 + 20 size: as-pair p/size/x - sizes/slider + 1 y text: form msg color: either word? msg-color [get msg-color] [msg-color] edge: make default-edge [size: 0x1] font: default-font para: para-wrap ] make baseface [ offset: as-pair t2 - 1 height - 1 size: as-pair (sizes/cell * any [select p/options 'date 25]) + sizes/slider + 1 21 span: all [p/span find p/span #W #X] text: form either now/date = date/date [date/time] [date/date] edge: make default-edge [size: 0x1] font: make font-top [style: 'bold align: 'right] color: either word? msg-color [get msg-color] [msg-color] ] ] height: height + y - 1 + 20 if ((length? pane/1/pane) / 3) > limit [ y: pane/1/pane/2/size/y + pane/1/pane/1/size/y - 2 remove/part pane/1/pane 3 foreach [u m d] pane/1/pane [ u/offset/y: u/offset/y - y m/offset/y: m/offset/y - y d/offset/y: d/offset/y - y ] height: height - y ] unless no-show [ insert tail data reduce [user user-color msg msg-color date] pane/1/size/y: height pane/3/ratio: pane/3/size/y / height show p ] show pane/1 ; !!! this cleans up artifacts but "eats" other widgets redraw events !!! ]

set-user-color: make function! [id [integer!] color [tuple! word! none!] /local idx] [ if any [zero? id id > rows] [exit] poke data id * 5 - 3 color if limit > (rows - id) [ idx: either rows > limit [(id + limit - rows) * 3 - 2] [id * 3 - 2] pane/1/pane/:idx/font/color: either word? color [get color] [color] show pane/1/pane/:idx ] ]

set-message-text: make function! [id [integer!] string [string!] /local idx] [ if any [zero? id id > rows] [exit] poke data id * 5 - 2 string if limit > (rows - id) [ idx: either rows > limit [(id + limit - rows) * 3 - 1] [id * 3 - 1] insert clear pane/1/pane/:idx/text string redraw ] ]

set-message-color: make function! [id [integer!] color [tuple! word! none!] /local idx] [ if any [zero? id id > rows] [exit] poke data id * 5 - 1 color if limit > (rows - id) [ idx: either rows > limit [(id + limit - rows) * 3 - 1] [id * 3 - 1] pane/1/pane/:idx/color: either word? color [get color] [color] show pane/1/pane/:idx ] ]

redraw: make function! [/no-show /local row] [ clear pane/1/pane height: 0 rows: (length? data) / 5 row: max 0 rows - limit: any [select options 'limit 100] foreach [user user-color msg msg-color date] skip data row * 5 [ append-message/no-show user user-color msg msg-color date row: row + 1 ] pane/1/size/y: height pane/3/ratio: either zero? height [1] [pane/3/size/y / height] unless no-show [show self] ]

init: make function! [/local p] [ unless options [options: copy []] p: self limit: any [select options 'limit 100] ; chat pane (1) insert pane make baseface [ offset: as-pair 0 sizes/line size: p/size - as-pair sizes/slider sizes/line span: all [p/span find p/span #W #W] pane: [] ] ; heading (2) insert tail pane make gradface [ offset: -1x-1 size: as-pair p/size/x sizes/line text: "Chat" span: all [p/span find p/span #W #W] font: make font-button [align: 'left] para: make default-para [tabs: [0 0]] ] ; set header tabs poke pane/2/para/tabs 1 sizes/cell * (any [select options 'user 15]) poke pane/2/para/tabs 2 size/x - sizes/slider - (sizes/cell * any [select options 'date 25]) ; vertical scroller insert tail pane make slider [ offset: as-pair p/size/x - sizes/slider sizes/line - 2 size: as-pair sizes/slider p/size/y - sizes/line + 2 span: case [ none? p/span [none] all [find p/span #H find p/span #W] [#XH] find p/span #H [#H] find p/span #W [#X] ] action: make default-action [ on-click: make function! [face] [ if height > face/size/y [ face/parent-face/pane/1/offset/y: (height - face/size/y * negate face/data) + sizes/line show face/parent-face ] ] ] ] pane/3/init action/on-resize self ] ]

17-Feb-11 6:20
8911AwiBasically what I'm doing is reading/monitoring a serial port using rate/feel. Since Rebol does not have a timer, the only thing I can think of is using rate/feel, which works very nicely as long as you don't "wait". "wait'" will kill your "thread" as the next timer event kicks again.6-Feb-11 11:28
8910AwiNice thing is, when I turn off "rate", it works again, so currently I have a workaround, thanks God, I'm very close to shipping as I found this bug :-)6-Feb-11 11:23
8909AwiFound another bug in b218: when using rate and feel, Ok button in alerts no longer working, the same with Yes/No buttons in confirm. Here is a code sample: do %rebgui.r

display "rate feel test" [ lbl: label "label with rate feel" rate 1 feel [ engage: func [f a e] [if a = 'time [print "awi"]] ] btn "test alert" [alert "can you close me?"] btn "?" [? lbl] btn "unset lbl/rate" [lbl/rate: none show lbl] btn "set lbl/rate" [lbl/rate: 1 show lbl] ] do-events

6-Feb-11 11:21
8908GrahamCAgreed.17-Jan-11 8:49
8907AwiI also assumed that since like 2008 :-) Some things like this project cannot wait, and RebGUI and Rebol2 are more than good enough for almost every case in my project. And I think if Rebol3 and r3-gui are out someday, I'll just rewrite my apps.17-Jan-11 8:43
8906GrahamCYeah ... the docs are in this channel for the tricky stuff. But Ashley has assumed that R3 was going to quickly replace R2 hence the lack of movement here.17-Jan-11 8:39
8905AwiYes good idea, and if I'm not asking too much, just a small documentaion explaining the basic concept of 2x RebGUI, to get people (me) started. Currently my only reference is RebDOC and tour.r and diff-ing with 117. For example I wanted to bring the b117 panel style (no border, silver background) back, I looked for some hours, and give up. Even some short points in this AltMe thread would be helpful. For example I found out how to do append-widget in 2.x through searching in google and found the chat history in altme.17-Jan-11 8:30
8904GrahamCMaybe we should have moved RebGUI to github instead so people could fork and post their changes ... I guess we could still do so if Ashley restarts development.17-Jan-11 8:22
8903AwiAshley & Graham, just want to let you know that my reservation program using b218 is finished, and has been working perfectly. Many thanks for your work on RebGUI and all the support. Hopefully I can join the effort soon and give some work back to the community. (Currently I only have drop-list2 and text-list2, but both are incomplete and based on incomplete b218, so I think sharing them will do more confusion than help).17-Jan-11 7:53
8902AwiBut the table in 2.x has the habit to prevent drawing text :-), that's why I moved my code to text-list, avoiding tables.16-Jan-11 3:54
8901AwiRebDOC says nothing about deleting rows in text-list. Yes there is add-row and remove-row in table.16-Jan-11 3:51
8900GrahamCusually there are methods to do this .. certainly there is for table/remove-row n16-Jan-11 3:48
8899AwiDelete "f", then delete other items, you will start to see "none" displayed in the list. This don't happen if you start by deleting other than "f" items.16-Jan-11 3:43
8898Awido %rebgui.r

display "test scroll panel" [ tl-rute: text-list data [ "a" "b" "c" "d" "e" "f"] button red "-" [ if tl-rute/selected [ remove find tl-rute/data tl-rute/selected tl-rute/redraw ] ] ] do-events

16-Jan-11 3:41
8897AwiHere I found another bug with the text-list style. When your list is longer than the box (means you have to scroll), deleting the item at the bottom caused some calculation mismatch in redraw. This don't happen when you start deleting from the top. Here is the test case:16-Jan-11 3:41
8896AwiSorry for reporting only bugs, I like the 2.x series so much, it's much faster, no slow scrolling, I do really hope this version gets stable and usable. Currently it's the only usable GUI for me with nice graphic.16-Jan-11 3:38
8895Awidisplay "test scroll panel" [ myspinner: spinner options [$0 $10 $1] data $5 button "confirm" [confirm "yes/no works?"] button "alert" [alert "OK works?"] ] do-events16-Jan-11 2:48
8894AwiI found another problem with b218: when there is a spinner style in display, the confirm and alert requestor's button do not works:16-Jan-11 2:48
8893AwiBut once you start clicking on the calendar, the text will be hidden again. Another hovering on the second or third table entrywill bring it back again. This only happens to text and fields. Text in buttons are not affected.14-Jan-11 10:52
8892AwiIf you run the code, clicking any button will show a new window with the text "see me?". But once you select the first table entry, clicking on the button will show you an empty window. The only cure is to hover on the second or third entry. Hovering is enough to fix the not drawn text problem.14-Jan-11 10:49
8891AwiREBOL []

do %rebgui.r seat-layout: copy []

for slot 1 16 1[ insert tail seat-layout compose/deep [panel 50 data []] for row 1 15 1 [ foreach col [A B - D E] [ insert tail last seat-layout compose/deep [button 7x5 blue (rejoin [row col]) [display "test" [text "see me?"]]] ] insert tail last seat-layout [return] ] ]

display "test scroll panel" compose/deep [ table options ["id" left .2 "name" right .8] data [1x2 "A to B" 3x4 "C to D" 5x5 "E to F"] return calendar scroll-panel 152x100 #HW data [after 4 (seat-layout)] ] do-events

14-Jan-11 10:46
8890AwiAfter an exhaustive testing, by luck I found out the problem. It was the table. The bug is pretty strange tough. Here is the test case:14-Jan-11 10:46
8889AwiThis don't happen in b117 (the same code, except I had to replace 'question' to 'confirm' and 'ctx-rebgui/layout/only' to 'layout/only')14-Jan-11 5:22
8888AwiAshley, that would be very cool. But with b217/8 I also experienced another strange thing when popping up a window on button click. Sometimes some texts in the window are blank, sometimes it's displayed correctly. The window consists of several panels, fields and buttons. It's reproducible consistently, I'm trying to make a sample code for this.14-Jan-11 5:13
8887AshleyDepends on how big the roadblocks are. It's easier to fix *-list than port the 2.x event handling back to 117! ;)14-Jan-11 4:50
8886GrahamCeh?? Is RebGUI alive again?14-Jan-11 4:16
8885AshleyOn a Mac, no problem. On WinXP it appears that the events are being generated faster than they can be processed. Good test case, I've never seen this before! ;)

I don't have an immediate fix, but this is one more reason for me to get the 2.x series released. Are drop- and edit-list the only roadblocks for you?

14-Jan-11 4:13
8884AwiThis trailing hover problem is not visible in build 218, but I need drop- and edit-list for my app, and these two are broken in b218. Thanks for the help!13-Jan-11 9:14
8883AwiStrangely, when you scroll the panel to bottom right, everything is back to normal in that condition, but when you scroll back to top left, things are the same again. Any hints how to fix this?13-Jan-11 9:12
8882AwiIf you move your cursor quickly over the calendar on the left, it will leave a trail while focusing, it gets worse when you try to select a button in the scroll panel. But the right calendar is not affected.13-Jan-11 9:06
8881AwiREBOL []

do %rebgui.r seat-layout: copy []

loop 16 [ insert tail seat-layout compose/deep [panel 50 data []] for row 1 15 1 [ foreach col [A B - D E] [ insert tail last seat-layout compose/deep [button 7x5 blue (rejoin [row col]) [alert face/text]] ] insert tail last seat-layout [return] ] ]

display "test scroll panel" compose/deep [ calendar scroll-panel 152x100 #HW data [after 4 (seat-layout)] calendar ] do-events

13-Jan-11 9:04
8880AwiI am using build 117 (public) for creating a reservation application. I noticed a tremendous slow down on hovering above buttons created at the beginning, but hovering at the buttons created at the end is fast. Here is a code sample:13-Jan-11 9:04
8879GrahamCWe're running different builds I guess29-Nov-10 21:22
8878AshleyOdd, I just tested with b117 and ran tour.r without a problem.29-Nov-10 21:21
8877GrahamCI did and started getting lots of errors!29-Nov-10 21:15
8876AshleyYou can comment out that line without causing any harm [to RebGUI].29-Nov-10 21:13
8875GrahamCIs there a way to monitor all events ? In vid you can do 'insert-event-func but in Rebgui we have this system/view/screen-face/feel: none ; kill global events system (used by 'insert-event-func)29-Nov-10 4:13
8874TomBonoki, looks like a static piece. thx graham...21-Nov-10 22:28
8873TomBonwhat about the accessor functions? BUILT-TREE etc. any change via this?21-Nov-10 22:17
8872TomBoncan change the data, no rebind,init or whatever to display the new data?21-Nov-10 22:16
8871TomBonsure?21-Nov-10 22:14
8870TomBonoups!21-Nov-10 22:13
8869GrahamCI don't think you can.21-Nov-10 22:12
8868TomBonhow to add dynamically data to the tree?

face/data or SET-DATA doesn't work for me here...

21-Nov-10 22:10
8867AshleyCan't reproduce using build#117 or 218 on Mac. Perhaps it's a Windows (7?) specific issue?7-Oct-10 12:05
8866GrahamCso must be the use of display/parent that is different7-Oct-10 7:53
8865GrahamChttp://screencast.com/t/y0PwDD9JBYo showing this behaviour7-Oct-10 7:51
8864GrahamCThe grandchild window will not open again.7-Oct-10 7:44
8863GrahamCclose the window that says "close this window" and then try to open all the windows again7-Oct-10 7:43
8862GrahamCdisplay "main" [ text "this is some text" button "child" [ display/parent "Child" [ text "close this window" button "grandchild" [ display/parent "Grandch ild" [ text "topmost windo"]]]]] do-events7-Oct-10 7:42
8861AshleyFollowing seems to work for me:

display "test" [ button "W1" [ display "w1" [ button "W2" [ display "w2" [text "test"] ] ] ] ]

7-Oct-10 7:42
8860GrahamCNope .. definitely not.7-Oct-10 7:35
8859AshleyIt shouldn't. Perhaps it's behind another window?7-Oct-10 7:34
8858GrahamCeven though it appears to disappear7-Oct-10 7:28
8857GrahamCI presume that when you close the parent the child is still hanging around or something7-Oct-10 7:28
8856AshleyHavn't hit that bug before, will try and reproduce. Rationale for this behaviour is simple: users click a button multiple times and open multiple instances of the same window. Coding this check manually is a pain ... but if you want this ability then having unique window titles is easy.7-Oct-10 7:26
8855GrahamEg. If you have an app, and open a window1, and from that open window2, and then close window1, then window2 also closes but can never be opened again. Removing the duplicate window title check seems to fix that bug.6-Oct-10 10:29
8854GrahamWhat's the rationale for preventing windows with duplicate names from opening? It seems to be a cause of a major bug with window handling.6-Oct-10 10:28
8853Grahamthis gets the color

display "" [ bt: button "test" green button "Color?" [ probe pick bt/effect/draw 14 ]] do-events

28-Sep-10 6:32
8852Grahamdisplay "" [ bt: button "Test" button "Set color" [ set-color/no-show bt green probe bt/color ] button "Set Color2" [ set-color bt red probe bt/color]] do-events

so we can see that the bt/color is set to the right color, 'show is then called and bt/color is then set to none :(

28-Sep-10 6:29
8851Ashleybutton color is controlled via draw block, not face/color.28-Sep-10 6:02
8850GrahamHow to get the color of a button?

button/color seems to return none always even though it is set with set-color ...

27-Sep-10 22:18
8849GrahamHmm.. perhaps face is passed27-Sep-10 21:23
8848GrahamIf you have something like this

b: button "text" on-click [ print face/text ]

you can't call the button action like this

b/action/on-click b

because the on-click action refers to 'face, and 'face is not passed when called this way.

What's the appropriate workround apart from using named faces ?

eg. on-click [ print b/text ]

27-Sep-10 21:00
8847HenrikI've tried, but the problem is that LAYOUT is not necessarily used recursively and thus doesn't always have a parent-face to use.18-Sep-10 21:34
8846GrahamWould it be easy to patch layout to do this?18-Sep-10 21:21
8845AntonGabriele is correct. PARENT-FACE is not set by LAYOUT, it is set by SHOW. I wrote some code which needed to know the parent-face before SHOW was used, so I did something like initialize the PARENT-FACE of every face in the face hierarchy myself. I wanted LAYOUT to do this by default.18-Sep-10 13:01
8844HenrikI do recall that parent-face doesn't work during INIT in VID.18-Sep-10 12:08
8843Henrikok, that may be it.18-Sep-10 12:07
8842Gabrieleparent-face can only be none if the face has never been shown, which may happen if you access it during layout and before the face as been shown.18-Sep-10 12:05
8841HenrikThe question is what that would be. But I have noticed way too many times that parent-face is NONE for faces that should be set up properly, particularly in VID, but apparently also in RebGUI.18-Sep-10 11:50
8840GabrieleHenrik, parent-face is managed by the native code, so there's something definitely wrong if it does not work for you.18-Sep-10 11:41
8839GrahamI use this for that

unview-window: func [ face ][ unview/only find-window face ]

17-Sep-10 23:54
8838AshleyGive it the widget's face and no matter how deeply embedded the widget the "window" it is in will be closed. Avoids having to do unview/only face/parent-face/parent-face type operations.17-Sep-10 23:47
8837Grahamwhat does that do vs unview/only ?17-Sep-10 23:44
8836GrahamOh ..17-Sep-10 23:44
8835Ashley2.x series.17-Sep-10 23:43
8834Grahamundisplay??17-Sep-10 23:43
8833AshleyRebGUI functions such as undisplay depend on it:

undisplay: make function! [ "Closes parent display of face." face [object!] ] [ while [face/parent-face] [face: face/parent-face] remove find screen*/pane face show screen* ]

17-Sep-10 23:40
8832AshleyRebGUI makes extensive use of parent-face (which is managed by View) ... never had an issue with it.17-Sep-10 23:36
8831Maximso you need to make an accessor for the pane which automatically assigns the parent-face.17-Sep-10 20:59
8830HenrikI've never experienced PARENT-FACE as reliable, so for the VID Extension Kit, I made separate functions to set it properly.17-Sep-10 20:59
8829Maximactually, I meant to say that you need to do a show on the *parent* for the child's parent-face to be refreshed17-Sep-10 20:58
8828GrahamI've never had an issue with find-window... can you give us an example of it not working?17-Sep-10 20:56
8827Maximin view (not VID) you need to do a show on a face for its parent-face to be updated. but the face must be actually visible IIRC.17-Sep-10 20:47
8826Henrikdoesn't work as RebGUI doesn't keep PARENT-FACE consistently available.17-Sep-10 20:44
8825Grahamfind-window?17-Sep-10 20:26
8824Henrikis there a way to find the window face of a particular face in RebGUI?17-Sep-10 10:57
8823Andreas(Well, not completely. But the fonts are ugly ...)16-Sep-10 12:27
8822AndreasOn the other hand, Linux AltME is completely unusable for me.16-Sep-10 12:25
8821AndreasAlso, I see 3 x's with Ashley's example, but they are halfway shifted outside the window at the top.16-Sep-10 12:22
8820Andreas(With REBOL/View 2.7.7.4.3)16-Sep-10 12:21
8819Andreas(Graham's example works for me on Ubuntu 10.04.)16-Sep-10 12:20
8818GrahamAlso, which version of R/view since 2.7.7 is apparently problematic16-Sep-10 6:49
8817GrahamAlso works on puppylinux16-Sep-10 6:48
8816GrahamMy recollection is that it works on Ubuntu .. but may not work on other linux variants16-Sep-10 6:48
8815GrahamMaxV, does this work for you ? http://www.compkarori.com/vanilla/display/AGG16-Sep-10 6:36
8814GrahamHmm... I don't recall having font issues with draw on Linux16-Sep-10 6:30
8813AshleyYep, tried that (the 2nd example above should read "/Library/Fonts/Verdana.ttf").16-Sep-10 6:09
8812Maxim(maybe it doesn't have one and I'm just being annoying ;-)16-Sep-10 6:07
8811Maximdid you try adding the file extension to the path qualification on osx/linux?16-Sep-10 6:06
8810Ashleystring! only ... http://www.rebol.com/docs/view-face-content.html#section-316-Sep-10 6:05
8809Maxim(I can't test it)16-Sep-10 6:00
8808Maximdon't you need to give a file! type for path qualification?16-Sep-10 6:00
8807AshleyAnd my answer is it's not a RebGUI problem. Try the following code on 2.7.7.3.1 (Windows):

view center-face make face [effect: [draw [text "xxx"]]]

You should see 3 black x's in the top left corner of a new window. Now try this on 2.7.7.2.5 (Mac) ... a blank window appears. I suspect the same thing happens on Linux. This is not a dialect problem (VID or RebGUI) but an issue with REBOL/View AGG font support on non-windows platforms.

Also note that while the following works on Windows:

view center-face make face compose/deep [effect: [draw [font (make face/font [name: "Verdana" size: 18]) text "xxx"]]]

path-qualifying the font name on Mac (and I suspect Linux) still does not work:

view center-face make face compose/deep [effect: [draw [font (make face/font [name: "/Library/Fonts/Verdana" size: 18]) text "xxx"]]]

16-Sep-10 5:59
8806MaxVMy question is: where is the font problem in RebGUi on Linux?15-Sep-10 15:05
8805Ashley"has had a deleterious effect on R2 3rd party support" ... agree, no-one wants to invest time into something that could be obsolete at any time. If I 100% knew that we wouldn't have a stable R3 SDK (for Mac, WIndows and Linux) for n months then I could make a rational investment of time ...15-Sep-10 0:23
8804Ashleyre: button colors. A QAD fix for b117 follows:

Edit rebgui.r and make the following changes to the button widget starting on line 1260:

- Add a new attribute ... old-color: none - Add the following to the init function ... old-color: color - Change color references ... replace "colors/theme-dark" with "face/old-color" (leave the "color = colors/theme-dark" ref though)

15-Sep-10 0:19
8803GrahamAlthough not vapourware, R3 has had a deleterious effect on R2 3rd party support15-Sep-10 0:12
8802GrahamI think R3GUi is not really relevant to the development of RebGUi ...15-Sep-10 0:11
8801AshleyIt's even worse than that, the true "cut-over" for many won't occur until we have a stable R3 SDK! ;)

Having 2 versions of RebGUI (b117 and b218) that are each 95% done, but each with their own bugs and quirks is not an ideal situation ... so I'm [again] looking to complete the 2.x series and finally obsolete b117 ... but R3, as always, is so close ...

15-Sep-10 0:10
8800GrahamEven if we get a stable R3GUI in the next year, people won't stop overnight using R215-Sep-10 0:03
8799GrahamAshley, given that the last code changes to RebGUi were a year ago .. waiting for R3GUI to appear, do you still feel that there is no point in improving/fixing RebGUI?15-Sep-10 0:02
8798AshleyThat's all VID-specific, NA for RebGUI.14-Sep-10 23:50
8797Maximsame for face/texts, face/fonts, face/images14-Sep-10 10:43
8796Maximnote that some view faces support the face/colorS which is a block with two colors.

if you only set the face/color, when ever a feel looks up the colors block, it will effectively overwrite the color... try it for your specific case (I don't use rebgui, so I can't test)

14-Sep-10 10:42
8795MaxVNO! :-(14-Sep-10 10:40
8794Grahamand don't change back?13-Sep-10 9:07
8793MaxVWell, 117 has some bugs that 218 hasn't. For example colored buttons turn grey after passing over them.13-Sep-10 9:03
8792NickA117 is the latest stable version10-Sep-10 14:42
8791MaxVYou use version 11710-Sep-10 12:26
8790MaxVI use Version 21810-Sep-10 12:24
8789MaxVYES! It's the Rebgui version that is different.10-Sep-10 12:23
8788NickAMaxV, this works perfectly for me on Ubuntu 10.04.1, using your rebol.deb installer - I ran Ubuntu directly from the CD created using the most recent Ubuntu download, installed REBOL using your Ubuntu package, and ran this script. Perhaps your version of RebGUI is different than mine? This version loads rebgui.r from an http:// link:

rebol [] do http://re-bol.com/rebgui.r font1: make face/font [ name: "/usr/share/fonts/truetype/freefont/FreeSans.ttf" size: 11 style: [italic bold] ] example: compose [ font (font1) pen red text "Hello World!" ] display "Example" [ style 20x20 data [ box snow 100x100 effect [ draw example ] ] ] do-events quit

7-Sep-10 16:27
8787MaxV** Script Error: style has no value ** Where: layout ** Near: style 20x20 data [ box snow 100x100 effect [ draw example ] ]6-Sep-10 9:29
8786NickAI haven't tried loading fonts in draw on Linux, but the rest of this works (the color is changed by the draw command "pen red"):

Rebol [] do %rebgui.r font1: make face/font [ ; name: "/usr/share/fonts/truetype/freefont/FreeSans.ttf" size: 11 style: [italic bold] ] example: compose [ font (font1) pen red text "Hello World!" ] display "Example" [ style 20x20 data [ box snow 100x100 effect [ draw example ] ] ] do-events

4-Sep-10 17:36
8785MaxVREBOL/View 2.7.7.4.3 5-Jan-2010

Linux ubuntu 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux

30-Aug-10 14:37
8784MaxVAll my code is: Rebol [] do %rebgui.r fnt1: make face/font [ name: "/usr/share/fonts/truetype/freefont/FreeSans.ttf" size: 12 ] example: ['text "Hello word!"] insert example ( reduce ['font fnt1 ]) display "Example" [ aaa_stats: box 50x50 effect [ draw example ] ] do-events30-Aug-10 14:35
8783MaxVI tried Nick code, but I obtain ** Script Error: style has no value30-Aug-10 13:32
8782shadwolfnickA didn't provided a font information in his draw block plus he didn't gived a different color... plus R2 VID sux with fonts and specially under linux.28-Aug-10 17:21
8781AntonOops, sorry Ashley, I was wrong about RebGUI unsetting LAYOUT. (It's been a long time since I tried RebGUI.) MaxV, tell us the rebol version you are using (system/version) and the RebGUI version. Show us the full code which does not work with RebGUI. I noticed your second example (using RebGUI) did not include the code which sets the font path. Just to be sure, can you confirm you tried it together?28-Aug-10 14:45
8780Grahamso it should work in rebgui as well as the draw dialect is unchanged in rebgui28-Aug-10 0:49
8779GrahamIt's a bug in that the font directories are unknown in linux28-Aug-10 0:49
8778AshleyRebGUI (b117 and later) does *not* redefine layout. It does however redefine alert, confirm and many of the request-* functions.

The fact that starting a fresh console session and entering:

view layout [box black 100x100 effect [draw [pen white text "Hello"]]]

no longer works on the linux and Mac ports of REBOL is I believe a REBOL/VIew bug (despite a workaround that may work for VID but not RebGUI).

28-Aug-10 0:38
8777NickArebol [] do %rebgui.r example: [pen black text "Hello word!"] display "Example" [ style 20x20 data [ box blue effect [draw example] ] ] do-events27-Aug-10 16:34
8776NickArebol [] do %rg example: "Hello world!" display "Example" [ style 20x20 data [ box blue example ] ] do-events27-Aug-10 16:32
8775NickAYou can use VID styles with the 'style word:27-Aug-10 16:32
8774AntonYou could probably modify the RebGUI sources so it doesn't do that, or ~maybe~ redefine the VID functions yourself (I think more challenging). Every time there is a RebGUI update, you'd have to remodify the RebGUI sources, so I wouldn't be inclined to do that myself. It depends how badly you want them to coexist.27-Aug-10 14:27
8773AntonWell, it's not going to be easy to mix them. Ashley made the decision early in RebGUI development to specifically unset (the majority of?) the built-in VID functions. I think primarily to reclaim memory use, but maybe also to avoid mixing code. (I didn't really like this decision, myself.)27-Aug-10 14:23
8772MaxVExactly, any suggestion?27-Aug-10 14:05
8771AntonNo, he solved the problem with Linux by providing an absolute filepath to the font. The problem is trying to use VID's LAYOUT (and maybe also VID's VIEW) after initialising RebGUI. If I remember correctly, RebGUI unsets 'LAYOUT, or redefines it for its own use. So it won't work anymore as you expect with VID.27-Aug-10 13:42
8770Grahamexample: [pen black text "Hello word!"] display "Example" [ aaa_stats: box 50x50 effect [ draw example ] ] do-events27-Aug-10 10:39
8769Grahambut your problem is linux isn't it?27-Aug-10 10:38
8768GrahamOn windows you get a nearly invisible "hello world"27-Aug-10 10:37
8767MaxVDo you know a solution?27-Aug-10 10:10
8766MaxVIt doesn't display anything.27-Aug-10 10:09
8765MaxVdo %rebgui.r example: ['text "Hello word!"] display "Example" [ aaa_stats: box 50x50 effect [ draw example ] ] do-events27-Aug-10 10:09
8764MaxVOk27-Aug-10 9:54
8763AshleyMax, fonts should work the same between View, VID and RebGUI. Please provide a small snippet of RebGUI code that demonstrates the problem.27-Aug-10 1:04
8762Ladislavaha, sorry, I did not find out you actually used RebGUI, sorry26-Aug-10 17:08
8761Ladislav(I suppose that you are mistaking VID and RebGUI)26-Aug-10 17:05
8760LadislavActually, this group is inappropriate, you should use View, or Linux26-Aug-10 17:04
8759MaxVHello everybody, I have a problem with Linux: DRAW choose a font that give problem displaying:

example: ['text "Hello word!"] view layout [ box 100x100 effect [draw example ]]

on linux it gives a blank window. I added:

example: ['text "Hello word!"] if (pick system/version 4) = 4 [ fnt1: make face/font [ name: "/usr/share/fonts/truetype/freefont/FreeSans.ttf" size: 12 ] os: "linux" ] if os = "linux" [ insert example reduce ['font fnt1] ] view layout [ box 100x100 effect [draw example ]]

This solution is good, but using REBGUI it doesn't work anymore. What can I do?

26-Aug-10 16:47
8758GrahamSo, I can feed this widget 18,000 entries which I don't think you can with the edit-list.22-Aug-10 5:56
8757GrahamI've posted my lookup-field as per my video here

http://rebol.wik.is/RebGUI/Lookup-field

It uses a lot of code from the edit-list which I don't quite grok! So, there's a bug which requires you to initialize the field with a backspace first.

22-Aug-10 5:55
8756GreggVID is the native REBOL GUI dialect. If you're just getting started, and doing basic UIs, it's worth a look.22-Aug-10 2:57
8755GreggAnd of course, VID is still valid as well.22-Aug-10 2:56
8754RickHthanks, again.22-Aug-10 2:54
8753GrahamThe SVN version is incomplete and was a rewrite which was not finished21-Aug-10 23:19
8752GrahamDon't use 118 .. the only one working is 11721-Aug-10 22:53
8751RickHHi,

Am just moving over here from TCL-land and would like to try RebGUI. However, there seems to be two versions: one downloadable from the Dobeash site (rel #117) and on resident in SVN (#218).

Which is the one with which to go; and if the version on SVN, what is the method to down load an use?

Any assistance would be appreciated.

Rick

21-Aug-10 22:37
8750Grahamok, include table into the tabbed block and use the set-focus from the svn works so far16-Aug-10 10:11
8749Grahamset-focus is different ...16-Aug-10 10:01
8748GrahamIn 117, you can't seem to tab into a table eg. display "" [ field field table options ["column" left 1.] data [ "ab" "cd" ]] do-events

but you can in the svn version .. what change has to be made to allow this?

16-Aug-10 9:53
8747Grahamsince the drop list uses a modal popup window I guess it would require a lot of modification :(16-Aug-10 5:15
8746GrahamWhat I'd like to emulate is this http://rxterms.nlm.nih.gov:8080/16-Aug-10 5:05
8745GrahamThe current edit-list shows the matches where you are typing which is a little distracting. How about the drop list appearing with the matches instead?16-Aug-10 5:04
8744AdrianSscratch that question - I don't know how I had pulled down a version 118 before27-May-10 16:54
8743ThorstenNo typo or not mine. It is a development build from Ashley and Graham, not GA. Ashley mentioned it (90% finished rewrite) in his previous post.27-May-10 16:35
8742AdrianSWhat is this build 218? Typo? I thought 118 is the latest.27-May-10 16:27
8741ThorstenI found out that the space on the right results from a margin command later in the script. I used tight on the top before the menu widget. If i didn't reset the margin, menu fills up to the right. If i want to reset the right margin to 4 px later to indent the following widgets to the left, it resets the margin for the complete window to 4 px. That means for the menu as well. Now i have a workaound an use a 4 px box to keep the distance from the right border. As Rebgui will not be developed any further, it seems that i have to live with it. I have chosen build 218 because of the better design, compared to the previous ones (My opinion) But thanks for the hints.27-May-10 16:14
8740Ashley... which is still the latest official release ( http://www.dobeash.com/download.html )

118 was the commencement of a makeover but as Graham says broke a lot of things. The 118 efforts morphed into an almost total rewrite of 'the engine' (everything bar the widgets) and were about 90% complete (build 218) when R3 gobs hit the scene (a game changer IMHO).

26-May-10 11:59
8739NickACute Graham :) AdrianS, I've only used that code with RebGUI version 117.26-May-10 9:32
8738GrahamThere were some major changes made which were never finished.25-May-10 21:53
8737AdrianSwasn't paying attention, I guess :-) Is 118 a new start?25-May-10 21:16
8736GrahamI wouldn't use 118 ... it's incomplete25-May-10 20:25
8735GrahamWhy do you think it's called a "crash-course" ?25-May-10 20:24
8734AdrianSNick, are the samples using RebGUI strictly intended for v117? I've tried a few with 118 and they seem to crash when poking around the UI.25-May-10 17:03
8733NickAThorsten, take a look at the point of sale application at http://re-bol.com/rebol_crash_course.html#section-5.1425-May-10 12:09
8732AshleySee margin, tight and pad ... http://www.dobeash.com/RebGUI/user-guide.html#section-3.425-May-10 1:32
8731ThorstenI have a menu as the top widget in my window. I think i tried every possible combination of the sizing attributes (#LOV, #HW, margin, tight and space). The menu sizes to nearly the full width of the window but keeps a distance (seems like 4x4) from the rigth window border. Is there any explanation for this space on the right??24-May-10 19:40
8730Ashley"what is your status re RebGUI and its future?" ... RebGUI does most of what *I* need it to do at present, but I'd really prefer to be using R3 + SDK + Cool looking R3 GUI. I'm experimenting with a minimalist GOB-based R3 GUI, but it's more an intellectual pursuit to see how minamalist (and functional) I can get it ... so don't hold your breath.23-May-10 10:55
8729AshleyNo immediate plans to update tree widget. For accessor functions, search for the word accessor in hhttp://www.dobeash.com/RebGUI/widgets.html23-May-10 10:42
8728PekrAshley - what is your status re RebGUI and its future? It seems to me, that R2 brach is not going to be further developed? And also - I noticed you mentioned some flawor of even more simplified RebGUI like engine for R3. Is this still a plan, or do you wait for how R3 VID emerges?23-May-10 10:06
8727ThorstenAre there any plans to update the widget in the near future or do you have other priorities?? Can you tell me which of the widgets already have these accessors, to have a look at??23-May-10 9:59
8726AshleyMany widgets have accessor functions (e.g. add-row) that allow you to dynamically modify them. The tree widget lacks these but is fully functional in all other respects.23-May-10 9:52
8725ThorstenYou say that tree is not fully developed. Can tell me, what limitations it has?? Is tree able to react on events, when i click on one of the branches of the tree??22-May-10 11:00
8724ThorstenOK , my fault. Should have studied the example more precisely. Now it is working perfectly. Thanks for your assistance.22-May-10 10:58
8723ThorstenDoes this apply to regui 218?? I get an error, that display has no compose refinement!22-May-10 10:51
8722AshleyTree is not a fully developed widget, so the easiest way of modifying it is to dynamically generate the spec. For example:

blk: copy [] append blk ["Pets" ["Cat" "Dog"] "Numbers" [1 2 3]] display "Test" compose/only [tree data (blk)]

22-May-10 9:53
8721ThorstenI want to give Rebgui a try for an app i need to do. So, i need a tree in there, which should be filled from database request when the app starts. Not via button click. Can anybody give me a small example how to achive this. Searched the docs, but couldn't find something like that. And be kind with me as i am not too familiar with Rebgui till now. I downloaded build 218. What i tried so far is set-data via button, but that doesn't seem to work. A sample would drastically shorten my way to get this working. Thanks in Advance!!22-May-10 9:26
8720ThorstenHi,22-May-10 9:18
8719AshleyBit of a hiatis while R3 comes closer to fruition, so no.10-May-10 3:52
8718Claudethanks Ashley, do you find a way to correct Build 218 and drop-list, menu etc.... ?10-May-10 3:44
8717AshleyReplace 'load-image with 'load unless you want to cache the image.10-May-10 1:50
8716Claudeiam stupid ;-) my-image/image: load-image %./Photos/test.jpg show my-image2-May-10 17:06
8715Clauderebgui 1182-May-10 15:22
8714Claudesomeone have a solution ?2-May-10 15:22
8713Claudeis missing a set-image ;-)2-May-10 15:22
8712Claudei wonder if set-values works ?2-May-10 15:15
8711Claudemy-image/image: make image! 60x80 load %./Photos/test.jpg show my-image2-May-10 14:48
8710Claudei try this but i have a black image !!!!!2-May-10 14:47
8709Claudemy-image: image %./nophoto.jpg2-May-10 14:47
8708Claudehi, i would like to change the image of a variable2-May-10 14:47
8707Grahamset-state f false24-Apr-10 4:59
8706marekwork (sorry again)24-Apr-10 3:35
8705marek... it doesn't24-Apr-10 3:35
8704marekJust found out how to24-Apr-10 3:34
8703marekdisplay "" [button disable] do-events ;- this simple (I can't change sending messages on my Mint, sorry for multi replays)24-Apr-10 3:31
8702marek>> display "" [f: field do [set-state f]] do-events ** Script Error: set-state expected state argument of type: logic ** Where: init ** Near: set-state f But better result gives this:-24-Apr-10 3:29
8701marekWith build 216 I get this:-24-Apr-10 3:27
8700Claudegreat thank you very much ;-)23-Apr-10 23:22
8699BudzinskiCYou can toggle enabled/disabled with the set-state function.

Example app: display "test" [a: field do [set-state a]] do-events

23-Apr-10 23:18
8698Claudehi, how i can force a field to be disabled ? i try myfield/options: [info] but it don't work !!!!23-Apr-10 23:06
8697GrahamGood luck! We need this for the spell checker18-Apr-10 23:16
8696BudzinskiCThanks Ashley. That only shows the height for the default font though. I am displaying three text areas with different font sizes, so I set the font size in the areas directly. I had to use an invisible text area now anyway though because I forgot that to be able to scroll to a certain line in the text area I have to find out in which line a certain word, to which I want to scroll, actually is :) So now I made a test text area for this and positioned the "real" text area on top of it so that the test text area is completely covered by it. I copy the text up till the word I want to scroll to into the test text area and then look at the text size of the test text area and use that information to scroll the "real" text area to this word. It isn't working correctly yet but it should so I guess I just made a stupid mistake somewhere, have to look at it again tomorrow.18-Apr-10 22:51
8695Ashleyctx-rebgui/sizes/font-height18-Apr-10 5:44
8694GrahamYep, something like that :)16-Apr-10 19:39
8693BudzinskiCAh you mean like in an invisible text container? That should work, right. Thanks :)16-Apr-10 19:38
8692GrahamSo, instead of using your whole area, just use one character in a face16-Apr-10 19:38
8691Grahambut if you can get the font name, font size you should be able to create some text and then get the sizes from that16-Apr-10 19:36
8690BudzinskiC:) Thanks anyhow16-Apr-10 19:35
8689GrahamNor me ...16-Apr-10 19:35
8688BudzinskiCa/font/size gives me the font size, which is 12 by default. But does that help in getting the line height? Is there some kind of standard so that a font with the size 12 always has a height of font-size * something? Don't know anything about fonts...16-Apr-10 19:34
8687Grahampresumably you need to get the font information out16-Apr-10 19:33
8686BudzinskiCThis seems to work:

display "test" [ a: area (mold ctx-rebgui/colors) button [ scroll-to-line: 5 line-height: 30 total-lines: (second size-text a) / line-height percent: ((scroll-to-line - 1) / (total-lines / 100)) / 100 a/pane/data: percent show a ] ]

The height of a line is hardcoded though which means it stops working if the font size is changed. Is there a way to get the current line height?

16-Apr-10 19:31
8685GrahamIs that informatio available?16-Apr-10 19:29
8684BudzinskiCThanks a lot :) Before I do something completely wrong again... I also want to scroll to a certain line in the text area if possible. My approach now would be to see if I can somehow see how many lines of text are displayed in the text area, calculate the percentage of the line I want to scroll to based on this total number of lines, divide that by 100 and use it for a/pane/data. Right..?16-Apr-10 16:58
8683Ashleydisplay "test" [ a: area (mold ctx-rebgui/colors) button [a/pane/data: .5 show a] ]16-Apr-10 13:30
8682BudzinskiCI need help! But that aside, how can I scroll programatically to a certain position in an area? I was able to scroll to the very end by doing this:

textarea/para/scroll/y: negate (textarea/text-y - textarea/size/y) show textarea

But the scrollbar handle stays at the top when doing this. I haven't yet found out how I can access the scrollbar from the area which is probably what I will have to do to solve this, right?

16-Apr-10 13:21
8681SteeveAh ! wrong thread11-Mar-10 18:06
8680Steevebtw 2/, We can not set the gob attribute on custom events (using make event!)11-Mar-10 18:01
8679Steevebtw, map-event crash if the event doesn't contain a gob.11-Mar-10 18:00
8678HenrikGabriele, ok. also try to simply click the first style and hold down the down cursor key. then you will scroll through all styles.11-Mar-10 10:12

Return to Index Page