PDA

View Full Version : readding popupmenu and items not working


butCherHeLL
07-16-2005, 01:55 PM
with CODE_BLOCK_2 I am addind a popupmenu and its items to listbox....
with CODE_BLOCK_1 I am deleting these popups.....

if I reexecute CODE_BLOCK_2 to readd same popups.... it does not adds same popups or anything...


look.... !
print $PMenuof_tslTargetNodes;

with this line shows me

popupMenu40
popupMenu41
popupMenu40
popupMenu41
popupMenu42
popupMenu43
popupMenu44
popupMenu45


so this means -dai parameters not frees(removing from memory) this objects ?
or only detaches them ?
so if it delete the popupmenu;why it is not giving same name,and should print something like this:

popupMenu40
popupMenu40
popupMenu40
popupMenu40
..










//CODE_BLOCK_1
//--TO DELETE POPUPMENUS WHICH ATTACHED TO LIST BIX------------------------

string $PMenuof_tslTargetNodes[]=`textScrollList -q -popupMenuArray tslTargetNodes`;
print $PMenuof_tslTargetNodes;
popupMenu -e -dai $PMenuof_tslTargetNodes;
//-------------------------------------------------------------------------


//CODE_BLOCK_2
//-- TO APPEND A SPESIFIC POPUPMENU----------------------------------------

$pmRB_CamerazTList1=`popupMenu -p tslTargetNodes`;
$pmRB_CamerazTList1_1=`menuItem -l "Look through"`;
menuItem -l "Toggle ResGate";
menuItem -l "Open AE";
menuItem -l "rename";
menuItem -l "add bookmark";
//-------------------------------------------------------------------------

butCherHeLL
07-16-2005, 04:19 PM
I am asking...
I am answering... http://img350.imageshack.us/img350/4688/iconmad2kq.gif


global proc deltslTargetNodeMenus()
{
string $PMenuof_tslTargetNodes[]=`textScrollList -q -popupMenuArray tslTargetNodes`;
if(`popupMenu -exists $PMenuof_tslTargetNodes[0]`)
deleteUI $PMenuof_tslTargetNodes;
}

CGTalk Moderation
07-16-2005, 04:19 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.