Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    GiuseppeChillemi
    @GiuseppeChillemi
    >> help layout
    Func spec couldn't be parsed, may be malformed.
    Is this know?
    hiiamboris
    @hiiamboris
    update
    luce80
    @luce80
    This is same as R2 (!) but should give an error IMHO:
    >> -1x-
    == -1x0
    hiiamboris
    @hiiamboris
    agreed, make an issue
    dsunanda
    @dsunanda

    This breaks the layout parser:

     unview/all view/no-wait [
          rich-text 100x100 data [
              font 9  i "" /i /font
              ]]
    *** Script Error: f has no value
    *** Where: either
    *** Near : f
    *** Stack: view layout fetch-options rtd-layout pop cause-error

    I think it may be a fairly recent regression.
    Workaround: don't have empty strings :)

    Gregg Irwin
    @greggirwin
    I went back over a year and it's still there, so not a recent regression.
    dsunanda
    @dsunanda
    Thanks....I've just started seeing it; maybe I've not been emitting null strings before.
    Nenad Rakocevic
    @dockimbel
    @dsunanda Please open a ticket for it.
    hiiamboris
    @hiiamboris
    I think Qingtian fixed it 3 hours ago :)
    dsunanda
    @dsunanda
    @hiiamboris Not seeing it fixed in the current windows download. Does that take a few hours to update?
    hiiamboris
    @hiiamboris
    Ah, different branch red/red@ef3849d
    Maybe incomplete?
    dsunanda
    @dsunanda
    Thanks....I'll report it per Nenad's request.....#5231
    Qingtian
    @qtxie

    I think Qingtian fixed it 3 hours ago :)

    I'm not sure if the fix is complete. I made a PR so @dockimbel can review it.

    Nenad Rakocevic
    @dockimbel
    Ah, too bad I didn't see your PR in time. I've pushed a fix too, but yours is better. I'll rollback my changes.
    dsunanda
    @dsunanda
    @qtxie @dockimbel #5231 looks fixed. Thanks for the fast work!
    Nenad Rakocevic
    @dockimbel
    @dsunanda You're welcome!
    hiiamboris
    @hiiamboris
    @dockimbel this seems surprising:
    >> f: function [w] [a: 1 b: 2  get select #(x a y b) w]
    >> f 'x
    *** Script Error: a has no value
    *** Where: get
    *** Near : get select #(x: a y: b) w
    *** Stack: f
    Toomas Vooglaid
    @toomasv
    Funny
    >> f: function [w] [a: 1 b: 2  get select to map! [x a y b] w]
    >> f 'x
    == 1
    Nenad Rakocevic
    @dockimbel
    Words in maps are not bound to local contexts, you have to bind them explicitly when needed:
    >> f: function [w] [a: 1 b: 2 get bind select #(x a y b) w :f]
    == func [w /local a b][a: 1 b: 2 get bind select #(
        x: a
        y: b
    ) w :f]
    >> f 'x
    == 1
    hiiamboris
    @hiiamboris
    What's the reason?
    Nenad Rakocevic
    @dockimbel
    map! is not a data-structure primarily used for representing code to evaluate, so it does not get automatically bound to local contexts like for any-block! series.
    Gregg Irwin
    @greggirwin
    Would someone like to add that to the Guru Meditations wiki page?
    dsunanda
    @dsunanda
    Is it reasonable to expect this to work?
    save/as "" system 'redbin
    *** Access Error: cannot decode or encode (no codec): routine ["Internal Use Only"][bool: as red-logic! stack/arguments bool/header: T
    Gregg Irwin
    @greggirwin
    No, because strings are UTF-8 and redbin is binary. That issue aside, redbin can't currently encode every value (type). Offhand I don't know what it's tripping over in system.
    Semseddin Moldibi
    @endo64
    About decode-url:
    1. It accepts string! but always return none: >> decode-url "http://example.com" ; == none (regression?)
    2. decode-url directly calls parse-url which has throw-error refinement, wouldn't be nice to have that refinement on decode-url?
    Gregg Irwin
    @greggirwin
    1. Doesn't appear to be a regression, just a bug that's always been there. parse-url molds the arg, whether it's a string or not. mold is there because form doesn't hex-encode URLs, but if it's given a string, can we all agree that it's on the user to ensure they are hex-encoded, or do we drop string support?

    2. decode-url is meant to be higher level, and exists mainly as a name to balance encode-url, so I don't think we need to expose the refinement there. Do you have a specific use case where that seems better than using parse-url directly?

    Semseddin Moldibi
    @endo64

    Do you have a specific use case where that seems better than using parse-url directly?

    No, actually I could use parse-url directly.

    It looks correct to remove string! support from parse-url, but would be ok to keep it in decode-url high level function. And instead of mold, to url! can be used if the argument is a string!.

    Gregg Irwin
    @greggirwin
    I agree. Does anybody have a reason to keep string support in parse-url?
    Rudolf Meijer
    @meijeru
    It seems that an area face that has enabled? set to false does not allow scrolling. I use such a face to display search results and I don't want the user to modify these, but when there are more results than fit in the visible area, I want the user to be able to scroll down. Do we have a bug or a feature here?
    Rudolf Meijer
    @meijeru
    Also, does the VID keyword middle work? I can't see it working on text in a field face.
    hiiamboris
    @hiiamboris
    field is a single line edit box, it's not supposed to support vertical alignment
    as for area we should ask @qtxie if it's even possible to scroll a disabled control
    even if it is, I don't think it's a good thing to do - one should use a text in a scrollable panel instead
    hiiamboris
    @hiiamboris
    text is dumb though, I can't seem to make it autosize itself properly
    Rudolf Meijer
    @meijeru
    @hiiamboris With default sizes for font-height and field height, I find the text aligned to the top, which is not nice.
    hiiamboris
    @hiiamboris
    my default:
    what's yours?
    view [field "abcd"]
    seems very much centered
    Rudolf Meijer
    @meijeru
    Screenshot_20221122_170607.png
    hiiamboris
    @hiiamboris
    yeah not nice, you should report it
    Rudolf Meijer
    @meijeru
    This is mine. It is definitely not centered.
    Rudolf Meijer
    @meijeru
    For the record: issue #5242.
    Qingtian
    @qtxie

    if it's even possible to scroll a disabled control

    @hiiamboris There is a ES_READONLY flag. We can give it a try. https://learn.microsoft.com/en-us/windows/win32/controls/em-setreadonly

    Qingtian
    @qtxie
    @meijeru Height 23 should be the standard height. I changed it in the latest commit.
    Rudolf Meijer
    @meijeru
    The fix works for the standard font but not for e.g. Courier New.
    1 reply
    hiiamboris
    @hiiamboris
    txt: " this text^/should be^/ readable"
    img: draw 70x70 drw: compose [text 8x10 (txt)]
    view [image 70x70 draw drw image 70x70 with [image: img]]
    we have some rather crappy image scaling @qtxie
    1 reply
    I guess it's even worse for 200% scaling users (I got 150%)