xsi = Application
ad = xsi.Desktop.ActiveLayout
for N in ad.Views:
if N.Type == "Menu Window":
print N.GetAttributeValue("metadata")
This will return the name of the Menu Window...don't ask how I found that,
pure luck.
I now realize even getting the name won't be enough to know it's part of my
menu. If someone tears off a sub-menu for instance, the name will not be
the same name as the original Menu name.
-tony
On Mon, Jul 8, 2013 at 5:29 PM, Tony Barbieri <[email protected]> wrote:
> Thanks Luc-Eric.
>
> I am able to find the torn off menu but I'm trying to find the right one.
> Using this:
>
> xsi = Application
> ad = xsi.Desktop.ActiveLayout
> for N in ad.Views:
> print N.Name
>
> prints Menu Window. Is there a way to find the title of the torn off Menu
> Window so I can be sure it's the right one I want to close?'
>
> -tony
>
>
> On Mon, Jul 8, 2013 at 4:51 PM, Luc-Eric Rousseau <[email protected]>wrote:
>
>> I think you should be able to find the tear off menu view by searching
>> for the floating window on the desktop, and then close that.
>> doesn't it apear in the Window menu?
>>
>> On Mon, Jul 8, 2013 at 4:40 PM, Tony Barbieri <[email protected]> wrote:
>> > Thanks for the reply, Brad!!
>> >
>> > Wasn't sure if you had messed with that...bummer...
>> >
>> > -tony
>> >
>> >
>> > On Mon, Jul 8, 2013 at 4:37 PM, Bradley Gabe <[email protected]>
>> wrote:
>> >>
>> >> Hi Tony-
>> >>
>> >> I remember looking into that issue and coming up empty handed. I don't
>> >> think the SDK provides any handles for menu windows, or at least it
>> didn't
>> >> in the versions we were using.
>> >>
>> >> -B
>> >>
>> >> Sent from my iPhone
>> >>
>> >> On Jul 8, 2013, at 3:08 PM, Tony Barbieri <[email protected]> wrote:
>> >>
>> >> > Hello!
>> >> >
>> >> > I am working on a project that is dynamically rebuilding menus with
>> >> > different entries. The menu building is all functioning
>> correctly...unless
>> >> > a torn off menu exists. The non-torn off menu is updated correctly,
>> but the
>> >> > torn off menu becomes orphaned because the old callbacks no longer
>> exist in
>> >> > memory.
>> >> >
>> >> > Ideally (and I know this is a long shot) we would rebuild the torn
>> off
>> >> > menu. If that is not possible then I would just like to close any
>> torn off
>> >> > menus to limit confusion as to why pressing a menu item no longer
>> does
>> >> > anything.
>> >> >
>> >> > Are either of these solutions currently possible?
>> >> >
>> >> > Thanks much!
>> >> >
>> >> > --
>> >> > -tony
>> >>
>> >
>> >
>> >
>> > --
>> > -tony
>>
>
>
>
> --
> -tony
>
--
-tony