Opened 10 years ago

#2027 new Defect

Which item is the contextual menu built from?

Reported by: Draft Owned by: timothy
Component: Colloquy (Mac) Version: 2.3 (Mac)
Severity: Normal Keywords:


I am looking to create a contextual menu item that knows the user that the contextual menu was attached to. So, if I were to right click on a user as part of a room and select this menu item, I could do something with the user name.

After playing with this, I can't seem to find where the contextual menu was created:

on build contextual menu for item the_item
	return {"Print User Name"}
end build contextual menu for item

on handle clicked contextual menu item the_item for the_user
	if (the_item as string) is equal to "Print User Name" then
		tell active panel of front window
			(* this does not work *)
			add event message (the_user as string) with name "contextual menu item"
		end tell
	end if
end handle clicked contextual menu item

Any help here would be greatly appreciated.

Change History (0)

Note: See TracTickets for help on using tickets.