[flexcoders] Hide columns from a datagrid

2008-10-21 Thread guillaumeracine
I have a datagrid in a mxml file that contains some hard coded
mx:column objects.
I want to hide the mx:columns that does not contains any value for all
objects in the dataprovider...
I should subclass a column renderer class or something like that i think

Ex:
collection of employee : {id,name,job}
Datagrid's dataprovider : {1,jo,},{2,jo2,}
In this case no record have a job value so the mx:column job should
be hided...
Any idea?



[flexcoders] Re: Hide columns from a datagrid

2008-10-21 Thread guillaumeracine
Hehehe yes but this is the context of my application...
I have to convert an existing catalog of products in flex and 
The database is built like this :

Table : product (this is generic)
  -property1
  -property2
  -property3

The product X may have property3 but not product Y.
This is why i must do that (hide columns)




[flexcoders] Display problem with repeater

2008-10-02 Thread guillaumeracine
Hi guys,

I have a problem with a repeater component...

Context :
I developped a product viewer for a client.
I have a menu of product's sections on the left and when we click on a
section
a call to my backend is made to feed my repeater component wich render
properly
the products associated with the selected section.

Problem :
My main problem is that on some sections, the last product shown (in
the repeater) is displayed in half...i really don't get it...try it at
this temp url :

http://chidacaprague.4java.ca/quincaillerie.jsp
Click on Section A / Pinceaux / 

By the way : This is normal that you don't see the product's images



[flexcoders] How to call Air from Javascript?

2008-09-14 Thread guillaumeracine
I know how to call flex from javascript but in air it is a different
scenario...

I just found the following hint on a blog:

in Air:
myHtmlcontrol.useApplicationDomain = ApplicationDomain.currentDomain;

In javascript (embeded in myHtmlControl):
runtime.mx.core.Application.application.myASFunction();

Actually the useApplicationDomain property does not exists for the
mx:HTML object and doing alert(runtime) in javascript throws an error...

Help!!!



[flexcoders] Re: How is this done?

2008-09-11 Thread guillaumeracine
I don't think the previous answers helped you much.

If you want to dynamically increase your HTML div, you must use the
ExternalInterface object.

In the HTML side :
script language=JavaScript type=text/javascript
function myJavascriptResizeFunction(height) {
document.getElementById(myDiv).style.height = 
parseInt(height)+px;
}
/script

In the FLEX side :

private function resizeApp():void{
  if (ExternalInterface.available) {
  try{
var myErr:Object =
ExternalInterface.call(myJavascriptResizeFunction, this.height);
  }
  catch(myErr:Error){
Alert.show(exception :  + myErr.toString());
  }

  }
}

Note that your swf is inside the div tag with id myDiv.


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

 I saw a fiew flash sites that act as normal HTML/CSS sites. By that i 
 meen they resize the browser window acording to the content in flash, 
 so if you click a link in a site and new content is much bigger then 
 the old one, the flash SWF width and height changes and browser adopts.
 
 Can anyone here explain how is that done?
 
 Thank you in advanced.





[flexcoders] Signing Air application!?

2008-09-07 Thread guillaumeracine
Hi i built an application that i want to use but i don't know how to
sign it ... it seems i must provide a valid certificate but i dont
want to pay for it since its not a commercial app...

Is there a workaround?



[flexcoders] Re: Deploy Flex Application

2008-09-03 Thread guillaumeracine
I got your error the first time i wanted to put my flex app in prod...

I changed my service-config.xml correctly but i needed to do another
thing :
You have to change project options in the Eclipse IDE...the project
was compiled with my localhost as server url...
Change it, rebuild and drop it on the prod server and all should be
fine...

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

 I tried the mapping and the site is already in the root.  So the
 mapping did not work either.  I have even tried hard coding the
 context root into the services-config.xml where it is setting the path
 for the flex2gateway and it is still trying to use
 http://mysite.com/flex2gateway instead of the
 http://mysite.com/mysite/flex2gateway.  GRRR!  I am really at a loss
 as to what else to try with this.
 
 
 --- In flexcoders@yahoogroups.com, Sherif Abdou flex@ wrote:
 
  I Guess maybe then you can try mappings, Try doing /mysite for
 Logical Path and for Directory Path  give the path where mysite is
 stored so C:\etc..? If that does not work then Try putting all your
 files in root and Test out then we will move from there.
  --
  Sherif Abdou
  http://VadexFX.com
  http://Sherifabdou.com
- Original Message - 
From: beczimm 
To: flexcoders@yahoogroups.com 
Sent: Wednesday, September 03, 2008 12:22 PM
Subject: [flexcoders] Re: Deploy Flex Application
  
  
If I use the URL that the flex error is giving me that flex is
trying
to use to access the flex2gateway I get a Not Found error from the
browser. But as soon as I try the URL that the flex error has along
with the context path that is supposed to be there then I get the
blank page which is good. I just am not sure how to make flex
use the
context path in the URL. For example the URL flex is trying to
use is
http://mysite.com/flex2gateway but it needs to be using
http://mysite.com/mysite/flex2gateway. Does that make sense to
anyone?
  
--- In flexcoders@yahoogroups.com, Sherif Abdou flex@ wrote:

 Actually, That problem is a pain. Everytime it happens I write the
solution down and forget about it. First thing you need to try is go
to http://yoursite.com/flex2gateway If you don't get a blank
page then
something is wrong with your configuration. I am assuming you are
using ColdFusion. Next Thing you need to do is go in the ColdFusion
Administrator and do Mappings to where your Folder is. I'll try to
find the solution on my computer. 
 --
 Sherif Abdou
 http://VadexFX.com
 http://Sherifabdou.com
 - Original Message - 
 From: nathanpdaniel 
 To: flexcoders@yahoogroups.com 
 Sent: Wednesday, September 03, 2008 10:16 AM
 Subject: [flexcoders] Re: Deploy Flex Application
 
 
 I have no clue what you can do to actually fix the issue - but I
 can 
 suggest doing the following:
 Put the debug version of the swf on your server. Then change your 
 debug options to run at - http://yoursite.com (the web page
serving 
 your swf) - rather than C:\Documents\pathto.swf - or whatever the 
 default is. It will be able to get you directly to the source of
 your 
 issue. I developed with Flex for 2 years before I ever figured
that 
 one out! :D (that one being I can debug remote swf files).
 
 Hope this helps a little!
 -Nathan
 
 --- In flexcoders@yahoogroups.com, beczimm beczimm@ wrote:
 
  So it is my first time of trying to deploy my flex app from
localhost
  to an actual server. I know the process is supposed to be fairly
  simple in that you need to copy the swf and any other related
 files,
  etc. However, I get an error when I try to access the
application
  from the server.[RPC Fault faultString=Send failed
  faultCode=Client.Error.MessageSend
  faultDetail=Channel.Connect.Failed error
 NetConnection.Call.Failed:
  HTTP: Failed: 
  
  Now I have figured out that the problem is probably happening
because
  it can not find the flex2gateway directory. The directory is
there
  but the URL it is trying to use is incorrect, it seems to be
 missing
  the context root of the server, which has been specified. Does
anyone
  have any ideas on how to fix this?
 

 





[flexcoders] Re: Custom event not dispatching as expected

2008-09-02 Thread guillaumeracine
Thank you problem solved!

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

 this.addEventListener means you're listening on the application, not
 on modelLocator. Unless the event bubbles, this will not work. Either
 make the event bubble or listen on modelLocator.
 
 HTH,
 Ben
 
 
 --- In flexcoders@yahoogroups.com, guillaumeracine
 guillaume.racine@ wrote:
 
  I did a sample app to test a custom event.
  I have a class named ModelLocator that extends EventDispatcher.
  This class dispatch an event of type TreeDataLoadedEvent.
  The main application listen to it but it seems that it never catch the
  TreeDataLoadedEvent object that is dispatched.
  Is it because the modelLocator object is not a child of the
application?
  
  If so how to get this thing done...
  
  mx:Application
  xmlns:mx=http://www.adobe.com/2006/mxml;
  layout=absolute
  creationComplete=creationCompletedHandler(event);
  
  mx:Script
  ![CDATA[
  import events.TreeDataLoadedEvent;
  import model.ModelLocator;
  import mx.controls.Alert;
  
  public var modelLocator:ModelLocator = 
  ModelLocator.getInstance();
  
  private function btnClicked(evt:Event):void{
  modelLocator.dispatchEvent( new 
  TreeDataLoadedEvent() );
  }
  
  private function eventReceived(evt:Event):void{
  Alert.show(Event received!); //This is not 
  shown
  }
  
  private function 
  creationCompletedHandler(evt:Event):void{
  this.addEventListener( 
  TreeDataLoadedEvent.LOAD_COMPLETED_EVENT,
  eventReceived );
  }
  ]]
  /mx:Script
  
  mx:Button id=btn x=209 y=299 label=Button
  click=btnClicked(event);/
  
  /mx:Application
 





[flexcoders] Event not bubbling as expected

2008-09-01 Thread guillaumeracine
I made a custom event called TreeDataLoadedEvent.
In my Application.mxml, i add a listener to this event in the
creationComplete phase.
The TreeDataLoadedEvent is dispatched by a custom class named
ModelLocator that extends EventDispatcher.
The ModelLocator class is instanced in Application.mxml.

It seems that Application.mxml does not receive the event at all...
I wonder if it is because ModelLocator is not directly a child of the
main application...?

How i can dispatch an event to the application that is not a child of
type DisplayObject?

Code :

mx:Application
 xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute
 creationComplete=creationCompletedHandler(event);

 mx:Script
 ![CDATA[
 import events.TreeDataLoadedEvent;
 import model.ModelLocator;
 import mx.controls.Alert;

 public var modelLocator:ModelLocator =
ModelLocator.getInstance();

 private function creationCompletedHandler(evt:Event):void{
 this.addEventListener(
TreeDataLoadedEvent.LOAD_COMPLETED_EVENT, eventReceived );
 }

 private function btnClicked(evt:Event):void{
 modelLocator.dispatchEvent( new TreeDataLoadedEvent()
);// In the constructor i call super(goodType,true)
 }

 private function eventReceived(evt:Event):void{
 Alert.show(Event received!);  //this is never shown
 }

 ]]
 /mx:Script

 mx:Button id=btn x=209 y=299 label=Button
click=btnClicked(event);/

/mx:Application


[flexcoders] Custom event not dispatching as expected

2008-09-01 Thread guillaumeracine
I did a sample app to test a custom event.
I have a class named ModelLocator that extends EventDispatcher.
This class dispatch an event of type TreeDataLoadedEvent.
The main application listen to it but it seems that it never catch the
TreeDataLoadedEvent object that is dispatched.
Is it because the modelLocator object is not a child of the application?

If so how to get this thing done...

mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
creationComplete=creationCompletedHandler(event);

mx:Script
![CDATA[
import events.TreeDataLoadedEvent;
import model.ModelLocator;
import mx.controls.Alert;

public var modelLocator:ModelLocator = 
ModelLocator.getInstance();

private function btnClicked(evt:Event):void{
modelLocator.dispatchEvent( new 
TreeDataLoadedEvent() );
}

private function eventReceived(evt:Event):void{
Alert.show(Event received!); //This is not 
shown
}

private function 
creationCompletedHandler(evt:Event):void{
this.addEventListener( 
TreeDataLoadedEvent.LOAD_COMPLETED_EVENT,
eventReceived );
}
]]
/mx:Script

mx:Button id=btn x=209 y=299 label=Button
click=btnClicked(event);/

/mx:Application



[flexcoders] Multiple viewstacks?

2008-08-22 Thread guillaumeracine
I want to know if this is possible because i tryed but it did not work...

Lets say i have 4 main sections (so 4 viewstack child), if each of
those child as 4 sub sections, is it possible to implements them as
viewstack or i must use the add/remove child mecanism?



[flexcoders] Re: Hiring Flex Developers ASAP!

2008-08-15 Thread guillaumeracine
You should post your job offering at another group:

The group flexjobs was created specially for that, thank you.

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

 Hi All,
 
 My company is looking for Flex gurus asap. We're building out a great
 new enterprise widget offering and need your help.
 
 The platform allows clients to author, order, track, distribute, and
 even own Flash widgets. We're also working on technology that will be
 the first of it's kind to allow cross-technology deployment of any
 widget created on the platform (no more messing with Flash and JS for
 different deployment channels...that's all we can say at this point or
 we'll be shot :))
 
 We're already working with some major clients and partnered with some
 coll companies.
 
 We're based in London, Ontario Canada and looking primarily for
 developers in Ontario that are interested in contract work for now and
 then possibly becoming employees (and enjoying in the growth).
 
 Apply at [EMAIL PROTECTED] - hurry!
 
 Thanks,
 Jaafer





[flexcoders] Re: Tree problem

2008-08-13 Thread guillaumeracine

If you want your tree to be displayed correctly populate it with custom
value object that follows this structure:

public class GroupItemVO{
   public var name:String;
   public var children:Array;

   public function addChildren(item:GroupItem):void{
 this.children.addItem(item);
   }
}

and then the dataProvider of the tree must be a collection containing a
single GroupItemVO (root) that contains sub GroupItemVO in its children
property...and so on

The flex tree will know how to display the nodes correctly by recusivly
inspecting the children attribute.

I hope this will help you.
--- In flexcoders@yahoogroups.com, venkat eswar [EMAIL PROTECTED] wrote:

 i have one doubt.i have to create a tree(group like chat application).
actually i am using an array and that values has to be displayed as
children.Here it is groupArr.also the groupName has to be kept as root
and the array values has to be the children of the root (ie groupName).




 ?xml version=1.0 encoding=utf-8?
 mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml;  width=448
height=454

 mx:Script
  ![CDATA[
   import mx.controls.Alert;

   import mx.controls.CheckBox;
   import mx.collections.ArrayCollection;
  import mx.events.CollectionEvent;
  import com.screencasterlive.model.DataManager;
  import org.igniterealtime.xiff.data.im.RosterItem;
  import com.screencasterlive.events.JabberEvent;



  public var obj:Object = new Object();


  [Bindable]
   private var dataManager:DataManager=DataManager.getInstance();


   private function saveGroup(evt:Event):void
   {


var idx:int;

var len:int = dataManager.userGroup.length;

for (idx=0; idxlen; idx++)
{
  if (groupCheck[idx].selected)
  {
  dataManager.groupArr.push(groupCheck[idx].label);
  }

}

dataManager.groupName = GroupNameText.text;

Alert.show(dataManager.groupArr.toString());

obj.groupArr = dataManager.groupArr;
obj.groupName = dataManager.groupName;
trace(obj.groupName);
trace(obj.groupArr);
groupListBox.visible = false;
formName.visible = false;
treeGroupBox.visible = true;

tree.dataProvider = dataManager.groupArr;



   }



  ]]
 /mx:Script


  mx:TitleWindow x=61 y=10 width=316 height=399
layout=absolute showCloseButton=true
  mx:Form width=296 id=formName verticalScrollPolicy=off
horizontalScrollPolicy=off
 mx:FormItem label=Group Name  width=265
 mx:TextInput id=GroupNameText width=176/
 /mx:FormItem
 /mx:Form

 mx:VBox y=62 x=26 id=groupListBox
mx:Repeater id=r dataProvider={dataManager.userGroup}
 mx:CheckBox id=groupCheck 
label={r.currentItem.toString()} /
/mx:Repeater
 /mx:VBox

 mx:VBox id=treeGroupBox visible=false  x=10 y=122
height=107 width=226 verticalScrollPolicy=off
horizontalScrollPolicy=off
  mx:Tree id=tree   height=190 verticalScrollPolicy=off
horizontalScrollPolicy=off width=251

  /mx:Tree
 /mx:VBox
  mx:Button x=74 y=327 label=Save emphasized=true
 click=saveGroup(event);/
  mx:Button x=147 y=327 label=Cancel /

  /mx:TitleWindow


 /mx:Canvas




[flexcoders] Re: Can I set the image source in CSS?

2008-08-13 Thread guillaumeracine

Yes :

Button{

corner-radius: 0;

border-style: solid;

border-color: #FF;

border-thickness: 2;

up-skin: Embed(source=assets/slideshow/btnBleu.jpg);

over-skin: Embed(source=assets/slideshow/btnOver.jpg);

color: #FF;

font-size: 10px;

}

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

 For an image, can I set the source in css?
 ie.
 mx:Image id=myimage source=@Embed(source='../mypic.png') /

 can I move the source to the css?

 or is there another way to do this?




[flexcoders] Re: Can I set the image source in CSS?

2008-08-13 Thread guillaumeracine
Yes:

 Button{
 corner-radius: 0;
 border-style: solid;
 border-color: #FF;
 border-thickness: 2;
 up-skin: Embed(source=assets/upSkin.jpg);
 over-skin: Embed(source=assets/downSkin.jpg);
 color: #FF;
 font-size: 10px;
 }
--- In flexcoders@yahoogroups.com, luvfotography [EMAIL PROTECTED] wrote:

 For an image, can I set the source in css?
 ie.
 mx:Image  id=myimage  source=@Embed(source='../mypic.png')  /

 can I move the source to the css?

 or is there another way to do this?




[flexcoders] Re: Can I set the image source in CSS?

2008-08-13 Thread guillaumeracine
Yes:

 Button{
 corner-radius: 0;
 border-style: solid;
 border-color: #FF;
 border-thickness: 2;
 up-skin: Embed(source=assets/upSkin.jpg);
 over-skin: Embed(source=assets/downSkin.jpg);
 color: #FF;
 font-size: 10px;
 }
--- In flexcoders@yahoogroups.com, luvfotography [EMAIL PROTECTED] wrote:

 For an image, can I set the source in css?
 ie.
 mx:Image  id=myimage  source=@Embed(source='../mypic.png')  /

 can I move the source to the css?

 or is there another way to do this?




[flexcoders] Re: Can I set the image source in CSS?

2008-08-13 Thread guillaumeracine
Sorry for my multiple reply...

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

 Yes:
 
  Button{
  corner-radius: 0;
  border-style: solid;
  border-color: #FF;
  border-thickness: 2;
  up-skin: Embed(source=assets/upSkin.jpg);
  over-skin: Embed(source=assets/downSkin.jpg);
  color: #FF;
  font-size: 10px;
  }
 --- In flexcoders@yahoogroups.com, luvfotography ygroups@ wrote:
 
  For an image, can I set the source in css?
  ie.
  mx:Image  id=myimage  source=@Embed(source='../mypic.png')  /
 
  can I move the source to the css?
 
  or is there another way to do this?
 





[flexcoders] Re: Can I set the image source in CSS?

2008-08-13 Thread guillaumeracine

Yes right...
My bad

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

 The 'upSkin' and 'overSkin' of a Button are styles. The 'source' of an
 Image is a property, not a style, and properties cannot be specified in
 CSS.
 
  
 
 Gordon Smith
 
 Adobe Flex SDK Team
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of guillaumeracine
 Sent: Wednesday, August 13, 2008 11:40 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Can I set the image source in CSS?
 
  
 
 Sorry for my multiple reply...
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , guillaumeracine
 guillaume.racine@ wrote:
 
  Yes:
  
  Button{
  corner-radius: 0;
  border-style: solid;
  border-color: #FF;
  border-thickness: 2;
  up-skin: Embed(source=assets/upSkin.jpg);
  over-skin: Embed(source=assets/downSkin.jpg);
  color: #FF;
  font-size: 10px;
  }
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com , luvfotography ygroups@
 wrote:
  
   For an image, can I set the source in css?
   ie.
   mx:Image id=myimage source=@Embed(source='../mypic.png') /
  
   can I move the source to the css?
  
   or is there another way to do this?
  
 





[flexcoders] Re: Tree problem

2008-08-13 Thread guillaumeracine
Normaly, a custom tree item must have a property named children.
This property contains other tree items...

  public class GroupVO
 {
 public var groupName: String;
 public var children : Array;

 public function addChild(vo:GroupVO):void{
 this.children.addItem(vo);
 }
 }

So here is how you want your tree to be populated:

private function populateTree():void{

   var root:GroupVO = new GroupVO();
   var subRoot1:GroupVO = new GroupVO();
   var subRoot2:GroupVO = new GroupVO();
   var subSubRoot1:GroupVO = new GroupVO();
   var subSubRoot2:GroupVO = new GroupVO();

   subRoot1.addChildren( subSubRoot1 );
   subRoot2.addChildren( subSubRoot2 );
   root.addChildren( subRoot1 );
   root.addChildren( subRoot2 );

//Your dataProvider must be a collection containing a single root object
//and the flex tree will know how to display it correctly by looking at
the children property recusivly
yourTree.dataProvider = new ArrayCollection();
yourTree.dataProvider.addItem( root );

// This result in
//-Root
// -subRoot1
// -subSubRoot1
// -subRoot2
//  -subSubRoot2
}

I hope this helps.


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

 i have one doubt.i have to create a tree(group like chat application).
actually i am using an array and that values has to be displayed as
children.Here it is groupArr.also the groupName has to be kept as root
and the array values has to be the children of the root (ie groupName).




 ?xml version=1.0 encoding=utf-8?
 mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml;  width=448
height=454

 mx:Script
  ![CDATA[
   import mx.controls.Alert;

   import mx.controls.CheckBox;
   import mx.collections.ArrayCollection;
  import mx.events.CollectionEvent;
  import com.screencasterlive.model.DataManager;
  import org.igniterealtime.xiff.data.im.RosterItem;
  import com.screencasterlive.events.JabberEvent;



  public var obj:Object = new Object();


  [Bindable]
   private var dataManager:DataManager=DataManager.getInstance();


   private function saveGroup(evt:Event):void
   {


var idx:int;

var len:int = dataManager.userGroup.length;

for (idx=0; idxlen; idx++)
{
  if (groupCheck[idx].selected)
  {
  dataManager.groupArr.push(groupCheck[idx].label);
  }

}

dataManager.groupName = GroupNameText.text;

Alert.show(dataManager.groupArr.toString());

obj.groupArr = dataManager.groupArr;
obj.groupName = dataManager.groupName;
trace(obj.groupName);
trace(obj.groupArr);
groupListBox.visible = false;
formName.visible = false;
treeGroupBox.visible = true;

tree.dataProvider = dataManager.groupArr;



   }



  ]]
 /mx:Script


  mx:TitleWindow x=61 y=10 width=316 height=399
layout=absolute showCloseButton=true
  mx:Form width=296 id=formName verticalScrollPolicy=off
horizontalScrollPolicy=off
 mx:FormItem label=Group Name  width=265
 mx:TextInput id=GroupNameText width=176/
 /mx:FormItem
 /mx:Form

 mx:VBox y=62 x=26 id=groupListBox
mx:Repeater id=r dataProvider={dataManager.userGroup}
 mx:CheckBox id=groupCheck 
label={r.currentItem.toString()} /
/mx:Repeater
 /mx:VBox

 mx:VBox id=treeGroupBox visible=false  x=10 y=122
height=107 width=226 verticalScrollPolicy=off
horizontalScrollPolicy=off
  mx:Tree id=tree   height=190 verticalScrollPolicy=off
horizontalScrollPolicy=off width=251

  /mx:Tree
 /mx:VBox
  mx:Button x=74 y=327 label=Save emphasized=true
 click=saveGroup(event);/
  mx:Button x=147 y=327 label=Cancel /

  /mx:TitleWindow


 /mx:Canvas




[flexcoders] Dertermine if a tree node is open

2008-08-12 Thread guillaumeracine
I searched this group and google but i did not find the answer i wanted.
Is there a way to know if an object is open in this case:

private function openItemHandler(evt:TreeEvent):void{
var selectedNode:Object = evt.item;
var child1:Object = selectedNode.children.getChildAt(0);
//How i can determine if child1 is open?
}

Currently my node are in fact custom Value Object (SectionVO.as)
So to fix my problem (for the moment) i added a class variable called
isOpen that i set in the openItemHandler() function like this :
selectedNode.isOpen = true;
Same case for closeItemHandler function.

Thanks for help.



[flexcoders] Re: Dertermine if a tree node is open

2008-08-12 Thread guillaumeracine
OMG i can't beleive that i did'nt see this one...!
Thank you! hehe

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

 isItemOpen?
 
 

http://livedocs.adobe.com/flex/201/langref/mx/controls/Tree.html#isItemOpen()
 
 
 
 --- In flexcoders@yahoogroups.com, guillaumeracine
guillaume.racine@ wrote:
 
  I searched this group and google but i did not find the answer i
wanted.
  Is there a way to know if an object is open in this case:
  
  private function openItemHandler(evt:TreeEvent):void{
  var selectedNode:Object = evt.item;
  var child1:Object = selectedNode.children.getChildAt(0);
  //How i can determine if child1 is open?
  }
  
  Currently my node are in fact custom Value Object (SectionVO.as)
  So to fix my problem (for the moment) i added a class variable called
  isOpen that i set in the openItemHandler() function like this :
  selectedNode.isOpen = true;
  Same case for closeItemHandler function.
  
  Thanks for help.
 





[flexcoders] Re: Dertermine if a tree node is open

2008-08-12 Thread guillaumeracine
OMG i can't beleive that i did'nt find this one by myself...thank you
very much eheh :)

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

 isItemOpen?
 
 

http://livedocs.adobe.com/flex/201/langref/mx/controls/Tree.html#isItemOpen()
 
 
 
 --- In flexcoders@yahoogroups.com, guillaumeracine
guillaume.racine@ wrote:
 
  I searched this group and google but i did not find the answer i
wanted.
  Is there a way to know if an object is open in this case:
  
  private function openItemHandler(evt:TreeEvent):void{
  var selectedNode:Object = evt.item;
  var child1:Object = selectedNode.children.getChildAt(0);
  //How i can determine if child1 is open?
  }
  
  Currently my node are in fact custom Value Object (SectionVO.as)
  So to fix my problem (for the moment) i added a class variable called
  isOpen that i set in the openItemHandler() function like this :
  selectedNode.isOpen = true;
  Same case for closeItemHandler function.
  
  Thanks for help.
 





[flexcoders] Re: Application's height property problem

2008-08-07 Thread guillaumeracine
Thank you very much!

Using ExternalInterface.call(resizeDiv,myHeight);
solved my problem of scrolling!

Here is my js function:

script language=JavaScript type=text/javascript
function resizeContent(height) {
document.getElementById(content).style.height = 
parseInt(height)+px;

}
/script

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

 App height is bound by the stage size.  It sounds like you actually want
 to change the player's object size in the browser which requires
 javascript and ExternalInterface
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of guillaumeracine
 Sent: Wednesday, August 06, 2008 9:02 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Application's height property problem
 
 
 
 Hi, i want to set the height of my application dynamically.
 My app has a tree menu to the left and product thumbnails on the right.
 I want to increase the height of the application depending on the
 number of rows displayed in my product thumbnails. (The goal is to be
 able to scroll with the browser instand of scrolling inside a VBox)
 
 I have a appHeight property in my ModelLocator class.
 This property is changed when the product's dataprovider change.
 
 Here is the structure of my application
 
 mx:Application ... height={modelLocator.appHeight }
 
 mx:HBox
 
 mx:Tree height={this.height}.../mx:Tree
 mx:VBox height={this.height}.../mx:VBox
 
 /mx:HBox
 
 /mx:Application
 
 This is the way i think it should work but it seems that i can't
 acheive what i want with this...the height does not change at all and
 i think there is a limit to the height of the application because if
 my heigh is 2000 or 4000 i don't see any difference...
 
 Please help!





[flexcoders] Application's height property problem

2008-08-06 Thread guillaumeracine
Hi, i want to set the height of my application dynamically.
My app has a tree menu to the left and product thumbnails on the right.
I want to increase the height of the application depending on the
number of rows displayed in my product thumbnails. (The goal is to be
able to scroll with the browser instand of scrolling inside a VBox)

I have a appHeight property in my ModelLocator class.
This property is changed when the product's dataprovider change.

Here is the structure of my application

mx:Application ... height={modelLocator.appHeight }

  mx:HBox

mx:Tree height={this.height}.../mx:Tree
mx:VBox height={this.height}.../mx:VBox

  /mx:HBox

/mx:Application

This is the way i think it should work but it seems that i can't
acheive what i want with this...the height does not change at all and
i think there is a limit to the height of the application because if
my heigh is 2000 or 4000 i don't see any difference...

Please help!



[flexcoders] Re: assign image path stored in sql server 2005 to mx:Image source property

2008-07-31 Thread guillaumeracine
--- In flexcoders@yahoogroups.com, siyaram_5 [EMAIL PROTECTED] wrote:

 
 Hi all .
 
 I m .NET developer and doing R  D in Flex 3 .
 
 I m using SQL SERVER and in one of its column i have given Image Path.
 
 In Flex i have retrieved the dataset but dont know how to assign that
 Image Path  stored in Sql server to Flex Image control.

Supposing that you got an handle on you data object from the sql 
server, eg : myData

mx:Image source={myData.imagePath} /

I hope this help



[flexcoders] Error #2025: The supplied DisplayObject must be a child of the caller

2008-06-14 Thread guillaumeracine
Hi i made a slideshow component. For example their is a main Canvas
(mainCanvas) that contains 3 nested canvas (canvas1,canvas2,canvas3).

All 4 canvas have the same size dans completely overlaps each other.

When the user click to see a previous Canvas i call this code:

mainWindow.swapChildren( canvas2,canvas1 );

To make the previous Canvas (canvas1) visible.

Ok all works fine if my component is directly nested in a
mx:application tag.

But in a real world application, i need to nest it in some hierachy of
Canvas. This is where i get this error message when calling the
swapChidren method : IllegalArgument Error #2025: The supplied
DisplayObject must be a child of the caller.

I really don't understand why because when i trace canvas2.parent and
canvas1.parent, mainCanvas is returned...


So the following mxml code works for swapChildren:
mx:Application 
xmlns:mx=http://www.adobe.com/2006/mxml; 
details ommited...

comp:HomeSlideShow
id=slideShow
y=0
width=610
height=200
dataProvider={slideShowProvider}
verticalScrollPolicy=off
horizontalScrollPolicy=off
borderStyle=solid borderThickness=1 borderColor=#00
horizontalCenter=0 /

mx:Application/

BUT NOT THIS ONE:

mx:Application 
xmlns:mx=http://www.adobe.com/2006/mxml; 
details ommited...

mx:Canvas details ommitted...

mx:Canvas details ommited...
mx:Image 
source=assets/accueil/slideshow/slideshowHeader_fr.jpg/

comp:HomeSlideShow
id=slideShow
y=0
width=610
height=200
dataProvider={slideShowProvider}
verticalScrollPolicy=off
horizontalScrollPolicy=off
borderStyle=solid borderThickness=1 borderColor=#00
horizontalCenter=0 /

/mx:Canvas

/mx:Canvas
mx:Application/




[flexcoders] Publish Flex dev application to Production problem!

2008-05-24 Thread guillaumeracine
Hi, my application in dev mode works fine with blazeDS.
But when i put it on my web server i cannot access the blazeDS
application (messagebroker) anymore from my flex client.

in dev mode i access to my flex app like this
http://192.168.1.101:8080/myapp/chidaca.html

In production mode i use myapp.4java.ca/chidaca.html

Do i have to change the service-config.xml before deploying or change
any compiler arguments in flex builder ???

Here is my error :

FaultEvent fault=[RPC Fault faultString=Send failed
faultCode=Client.Error.MessageSend
faultDetail=Channel.Connect.Failed error NetConnection.Call.Failed:
HTTP: Failed: url: 'http://myapp.4java.ca/messagebroker/amf']
messageId=4DAEE9EF-90D9-499E-977A-1C7FCE4EFFFD type=fault
bubbles=false 



[flexcoders] Re: What hosting compagny are you using for Flex + (Blaze || LCDS)

2008-04-14 Thread guillaumeracine
By compagny i was meaning Web Host...(mine is 4java.ca)


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

 I just created a new Flex+BlazeDS app.
 I did not notice any memory problem during development because i was
 using -xms:1024.
 
 When i copied the my webapp in the tomcat dir of my host, i noticed an
 out of memory error after 15min...
 
 My actual host allow me only 160mo of heap space for tomcat.
 
 I searched the net a bit but did not find any Java hosting compagny
 that offers enought memory for a Flex app with BlazeDS or LCDS...
 (I read in Adobe docs that we must use at least 512mo of heap space
 for blazeDS or LCDS).
 
 What compagny are you using guys?
 I'm sure i'm not the only one seeking for a nice java host...
 
 Thank you.





[flexcoders] Re: Is it possible to have a .properties filethat contains keys with multiple li

2008-04-14 Thread guillaumeracine
Thank you it solved my problem!

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

 You can continue a line by ending it with a backslash. Leading
 whitespace on the next line is stripped.
  
 From :
  
 http://livedocs.adobe.com/flex/3/html/help.html?content=l10n_3.html
  
 (I'd been meaning to look it up anyway, knew it was possible, just not
 what the syntax was)
  
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of guillaumeracine
 Sent: 13 April 2008 19:39
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Is it possible to have a .properties filethat
 contains keys with multiple lines?
  
 This is a major maintenance problem for me...
 I have to put an entire text in ONE LINE un my resources.properties
 file.
 
 Someone have a good solution?
  
 
 __
 This communication is from Primal Pictures Ltd., a company
registered in England and Wales with registration No. 02622298 and
registered office: 4th Floor, Tennyson House, 159-165 Great Portland
Street, London, W1W 5PA, UK. VAT registration No. 648874577.
 
 This e-mail is confidential and may be privileged. It may be read,
copied and used only by the intended recipient. If you have received
it in error, please contact the sender immediately by return e-mail or
by telephoning +44(0)20 7637 1010. Please then delete the e-mail and
do not disclose its contents to any person.
 This email has been scanned for Primal Pictures by the MessageLabs
Email Security System.
 __





[flexcoders] Is it possible to have a .properties filethat contains keys with multiple lines?

2008-04-13 Thread guillaumeracine
This is a major maintenance problem for me...
I have to put an entire text in ONE LINE un my resources.properties file.

Someone have a good solution?



[flexcoders] What hosting compagny are you using for Flex + (Blaze || LCDS)

2008-04-13 Thread guillaumeracine
I just created a new Flex+BlazeDS app.
I did not notice any memory problem during development because i was
using -xms:1024.

When i copied the my webapp in the tomcat dir of my host, i noticed an
out of memory error after 15min...

My actual host allow me only 160mo of heap space for tomcat.

I searched the net a bit but did not find any Java hosting compagny
that offers enought memory for a Flex app with BlazeDS or LCDS...
(I read in Adobe docs that we must use at least 512mo of heap space
for blazeDS or LCDS).

What compagny are you using guys?
I'm sure i'm not the only one seeking for a nice java host...

Thank you.





[flexcoders] How to display a button's icon from a remote source?

2008-04-04 Thread guillaumeracine
Hi,
i know we can set the icon of a button using this syntax:
mx:Button label=myBtn icon=@Embed(source='assets/slideshow/1.png')/

but my image icon is on a remote server...
How i can set the icon of a button from a remote source?



[flexcoders] Re: How to display a button's icon from a remote source?

2008-04-04 Thread guillaumeracine
What do you mean by just set to source=[url]?
what is the complete syntax?

The compiler does not allow the following syntax:
mx:Button label=myBtn
icon=@Embed(source='http://www.mywebsite.com/image/img.jpg')/


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

 Just set source=[url]
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of guillaumeracine
 Sent: Friday, April 04, 2008 7:20 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] How to display a button's icon from a remote
 source?
 
  
 
 Hi,
 i know we can set the icon of a button using this syntax:
 mx:Button label=myBtn
 icon=@Embed(source='assets/slideshow/1.png')/
 
 but my image icon is on a remote server...
 How i can set the icon of a button from a remote source?





