[flexcoders] events

2009-06-22 Thread stinasius
i have an array collection that populates a gallery. my arraycollection is in 
turn populated when i click an item in a tile list, so whenever i click on a 
new item in the tilelist, the data for the array collection is supposed to 
change but nothing seems to change. any help?



[flexcoders] controling mxml component layout at runtime.

2009-06-22 Thread Thibaud Van Vreckem
Simple question:
I have a vBox with various mxml component in it.
I would like to be able to determine their order in the vbox at runtime.

is this possible at All ?

Thanks.
Thibaud


[flexcoders] Re: controling mxml component layout at runtime.

2009-06-22 Thread Thibaud Van Vreckem
Never mind, I figured it out.
Somehow i didn't realize that display list methods worked fine with mxml
objects.
just as it should :)

On Mon, Jun 22, 2009 at 12:20 PM, Thibaud Van Vreckem thibaudm...@gmail.com
 wrote:

 Simple question:
 I have a vBox with various mxml component in it.
 I would like to be able to determine their order in the vbox at runtime.

 is this possible at All ?

 Thanks.
 Thibaud



Re: [flexcoders] Re: Radio Button in DataGrid urgent Plz

2009-06-22 Thread Harish Sivaramakrishnan
Use a boolean property (ex: selected) in the dataProvider Object and bind
the CheckBox in the itemRenderer's 'selected' property to {data.selected}

Cheers
Harish

On Sun, Jun 21, 2009 at 12:37 PM, vin.flex vin.f...@yahoo.com wrote:




 Thanks for your response Harui.

 I have tried your checkbox renderer. I want to preselect a checkbox
 depending on the value of a field in my dataprovider.

 Can you help me how can I bind the check box to a field in my dataprovider?

 thanks
 vin


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 vin.flex vin.f...@... wrote:
 
  Hi there,
 
  I had requirment for having radio button for one of the column in
 Datagrid and the user should be able to select only one row radiobutton.
 
  I have used item renderer and assigned it to a RadioButton Group. But I
 got scrolling issues and also I was unable to preselect one row(which is
 required).
 
  Can any body help me and share the code if you have .
 
  Thanks in advance
 
  vin
 

  



[flexcoders] domain problem in remoteobject application

2009-06-22 Thread Vikram Singh
Hello friends,
I have a query regarding domain problem.
My database is at primarydomain (www.primarydomain.com)
I also have subdomain and place all at subdomain directory. like this..

scenario 1:
Current file arrangement is:

Exported release build flex project at :www.subdomain..com/flexApplication/
amfphp code placed at :www.subdomain.com/flexApplication/amfphpcode/

this is perfectly working.
but now... 

scenario 2:
need to arrange like this

Exported release build flex project at :www.subdomain.com/flexApplication/
amfphp code placed at :www.subdomain.com/amfphpcode/

amfphpcode is placed outside of flex application directory.

to run perfectly flex application in scenario-2, what changes I have to make 
with flex application code OR any other.
OR any other possible idea to implement it in scenario-2.
Please help me...

Regards,
Vikram. 



  ICC World Twenty20 England #39;09 exclusively on YAHOO! CRICKET 
http://cricket.yahoo.com

[flexcoders] How do you enable wmodes in an AIR app?

2009-06-22 Thread Sascha
Ok, I've search the web up and down for this ... I know for the
standalone Flash Player there is no option to enable wmodes like gpu
or direct for testing but how do you enable them in an AIR app? Or
are they actually somehow enabled or configured automatically in an
AIR desktop app?

Sascha


Re: [flexcoders] domain problem in remoteobject application

2009-06-22 Thread Pedro Sena
You can configure in amfphp where your 'services' would be.

Take a look at documentation, I think that your idea is to have just one
amfphp directory for every project, if so, You can reference external
directories in a way that amfphp would search for them.

HTH

On Mon, Jun 22, 2009 at 9:07 AM, Vikram Singh vikisingh...@yahoo.in wrote:



 Hello friends,
 I have a query regarding domain problem.
 My database is at primarydomain 
 (www.primarydomain.comhttp://www..primarydomain.com
 )
 I also have subdomain and place all at subdomain directory. like this..

 scenario 1:
 Current file arrangement is:

 Exported release build flex project at :
 www.subdomain.com/flexApplication/
 amfphp code placed at : www.subdomain.com/flexApplication/amfphpcode/

 this is perfectly working.
 but now...

 scenario 2:
 need to arrange like this

 Exported release build flex project at :
 www.subdomain.com/flexApplication/
 amfphp code placed at : www.subdomain.com/amfphpcode/

 amfphpcode is placed outside of flex application directory.

 to run perfectly flex application in scenario-2, what changes I have to
 make with flex application code OR any other.
 OR any other possible idea to implement it in scenario-2.
 Please help me...

 Regards,
 Vikram.

 --
 ICC World Twenty20 England '09 exclusively on YAHOO! 
 CRICKEThttp://in.rd.yahoo.com/tagline_cricket_3/*http://cricket.yahoo.com
 




-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/


[flexcoders] prevent text from scrolling

2009-06-22 Thread thomas parquier
Hello,

I've developped a list item renderer which embeds a mx:Text component, some
text have two lines.
How to prevent texts with two lines from being scrolled when list is
scrolled whit mouse wheel ?

thomas
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net
téléphone portable : +33601 822 056


[flexcoders] Re: Accurate way of measuring a datagrid

2009-06-22 Thread valdhor
I have never found one that is reliable.

What I have had to resort to is doing my own counting of lines as I go then 
multiplying that by line height, adding in various padding numbers, sacrificing 
a chicken and hoping for the best.



--- In flexcoders@yahoogroups.com, djhatrick djhatr...@... wrote:

 Lulz thanks for the that!  I must be tired ... but i  got this to work, 
 correctly,  I have multiple rows that can be longer than others, so this was 
 my error...  By the way, is there an event I can subscribe to that will tell 
 me when everything is rendered, or do i have to rely on my trusty timeout?
 
 Thanks For your help.
 
 Patrick
 
 
 
 
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  I hate to be picky but my math makes it 52.
  
  Anyway, did you count things like padding, vertical gap etc?
  
  
  --- In flexcoders@yahoogroups.com, djhatrick djhatrick@ wrote:
  
   Tom:
   
   Thanks for that, but unfortunately that method is inaccurate( Maybe it 
   doesn't work for very good for factories... Here's how i am getting my 
   height, i am setting a height on my value object after i add my labels in 
   a vertical column, then i listen for an event on my collection 
   dataProvider, the last item, which I then loop through and calculate the 
   values?  
   
   See my examples:
   
   idSGrid.measureHeightOfItems 612
   Measuring each row height 560
   idSGrid.measureHeightOfItems 612
   Measuring each row height 560
   
   
   It's off by 72 pixels... that's quite a difference.
   
   Patrick
   
   
   
   --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
   

Hi Patrick,

private function resizeDataGrid():void
{
  myDataGrid.height = myDataGrid.measureHeightOfItems(0,
myDataGrid.dataProvider.length) + myDataGrid.headerHeight + 2;
}

mx:DataGrid id=myDataGrid valueCommit=resizeDataGrid()

-TH

--- In flexcoders@yahoogroups.com, djhatrick djhatrick@ wrote:

 My datagrid won't measure correctly, i have variable row height, but
it can't seem to get it right, I don't want any scroll bars..., is there
an easy way to override some function so i can get the actual rowheight
of each row and determine my height correctly

 Thanks,Patrick


 Wow, i had to rejoing Flexcoders Google Groups are better than
yahoogroups, sorry yahoogroups,

   
  
 





[flexcoders] IP Adress

2009-06-22 Thread christophe_jacquelin
Hello, 

Is it possible to get the IP adress or the computer name on the client side 
from a flex application ? 

Thank you,
Christophe, 



[flexcoders] Set the height of a custom itemRenderer to its children

2009-06-22 Thread lambovell
The class below is being used as a custom itemRenderer, and I want to set the 
height of the VBox to that of its contents (children).
 
public class MyDynamicLayout extends VBox
{
  // .. code removed for brevity
 
override protected function measure():void 
{
super.measure();
 // measuredHeight = height = ?;// I want to calculate the height of 
all the children and set the height of this VBox to that height of all the 
children combined.
}
}



[flexcoders] Drag Drop Panel placement

2009-06-22 Thread suba_be
Hi ,

We have the folowing requirement:

There are two canvas containers within a HDividedBox and a drag drop panel in 
the application. On moving the divider of the Hdividedbox, the drag drop panel 
should align itself to the second canvas dynamically.

We tried to get the container's x,y value on divider release handler, but the 
previous x,y values are obtanied not the current values.


The following is the layout

Application
HDividedBox
Canvas id=c1/
Canvas id=c2/
/HDividedBox
DragDropPanel/
/Application

On resizing the divider, DragDropPanel should be placed in x,y of Canvas c2


Any help on this will be appreciated.


Thanks in advance,
Suba




[flexcoders] Export Datagrid Flex to Excel file using JSP

2009-06-22 Thread Josh
Hi...
I want to ask about how to export datagrid in flex into excel file using JSP.. 
I'm really appreciated for your help...
Thanx..
(^_^)



[flexcoders] The Blueprint Eclipse plug-in is live on Adobe Labs

2009-06-22 Thread jrunrandy
If you get a minute, please check out Blueprint, which we released on
Adobe Labs a couple of weeks ago. Blueprint is an innovative code-centric
search application, initially delivered as an Eclipse plug-in. 

It is a custom search tool that searches only for code (for now, it
searches just for MXML and ActionScript). So, for example, if you
search for DataGrid, it returns a set of code examples that use the
Flex DataGrid control. But what's really cool is that you can easily
highlight, copy, and paste chunks of code right into your
application, all without leaving Flex/Flash Builder.

For more information, see the Blueprint page
(http://labs.adobe.com/technologies/blueprint/) on Adobe Labs 

(FYI, Blueprint now works for Flex Builder 3 and Flash Builder 4)

Regards,
Randy Nielsen
Flex Doc Manager




Re: [flexcoders] IP Adress

2009-06-22 Thread Jeffry Houser

 No! 
 CGI variables will have it, but that is client side. 

 What I've done in the past is use my server code code that accesses the 
CGI variable and create a JavaScript function that returns the IP 
address.  Then call that function w/ an external interface. 

 [This is the point where 100 people tell me I should have just used 'X'] 

christophe_jacquelin wrote:
 Hello, 

 Is it possible to get the IP adress or the computer name on the client side 
 from a flex application ? 

 Thank you,
 Christophe, 



 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links




   

-- 
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust




[flexcoders] Compressing the Axis in a Chart [1 Attachment]

2009-06-22 Thread Sherif Abdou
hello, Quick question. I have a chart graph/Picture is attatched. I want to 
compress the graph a bit/shift the axis to the left so I can see to the end of 
the line. Is there a function i can use to adjust? So pretty much I want extra 
room at the end. Thanks   


  

Re: [flexcoders] Need help tranforming some XML

2009-06-22 Thread Ian Thomas
Oh *sigh* - mind the line breaks.

Ian

On Mon, Jun 22, 2009 at 6:25 PM, Ian Thomasi...@eirias.net wrote:
 Hi Jason,
  Stepping through it, it works when you break that long line of E4X
 into separate components.

 (For some reason people seem to want to write really long E4X
 statements - I'm not quite sure why...)

 Like this, your loop works.

 for each (var contentRowItem:XML in _contentXML..row)
 {
   var moduleName:String = contentRowItem.Module;
   var topicXML:XML = new XML(topic /);
   topicx...@title = contentRowItem.LinkTitle;
   // This e4x creates an XMLList, so pull off the first entry
   var module:XML=finalXML.module.(@title == moduleName)[0];
   // Likewise
   var 
 topics:XML=module..subsection.(@title==contentRowItem.Subsection).topics[0];
   topics.appendChild(topicXML);
 }

 However - I'd include a bit of error checking for those XMLLists...

 for each (var contentRowItem:XML in _contentXML..row)
 {
   var moduleName:String = contentRowItem.Module;
   var topicXML:XML = new XML(topic /);
   topicx...@title = contentRowItem.LinkTitle;
   var modulesList:XMLList=finalXML.module.(@title == moduleName);
   if (modulesList.length()!=1)
     throw new Error(Can't find single module with title:+moduleName);

   var topicsList:XMLList=
 modulesList[0]..subsection.(@title==contentRowItem.Subsection).topics;
   if (topicsList.length()!=1)
     throw new Error(Can't find single subsection with
 title:+contentRowItem.Subsection);

   topicsList[0].appendChild(topicXML);
 }

 My general approach to this type of stuff is: break it down. Store and
 trace out each part of your e4x statement in a separate variable, bit
 by bit. That'll show you where it's going wrong.

 HTH,
   Ian

 On Mon, Jun 22, 2009 at 5:54 PM, Merrill,
 Jasonjason.merr...@bankofamerica.com wrote:


 Been wrestling with a script that transforms some XML from one schema to
 another for a while, and have most of the transformation working, but having
 a hard time wrapping my head around the last little bit.  Probably easy for
 some E4X XML gurus out there.  The original XML (built automatically by the
 sever-side app) is fairly flat and looks like this:

 (_contentXML)

 xml

   rows



     row

   ID1/ID

 ModuleiBuild/Module

 SubsectionAssumptions/Subsection

   TopicStarting iRequire/Topic

   OverviewTo start iRequire, you will first need to do a few things,
 like create a user name and password./Overview

   AuthorSanders, Larry/Author

   …etc.

     /row



     row

   ID2/ID

 ModuleiDeliver/Module

 SubsectionTechnical Constraints/Subsection

     …etc.

 What I need to do, is take it from that “flat” form, and based on the values
 of some of the nodes (Module,Subsection, and Topic values), make new
 more hierarchical XML that is based on the Module, Subsection, and Topic
 values in the XML, so that it looks like this:

 xml

 modules

         module title=iPlan orderID=5

         subsections

                 subsection title=Assumptions

                     topics

                         topic title=”Starting
 iRequire”

                             overview

                                 To start
 iRequire, you will first need to do a…

                             /overview

 authorSanders, Larry/author

                     /topics

             subsection title=Project Information/

             /subsections

         /module

         module title=”iDeliver” orderID=”6”

             subsections

                 subsection title=Assumptions/

             ..etc.

 I have it assembled this far, where the module nodes are created just fine,
 and the subsections are appearing under the right module with the right
 title attribute:

 (finalXML)

 xml

 modules

         module title=iPlan orderID=5

         subsections

                 subsection title=Assumptions

                     topics /

 /subsection

             subsection title=Project Information

                     topics /

 /subsection

             /subsections

         /module

         module title=”iDeliver” orderID=”6”

             subsections

                 subsection title=Assumptions

 topics /

 /subsection

             subsection title=Technical Constraints

                     topics /

 /subsection

 subsection title=Design Phase Documents

                     topics /

 /subsection

 subsection title=Implementation Phase Documents

 topics /

 /subsection

             /subsections

         /module

         …etc.

 

Re: [flexcoders] Need help tranforming some XML

2009-06-22 Thread Ian Thomas
Hi Jason,
  Stepping through it, it works when you break that long line of E4X
into separate components.

(For some reason people seem to want to write really long E4X
statements - I'm not quite sure why...)

Like this, your loop works.

for each (var contentRowItem:XML in _contentXML..row)
{
   var moduleName:String = contentRowItem.Module;
   var topicXML:XML = new XML(topic /);
   topicx...@title = contentRowItem.LinkTitle;
   // This e4x creates an XMLList, so pull off the first entry
   var module:XML=finalXML.module.(@title == moduleName)[0];
   // Likewise
   var 
topics:XML=module..subsection.(@title==contentRowItem.Subsection).topics[0];
   topics.appendChild(topicXML);
}

However - I'd include a bit of error checking for those XMLLists...

for each (var contentRowItem:XML in _contentXML..row)
{
   var moduleName:String = contentRowItem.Module;
   var topicXML:XML = new XML(topic /);
   topicx...@title = contentRowItem.LinkTitle;
   var modulesList:XMLList=finalXML.module.(@title == moduleName);
   if (modulesList.length()!=1)
 throw new Error(Can't find single module with title:+moduleName);

   var topicsList:XMLList=
modulesList[0]..subsection.(@title==contentRowItem.Subsection).topics;
   if (topicsList.length()!=1)
 throw new Error(Can't find single subsection with
title:+contentRowItem.Subsection);

   topicsList[0].appendChild(topicXML);
}

My general approach to this type of stuff is: break it down. Store and
trace out each part of your e4x statement in a separate variable, bit
by bit. That'll show you where it's going wrong.

HTH,
   Ian

On Mon, Jun 22, 2009 at 5:54 PM, Merrill,
Jasonjason.merr...@bankofamerica.com wrote:


 Been wrestling with a script that transforms some XML from one schema to
 another for a while, and have most of the transformation working, but having
 a hard time wrapping my head around the last little bit.  Probably easy for
 some E4X XML gurus out there.  The original XML (built automatically by the
 sever-side app) is fairly flat and looks like this:

 (_contentXML)

 xml

   rows



     row

   ID1/ID

 ModuleiBuild/Module

 SubsectionAssumptions/Subsection

   TopicStarting iRequire/Topic

   OverviewTo start iRequire, you will first need to do a few things,
 like create a user name and password./Overview

   AuthorSanders, Larry/Author

   …etc.

     /row



     row

   ID2/ID

 ModuleiDeliver/Module

 SubsectionTechnical Constraints/Subsection

     …etc.

 What I need to do, is take it from that “flat” form, and based on the values
 of some of the nodes (Module,Subsection, and Topic values), make new
 more hierarchical XML that is based on the Module, Subsection, and Topic
 values in the XML, so that it looks like this:

 xml

 modules

         module title=iPlan orderID=5

         subsections

                 subsection title=Assumptions

                     topics

                         topic title=”Starting
 iRequire”

                             overview

                                 To start
 iRequire, you will first need to do a…

                             /overview

 authorSanders, Larry/author

                     /topics

             subsection title=Project Information/

             /subsections

         /module

         module title=”iDeliver” orderID=”6”

             subsections

                 subsection title=Assumptions/

             ..etc.

 I have it assembled this far, where the module nodes are created just fine,
 and the subsections are appearing under the right module with the right
 title attribute:

 (finalXML)

 xml

 modules

         module title=iPlan orderID=5

         subsections

                 subsection title=Assumptions

                     topics /

 /subsection

             subsection title=Project Information

                     topics /

 /subsection

             /subsections

         /module

         module title=”iDeliver” orderID=”6”

             subsections

                 subsection title=Assumptions

 topics /

 /subsection

             subsection title=Technical Constraints

                     topics /

 /subsection

 subsection title=Design Phase Documents

                     topics /

 /subsection

 subsection title=Implementation Phase Documents

 topics /

 /subsection

             /subsections

         /module

         …etc.

 But what I can’t seem to get is that last part of how to insert the right
 topic data under each topics node (Overview, ID, 

RE: [flexcoders] prevent text from scrolling

2009-06-22 Thread Alex Harui
The default renderer can have multiple lines of text and is smaller and faster 
than one that uses mx:Text.  If you look at the code 
(mx.controls.listClasses.ListItemRenderer) you’ll see that it uses the 
explicitWIdth to set the width of the text widget before measuring.   That is 
required since the text height generally depends on how wide it is.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.http://www.adobe.com/
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of thomas parquier
Sent: Monday, June 22, 2009 6:28 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] prevent text from scrolling





Hello,

I've developped a list item renderer which embeds a mx:Text component, some 
text have two lines.
How to prevent texts with two lines from being scrolled when list is scrolled 
whit mouse wheel ?

thomas
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.frmailto:thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.netmailto:sip%3awebattit...@ekiga.net
téléphone portable : +33601 822 056



[flexcoders] Re: Need help tranforming some XML

2009-06-22 Thread Jason

 Oh *sigh* - mind the line breaks.
 
 Ian

Ian, I didn't insert those line breaks. I wrote this e-mail from Outlook and 
sent it directly to this list and it looked beautiful on the way out.  I was 
just as disappointed with the way the formatting came out as you apparently 
were.

Jason




[flexcoders] Re: Need help tranforming some XML

2009-06-22 Thread Jason
--- In flexcoders@yahoogroups.com, Ian Thomas i...@... wrote:

 Oh *sigh* - mind the line breaks.
 
 Ian

Oh, heh heh, regards to formatting, you're rerferring to YOUR post, not my 
original.  Yeah, sucks how bad Yahoo manages to mess up formatting eh?  Thanks 
for the post, trying it out now.

Jason



Re: [flexcoders] prevent text from scrolling

2009-06-22 Thread thomas parquier
Well I will use mx:UITextField if faster... but I have to use custom
itemrenderer because of complex data to display.
The scrolling I described occurs only on mousewheel, and there's no
scrollbar.
The measures are not wrong and the area for the text can expand, so the
problem is not measurement : the text scrolls though there is no more text
to see, thus only one line of text is visible out of the two when scrolling
down.

thomas
---
http://www.web-attitude.fr/
msn : thomas.parqu...@web-attitude.fr
softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net
téléphone portable : +33601 822 056


2009/6/22 Alex Harui aha...@adobe.com



  The default renderer can have multiple lines of text and is smaller and
 faster than one that uses mx:Text.  If you look at the code
 (mx.controls.listClasses.ListItemRenderer) you’ll see that it uses the
 explicitWIdth to set the width of the text widget before measuring.   That
 is required since the text height generally depends on how wide it is.



 Alex Harui

 Flex SDK Developer

 Adobe Systems Inc. http://www.adobe.com/

 Blog: http://blogs.adobe.com/aharui



 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *thomas parquier
 *Sent:* Monday, June 22, 2009 6:28 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] prevent text from scrolling






  Hello,

 I've developped a list item renderer which embeds a mx:Text component, some
 text have two lines.
 How to prevent texts with two lines from being scrolled when list is
 scrolled whit mouse wheel ?

 thomas
 ---
 http://www.web-attitude.fr/
 msn : thomas.parqu...@web-attitude.fr
 softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net
 téléphone portable : +33601 822 056

   



[flexcoders] Re: Need help tranforming some XML

2009-06-22 Thread Jason
I'd include a bit of error checking for those XMLLists...
 
 for each (var contentRowItem:XML in _contentXML..row)
 {
var moduleName:String = contentRowItem.Module;
var topicXML:XML = new XML(topic /);
topicx...@title = contentRowItem.LinkTitle;
var modulesList:XMLList=finalXML.module.(@title == moduleName);
if (modulesList.length()!=1)
  throw new Error(Can't find single module with title:+moduleName);
 
var topicsList:XMLList=
 modulesList[0]..subsection.(@title==contentRowItem.Subsection).topics;
if (topicsList.length()!=1)
  throw new Error(Can't find single subsection with
 title:+contentRowItem.Subsection);
 
topicsList[0].appendChild(topicXML);
 }

Thanks Ian, that gets me closer, but it doesn't quite work because, I get the 
error, Can't find single subsection with title:Assumptions - because not 
every subsection will have one with that title - that topic is only in certain 
subtopics.  The XML it needs to be inserted into looks like this:

xml
  modules
module title=iRequire orderID=0
  subsections
subsection title=Technical Constraints/
subsection title=Project Information/
  /subsections
/module
module title=iDesign orderID=1.00
  subsections
subsection title=Assumptions/
  /subsections
/module
module title=iBuild orderID=2.00
  subsections
subsection title=Assumptions/
...etc.

So there are some subsections that have one with a title of Assumtions, but 
you'll see the first module's subsections doesn't have one.  Trying to figure 
out how to account for that withouth getting null property errors.  Any ideas?

Thanks, you've given me some good stuff to work with so far!

Jason




[flexcoders] Re: IP Adress

2009-06-22 Thread valdhor
For IP address use Javascript (example at 
http://javascript.internet.com/user-details/ip-address.html) and external 
interface.

I don't believe it is possible to get the computer name.


--- In flexcoders@yahoogroups.com, christophe_jacquelin 
christophe_jacque...@... wrote:

 Hello, 
 
 Is it possible to get the IP adress or the computer name on the client side 
 from a flex application ? 
 
 Thank you,
 Christophe,





[flexcoders] Re: Need help tranforming some XML

2009-06-22 Thread Jason
Wait - I figured out I was not adding in the topics / node. So I am almost 
there now, this is working, EXCEPT the code only inserts one topic per 
subtopic, even though there are more row nodes that are tagged to the same 
subtopic in the same module.  If more than one topic belongs to a topics node, 
it gets overwritten, so only the last one found is inserted. The code as I have 
it now (thanks Ian) is:

for each (var contentRowItem2:XML in _contentXML..row)
{
var moduleName:String = stripSharepointPoundTag(contentRowItem2.Module);
var topicXML:XML = new XML(topic /);
topicx...@title = contentRowItem2.LinkTitle;
topicx...@author = stripSharepointPoundTag(contentRowItem2.Author);
topicXML.overview = new XML(overview /);
topicXML.overview = contentRowItem2.Overview;

var modulesList:XMLList = finalXML..module.(@title == moduleName);

modulesList[0]..subsection.(@title==contentRowItem2.Subsection).topics 
= new XML(topics /);

if (modulesList.length()!= 1)
throw new Error(Can't find single module with title:+moduleName);
var topicsList:XMLList = 
modulesList[0]..subsection.(@title==contentRowItem2.Subsection).topics;

if (topicsList.length()!=1)
throw new Error(Can't find single subsection with 
title:+contentRowItem.Subsection);

topicsList[0].appendChild(topicXML);
}


This produces this:

xml
  modules
module title=iRequire orderID=0
  subsections
subsection title=Technical Constraints
  topics
topic title=Test Topic 1 author=Markley, Bill
  OverviewBlah blah blah/Overview
/topic
  /topics
/subsection
subsection title=Project Information
  topics
topic title=Test Topic 3 author=Merrill, Jason
  OverviewBlah blah blah and more blah and even more 
blah/Overview
/topic
  /topics
/subsection
  /subsections
/module
module title=iDesign orderID=1.00
  subsections
subsection title=Assumptions
  topics
topic title=Test Topic 15 author=Merrill, Jason
  OverviewBlah/Overview
/topic
  /topics
/subsection
  /subsections
/module
module title=iBuild orderID=2.00
  subsections
   ...etc.

So the line, topicsList[0].appendChild(topicXML); is suspect, but wouldn't 
appendChild just add a new child, not overwrite the existing child?  Thanks for 
any help,

Jason



[flexcoders] Re: Performance improvement recommendation

2009-06-22 Thread yial2
Hi Alex,
Thank you for your suggestion. I did use profiler to check, and yes, it was 
rendering of post that is taking most of the time. I did my best to make the 
render as light weight as possible by extending from UIComponent, but as you 
can see, the post render did not only include text and pictures, it also 
included a list of comments.(List within list, or list control inside another 
list's itemRenderer...I hope this is not too confusing.)

You may be right that the post renderer is inefficient, but I think there is 
just too much going on in one post render. If the post render MUST have these 
many other controls/features in it, how should I approach this design 
requirement?


--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 Use the profiler to see where the time is being spent.  If your attempt to 
 use List had poor scrolling it implies that your post renderer is inefficient.
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of yial2
 Sent: Friday, June 19, 2009 3:50 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Performance improvement recommendation
 
 
 
 
 
 Hi everyone,
 
 I am creating an application which is basically a flex/flash based blog 
 engine. When the application is initially loaded, it will retrieve 50 blog 
 post and display them on the first page. The problem I am having now is that 
 it takes a LONG(5 min) time to load the posts. If I decrease the posts number 
 down to 5, the load time is within an acceptable level(7 seconds). However, 5 
 posts per page is just not acceptable.
 
 I will try my best to describe the blog post structure in the following...
 
 1. Each blog post can have pictures and text in it. Each post also has 
 comments attach to the bottom. Following is a diagram illustrating what a 
 post would look like
 
 * abc dummy text *
 * (picture) *
 * xyz dummy text *
 * (picture2) (picture3)*
 
 *Comment 1 *
 
 
 *Comment 2 *
 
 
 *Comment 3 *
 
 
 2. Each post will have variable height due to different content and different 
 number of comments
 
 Currently, I put 50 posts in a vbox, and the vbox height is set to 768. The 
 vbox wil have a vertical scroll bar for user to scroll down to see the older 
 posts. Since vbox will render everything before the component can be 
 visually displayed, I can understand why it takes such a long time. I have 
 tried to modify the code to use variable height List with custom 
 itemRenderer instead, but the scroll on the list is NOT smooth at all due to 
 itemRenderer recycle and re-render with new data.
 
 I am running out of ideas now. Many sites(facebook, blogger, or any other 
 blog site) made this easy with PHP/.NET/HTML utilizing div+AJAX, but what 
 is the best approach with Flex when constructing a blog engine application? 
 Any suggestion/help will be greatly appreciated. Thanks!





[flexcoders] Re: Performance improvement recommendation

2009-06-22 Thread yial2
 One thing the OP might want to try in addition to lightening the repeated 
 components is to use a repeater and start out by just loading 5 (or however 
 many are visible without scrolling), and then add to the collection after 
 those are drawn.

Amy, thank you for your suggestion. I have one question which is related to UI 
design based on your suggestion. Let's say I have 50 posts to display. I only 
display first 5 and add rest of the posts after the first 5 are drawn. By doing 
this, if a user want to see older post, let's assume post number 46~50, the 
user should scroll down by using the vertical scroll generated by repeater. 
Doesn't the user still have to wait for a while before the vertical scroll bar 
is seen since repeater will need to render rest of posts before the vertical 
scroll bar can be generated correctly?

Currently, I am implementing paging as a temporarily solution(5 posts per 
page), but I really prefer to squeeze in as many posts as possible initially.

--- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote:

 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  Use the profiler to see where the time is being spent.  If your attempt to 
  use List had poor scrolling it implies that your post renderer is 
  inefficient.
 
 No, List scrolling in Flex 3 (Halo) isn't really scrolling, it just jumps 
 to the next item, so no matter how you optimize your renderers, this is going 
 to happen.  I believe this is fixed in Gumbo, so a move to Gumbo might help.
 
 One thing the OP might want to try in addition to lightening the repeated 
 components is to use a repeater and start out by just loading 5 (or however 
 many are visible without scrolling), and then add to the collection after 
 those are drawn.
 
 -Amy





[flexcoders] Recommended library to render and manipulate graphs?

2009-06-22 Thread Leo Soto M.
Hello,

I've googled a bit a found different graphs visualization libraries
(the most promising being SpringGraph and RaVis).

Do you have experience using any visualization libraries? And, if so,
which one would you recommend? (or not recommend!)

-- 
Leo Soto M.
http://blog.leosoto.com


[flexcoders] Re: Charting questions

2009-06-22 Thread Amy
--- In flexcoders@yahoogroups.com, inevative inevat...@... wrote:

 Thanks for that.  I had not embeded the font which seemed to be the issue.  
 Any ideas on the other ones? especially getting the color being used in the 
 legend.


This might help

http://blogs.adobe.com/flexdoc/2008/07/customized_legend_layout.html



[flexcoders] Re: Set the height of a custom itemRenderer to its children

2009-06-22 Thread Amy
--- In flexcoders@yahoogroups.com, lambovell lambov...@... wrote:

 The class below is being used as a custom itemRenderer, and I want to set the 
 height of the VBox to that of its contents (children).
  
 public class MyDynamicLayout extends VBox
 {
   // .. code removed for brevity
  
 override protected function measure():void 
 {
 super.measure();
  // measuredHeight = height = ?;// I want to calculate the height of 
 all the children and set the height of this VBox to that height of all the 
 children combined.
 }
 }

I think that the default measure method of VBox makes it just big enough for 
its children + all padding and vertical gaps.  So just leave off width and 
height, and you should have it.




Re: [flexcoders] prevent text from scrolling

2009-06-22 Thread Andriy Panas
Hi Thomas,

Have a look at this discussion:
http://www.actionscript.org/forums/showthread.php3?t=160802

You can start from listening to event Event.SCROLL as was pointed at
that discussion:
http://livedocs.adobe.com/flex/2/langref/flash/text/TextField.html#event:scroll

May be this workaround will already satisfy your needs.

Another possible workaround can be found here:
http://ghostwire.com/blog/archives/fixing-textfieldbottomscrollv-and-textfieldmaxscrollv/

--
Best regards,
Andriy Panas




2009/6/22 thomas parquier mailingli...@web-attitude.fr:


 Well I will use mx:UITextField if faster... but I have to use custom
 itemrenderer because of complex data to display.
 The scrolling I described occurs only on mousewheel, and there's no
 scrollbar.
 The measures are not wrong and the area for the text can expand, so the
 problem is not measurement : the text scrolls though there is no more text
 to see, thus only one line of text is visible out of the two when scrolling
 down.

 thomas
 ---
 http://www.web-attitude.fr/
 msn : thomas.parqu...@web-attitude.fr
 softphone : sip:webattit...@ekiga.net
 téléphone portable : +33601 822 056


 2009/6/22 Alex Harui aha...@adobe.com


 The default renderer can have multiple lines of text and is smaller and
 faster than one that uses mx:Text.  If you look at the code
 (mx.controls.listClasses.ListItemRenderer) you’ll see that it uses the
 explicitWIdth to set the width of the text widget before measuring.   That
 is required since the text height generally depends on how wide it is.



 Alex Harui

 Flex SDK Developer

 Adobe Systems Inc.

 Blog: http://blogs.adobe.com/aharui



 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of thomas parquier
 Sent: Monday, June 22, 2009 6:28 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] prevent text from scrolling




 Hello,

 I've developped a list item renderer which embeds a mx:Text component,
 some text have two lines.
 How to prevent texts with two lines from being scrolled when list is
 scrolled whit mouse wheel ?

 thomas
 ---
 http://www.web-attitude.fr/
 msn : thomas.parqu...@web-attitude.fr
 softphone : sip:webattit...@ekiga.net
 téléphone portable : +33601 822 056

 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:flexcoders-dig...@yahoogroups.com 
mailto:flexcoders-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
flexcoders-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[flexcoders] Re: Set the height of a custom itemRenderer to its children

2009-06-22 Thread lambovell
Thanks for the response, droponrcll. 

Actually, if I just had the VBox only that would have been fine, but my VBox is 
actually an itemRenderer for a List control. The List control is automatically 
scaling the width and height of the VBox to 100% of the List controls' row.

Any idea how to get around this? Thanks.




--- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote:

 --- In flexcoders@yahoogroups.com, lambovell lambovell@ wrote:
 
  The class below is being used as a custom itemRenderer, and I want to set 
  the height of the VBox to that of its contents (children).
   
  public class MyDynamicLayout extends VBox
  {
// .. code removed for brevity
   
  override protected function measure():void 
  {
  super.measure();
   // measuredHeight = height = ?;// I want to calculate the height 
  of all the children and set the height of this VBox to that height of all 
  the children combined.
  }
  }
 
 I think that the default measure method of VBox makes it just big enough for 
 its children + all padding and vertical gaps.  So just leave off width and 
 height, and you should have it.





[flexcoders] Re: htmlText truncation when changing from embedded to device font

2009-06-22 Thread Tim Hoff

I'll let the engineers let you know why this is happening.  But, you can
get it to work with the following steps (hack):

1)  Remove height=200 from the test Text control.

2) Add this function:

private function updateTextSize():void
{
  test.invalidateSize();
}

3) On the ComboBox change event, execute callLater(updateTextSize);

Note: If you use embedded fonts, a boldface font must be available for 
b/b to work.

-TH

--- In flexcoders@yahoogroups.com, tphipps toby.phi...@... wrote:

 Hi all,

 I've seeing some strange behaviour with a mx:Text component using
htmlText.

 It seems that when the fontFamily of the text component is changed at
runtime from an embedded font to a device font (or vice versa), the
content is truncated, and the HTML formatting lost. However, when
changing from one device font to another (or one embedded font to
another), it works just fine.

 Take this example (view source enabled but without the actual font
files included - any OTF should work fine):
http://dev.nx.sg/lab/fontchange/FontChange.html

 This app initializes the text component with some htmlText using a
device font (_sans in this case). Once loaded, try changing the font
to another device font (e.g. Courier New or Myriad) with the dropdown.
Everything's fine. Now change to an embedded font, and note the
truncation and loss of formatting.

 The reverse happens if I initalize the field with an embedded font -
changing to another embedded font works fine but changing to a device
font ends up truncating again.

 Anyone got any ideas how to make this work?

 Thanks,
 Toby.





[flexcoders] Using states is better than modules ?

2009-06-22 Thread j2me_soul
I have a small project to do. 
I worder which method is better ?
states or modules ?


[flexcoders] Re: Using states is better than modules ?

2009-06-22 Thread otunazero
if size is an issue use module, if not use state. Module will allow you to load 
the content later while with state the component is already inside the main 
application so it will run faster but maybe cause your swf to be big

--- In flexcoders@yahoogroups.com, j2me_soul j2me_s...@... wrote:

 I have a small project to do. 
 I worder which method is better ?
 states or modules ?





[flexcoders] Announcing FlexDataPaging for flex 4

2009-06-22 Thread otunazero
I know there are few flex paging components out there some good some bad. well 
check the screen shot of this one out and tell me what you think. More info 
coming soon check out the screen shot at http://otunazero.wordpress.com



Re:[flexcoders] Re: Using states is better than modules ?

2009-06-22 Thread j2me_soul
Can use effects on module loaded or unloaded etc. like using state ?



在2009-06-23,otunazero otunaz...@yahoo.com 写道:





if size is an issue use module, if not use state. Module will allow you to load 
the content later while with state the component is already inside the main 
application so it will run faster but maybe cause your swf to be big

--- In flexcoders@yahoogroups.com, j2me_soul j2me_s...@... wrote:

 I have a small project to do. 
 I worder which method is better ?
 states or modules ?






Re: [flexcoders] domain problem in remoteobject application

2009-06-22 Thread Vikram Singh
I am not getting excetly what you are trying to say me.
Can you please tell me in some detail which/how configure in amfphp?
I am little bit freshers for this stuff.


Thanks.



From: Pedro Sena sena.pe...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Monday, 22 June, 2009 5:55:51 PM
Subject: Re: [flexcoders] domain problem in remoteobject application





You can configure in amfphp where your 'services' would be.

Take a look at documentation, I think that your idea is to have just one amfphp 
directory for every project, if so, You can reference external directories in a 
way that amfphp would search for them.

HTH


On Mon, Jun 22, 2009 at 9:07 AM, Vikram Singh vikisingh169@ yahoo.in wrote:




Hello friends,
I have a query regarding domain problem.
My database is at primarydomain (www..primarydomain. com)
I also have subdomain and place all at subdomain directory. like this..

scenario 1:
Current file arrangement is:

Exported release build flex project at :www.subdomain. com/flexApplicat ion/
amfphp code placed at :www.subdomain. com/flexApplicat ion/amfphpcode/

this is perfectly working.
but now... 

scenario 2:
need to arrange like this

Exported release build flex project at :www.subdomain. com/flexApplicat ion/
amfphp code placed at :www.subdomain. com/amfphpcode/

amfphpcode is placed outside of flex application directory.

to run perfectly flex application in scenario-2, what changes I have to make 
with flex application code OR any other.
OR any other possible idea to implement it in scenario-2.
Please help me...

Regards,
Vikram. 


 ICC World Twenty20 England '09 exclusively on YAHOO! CRICKET 


-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer 
* Sun Certified Web Component Developer
*/

   


  ICC World Twenty20 England #39;09 exclusively on YAHOO! CRICKET 
http://cricket.yahoo.com

RE: [flexcoders] Need help tranforming some XML

2009-06-22 Thread Tracy Spratt
... break that long line of E4X into separate components...
I am with you here.  Do it one step at a time and check each step with a
trace(xml.toXMLString()).  If you really like concise, hard to read code,
you can squash it back together once you get it working.  

Tracy Spratt,
Lariat Services, development services available

-Original Message-
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Ian Thomas
Sent: Monday, June 22, 2009 1:26 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Need help tranforming some XML

Hi Jason,
  Stepping through it, it works when you break that long line of E4X
into separate components.

(For some reason people seem to want to write really long E4X
statements - I'm not quite sure why...)

Like this, your loop works.

for each (var contentRowItem:XML in _contentXML..row)
{
   var moduleName:String = contentRowItem.Module;
   var topicXML:XML = new XML(topic /);
   topicx...@title = contentRowItem.LinkTitle;
   // This e4x creates an XMLList, so pull off the first entry
   var module:XML=finalXML.module.(@title == moduleName)[0];
   // Likewise
   var
topics:XML=module..subsection.(@title==contentRowItem.Subsection).topics[0];
   topics.appendChild(topicXML);
}

However - I'd include a bit of error checking for those XMLLists...

for each (var contentRowItem:XML in _contentXML..row)
{
   var moduleName:String = contentRowItem.Module;
   var topicXML:XML = new XML(topic /);
   topicx...@title = contentRowItem.LinkTitle;
   var modulesList:XMLList=finalXML.module.(@title == moduleName);
   if (modulesList.length()!=1)
 throw new Error(Can't find single module with title:+moduleName);

   var topicsList:XMLList=
modulesList[0]..subsection.(@title==contentRowItem.Subsection).topics;
   if (topicsList.length()!=1)
 throw new Error(Can't find single subsection with
title:+contentRowItem.Subsection);

   topicsList[0].appendChild(topicXML);
}

My general approach to this type of stuff is: break it down. Store and
trace out each part of your e4x statement in a separate variable, bit
by bit. That'll show you where it's going wrong.

HTH,
   Ian

On Mon, Jun 22, 2009 at 5:54 PM, Merrill,
Jasonjason.merr...@bankofamerica.com wrote:


 Been wrestling with a script that transforms some XML from one schema to
 another for a while, and have most of the transformation working, but
having
 a hard time wrapping my head around the last little bit.  Probably easy
for
 some E4X XML gurus out there.  The original XML (built automatically by
the
 sever-side app) is fairly flat and looks like this:

 (_contentXML)

 xml

   rows



     row

   ID1/ID

 ModuleiBuild/Module

 SubsectionAssumptions/Subsection

   TopicStarting iRequire/Topic

   OverviewTo start iRequire, you will first need to do a few things,
 like create a user name and password./Overview

   AuthorSanders, Larry/Author

   …etc.

     /row



     row

   ID2/ID

 ModuleiDeliver/Module

 SubsectionTechnical Constraints/Subsection

     …etc.

 What I need to do, is take it from that “flat” form, and based on the
values
 of some of the nodes (Module,Subsection, and Topic values), make new
 more hierarchical XML that is based on the Module, Subsection, and Topic
 values in the XML, so that it looks like this:

 xml

 modules

         module title=iPlan orderID=5

         subsections

                 subsection title=Assumptions

                     topics

                         topic title=”Starting
 iRequire”

                             overview

                                 To start
 iRequire, you will first need to do a…

                             /overview

 authorSanders, Larry/author

                     /topics

             subsection title=Project Information/

             /subsections

         /module

         module title=”iDeliver” orderID=”6”

             subsections

                 subsection title=Assumptions/

             ..etc.

 I have it assembled this far, where the module nodes are created just
fine,
 and the subsections are appearing under the right module with the right
 title attribute:

 (finalXML)

 xml

 modules

         module title=iPlan orderID=5

         subsections

                 subsection title=Assumptions

                     topics /

 /subsection

             subsection title=Project Information

                     topics /

 /subsection

             /subsections

         /module

         module title=”iDeliver” orderID=”6”

             subsections