ghoetker
2018-5-24 21:08:02

@mark.warren If you want to look at the code for my project, I just posted it at https://gist.github.com/ghoetker/91adbf5cfa601af22f50a174de721f34.js. Please remember that this is my first attempt, so I may have done horrible violence to the “best way” to do things. Feel free to ask me any questions about what I did…we can do some joint learning. Good luck.


ghoetker
2018-5-24 21:18:38

@mark.warren Oh, regarding your “Is this sensible?” question above, I was hoping someone with more knowledge would chime in. In the interim, however, your approach seems straight forward. I wondered about setting the undesired panel to 'hidden rather than deleting and creating it. But, doing so would have frame leave space for it, which wouldn’t really be swapping.

The only issue I see is that—assuming I’m reading section 1.42 of https://docs.racket-lang.org/gui/ properly—the deleted panel would be subject to garbage collection since there would be no external reference to it. That might or might not be a problem, depending what was on the panel.

I hope that’s helpful (and more importantly, right…)


mark.warren
2018-5-25 06:45:41

@ghoetker Thanks for your comments. I will take a look at your project and don’t worry I can’t make any comments as I’m just starting too.


mark.warren
2018-5-25 06:47:38

@ghoetker I was also hoping someone with a bit more experience would comment on my question, I think it will not be garbage collected as the define of next-panel should maintain a strong reference to it.