:in literal issue! and refinement! values. red/red@833e133
input methodfor rich-text red/red@5c3e9e8
abouterror in the gui-console. red/red@ca4e905
readon urls doesn't apply CRLF->LF translation red/red@3eb847f
list-dircaused by integer division rule change. red/red@54a9781
i am on linux ubuntu 18.04.03 LTS
root@ubuntu-2gb-nbg1-1:/usr/local/bin# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.3 LTS Release: 18.04 Codename: bionic root@ubuntu-2gb-nbg1-1:/usr/local/bin# ls red-064.dms red2019.dms red.dms root@ubuntu-2gb-nbg1-1:/usr/local/bin# red.dms Unable to init server: Could not connect: Connection refused (console-2021-3-16-29645:1717): Gtk-WARNING **: 17:43:54.824: cannot open display: root@ubuntu-2gb-nbg1-1:/usr/local/bin#
Red 0.6.4 works correctly. When I try to run
red-16mar21-0051dff08 (I renamed red.dms) it gives me error above
It's a remote server without a monitor connected to it
strange gtk error:
Red [ needs 'view ] getpanel: function [ md ] [ compose/deep [ panel 55x55 30.30.30 with [ offset: (md) ]  ] ] view [ panel 400x600  on-down [ probe event/offset append face/pane layout/only getpanel event/offset ] ]
(console-2021-3-28-10126:39690): Gtk-CRITICAL **: 15:12:40.593: gtk_widget_grab_focus: assertion 'GTK_IS_WIDGET (widget)' failed
any idea what could be causing this?
@qtxie got it thanks! Now for the actual problem:
Red [ needs 'view ] getpanel: function [ i bgc ] [ compose/deep [ panel 200x55 30.30.30 loose with [ color: (bgc) ] extra [ idx: (i) ] [ ] draw  ] ] view [ aa: panel 400x600 [ text "click to add panel" ] on-down [ clear face/pane repeat n 10 [ rc: to-tuple reduce [ (min 80 random 120) (min 80 random 120) (min 80 random 120) ] append face/pane layout/only getpanel n rc ] foreach-face face [ unless none? face/extra/idx [ face/offset/y: to-integer ((face/extra/idx - 1) * (face/size/y + 10)) + 10 ] ] ] ]
click repeatedly in the panel bg...
*** Runtime Error 1: access violation *** at: 0807FDE3h
its almost certainly the empty
draw  that's causing it
is there a safer way to make panels with empty draws? I'm using it to draw/clear a highlight border on select.
libgtk-3-0:i386installed, I get an error:
$ ./red-12apr21-630069f9e --no-view --cli Unable to init server: Could not connect: Connection refused (console-2021-4-12-26611:12814): Gtk-WARNING **: 14:27:35.576: cannot open display:
draw , then
view [panel draw ]should make it crashes.
#!/usr/local/bin/red Red [ Title: "Draw tests " Needs: 'View ] img: make image! reduce [512x512 white] loadImage: does [ tmp: request-file unless none? tmp [ img: load tmp canvas/image: img ] ] view win: layout [ title "Image Tests" button "Load" [loadImage ] button 60 "Quit" [Quit] return canvas: base 512x512 img ]
Red [ needs 'view ] doup: true mkp: func [ ] [ n: copy  append n [ below ] repeat i 2 [ append n compose/deep [ (to-set-word rejoin [ "list" (i) ]) text-list 280x80 data [ "one" "two" ] select 1 on-change [ ;print [ "list on-change triggered and doup is" doup ] if doup [ doup: false (to-set-path rejoin [ "edit" (i) " text" ]) (quote face/data/(face/selected)) doup: true ] ] (to-set-word rejoin [ "edit" (i) ]) field 280x30 on-change [ ;print [ "field on-change triggered and doup is" doup ] if doup [ if (quote face/text) <> "" [ doup: false (to-set-path rejoin [ "list" (i) " data" "(list" (i) "/selected)" ]) face/text doup: true ] ] ] pad 0x30 ] ] probe n n ] view/tight [ title "face from func test - onchange" aa: panel 300x320 30.30.30 [ ] do [ append aa/pane layout/only mkp ] ]
more ui woes, text-list below is updated by changes to its data from one fied, but not another:
Red [ needs 'view ] a: [ "one" "two" "three" ] doup: true view [ panel 200x500 [ below text "list block 'a'^/changes field below" aa: text-list 180x100 data a select 1 on-change [ if doup [ doup: false bb/text: a/(aa/selected) doup: true ] ] pad 0x30 text "changes a/(listbox/selected)^/via on-change which^/auto-updates the listbox^/but not the field below" bb: field 180x30 with [ text: "one" ] on-change [ if doup [ a/(aa/selected): face/text probe a ] ] pad 0x30 text "this is linked to a/2^/but doesn't update fields^/above" cc: field 180x30 with [ text: a/2 ] on-change [ probe a ] ] ]
Is there any documentation that explains when widgets can or can't be updated by the data they use?
About the 2nd snippet (didn't run the 1st yet).
A series can only be owned by a single object currently. In this case
data transfers ownership to
aa of both
a and it's subseries. Then
text takes ownership of
aa/2 only from
aa and gives it to
aa won't see the changes in
a/2 anymore but it will see changes in
a, that's why your
a/thing: other-thing works, but the other one not.
ais still owned by
having trouble attaching on-wheel to text
Red [ needs 'view ] txtscroll: object [ on-wheel: function [face event] [ print [ "we're scrollin..." ] ] on-down: function [face even] [ print [ "click works" ] ] ] view/tight [ panel 50x50 [ below center t: text "10" ] do [ t/actors: txtscroll probe t/actors ] ]
bug or feature??