<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 12 January 2018 at 13:00,  <span dir="ltr"><<a href="mailto:subversion@hamsterrepublic.com" target="_blank">subversion@hamsterrepublic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">james<br>
2018-01-11 16:00:45 -0800 (Thu, 11 Jan 2018)<br>
38<br>
load_plank_from_file() helper function<br>
---<br>
U   wip/plankmenu.bas<br>
U   wip/<a href="http://plankmenu.bi" rel="noreferrer" target="_blank">plankmenu.bi</a><br></blockquote><div><br></div><div>+ DIM col as Slice Ptr<br>+ col = NewSliceOfType(slSpecial)<br>+ SliceLoadFromFile col, filename<br>+ IF col = 0 THEN visible_debug "load_plank_from_file: unable to load slices from """ & filename & """": RETURN 0<br><br></div><div>This doesn't work:  if SliceLoadFromFile fails, it doesn't delete col.</div><div><br></div><div>I actually have a git branch where I was working on making SliceLoadFromFile return a new slice instead of modify an existing one. Which was a surprisingly large change. I don't remember why I didn't check that in; maybe it didn't seem worth the effort to finish it.</div><div><br></div><div>BTW, I have been working on changing the way that plankmenus work. I am getting rid of "plank" collections and instead using template slices parented directly to the menu slice collection. Oh... I didn't check in template slices yet either? Well, it's basically just another Slice bit which works very similarly to Slice.Visible. Well, after planks are gone maybe plank menus should be renamed... I have a suggestion: Menu Slices. As in, promote them to a new slice type so that they can be used by scripts too, not just from FB. I have a long writeup about this which I haven't finished yet...<br></div></div></div></div>