Win32Lib question

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi all!

I'm having a problem in Win32Lib.  What I'd like to do is create a set of
dynamic menu items (by dynamic I mean that menu items will be created and
destroyed many times in the course of a program).  So far I haven't had any
luck destroying menu items.  deleteObject() and closeWindow() don't seem to
work.  Is there some other way to destroy an object (perhaps using
sendmessage or something similar)?

Here is some sample code to help demonstrate my reasoning:

global sequence ViewMenuItems     -- a sequence of integers generated by
                                  -- the Win32Lib create() function

sequence LOTTATTM                  -- a list of things I want to add to
                                  -- a Menu

ViewMenuItems = {}
LOTTATTM = {}

...

procedure build_menu_items()

  -- first destroy the current list of Menu Items
  for i = 1 to length(ViewMenuItems) do
    destroyObject(ViewMenuItems[i])  -- THIS DOESN'T WORK! HELP PLEASE!!!
  end for

  ViewMenuList = {}

  -- now build a new list
  for i = 1 to length(LOTTATTM) do
    ViewMenuList = append(ViewMenuList,
      create(MenuItem,sprintf("%s",i+48) & " " & LOTTATTM,0,0,0,0,0))
  end for
end procedure

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu