AltME: R3-GUI

Messages

Cyphre
"Different for text-tables (from previous example)?  
>> get-face tt2
== none
have to use /field refinement"
Yes, that's possible. The behavior of get/set-face is completely in hands of style programmer. Regarding the text-table: maybe the "get-face tt2" default call couls return a block with complete data of the table? Or some other value? You can dicuss this here with Rebolek(author of text-table) and any other R3GUI users.
Josh
I think my first thought would be get-face FACE would return the whole data block

Marco
Speaking of this I'd like to know your opinion about the generic problem of setting/getting a value of a face. Which one of the following methods would you like best?
    face/size: 20x30 show face
    face/set 'size 20x30
    face/resize 20x30
    set-face face 'size 20x30
    resize-face face 20x30
and here are their generic implementations:
    face/set: func [attr value /no-show][
        switch/default attr [
            'size [self/size: value]
            ;...
        ] [set in self attr value]
        unless no-show [show self]
    ]
    face/resize: func [value /no-show][
        do pick [self/set self/set/no-show] none? no-show 'size value
    ]
    set-face: func [face attr value /no-show][
        switch attr [
            'size [do pick [face/resize face/resize/no-show] none? no-show value]
            ;...
        ]
    ]
    resize-face: func [face value /no-show][
        do pick [set-face set-face/no-show] none? no-show 'size value
    ]
Robert
I like this: "face/size: 20x30 show face" but it's not good as you code hard against the widget internal structure. One change and you have to change your code.
So, this is the way to go: set-face face 'size 20x30
Henrik
I agree with Robert on SET-FACE.

DideC
Hi all,
In this file https://github.com/saphirion/r3-gui/blob/master/source/text-keys.r3
line 92, I see what could be a typo: "delete deslect"
I don't see any other "deslect" in all the files in source/
(reposted to be readable due to the link)
line 92, I see what could be a typo: "delete deslect"
I don't see any other "deslect" in all the files in source/
Gregg
Well, there are other 'deselect references around it, so I assume that's what it should be.
DideC
I suppose too. But I don't have the insight of r3gui to be sure. So I let whose who know (make) it to correct it.
GrahamC
@DideC .. I've mentioned this typo on the 22nd May, but now we have the sources on github it seems the appropriate way is to fork, fix and make a pull request ...
Cyphre
Marco, since R3 GUI uses own resizing algorithm you should read the documentation first to get the idea. Things like face/size: XxY won't work anymore for you. (unless you "force" to turn the resizing off for certain face(s) or implement own "custom" layout style that is not based on PANEL/GROUP containers)
To lcarify my answer: R3GUI can ofcourse use absolute positioning or any other resizing algorithm possible. The resizing is not "hardcoded" in the R3GUI core code. Anyone can implement own Layout style that treats the contained faces in any way.
Cyphre
Graham: true, the type fix probably slipped during some code merges so yes, we are on GitHub nows corrections are welcome and won't be forgotten ;)
type=typo
GrahamC
@Cyphre I submitted a pull request 2 days ago https://github.com/saphirion/r3-gui/pulls in case you didn't see it.

DideC
I have just submited my first Github "pull request" ever.
PeterWood
Great ... hopefully the first of many :-)
Arnold
Congratulations! Wouldn't that have to be a Push request? (No just kidding!) ;-)
GrahamC
@Cyphre - did you already fix this bug I mentioned here on the 26-May with the leading === ?  That was the reason for the pull request because it looked as though you hadn't ?
Cyphre
GrahamC: see the pull-request chat for answer

Last message posted 268 weeks ago.