
In racket/gui, I have 2 vertical panels that I would like to stack, each height determined by the total height of the widgetd drawn within them. By default though each vertical panel seems to take up 50% of the height of the initialized frame height. How can I get the behavior I want? Thanks!

Playing with min-height on the panel definition doesn’t do what I want. The top panel I want to have a dynamically changeable height through mouse vertical window resizing and I’d like the bottom panel to always have a fixed height.

@steveh2009 I think you want to set stretchable-height
on the bottom panel to false.

can I include a native lib (ie .so or .dll) with the package?

I’d really like to work this out too. I was looking at how #lang video
packaged native libs but I couldn’t get it to work (.dylib for macOS) I want to work out how to package up binaries for Linux and Windows too.

It’s not entirely clear to me why this would be desirable

I asked a couple of months ago how to bundle some C code to compile into an .so
, and the verdict was that I shld rather rely on that .so
being installed by other means

which I can entirely see the point of

well in my case I want to make FFI to a lib that a) seems to not prioritize backwards compatibility and thus breaks old code often, and b) I’m only interested in a rather small subset, so I’d be compiling those dlls myself (and omitting good chunk in the process)

plus that lib isn’t even close to mainstream, likely nobody would have it on their system by accident

@mjo has joined the channel

How can I create a c array of c string? I defined the type as (define the-type (make-array-type _bytes/nul-terminated 2)), but there isn’t a make-the-type binding like for a c struct.

you can write a small package that provides/installs the lib, and have your main package depend on it
here’s an example small package: https://pkgs.racket-lang.org/package/ffmpeg-x86_64-macosx

@xinhuang.abc Regarding the last comment, have you seen make-cstruct-type
?

I checked the document, but don’t quite understand it. Now I am trying with (_list i _bytes/nul-terminated)

@xinhuang.abc Someone asked a variant of this question on Stack Overflow recently: https://stackoverflow.com/questions/56759569/racket-ffi-example-of-c-array-array-usage/56760192 Probably I should try to add an example to the docs …

heh that’s funny. That someone was me, and the answer was the reason I’ve joined this slack.. :smile: