-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modal issues #142
Comments
I think you're right and there's an issue with |
Aha! I was looking for shown first and couldn't find it. That's what I used in my old C++ app that I've been replacing. That works fine. Still have to figure out how to detect OK/Cancel without using an IORef. I'm making a bunch of modal editors for various attributes, some of which may be complex enough to need runtime generation, which is why I'm not using Fluid. Plus I'd like to avoid C++ entirely. Ah, looking at your code, I see you just use an IORef. So I'll just do that. Thanks! Incidentally, regarding the pointer mismatches, I recall having similar problems when using FLTK with C++ years ago [my bugs, not theirs]. I hit problems due to multiple inheritance and using the wrong order of casts, such that I'd get a slightly wrong pointer, since it got confused about base class offsets. I don't understand out safeCast works. I doubt that's the problem here since the two pointers are so far apart, but I thought I'd mention it just in case. |
I'm not sure how much making-modals-easier you want to build into the library, and how much you want to remain a thin wrapper around FLTK. But you can always supply sample code. Here's what I'm playing around with to cut down on repetition:
|
I fixed the issue with |
If this fix mentioned above works could you close this issue? |
The compilation issue is fixed; the pointer mismatch remains. |
I'm having trouble figuring out how to do a modal window from scratch. I think there's at least one API issue, but even with that, it's not working.
First, FL.modal should be returning Ref WindowBase, not Ref Widget. That's an easy fix.
But then when I call it and compare it to my modal window, I get a different pointer back. Am I missing something obvious, and/or is there a more straightforward way to do this than whileM_?
Here's my test code:
Output:
The text was updated successfully, but these errors were encountered: