Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 832
  • Last Modified:

Using simple popup menu..

i have a menu as follows:
   m_category
      &Delete
      &Insert

I wanna using this menu as popup in my datawindow(dw_category1) which is in a tab object (tab_category.tab_page1)

following is my code in rbuttondown event of tab_category.tab_page1.dw_category1:
m_category.popmenu(PointerX(), PointerY())

following is the error message:
Null object reference in rbuttondown event of object dw_category1
0
peterdevadoss
Asked:
peterdevadoss
1 Solution
 
hinkCommented:
Declare an instance variable
m_category mymenu

In window open script (or treeview create script):
mymenu=create m_category

On rbuttondown will work fine your code:
mymenu.popmenu(PointerX(), PointerY())

A comment:
I usually create menu object level variables, that I set before, f.e.:
treeview tv

On rbuttondown You can write this:
mymenu.tv=this
mymenu.popmenu(PointerX(), PointerY())
0
 
peterdevadossAuthor Commented:
thank you.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now