: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
having an issue with resizing image containers, not sure if its GTK or red...
Red [ needs 'view ] view/flags [ ip: panel papaya [ p: image 300x300 [ g: load request-file/filter ["png" "*.png" "jpg" "*.jpg"] ; get image y of x rr: round (300.0 * (g/size/y / g/size/x)) ; attempt to scale image container, but gets cut-off p/size/y: to-integer rr p/image: g ;attempt to scale panel (should this be automatic?), but it gets cut-off ;ip/size/y = ip/size/y + (300 - rr) ] ] ] [ modal resize ]
#!/usr/local/bin/red Red [ ] mainWin: layout [ title "Resizing Image" f: field "256x256" button "Quit" [quit] return canvas: base 256x256 %lena.png ] view/flags/options mainWin [resize] [ actors: object [ on-resizing: function [face [object!] event [event!]][ win: face canvas/size: win/size - 20x60 f/text: form canvas/size ] ] ]
#!/usr/local/bin/red Red [ Title: "Resize test" Author: "Francois Jouen" File: %resize3.red Needs: 'View ] _offset: 0x0 loadImage: does [ tmp: request-file/filter ["png" "*.png" "jpg" "*.jpg"] if not none? tmp [ _offset: canvas/offset + 10 img: load tmp canvas/size: img/size mainWin/size: _offset + img/size f/text: form canvas/size canvas/image: img ] ] mainWin: layout [ title "Resizing Image" button "Load Image" [loadImage] f: field 70 "256x256" button "Quit" [quit] return canvas: base 256x256 black ] ;--resize event processing view/flags/options mainWin [resize] [ actors: object [ on-resizing: function [face [object!] event [event!]][ win: face canvas/size: win/size - _offset f/text: form canvas/size ] ] ]
tmp: request-file/filter ["Image Files" "*.png;*.jpg; *.bmp"]
Red [ needs 'view ] view [ d: drop-list 180x30 select 2 data["two" "four" "eight"] [f/text: pick face/data face/selected ] f: field 180x30 on-enter [ append d/data face/text d/selected: (length? d/data) probe d/data ] ]
Red [ needs 'view ] view [ panel 120x120 with [ extra: [name: "panel_1" id: 1 ] ] [ field 80x30 "edit" ] on-down [ print "panel selected: " probe face/extra/name ] ]
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.