[Ohrrpgce] SVN: james/9958 load_plank_from_file() helper function

Ralph Versteegen teeemcee at gmail.com
Fri Jan 12 08:04:31 PST 2018


On 12 January 2018 at 13:00, <subversion at hamsterrepublic.com> wrote:

> james
> 2018-01-11 16:00:45 -0800 (Thu, 11 Jan 2018)
> 38
> load_plank_from_file() helper function
> ---
> U   wip/plankmenu.bas
> U   wip/plankmenu.bi
>

+ DIM col as Slice Ptr
+ col = NewSliceOfType(slSpecial)
+ SliceLoadFromFile col, filename
+ IF col = 0 THEN visible_debug "load_plank_from_file: unable to load
slices from """ & filename & """": RETURN 0

This doesn't work:  if SliceLoadFromFile fails, it doesn't delete col.

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.

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...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20180113/5372a503/attachment.html>


More information about the Ohrrpgce mailing list