Re: Don Cole's Niffty Progress Bar Uploaded

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

don cole wrote:
> 
> Hello Rad,
> 
> E=mailed you a couple of times and got no response.
> 
> This doesen't make sense to me.
> 
>  session_menu = {}
>  for i=1 to length(session_menu) do
>  
>  What are you trying to check the progress of?
> 
> Don Cole

Hi Don,

Sorry for the late reply, as there was a 12 hr. power shutdown in our area.

for i = 1 to length(session_menu) do
		childID = getMenuID(session_menu[i][1])
		void = destroyMenu(session_menu[i][2])
		destroy(childID)
		refreshWindow(WinId)
	end for
	allMenus = {{},{}}
	session_menu = {}


I added this loop to remove the previously built menu items.
If you do not use this loop, the you get multiple menu items in menu bar.

I had this problem of multiple menu items getting generated and that's why this
loop came into place, and hence the project name. The scenario is like this-

1] Application starts.
2] User is provided with log-in screen.
3] User can provide user-id / password to login or he can quit application. 3]
Main Application window is shown where Menu is built for the user as per
   his access rights to various options in the application.
4] User does his work and when he logs out, he is taken back to step 2.

Now without exiting the system, if the user logs in again with same or different
user name, the previous menu is still attached to Main Application window.

Just comment out this loop and see what happens -
1] start MenuDestroy
2] open window2 (first login)
3] close window2
4] again open window2 (equivalent to second login)

So I am destroying the Menu items *if present* (first time it won't do
anything), but I am not tracking it as there is no need.

Regards,
Rad.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu