[flexcoders] Using GWT Javascript from ExternalInterface

2008-11-26 Thread lynnkuh
Has anyone done that or can point me to some examples? I have some
ugly looking Javascript created from GWT that I was given I need to
call in Flex or use in Flex. I have already posted in a GWT forum. 

Thanks,
Lynn



[flexcoders] Re: Using an IFrame in an MDIWindow

2008-11-06 Thread lynnkuh
Brendan, I see what you mean now. No, I don't have that. Do I need to
update the display list and get the width and height and of the
MDIWindow? Something else?

Thanks,
Lynn

--- In flexcoders@yahoogroups.com, lynnkuh [EMAIL PROTECTED] wrote:

 I also have an IFrame.js class I call in the index.template.html file
 and here's the code for the ExternalInterface:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml;
  resize=callLater(moveIFrame)
 move=callLater(moveIFrame)
  
 mx:Script
 ![CDATA[
 
 import flash.external.ExternalInterface;
 import flash.geom.Point;
 import flash.net.navigateToURL;
 
 private var __source: String;
 
 private function moveIFrame(): void {
 
 var localPt:Point = new Point(10, 10);
 var globalPt:Point = this.localToGlobal(localPt);
 ExternalInterface.call(moveIFrame, globalPt.x,
 globalPt.y, this.width, this.height);
 }
 
 public function set source(source: String): void {
 if (source) {
 
// if (! ExternalInterface.available)
// {
// // TODO: determine if this Error is actually
 needed.  The debugger 
// // build gives the error below.  Assuming that this
 error will not show
// // up in the release build but haven't checked.
// throw new Error(The ExternalInterface is not
 available in this container. Internet Explorer ActiveX, Firefox,
 Mozilla 1.7.5 and greater, or other browsers that support NPRuntime
 are required.);
// }
 __source = source;
 ExternalInterface.call(loadIFrame, source);
  
 }
 }
 
 public function get source(): String {
 return __source;
 }
 
 override public function set visible(visible: Boolean): void {
 super.visible=visible;
 if (visible)
 {
 ExternalInterface.call(showIFrame);
 }
 else
 {
 ExternalInterface.call(hideIFrame);
 }
 }
 
 ]]
 /mx:Script
 
 /mx:Canvas
 
 
 --- In flexcoders@yahoogroups.com, Brendan Meutzner bmeutzner@
 wrote:
 
  Lynn,
  Do you have the proper hooks setup in the external browser window to
 update
  the iFrame position via JavaScript when you move the MDIWindow
instance?
  
  I haven't setup an IFrame within MDI, but have in the past used
 Panel popups
  to do this (which is basically the same thing), and the tricky
part was
  using ExternalInterface to update the IFrame content position
 getting loaded
  by the browser.
  
  
  Brendan
  
  
  
  On Mon, Nov 3, 2008 at 3:35 PM, lynnkuh lynnk@ wrote:
  
 Has anyone gotten this work? If so, how did you do it? It doesn't
   position the IFrame in the correct place and when I move the IFrame,
   the window doesn't move with it. I also tried using URLRequest but
   that pops up a browser window only - it will not add it to the stage
   or addChild() for either IFrame or URLRequest. Am thinking maybe I
   should modify the updateDisplayList method in
 MDIWindowControlsContainer?
  
   Thanks,
   Lynn
  

  
  
  
  
  -- 
  Brendan Meutzner
  http://www.meutzner.com/blog/
 





[flexcoders] Re: IFrame: open new browser window from

2008-11-06 Thread lynnkuh
Can't an ExternalInterface be used to do that? I know there are
examples of some on different websites.

Lynn

--- In flexcoders@yahoogroups.com, markgoldin_2000
[EMAIL PROTECTED] wrote:

 Well, I have run it in different browsers. Same.
 But just now I have published it to a web site and it is actually 
 working. Having it not working from the Builder is not a big of a 
 deal. I should have removed my cry baby message :)
 
 --- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiverton@ 
 wrote:
 
  On Wednesday 05 Nov 2008, markgoldin_2000 wrote:
   Can someone help, please?
  
  What debugging have you done so far ?
  
  -- 
  Tom Chiverton
  Helping to advantageously orchestrate customized fine-grained 
 corporate 
  networks
  
  
  
  
  
  This email is sent for and on behalf of Halliwells LLP.
  
  Halliwells LLP is a limited liability partnership registered in 
 England and Wales under registered number OC307980 whose registered 
 office address is at Halliwells LLP, 3 Hardman Square, 
 Spinningfields, Manchester, M3 3EB.  A list of members is available 
 for inspection at the registered office. Any reference to a partner 
 in relation to Halliwells LLP means a member of Halliwells LLP.  
 Regulated by The Solicitors Regulation Authority.
  
  CONFIDENTIALITY
  
  This email is intended only for the use of the addressee named 
 above and may be confidential or legally privileged.  If you are not 
 the addressee you must not read it and must not use any information 
 contained in nor copy it nor inform any person other than Halliwells 
 LLP or the addressee of its existence or contents.  If you have 
 received this email in error please delete it and notify Halliwells 
 LLP IT Department on 0870 365 2500.
  
  For more information about Halliwells LLP visit www.halliwells.com.
 





[flexcoders] Re: Using an IFrame in an MDIWindow

2008-11-04 Thread lynnkuh
I also have an IFrame.js class I call in the index.template.html file
and here's the code for the ExternalInterface:

?xml version=1.0 encoding=utf-8?
mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml;
   resize=callLater(moveIFrame)
move=callLater(moveIFrame)
   
mx:Script
![CDATA[

import flash.external.ExternalInterface;
import flash.geom.Point;
import flash.net.navigateToURL;

private var __source: String;

private function moveIFrame(): void {

var localPt:Point = new Point(10, 10);
var globalPt:Point = this.localToGlobal(localPt);
ExternalInterface.call(moveIFrame, globalPt.x,
globalPt.y, this.width, this.height);
}

public function set source(source: String): void {
if (source) {

   // if (! ExternalInterface.available)
   // {
   //   // TODO: determine if this Error is actually
needed.  The debugger 
   //   // build gives the error below.  Assuming that this
error will not show
   //   // up in the release build but haven't checked.
   // throw new Error(The ExternalInterface is not
available in this container. Internet Explorer ActiveX, Firefox,
Mozilla 1.7.5 and greater, or other browsers that support NPRuntime
are required.);
   // }
__source = source;
ExternalInterface.call(loadIFrame, source);
 
}
}

public function get source(): String {
return __source;
}

override public function set visible(visible: Boolean): void {
super.visible=visible;
if (visible)
{
ExternalInterface.call(showIFrame);
}
else
{
ExternalInterface.call(hideIFrame);
}
}

]]
/mx:Script

/mx:Canvas


--- In flexcoders@yahoogroups.com, Brendan Meutzner [EMAIL PROTECTED]
wrote:

 Lynn,
 Do you have the proper hooks setup in the external browser window to
update
 the iFrame position via JavaScript when you move the MDIWindow instance?
 
 I haven't setup an IFrame within MDI, but have in the past used
Panel popups
 to do this (which is basically the same thing), and the tricky part was
 using ExternalInterface to update the IFrame content position
getting loaded
 by the browser.
 
 
 Brendan
 
 
 
 On Mon, Nov 3, 2008 at 3:35 PM, lynnkuh [EMAIL PROTECTED] wrote:
 
Has anyone gotten this work? If so, how did you do it? It doesn't
  position the IFrame in the correct place and when I move the IFrame,
  the window doesn't move with it. I also tried using URLRequest but
  that pops up a browser window only - it will not add it to the stage
  or addChild() for either IFrame or URLRequest. Am thinking maybe I
  should modify the updateDisplayList method in
MDIWindowControlsContainer?
 
  Thanks,
  Lynn
 
   
 
 
 
 
 -- 
 Brendan Meutzner
 http://www.meutzner.com/blog/





[flexcoders] Using an IFrame in an MDIWindow

2008-11-03 Thread lynnkuh
Has anyone gotten this work? If so, how did you do it? It doesn't
position the IFrame in the correct place and when I move the IFrame,
the window doesn't move with it. I also tried using URLRequest but
that pops up a browser window only - it will not add it to the stage
or addChild() for either IFrame or URLRequest. Am thinking maybe I
should modify the updateDisplayList method in MDIWindowControlsContainer?

Thanks,
Lynn



[flexcoders] Getting a the supplied DisplayObject must be a child of the caller error

2008-09-03 Thread lynnkuh
I'm using the Flex MDI Explorer and instead of using 

flexmdi:MDICanvas id=mdiCanvas horizontalScrollPolicy=off
verticalScrollPolicy=off
width=100% height=100% backgroundColor=#FF
backgroundAlpha=0
flexmdi:MDIWindow id=win1
title=Window 1 has a really really long title 
to show support for
truncation
x=30 y=30 width=400 height=200 /
flexmdi:MDIWindow id=win2
title=Window 2
x=450 y=30 width=250 height=300
ns:SampleContent id=sample height=100% 
width=100% /
/flexmdi:MDIWindow
/flexmdi:MDICanvas

I created an actionscript variable mdiCanvas. I'm getting the error
when I try and minimize the window, close the window, or make it full
size after calling the addWindow function. Here's my addWindow function:

private function addWindow():void
{
var win:MDIWindow = new MDIWindow();
win.width = 350;
win.title = Window  +
String(mdiCanvas.windowManager.windowList.length + 1);
mdiCanvas.windowManager.add(win);
win.addChild(new SampleContent());
addChild(win);
}

How can I get the windows to work? I don't want the MXML windows open
when I first start the application which is the default. 



[flexcoders] FlexMDI Window help wanted

2008-08-28 Thread lynnkuh
I'm trying to create new windows using the addWindow function but I'm
not using the mdiCanvas instance created with MXML. The window is
created but it seems to be fixed at a particular x coordinate but can
move horizontally and resize. I can add another window but it puts it
underneath the first window and I can't move it from that location.
Can anyone please let me know what I need to add to fix it? It doesn't
matter whether I have the views added or not. Here's the code:

private function addWindow():void
{   

var mdiCan:MDICanvas = new MDICanvas();
mdiCan.percentHeight = 100;
mdiCan.percentWidth = 100;
mdiCan.horizontalScrollPolicy = off;
mdiCan.verticalScrollPolicy = off;
var win:MDIWindow = new MDIWindow();
win.width = 650;
win.height= 700;
win.title = Window + 
String(mdiCan.windowManager.windowList.length
+ 1);
win.x= 50;
win.y = 100;
win.addChild(new RSTView());
win.addChild(new DataGridView());
win.addChild(new SliderSearchView());
mdiCan.windowManager.add(win);
addChild(mdiCan);

}