Thanks Haykel,

The issue was in window which was causing the new pop up window to open.

It had something like 

public function openWin_fn(eventObj:*):void
            {
...................
                    outcome_win = PopUpManager.createPopUp(this, my_new_win, 
true) as my_newlycreated_win;

              ...........................
  
            }

At the line which is highlighted in bold, I needed a "parentWindowOpener" 
instead of a "this"pointerwhich was causing the issue. The line should be 
outcome_win = PopUpManager.createPopUp(parentWindowOpener, my_new_win, true) as 
my_newlycreated_win;

I don't recall why I changed the parentWindowOpener to this and am more 
surprised that my original source file had the "this" pointer which is why I 
could not trace it earlier. 


Such subtleties of Flex are what I need to know in detail. 

Thanks for your help.







________________________________
From: Haykel BEN JEMIA <[email protected]>
To: [email protected]
Sent: Wed, August 25, 2010 3:30:42 AM
Subject: Re: [flexcoders] window resizing issues

  
The createPopUp call looks suspicious to me, normally you should pass a class 
name as a second argument.
Haykel.
Le 2010 8 24 23:35, "h_chris_87" <[email protected]> a écrit :
> I have window W1 which has a Vertical Box which in turn has a Datagrid
> and one of those DataGrid columns of the Datagrid has a Horizontal Box
> which has a button icon. The MXML is somewhat like
> 
> <mx:VBox width="100%" paddingBottom="10" paddingLeft="10"
> paddingRight="10" paddingTop="10" styleName="formSection">
>              <mx:DataGrid id="my_grid" dataProvider="{my_grid_dp}"
> headerHeight="0" width="100%"
>                  allowMultipleSelection="true"
> change="remove_value.enabled = expected_result_grid.selectedItems.length
>> 0;" rowCount="3">
>                  <mx:columns>
>                      <mx:DataGridColumn headerText="Column 1"
> dataField="expected_result" wordWrap="true" />
> 
>                      <mx:DataGridColumn headerText="Column 2"
> dataField="expected_result" width="45" >
>                          <mx:itemRenderer>
>                              <mx:Component>
>                                  <mx:HBox horizontalAlign="center">
>                                      <mx:Button
> icon="@Embed('../assets/img/edit.png')" toolTip="View" buttonMode="true"
> click="outerDocument.openmyWin_fn('update')"/>
>                                  </mx:HBox>
>                              </mx:Component>
>                          </mx:itemRenderer>
>                      </mx:DataGridColumn>
> 
>                  </mx:columns>
>              </mx:DataGrid>
> 
>          </mx:VBox>
> 
> When the button icon is clicked(which is noted in bold above), another
> new window W2 is opened using the below function
> 
> public function openmyWin_fn(eventObj:*):void
>              {
>                  //Keeps multiple windows from being opened
>                  if(result_win == null){
>                      result_win = PopUpManager.createPopUp(this,
> result_win, true) as result_win;
>                  }
> 
>                  //Passes the parent object to the popup window
>                  result_win.openingParentWindow = this;
> 
>                  //Set the mode (Add or Update) in which the form should
> operate
>                 result_win.form_mode = eventObj;
> 
>              }
> 
> I tried to add a TextInput in the above MXML in Window W1's source which
> led to the window W2 opening in the rightmost part of browser window
> without a scroll bar instead of appearing with a scroll bar in the
> center of browser window. W2 should be appearing as overlapping W1, not
> adjacent to it.
> 
> I commented the TextInput I added, even removed it, still the
> issue(window W2 opening in the rightmost part of browser window without
> a scroll bar) persists.
> 
> I once faced this problem where inadvertently a height value was added
> to the whole W2 window. After I removed it, the window W2 was fine. This
> time I am comparing the source files before I added the TextInput
> control and after I removed it(when the window W2 was not displaying in
> the proper place) and the source files are identical.
> 
> Window W2 was having scrollbars before I tried to add the TextInput MXML
> control. It was also centering in the application before I tried to add
> the TextInput MXML control.
> 
> Where could I be erring to cause the W2 to appear in the rightmost part
> of browser? I don't understand what is causing it to happen if the
> source files are identical?
> 
> Any suggestions would be appreciated.
> 
> 

 


      

Reply via email to