Toadwart
June 28th, 2007, 09:04
Trying to figure out how to to locate the windowinstance for a panel using the Interface.findWindow function.
Have a panel like so:
<panel name="shortcuts" modes="host">
<class>shortcuts_dm</class>
<bounds>
<anchored>
<left>
<anchor>left</anchor>
<offset>370</offset>
</left>
<top>
<anchor>top</anchor>
<offset>90</offset>
</top>
<bottom>
<anchor>bottom</anchor>
<offset>30</offset>
</bottom>
<size>
<width>67</width>
</size>
</anchored>
</bounds>
</panel>
with class definition:
<windowclass name="shortcuts_dm">
<sizelimits>
<maximum>
<height>1000</height>
</maximum>
</sizelimits>
<sheetdata>
<windowreferencecontrol>
<icon>
<normal>DesktopIconCharacters</normal>
<pressed>DesktopIconCharactersDown</pressed>
</icon>
<bounds>20,0,47,27</bounds>
<class>charactersheetlist</class>
<recordname>charsheet</recordname>
<tooltip>
<text>Characters</text>
</tooltip>
<nodrag />
<closetoggle />
</windowreferencecontrol>
...
</windowclass>
I'd like to find that panel in order to disable the windowreferencecontrol but findWindow doesn't seem to be locating it.
I though this would work since the panel class has no database node but it just gives an "invalid parameters passed to findWindow" error:
Interface.findWindow("shortcuts_dm"), nil);
Also tried:
Interface.findWindow("shortcuts_dm"), "");
and
Interface.findWindow("shortcuts_dm"), "nil");
both of which return nil
Anyone know how to do this?
Have a panel like so:
<panel name="shortcuts" modes="host">
<class>shortcuts_dm</class>
<bounds>
<anchored>
<left>
<anchor>left</anchor>
<offset>370</offset>
</left>
<top>
<anchor>top</anchor>
<offset>90</offset>
</top>
<bottom>
<anchor>bottom</anchor>
<offset>30</offset>
</bottom>
<size>
<width>67</width>
</size>
</anchored>
</bounds>
</panel>
with class definition:
<windowclass name="shortcuts_dm">
<sizelimits>
<maximum>
<height>1000</height>
</maximum>
</sizelimits>
<sheetdata>
<windowreferencecontrol>
<icon>
<normal>DesktopIconCharacters</normal>
<pressed>DesktopIconCharactersDown</pressed>
</icon>
<bounds>20,0,47,27</bounds>
<class>charactersheetlist</class>
<recordname>charsheet</recordname>
<tooltip>
<text>Characters</text>
</tooltip>
<nodrag />
<closetoggle />
</windowreferencecontrol>
...
</windowclass>
I'd like to find that panel in order to disable the windowreferencecontrol but findWindow doesn't seem to be locating it.
I though this would work since the panel class has no database node but it just gives an "invalid parameters passed to findWindow" error:
Interface.findWindow("shortcuts_dm"), nil);
Also tried:
Interface.findWindow("shortcuts_dm"), "");
and
Interface.findWindow("shortcuts_dm"), "nil");
both of which return nil
Anyone know how to do this?