[flexcoders] Flex Java-based compiler error

2008-02-24 Thread guillaumeracine
I am trying to execute a sample test to compile a simple mxml
application from Java using the flex-compiler-oem.jar.

When the following line is executed :  long result =
application.build(true);
i get this error message:

Exception in thread main java.lang.NoSuchMethodError:
flex2.compiler.API.usePathResolver(Lflex2/compiler/common/SinglePathReso\
lver;)V

I seems that i have a class missing...

Code :

import flex2.tools.oem.*;
import java.io.*;

public class Main {


 public static void main(String[] args) {
 try {
 Application application = new Application(new
File(testApp.mxml));
 application.setOutput(new File(TestApp.swf));
 long result = application.build(true);

 } catch (Exception ex) {
 ex.printStackTrace();
 }
 }
}

testApp.mxml code (should not have any impact with my stacktrace):

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
 mx:Panel x=442 y=204 width=250 height=200
layout=absolute
 mx:Button x=68 y=128 label=Button/
 /mx:Panel
/mx:Application

I have included the following library in my project :
flex-compiler-oem.jar
mxmlc.jar
compc.jar

Please help :)




[flexcoders] How to call Air from Javascript?

-- Thread guillaumeracine
->










  
  [flexcoders] Re: How to call Air from Javascript?
  
  
  
  
  
  








	

	flexcoders 

	
		
			-- Thread --
			-- Date --
			





			
		
	



	
	
	




 




<!--
google_ad_client = "pub-7266757337600734";
google_alternate_ad_url = "http://www.mail-archive.com/blank.png";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel = "8427791634";
google_color_border = "FF";
google_color_bg = "FF";
google_color_link = "006792";
google_color_url = "006792";
google_color_text = "00";
//-->







[flexcoders] How to call Air from Javascript?
guillaumeracine



[flexcoders] Re: How to call Air from Javascript?
guillaumeracine
 





 






  
  





Reply via email to