[flexcoders] big problem

2008-01-13 Thread adnane_1979
I developed a flex 2 application, and i's been on production for a 
while now.
But last week some of my clients were complaining that the application 
doesn't work anymore, after i've checked with them ,i found out that 
the application doesn't work with the new version of flash player 
9.0.1115.0
When i've tried to run the application with this version of flash 
player ,I've got a blank page.
So i dont know what to do now,should i change some thing on the code of 
the application it self or what?
Please, if some body knows about this issue, help me, because it's very 
urgent.

Thanks in advance



[flexcoders] Re: Flex + Spring + Hibernate - Lazy=true

2008-01-13 Thread den.orlov
Check Granite Data Services. They handle lazy loading properties
support, they have as3 code generator.

Den



[flexcoders] mx:Text How to get text to rotate vertically?

2008-01-13 Thread Dave
I am NOT using charts.  I am using beta3 release 3.  How can I get my
text to draw vertically in a label or text control?  I tried rotate
property.  When I use that my text doesn't show up at all.



[flexcoders] Using an XML file as a dataProvider and accessing its data

2008-01-13 Thread kenny14390
I started with Flex a couple days ago and I'm just learning the
basics. This shouldn't be too hard to answer, but getting me to
understand it would be the hard part! If I have an XML file with
parents, children, and siblings (see the example below), how can I
link say a DataGrid to a child element, but access its children? Refer
to the sample XML file below. Let's call it test.xml

?xml version=1.0 encoding=utf-8?
Schedule
 Semester id='Spring08'
  Department id='ACCT' name='Accounting'
   Course id='211' name='Financial Accounting'
Section id='DIS01' limit='150' enroll='71'
 Section id='ACT50' limit='25' enroll='8'/
 Section id='ACT51' limit='25' enroll='12'/
/Section
Section id='DIS02' limit='41' enroll='23'
 Section id='ACT56' limit='41' enroll='23'/
/Section
   /Course
   Course 
Section ...
 
/Section
   /Course
   ...
  /Department
  ...
 /Semester
 ...
/Schedule



From what I understand, one way to get this document into the DataGrid
is to create an HTTPService that connects to the XML file and give it
an id, we'll call it 'file'. So in the DataGrid we would say
dataProvider='file.Schedule.Semester.Department.Course.Section'? If
this is the case, how does the DataGrid know what attributes to pull
out of the elements and how is this displayed?

Let's say I want to do some OOP and make an object for every Semester,
Department, Course, and Section. How would I read this data and create
the objects? Fields of the objects would be equivalent to the
attributes to the elements. 

Thank you all for the support



[flexcoders] Managing (http)session data from java code

2008-01-13 Thread vttanhua
I'm trying to access http session from java code (separate EJB3 
project)(through FlexContext.getHttpRequest())
 but when I'm trying to use my class from other java classes I get 
nullpointer exception for FlexContext.getHttpRequest().
So am I missing some important point here?

I have created a java class like this:
public class SessionRO {

public HttpServletRequest request = null;
public FlexSession session = null;
public SessionRO() {
request = FlexContext.getHttpRequest();
session = FlexContext.getFlexSession();
}


public String getAttribute(String keyName){
return (String)FlexContext.getHttpRequest
().getAttribute(keyName);
}
public void setAttribute(String keyName, String value)
{
FlexContext.getHttpRequest().setAttribute
(keyName, value);
}



RE: [flexcoders] Imports being lost

2008-01-13 Thread Dealy, Brian
Patrick

this may be obvious to most, but sometimes I don't realize that
flexbuilder collapses the imports

and represents that by putting a plus next to the first one indicating
it can be expanded by

clicking on plus sign next to the first import...  

 

sometimes the little things can elude us.

Brian

 

From:
[EMAIL PROTECTED]
oo.com
[mailto:[EMAIL PROTECTED]
oups.yahoo.com] On Behalf Of djhatrick
Sent: Saturday, January 12, 2008 12:15 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Imports being lost

 

I have noticed several times throughout my AS3 project in Flexbuilder,
with linked libraries, that sometimes a few of imports at the top of
the files, all of a sudden go missing? It's a weird bug. Anybody
notice this?

Thanks,
Patrick

 



Re: [flexcoders] Adding several NumericSteppers = Total

2008-01-13 Thread Paul Kukiel

Isn't value of NumericRepeater of type Number not String.
ie:

private function stepperSumFun( val1:int, val2:int, val3:int,  
val4:int,

val5:int):Number {
return (val1+val2+val3+val4+val5);


Also the function name in Action script is stepperSumFun but you call  
stepperSunFunc




On 12/01/2008, at 7:03 PM, JRBower wrote:



Here's the code I have for returning the total to display in a Label.

private function stepperSumFun( val1:int, val2:int, val3:int,  
val4:int,

val5:int):String {
return (val1+val2+val3+val4+val5).toString();

mx:Label text={stepperSumFunc( ns01.value, ns02.value, ns03.value,
ns04.value, ns05.value)}/

What I'd like to do, for example:

mx:NumericStepper id=ns06 value={stepperSumFunc( ns01.value,  
ns02.value,

ns03.value, ns04.value, ns05.value)}/

But it returns an error.

Thanks,
James

Alex Harui wrote:



 Add up the 5 and set the value of the NumericStepper. What does your
 code look like?



 

 From: flexcoders@yahoogroups.com  
[mailto:[EMAIL PROTECTED] On

 Behalf Of JRBower
 Sent: Friday, January 11, 2008 7:28 PM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Adding several NumericSteppers = Total




 Can someone help?

 I have 5 numericsteppers and I would like to be able to display  
their

 total
 in a sixth NumericStepper.

 ns01 + ns02 + ns03 + ns04 + ns05 = nsTotal06

 How can I do this?

 Thanks,

 James

 --
 View this message in context:
 http://www.nabble.com/Adding-several-NumericSteppers-%3D-Total- 
tp1475076

 4p14769497.html
 http://www.nabble.com/Adding-several-NumericSteppers-%3D-Total- 
tp147507

 64p14769497.html
 Sent from the FlexCoders mailing list archive at Nabble.com.






--
View this message in context: http://www.nabble.com/Adding-several- 
NumericSteppers-%3D-Total-tp14750764p14770341.html

Sent from the FlexCoders mailing list archive at Nabble.com.







[flexcoders] Re: Flex 3 Beta is now available!

2008-01-13 Thread Jeremiah Small
I'm looking for this answer too. Can anyone provide a link to a
comprehensive discussion of the best practice for basic
authentication? We are now passing the credentials through the url
string which works, but this seems lame.

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

 We do exactly this and now Update 3 has been released it appears that
 the ability to change the Authorization header has been removed. 
 
 What is the 'official' work around for this ?
 
 Any help appreciated.
 
 Thanks
 
 BOb




[flexcoders] ERROR [org.jgroups.stack.ProtocolStack] no down protocol available

2008-01-13 Thread ngpaiva
I have JBoss in a 2-node cluster.  After a few days of uptime, I see 
that the Flex platform seems to lose connection to one of the 
instances, and the following message shows up on the logs.
Once this message starts to appear, the requests start favoring the 
node that does not see the messages, but some requests still make it 
over to the server instance that is having the issue.

Console.log:
ERROR [ProtocolStack] no down protocol available !

Server.log:
ERROR [org.jgroups.stack.ProtocolStack] no down protocol available !

The JBoss cluster seems to be working fine.  The message keeps being 
logged in the files every other second, filling up the files.  There is 
no full stack trace.  Just the message as shown.

I think it might be something with Flex event listeners potentially, 
but looking to see if anyone has any suggestions. 

Thank you.  



Re: [flexcoders] Re: How do I set and get the date of a DateField?

2008-01-13 Thread Maciek Sakrejda
Hmm... I'm not sure if me pulling suggestions out of thin air is at all
helpful, but have you tried labelFunction and parseFunction? I don't see
why the default wouldn't work, but if there's a problem, you could use
these two to hack up a fix for your specific format (assuming you have a
specific format, and are not trying to parse dates with arbitrary format
strings).


-Original Message-
From: simonjpalmer [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How do I set and get the date of a DateField?
Date: Fri, 11 Jan 2008 21:56:40 -

thanks! that seems to work as long as I have dd/mm/ or mm/dd/
as the formatString, otherwise it fails to parse and I seem to get a
zero date.

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

 DateField.selectedDate?
 
 
 -Original Message-
 From: simonjpalmer [EMAIL PROTECTED]
 Reply-To: flexcoders@yahoogroups.com
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] How do I set and get the date of a DateField?
 Date: Fri, 11 Jan 2008 21:28:32 -
 
 not normally stumped, but I can't figure out how to set the value of a
 DateField from a Date and then do the reverse and get a Date object
 from the DateField. I was expecting to have accessors which took Date
 objects, but there aren't any. 
 
 Do I have to do the whole thing via formatted text?





 




[flexcoders] Skinning VScrollBar - how to control the size of the thumb

2008-01-13 Thread ezderman
I am skinning a VScrollBar and I am trying set the thumb to a fixed
size. currently the thumb is stretches depend on the size of the
content. how can I set the thumb that it wont change its size?



Re: [flexcoders] FlexPrintJob: print image AND text

2008-01-13 Thread Frederico Garcia
Alex Harui escreveu:

 Externally loaded images may not be done loading by the time you 
 submit the printed page.  It is best to preload all external images 
 and make bitmap copies

  

 

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
 *On Behalf Of *Frederico Garcia
 *Sent:* Saturday, January 12, 2008 1:58 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] FlexPrintJob: print image AND text

  

 Hi,

 I'm trying to print Image and Text, and I want the text to be clear, so
 I set printAsBitmap = false. The problem is, sometimes it prints the
 images, sometimes it doesn't.

 Any help?

 Regards,

 Frederico Garcia

 

 __ NOD32 2781 (20080110) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.com
Hi,

I'm not printing external images. I'm printing components (charts). If I 
set
printAsBitmap=true everything is printed but text is blurry. The issue 
only occurs with printAsBitmap set to false. I'll try to find the source 
of the problem and then repost.

Regards,

Frederico Garcia


Re: [flexcoders] mx:Text How to get text to rotate vertically?

2008-01-13 Thread Frederico Garcia
Dave escreveu:
 I am NOT using charts.  I am using beta3 release 3.  How can I get my
 text to draw vertically in a label or text control?  I tried rotate
 property.  When I use that my text doesn't show up at all.



 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
 Yahoo! Groups Links




 __ NOD32 2781 (20080110) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.com



   
Hi,

Have you embed your fonts? rotation only works with embedded fonts.

Regards,

Frederico Garcia


[flexcoders] Re: mx:Text How to get text to rotate vertically?

2008-01-13 Thread Dave
--- In flexcoders@yahoogroups.com, Frederico Garcia [EMAIL PROTECTED]
wrote:

 Dave escreveu:
  I am NOT using charts.  I am using beta3 release 3.  How can I get my
  text to draw vertically in a label or text control?  I tried rotate
  property.  When I use that my text doesn't show up at all.
 
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
  Yahoo! Groups Links
 
 
 
 
  __ NOD32 2781 (20080110) Information __
 
  This message was checked by NOD32 antivirus system.
  http://www.eset.com
 
 
 

 Hi,
 
 Have you embed your fonts? rotation only works with embedded fonts.
 
 Regards,
 
 Frederico Garcia

No I haven't.  Thanks I will try that!



[flexcoders] DataGrid initial sort broken in latest FlexBuilder Beta SDK 3.0.0

2008-01-13 Thread rleuthold
Hi,

Since I'm using the lastest FlexBuilder Beta with SDK 3.0.0, I have a problem 
with the initial sort 
of a dataGrid . The underlying ArrayCollection is in the desired sort order 
when the dataGrid is 
added. But the displayed dataGrid is in coomplete disorder. 

Versions of my Application compiled with older FlexBuilder/SDK versions doesn't 
show this 
problem. 

Does somebody notice something similar ?

_rico






[flexcoders] annotation on bar chart needs a little help

2008-01-13 Thread Mark
I'm placing a small button at some of the bars in the barChart 
depending on the data using annotationElements.  The x axis is set to 
0 and y is set to each bar in the cart.  Everything works just great, 
but in some cases the bar will span the entire length of the chart so 
the button falls on top of a bar.  When this happens, if you click on 
the button you get a pop-up window from that button (good), and a pop-
up from an itemClick from the bar (bad).  Is there a way to make it so 
only the button event works and not the bar when clicking a button 
that falls on top of a bar?

Thanks,
Mark



[flexcoders] Simulating a printed page

2008-01-13 Thread John Nagle
Hello,

I'm trying to figure out the best way to simulate a printed page.  I 
want to display text on a page (currently a canvas), such that it has 
the look and feel of printed type on paper.  I will have arrows at the 
bottom of the page to switch to the next page, where hopefully the same 
source text (originating from a remote resource) can flow into.

Any suggestions on the best way to set this up?

Thanks for any help,

John




[flexcoders] horizontal rule background

2008-01-13 Thread Matt Maher

I have written a pinstriped background class that extends HaloBorder. It
works great... (as the plainest example) basically I just overrode
updateDiplayList..

You basically end up with a rectangle with a light pinstripe effect.
Nice.



But what I want to do is follow any rounded corners that are being
drawn. I can draw a rounded rectangle (of course) but I don't know how
to clip my lines to the inner boundry of the rectangle. I am currently
drawing line after line for the full width in a loop after the backgound
is filled (see psudo-code below).

All you drawing experts... Is there a way to draw the portion of each
line which intersects with the already drawn rectangle?









the class looks similar to the following:




package  {

import mx.skins.halo.HaloBorder;

public class HorizontalRuleBackground extends HaloBorder {

//
\
- //

override protected function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void {

super.updateDisplayList(unscaledWidth, unscaledHeight);



// At this point we cannot do rounded corners, so we need to

// flatten the rounded corners no matter what

topCornerRadius = 0;

bottomCornerRadius = 0;

var matrix:Matrix= verticalGradientMatrix(0, 0, unscaledWidth,
unscaledHeight);

var backgroundColor:uint = getStyle(backgroundColor) as uint;



graphics.beginGradientFill(linear, [backgroundColor, backgroundColor],
[1,1], [0,255], matrix);

GraphicsUtil.drawRoundRectComplex(graphics, backgroundLeft,
backgroundTop, backgroundWidth, backgroundHeight, topCornerRadius,
topCornerRadius, bottomCornerRadius, bottomCornerRadius);

graphics.endFill();



var stepSize:int = 3;

var numberOfLines:Number = unscaledHeight/ stepSize;

var borderColor:uint = getStyle(borderColor);



graphics.lineStyle(1, borderColor, .2, true);



for(var i:int=0; iunscaledHeight; i=i+stepSize) {

graphics.moveTo(0, i);

graphics.lineTo(unscaledWidth, i);

}



}

}

}



Re: [flexcoders] Simulating a printed page

2008-01-13 Thread Frederico Garcia
John Nagle escreveu:
 Hello,

 I'm trying to figure out the best way to simulate a printed page.  I 
 want to display text on a page (currently a canvas), such that it has 
 the look and feel of printed type on paper.  I will have arrows at the 
 bottom of the page to switch to the next page, where hopefully the same 
 source text (originating from a remote resource) can flow into.

 Any suggestions on the best way to set this up?

 Thanks for any help,

 John




 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
 Yahoo! Groups Links




 __ NOD32 2787 (20080112) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.com



   
Hi,

Have been working on a similar component: FlexReport... you can see a 
demo at www.kemelyon.com/flexreport
I advise you that printing in flex isn't has simple has we might think 
at first (I'm trying to simplify that process).

If you're interested mail and I'll be glad to send you the source.

Regards,

Frederico Garcia


[flexcoders] Re: Accessing objects within objects within objects... ???

2008-01-13 Thread anthony_morsey
Thanks, but that did not work.  Still got runtime errors.

Here is a stripped down version of what I have:

mx:TabNavigator  id='maintab' 

   mx:Canvas id=tab3_panel  

  mx:Canvas id=model_area 

 mx:Text id=total_cost  /

  /mx:Canvas

   /mx:Canvas

/mx:TabNavigator

I want to set the text value of total_cost.

Thanks
Tony


--- In flexcoders@yahoogroups.com, yiğit boyar [EMAIL PROTECTED] wrote:

 tab1_panel.getChildren()[0].myText,text= dsa;
 if it gives a compile time error; try
 (tab1_panel.getChildren()[0] as Object).myText,text= dsa;
 
 On Jan 12, 2008 7:11 PM, Alger Werft [EMAIL PROTECTED] wrote:
 
  Mayby it's due to the creationPolicy.
 
  Alger
 
  Randy Martin wrote:
  
  
   Post your code. Maybe we can help.
  
   ~randy
  
  
 

   *From:* flexcoders@yahoogroups.com
   [mailto:[EMAIL PROTECTED] *On Behalf Of
*anthony_morsey
   *Sent:* Saturday, January 12, 2008 9:05 AM
   *To:* flexcoders@yahoogroups.com
   *Subject:* [flexcoders] Re: Accessing objects within objects
within
   objects... ???
  
   Its actually one level deeper.
  
   TabNavigator-Canvas-Canvas-Text
  
   I get a runtime error - TypeError: Error #1009: Cannot access a
   property or method of a null object reference. on the line
that I
  ref
   that text object.
  
   --- In flexcoders@yahoogroups.com
   mailto:flexcoders%40yahoogroups.com, Randy Martin randy@
  wrote:

 I'm assuming you mean that you have a TextInput on the
canvas. So
   you have
 something like this:

 mx:TabNavigator id=tabNav
 mx:Panel id=tab1_panel
 mx:Canvas id=myCanvas
 mx:TextInput id=myText/
 /mx:Canvas
 /mx:Panel
 /mx:TabNavigator

 So, you can get to the text input from anywhere in the
component
   like this:

 this.myText.text = some string;

 ~randy


 _

 From: flexcoders@yahoogroups.com
   mailto:flexcoders%40yahoogroups.com
   [mailto:flexcoders@yahoogroups.com
   mailto:flexcoders%40yahoogroups.com] On
 Behalf Of anthony_morsey
 Sent: Friday, January 11, 2008 10:22 AM
 To: flexcoders@yahoogroups.com mailto:
  flexcoders%40yahoogroups.com
 Subject: [flexcoders] Accessing objects within objects within
   objects... ???



 I have a the following object hierarchy:

 TabNavigator
 tab1_panel (first tab in series of 4)
 myCanvas (canvas in the first tab)
 myText (text control within the above canvas)

 How do I change the text value of myText in the above
example?

 Before I added the second canvas above (myCanvas), I
could do the
 following to change the text value:
 Object(tab1_-panel.getChildBy-Name(myText-)).text = Tony;

 Thanks

 Tony






 No virus found in this outgoing message.
 Checked by AVG.
 Version: 7.5.516 / Virus Database: 269.19.0/1218 -
Release Date:
   1/10/2008
 1:32 PM

  
  
   No virus found in this outgoing message.
   Checked by AVG.
   Version: 7.5.516 / Virus Database: 269.19.1/1220 - Release Date:
   1/11/2008 6:09 PM
  
  
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
 
 
 
 





Re: [flexcoders] Anyone have a template ant build file for FDS?

2008-01-13 Thread James Ward
See if this one helps:

http://flexapps.cvs.sourceforge.net/flexapps/census/build.xml?revision=1.24view=markup

-James


On Fri, 2008-01-11 at 06:48 -0800, Collene wrote:
 Hi all,
 
 I'm trying to create a Flex Data services application and deploy to
 Tomcat 6 using ant. I created a simple Stock Portfolio application
 from this book: http://www.theriabook.com/ . The Stock Portfolio has
 a remote procedure call using a Java backend and Flex/mxml front end.
 In my build file, I compile the Java classes, then copy the Flex DS
 libs and .mxml files to the appropriate directories in the webapp. I
 then jar this all up and use a catalina task to deploy to Tomcat using
 ant (this is similar to how we deploy our other applications). I then
 go to http://localhost:8080/stockportfolio, which goes to
 http://localhost:8080/StockPortfolio.mxml. And it works (my
 application shows up, and the remote calls work great). However, if I
 make a small change to my code and deploy again using the same ant
 build file, then go back to http://localhost:8080/stockportfolio, it
 indicates the application can not be found. Checking out the Tomcat
 webapps directory, stockportfolio is there, but the only directory
 left inside the folder is WEB-INF/lib, with all of the jar files. 
 I've encountered this problem before (a jar locking problem in
 Tomcat), so added antiResourceLocking=true and antiJARLocking=true
 to my context.xml file, stopped Tomcat, deployed again, and that fixed
 the problem (so I'm able deploy without the jar files locking up), but
 a new one has popped up. I can only deploy this way 3-4 times before
 Tomcat displays an out of memory error. Watching my task manager
 while deploying and then going to the application, I think this
 happens as the .swf is created. Each time I redeploy and then visit
 the application, the memory usage continues to rise. I've increased
 the memory allocated to Tomcat, but it doesn't help if the memory
 usage continues to rise as I deploy several times (which I tend to do
 during development of the application).
 
 I'm trying to find a better way to deploy the application, and if this
 is indeed caused by compiling the mxml to swf, I'd like to compile the
 swf during deployment using ant. So I looked on the web and fount
 flex ant tasks (http://labs.adobe.com/wiki/index.php/Flex_Ant_Tasks ).
 However, I have yet to find a good ant build file I can use as a
 template for a Flex Data Services application, and was hoping someone
 could point me in the right direction (or perhaps provide a solution
 to the problem I have above). Any attempts so far at compiling using
 mxmlc and the ant tasks have corrupted my application source and so
 the application doesn't run (solve one error, another pops up, very
 frustrating process). Any help/advice is appreciated, thanks!
 
 
 
 
  


[flexcoders] Re: Simulating a printed page

2008-01-13 Thread John Nagle
--- In flexcoders@yahoogroups.com, Frederico Garcia [EMAIL PROTECTED]
wrote:

Hello Frederico,

That is pretty similar to what I am trying to do, especially with
zooming in/out.  The only thing is, I want to fill the pages with
paragraph text stemming from a single, large file.  The trick there is
knowing where the text ends on one page so it can begin from the
appropriate location on the next page.

Ideally, I'd preserve formatting tags like bold and italics.

I'm thinking at this point I'll need to write a custom page
control...which could be fun anyway.  I'm extremely comfortable with
ActionScript 3, slightly less so with Flex.  I've written several
games and apps in AS3.

I would definitely be interested in seeing your source if you're
willing to share it.  And any other suggestions you might have would
be greatly appreciated as well.

Thanks!

-John



 John Nagle escreveu:


  Hello,
 
  I'm trying to figure out the best way to simulate a printed page.  I 
  want to display text on a page (currently a canvas), such that
it has 
  the look and feel of printed type on paper.  I will have arrows at
the 
  bottom of the page to switch to the next page, where hopefully the
same 
  source text (originating from a remote resource) can flow into.
 
  Any suggestions on the best way to set this up?
 
  Thanks for any help,
 
  John
 
 
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
  Yahoo! Groups Links
 
 
 
 
  __ NOD32 2787 (20080112) Information __
 
  This message was checked by NOD32 antivirus system.
  http://www.eset.com
 
 
 

 Hi,
 
 Have been working on a similar component: FlexReport... you can see a 
 demo at www.kemelyon.com/flexreport
 I advise you that printing in flex isn't has simple has we might think 
 at first (I'm trying to simplify that process).
 
 If you're interested mail and I'll be glad to send you the source.
 
 Regards,
 
 Frederico Garcia





[flexcoders] Easing List Control

2008-01-13 Thread rueter007
Hello, does anybody have any idea on how to create a flex list control
which has an easing scrolling? The default list component snaps to the
selected index rather than gently easing. I am wondering if there is a
simple property that I am not aware of or if it is much more than that.
Thanks in advance.



[flexcoders] Re: FlexPrintJob: print image AND text

2008-01-13 Thread mitek17
Hi Frederico,

printAsBitmap is not related to the problem, as images/charts/whatever
simply don't have enough time to be rendered.

You should add event listeners to all your images/charts and wait for
the creationComplete  updateComplete events.

Cheers,
Dmitri.


 

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

 Hi,
 
 I'm trying to print Image and Text, and I want the text to be clear, so 
 I set printAsBitmap = false. The problem is, sometimes it prints the 
 images, sometimes it doesn't.
 
 Any help?
 
 Regards,
 
 Frederico Garcia





[flexcoders] Re: Accessing objects within objects within objects... ???

2008-01-13 Thread mitek17
Hi Tony,

*When* do you want to do this assignment?

Runtime error simply means that the object has not been created yet.

Place the assignment within a function and call this function when
TabNavigator sends creationComplete event.

Cheers,
Dmitri.



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

 Thanks, but that did not work.  Still got runtime errors.
 
 Here is a stripped down version of what I have:
 
 mx:TabNavigator  id='maintab' 
 
mx:Canvas id=tab3_panel  
 
   mx:Canvas id=model_area 
 
  mx:Text id=total_cost  /
 
   /mx:Canvas
 
/mx:Canvas
 
 /mx:TabNavigator
 
 I want to set the text value of total_cost.
 
 Thanks
 Tony




RE: [flexcoders] More control over datagrid? Adding Running Total Row?

2008-01-13 Thread Jehanzeb Musani
Hello Gordon,

I need to know that whether DataGrid or
AdvancedDataGrid in Flex supports running totals? Let
say I have the following data.

Order Number Quantity Price
1   4 25.00
2   3 12.25
3   1110.00
---
3   18246.75
---

The dataprovider contains the first three rows of the
aforementioned table. The requirement is that the grid
should calculate the total of the data in the
dataprovider.

I can manually add the running total row in the data
provider so that grid can display that row. But the
next requirement is that the running total row should
be displayed in different backcolor, forecolor and
font.

Can you tell me how can I implement the running total
functionality in Flex?

Regards,
Jehanzeb

--- Gordon Smith [EMAIL PROTECTED] wrote:

  I'm wondering about how much run-time control you
 have over a data grid?
  
 Everything the DataGrid component does can be
 controlled at runtime.
  
  Can you add rows / columns at runtime?
  
 Yes.
  
  Also, is it possible to sort of pivot a table 90º
 anti-clockwise so instead of defining
  columns, you define rows, and your data appears as
 columns instead of rows? 
  
 What do you mean by appears as columns? A DataGrid
 appears as a rectangular matrix of cells. The
 columns can have headers. Row headers are not
 supported.
  
 Gordon Smith
 Adobe Flex SDK Team
 
 
 
 From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On Behalf Of
 Josh McDonald
 Sent: Thursday, January 10, 2008 5:50 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] More control over datagrid?
 Put headings on the LHS instead of the top?
 
 
 
 Hi guys,
 
 I'm wondering about how much run-time control you
 have over a data grid? Can you add rows / columns at
 runtime? Also, is it possible to sort of pivot a
 table 90º anti-clockwise so instead of defining
 columns, you define rows, and your data appears as
 columns instead of rows? 
 
 It's awfully hard to google up some advanced
 datagrid topics without just getting half-finished
 docs on the new advanced datagrid :D
 
 Not sure I explained that very well, if not let me
 know and I'll try and expand on it a bit... 
 
 Cheers,
 -Josh
 
 -- 
 This is crazy! Why are we talking about going to
 bed with Wilma Flintstone... She'll never leave Fred
 and we know it. 
 
 :: Josh 'G-Funk' McDonald 
 :: 0437 221 380 :: [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]  
 
  
 



  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping


Re: [flexcoders] More control over datagrid? Put headings on the LHS instead of the top?

2008-01-13 Thread Josh McDonald
Will do, cheers!

On Jan 11, 2008 4:54 PM, Alex Harui [EMAIL PROTECTED] wrote:

Check out OLAPDataGrid.  It might handle pivots.


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Thursday, January 10, 2008 6:34 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] More control over datagrid? Put headings on
 the LHS instead of the top?



 Right, so that's a no on the pivot then. Cheers. Are there any articles
 out there on runtime manipulation of datagrids, or should I just hit the
 docs and start experimenting?

 Cheers,
 -Josh

 On Jan 11, 2008 11:56 AM, Gordon Smith [EMAIL PROTECTED] wrote:

  I'm wondering about how much run-time control you have over a data grid?



 Everything the DataGrid component does can be controlled at runtime.



  Can you add rows / columns at runtime?



 Yes.



  Also, is it possible to sort of pivot a table 90º anti-clockwise so
 instead of defining

  columns, you define rows, and your data appears as columns instead of
 rows?



 What do you mean by appears as columns? A DataGrid appears as a
 rectangular matrix of cells. The columns can have headers. Row headers are
 not supported.



 Gordon Smith

 Adobe Flex SDK Team


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Thursday, January 10, 2008 5:50 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] More control over datagrid? Put headings on the
 LHS instead of the top?

 Hi guys,

 I'm wondering about how much run-time control you have over a data grid?
 Can you add rows / columns at runtime? Also, is it possible to sort of pivot
 a table 90º anti-clockwise so instead of defining columns, you define rows,
 and your data appears as columns instead of rows?

 It's awfully hard to google up some advanced datagrid topics without just
 getting half-finished docs on the new advanced datagrid :D

 Not sure I explained that very well, if not let me know and I'll try and
 expand on it a bit...

 Cheers,
 -Josh

 --
 This is crazy! Why are we talking about going to bed with Wilma
 Flintstone... She'll never leave Fred and we know it. 

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]




 --
 This is crazy! Why are we talking about going to bed with Wilma
 Flintstone... She'll never leave Fred and we know it. 

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
   




-- 
This is crazy! Why are we talking about going to bed with Wilma
Flintstone... She'll never leave Fred and we know it. 

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] Re: FlexPrintJob: print image AND text [SOLVED]

2008-01-13 Thread Frederico Garcia
mitek17 escreveu:
 Hi Frederico,

 printAsBitmap is not related to the problem, as images/charts/whatever
 simply don't have enough time to be rendered.

 You should add event listeners to all your images/charts and wait for
 the creationComplete  updateComplete events.

 Cheers,
 Dmitri.


  

 --- In flexcoders@yahoogroups.com, Frederico Garcia [EMAIL PROTECTED]
 wrote:
   
 Hi,

 I'm trying to print Image and Text, and I want the text to be clear, so 
 I set printAsBitmap = false. The problem is, sometimes it prints the 
 images, sometimes it doesn't.

 Any help?

 Regards,

 Frederico Garcia

 




 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
 Yahoo! Groups Links




 __ NOD32 2787 (20080112) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.com



   
Hi,

This was due to a player bug. Updating to version 9.0.r115 solved the 
problem.

http://bugs.adobe.com/jira/browse/SDK-7698

Regards,

Frederico Garcia




RE: [flexcoders] resizing and sliding panels?

2008-01-13 Thread Justin Raymond
 

You can use the following:

mx:Resize id=shrink widthTo=0 target={navPanel} duration=1000/
 mx:Resize id=grow widthTo=240 target={navPanel} duration=1000
/

then call them to run as:
 
shrink.end();
shrink.play();
 
and
 
grow.end();
grow.play();
 
Hope this helps
 
Justin




From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alger Werft
Sent: Saturday, 12 January 2008 9:09 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] resizing and sliding panels?



what about HDividedBox?

Alger

pfkellogg schrieb:

 i have 2 panels in my app, a thin navigator panel on the left and a
 fat dashboard panel on the right. I want to click and have the
 navigator shrink to nothing while the dashboard expands to full size,
 without using states. like a sliding panel. anyone have links to
 some samples that work or any ideas? thanks.

 


 

#
Note:

This correspondence and any files transmitted with it are confidential. If you
are not the intended recipient, you must not disclose or use the information
contained in it. Any opinions expressed in this correspondence are those of the
individual sender, except where the sender expressly, and with authority, states
them to be the opinions of ABBOTSLEIGH.

If you have received this correspondence in error please notify Abbotsleigh
immediately by phone (612 9473 7900) or email ([EMAIL PROTECTED]).
Neither the sender nor ABBOTSLEIGH warrants that any communication via the 
Internet
is free of errors, viruses, interception or interference. Information is 
distributed
without warranties of any kind. 
#


[flexcoders] JSON PHP

2008-01-13 Thread vivek
I am getting this error at run time. Can anyone help?

TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at
com.adobe.serialization.json::JSONDecoder/com.adobe.serialization.json:JSONDecoder::parseValue()[C:\Development\ContractProjects\Adobe\as3corelib\src\com\adobe\serialization\json\JSONDecoder.as:197]
at
com.adobe.serialization.json::JSONDecoder$iinit()[C:\Development\ContractProjects\Adobe\as3corelib\src\com\adobe\serialization\json\JSONDecoder.as:64]
at
com.adobe.serialization.json::JSON$/decode()[C:\Development\ContractProjects\Adobe\as3corelib\src\com\adobe\serialization\json\JSON.as:81]
at CustomCalendar/CustomCalendar::modeJSON()[C:\Documents and
Settings\Vivek\My Documents\Flex Builder 2\Vandoes
DateSelector\src\CustomCalendar.mxml:50]
at CustomCalendar/__modeRequest_result()[C:\Documents and
Settings\Vivek\My Documents\Flex Builder 2\Vandoes
DateSelector\src\CustomCalendar.mxml:62]
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\dev\enterprise_bali\frameworks\mx\rpc\http\mxml\HTTPService.as:247]
at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\dev\enterprise_bali\frameworks\mx\rpc\AbstractInvoker.as:168]
at
mx.rpc::Responder/result()[C:\dev\enterprise_bali\frameworks\mx\rpc\Responder.as:48]
at
mx.rpc::AsyncRequest/acknowledge()[C:\dev\enterprise_bali\frameworks\mx\rpc\AsyncRequest.as:82]
at
DirectHTTPChannel.as$139::DirectHTTPMessageResponder/completeHandler()[C:\dev\enterprise_bali\frameworks\mx\messaging\channels\DirectHTTPChannel.as:359]
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()




[flexcoders] mx:Grid and drawing grid lines?

2008-01-13 Thread Josh McDonald
Hey guys,

Is there an easy way to get the mx:Grid layout container to draw grid lines?
I tried using a background colour and then setting colour to white on the
GridRow items, but then I only get horizontal rules. Surely there's some
code out there somewhere to do this?

Cheers,
-Josh

-- 
This is crazy! Why are we talking about going to bed with Wilma
Flintstone... She'll never leave Fred and we know it. 

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


[flexcoders] Upload/Download Files using FTP/SSH2 with Air

2008-01-13 Thread Jhonny Everson
Hi,

Does anyone have anything on using Adobe Air to transfer files to a server
that doesn't involve server side code solution? like FTP, SSH2...

Thanks,

-- 
Jhonny Everson


[flexcoders] how to update database with update datagrid value.?

2008-01-13 Thread markflex2007
Hi,

Datagrid can be editable, I need update the back end database after
Datagrid updated.

Which event I can use and how to pass the new value to backend.I am
using Coldfusion now.

Thanks

Mark



Re: [flexcoders] Imports being lost

2008-01-13 Thread Douglas Knudsen
Patrick, I have noticed this behavior.  I have not noticed since I upgraded
to the latest beta 3 though, so far.

DK

On Jan 12, 2008 5:20 PM, Dealy, Brian [EMAIL PROTECTED] wrote:

Patrick

 this may be obvious to most, but sometimes I don't realize that
 flexbuilder collapses the imports

 and represents that by putting a plus next to the first one indicating it
 can be expanded by

 clicking on plus sign next to the first import…



 sometimes the little things can elude us.

 Brian



 *From:*
 [EMAIL PROTECTED]:
 [EMAIL PROTECTED]
 *On Behalf Of *djhatrick
 *Sent:* Saturday, January 12, 2008 12:15 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Imports being lost



 I have noticed several times throughout my AS3 project in Flexbuilder,
 with linked libraries, that sometimes a few of imports at the top of
 the files, all of a sudden go missing? It's a weird bug. Anybody
 notice this?

 Thanks,
 Patrick

   




-- 
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?


[flexcoders] Re: [flexcomponents] item renderer for list

2008-01-13 Thread learner
but if I don't extend canvas...it does not let me override the set data
method if i don't make a override for set datahow can modify the
properties of the data supplied to item render  from dataprovider...??

On Jan 11, 2008 11:56 PM, Alex Harui [EMAIL PROTECTED] wrote:

You should extend UIComponent and not Canvas.  You are not using any
 Canvas features so you don't need the weight.


  --

 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] *On Behalf Of *learner
 *Sent:* Friday, January 11, 2008 2:23 AM
 *To:* [EMAIL PROTECTED]; flexcoders@yahoogroups.com
 *Subject:* [flexcomponents] item renderer for list



 hi all,
 while creating a Itemrender of for the list , I am facing stranger
 problems
 1. the data displayed in the itemrendere gets screwed up while scrolling
 2. it takes lots of time ( 1 sec ) to render list


 Can somebody please anyalyse this and tell me that what is that which is
 taking resources ...
 Any help would be great.



 here is the itemrendere :


 package ms.chatmodule.view
 {
 import flash.events.MouseEvent;

 import ms.chatmodule.controls.ChatController;
 import ms.imfusion.model.MemberObject;
 import ms.imfusion.util.view.ImageHolder;

 import mx.containers.Canvas ;
 import mx.controls.Image;
 import mx.controls.Label;
 import mx.controls.listClasses.BaseListData;
 import mx.controls.listClasses.IDropInListItemRenderer;
 import mx.controls.listClasses.IListItemRenderer ;
 import mx.controls.listClasses.ListData;
 import mx.core.BitmapAsset;
 import mx.core.IDataRenderer;
 import mx.core.UITextField;


 /**
  * Displays one row in memberList
  */
 public class MemberBox extends Canvas implements IDataRenderer,
   IDropInListItemRenderer, IListItemRenderer
 {
 private var memberName:Label;

 private var memberStatus:UITextField;

 [Embed(source='ms/felix/css/assets/felixStyle.swf',
 symbol='memberOnline')]
 private var onlineIcon:Class;

 [Embed(source='ms/felix/css/assets/felixStyle.swf',
 symbol='memberOffline')]
 private var offlineIcon:Class;

 [Embed(source='ms/felix/css/assets/felixStyle.swf',
 symbol='memberBusy')]
 private var busyIcon:Class;

 [Embed(source='ms/felix/css/assets/felixStyle.swf',
 symbol='organizer')]
 private var organizerIcon:Class;

 private var memberObject:MemberObject;
 private var statusImage:Image;
 private var orgnizerImage:Image;
 private var imgObj:BitmapAsset;
 private var avatarHolder:ImageHolder;
 private var serviceStatus:String;
 private var memberColor:uint;
 private var statusIcon:Object;
 private var statusString:String;
 /**
  * Constructor
  */
 function MemberBox() {
 super();
 this.horizontalScrollPolicy = off;
 this.verticalScrollPolicy = off
 }

 override public function set data(value:Object):void {
 super.data = value;
 memberObject = value as MemberObject;
 memberColor = 0xbababa;
 orgnizerImage.source =  new organizerIcon();
 if(memberObject.userRole == A){
 orgnizerImage.visible = true;
 }
 else{
 orgnizerImage.visible = false;
 }
 avatarHolder.unloadImage();
 //trace(setData MemberBox  + memberObject.name +  ---  +
 this.listData.owner[listData].label)
 serviceStatus = this.listData.owner[listData].label;

 statusString = ;
 statusIcon = ;
 getMemberStatuts();
 getStatusIcon();
 invalidateProperties();
 }

 private function getMemberStatuts():void {
 if(serviceStatus == L) { // event is locked
   if(memberObject.responseToLockedChoice == Y) {
   memberColor = 0x196a0c;
   }else if(memberObject.responseToLockedChoice == N) {
 memberColor = 0xff2a0e;
   }
 }
 else if(memberObject.hasResponded == 'Y'){
 memberColor = 0x0a92cb;
 }
 if(memberObject.hasSeen == U) {
 statusString = (Not Seen Yet);
 if(memberObject.inviteEmailStatus == FD) {
  statusString= (Delivery Failed);
 }
 }
 }


 private function getStatusIcon():void {
 if(memberObject.presence == Online){
 statusIcon = new onlineIcon() ;
 }
 if(memberObject.presence == Offline){
 statusIcon = new offlineIcon();
 }
 if(memberObject.presence == Busy){
 statusIcon = new busyIcon();
 }
 }

 

RE: [flexcoders] Re: XML List problems

2008-01-13 Thread Tracy Spratt
I will clean up those example snippets to remove the variable name
errors.  I apologize for that.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alger Werft
Sent: Friday, January 11, 2008 4:50 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: XML List problems

 

Concerning three of your errors:

in onResult():

You are passing in oEvent.
The next line you are using event.

You are declaring
var callToken:AsyncToke

but are using:
token.callId = myQuery1;

You are calling:
doQuery2();

The declaration of this method is nowhere to be found.

Read your code a bit more carefully. FlexBuilder gives you hints. Use
them.
Look at the lines FlexBuilder lists in the Problems-View.
If FlexBuilder says undefined property, ask yourself, is this property

declared? Have I misspelled it?
Same goes for undefined method.

markcavins schrieb:

 OK I've seen some of the errors

 mx:HTTPService id=tempXML resultFormat=e4x
 result=onResult(event)

url=https://{customer.text}.mysite.net/interface.php?action=showopenam
p;operation=showassetsamp;format=xmlamp;opstatus=critamp;username={us
ername.text}amp;password={password.text}
 /

 mx:TileList dataProvider={_xlcMyListData}
 width=344 backgroundColor=#00 color=#ff fontSize=27
 borderColor=#00 columnWidth=300 rowHeight=50
 themeColor=#808080 fontWeight=bold allowMultipleSelection=true
 id=TileList1 height=0 y=202 x=178/

 mx:Script
 ![CDATA[


 import mx.rpc.Events.ResultEvent;
 import mx.rpc.AsyncToken;
 import mx.collections.XMLListCollection;

 [Bindable]
 private var _xlcMyListData:XMLListCollection;


 var oRequest:Object = new Object();
 oRequest.Arg1 = value1;
 var callToken:AsyncToken = tempXML.send(oRequest);
 token.callId = myQuery1;

 private function onResult(oEvent:ResultEvent):void {
 var xmlResult:XML = XML(event.result);
 var xlMyListData:XMLList = xmlResult.myListData;
 _xlcMyListData = new XMLListCollection(xlMyListData);
 trace(_xlcMyListData.toXMLString());
 var callToken:AsyncToken = oEvent.token;
 var sCallId = callToken.callId;
 switch(sCallId) {
 case myQuery1:
 doQuery2();
 break;
 }


 }

 ]]
 /mx:Script

 that cut the errors is half

 1120: Access of undefined property event.
 1120: Access of undefined property oRequest.
 1120: Access of undefined property token.
 1180: Call to a possibly undefined method doQuery2.

 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  
 mailto:flexcoders%40yahoogroups.com, markcavins [EMAIL PROTECTED]

 wrote:
 
  This is what I have currently. I removed the comments to make it
  cleaner to read here.
 
  mx:HTTPService id=tempXML resultFormat=e4x
  result=onResult(event)
 

url=https://{customer.text}.mysite.net/interface.php?action=showopenam
p;operation=showassetsamp;format=xmlamp;opstatus=critamp;username={us
ername.text}amp;password={password.text}
  /
 
  mx:Script
  ![CDATA[
 
 
  import mx.rpc.Events.ResultEvent;
  import mx.rpc.AsyncToken;
  import mx.rpc.XMLListCollection;
 
  [Bindable]
  private var _xlcMyListData:XMLListCollection;
 
 
  var oRequest:Object = new Object();
  oRequest.Arg1 = value1;
  var callToken:AsyncToken = service.send(oRequest);
  token.callId = myQuery1;
 
  private function onResult(oEvent:ResultEvent):void {
  var xmlResult:XML = XML(event.result);
  var xlMyListData:XMLList = xmlResult.myListData;
  _xlcMyListData = new XMLListCollection(xlMyListData);
  trace(_xlcMyListData.toXMLString());
  var callToken:AsyncToken = oEvent.token;
  var sCallId = callToken.callId;
  switch(sCallId) {
  case myQuery1:
  doQuery2();
  break;
  }
 
 
  }
 
  ]]
  /mx:Script
 
 
  mx:TileList dataProvider={_xlcMyListData}
  width=344 backgroundColor=#00 color=#ff fontSize=27
  borderColor=#00 columnWidth=300 rowHeight=50
  themeColor=#808080 fontWeight=bold allowMultipleSelection=true
  id=TileList1 height=0 y=202 x=178/
 
 
 
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  
 mailto:flexcoders%40yahoogroups.com, Alger Werft alger.werft@
wrote:
  
   Do you import AsyncToken and XMLListCollection?
  
   markcavins schrieb:
   
Yeah thanks for the advice but I can't seem to get anything on
that
code to work and to be honest I don't even begin to understand
where
to begin on how to modify it to get it to work. Trying to get it
to
work but I get a whole mess of errors
   
1046: Type was not found or was not a compile-time constant:
  AsyncToken.
1046: Type was not found or was not a compile-time constant:
  AsyncToken.
1046: Type was not found or was not a compile-time constant:
XMLListCollection.
1120: Access of undefined property event.
1120: Access of undefined property oRequest.
1120: Access of undefined property service.
1120: Access of undefined property token.
1180: Call to a possibly undefined method doQuery2.
1180: Call to a possibly undefined method XMLListCollection.
   
Thank you 

RE: [flexcoders] Re: XML List problems

2008-01-13 Thread Tracy Spratt
Also, Mark, you can remove the AsyncToken stuff until you are ready for
it.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alger Werft
Sent: Friday, January 11, 2008 4:50 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: XML List problems

 

Concerning three of your errors:

in onResult():

You are passing in oEvent.
The next line you are using event.

You are declaring
var callToken:AsyncToke

but are using:
token.callId = myQuery1;

You are calling:
doQuery2();

The declaration of this method is nowhere to be found.

Read your code a bit more carefully. FlexBuilder gives you hints. Use
them.
Look at the lines FlexBuilder lists in the Problems-View.
If FlexBuilder says undefined property, ask yourself, is this property

declared? Have I misspelled it?
Same goes for undefined method.

markcavins schrieb:

 OK I've seen some of the errors

 mx:HTTPService id=tempXML resultFormat=e4x
 result=onResult(event)

url=https://{customer.text}.mysite.net/interface.php?action=showopenam
p;operation=showassetsamp;format=xmlamp;opstatus=critamp;username={us
ername.text}amp;password={password.text}
 /

 mx:TileList dataProvider={_xlcMyListData}
 width=344 backgroundColor=#00 color=#ff fontSize=27
 borderColor=#00 columnWidth=300 rowHeight=50
 themeColor=#808080 fontWeight=bold allowMultipleSelection=true
 id=TileList1 height=0 y=202 x=178/

 mx:Script
 ![CDATA[


 import mx.rpc.Events.ResultEvent;
 import mx.rpc.AsyncToken;
 import mx.collections.XMLListCollection;

 [Bindable]
 private var _xlcMyListData:XMLListCollection;


 var oRequest:Object = new Object();
 oRequest.Arg1 = value1;
 var callToken:AsyncToken = tempXML.send(oRequest);
 token.callId = myQuery1;

 private function onResult(oEvent:ResultEvent):void {
 var xmlResult:XML = XML(event.result);
 var xlMyListData:XMLList = xmlResult.myListData;
 _xlcMyListData = new XMLListCollection(xlMyListData);
 trace(_xlcMyListData.toXMLString());
 var callToken:AsyncToken = oEvent.token;
 var sCallId = callToken.callId;
 switch(sCallId) {
 case myQuery1:
 doQuery2();
 break;
 }


 }

 ]]
 /mx:Script

 that cut the errors is half

 1120: Access of undefined property event.
 1120: Access of undefined property oRequest.
 1120: Access of undefined property token.
 1180: Call to a possibly undefined method doQuery2.

 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  
 mailto:flexcoders%40yahoogroups.com, markcavins [EMAIL PROTECTED]

 wrote:
 
  This is what I have currently. I removed the comments to make it
  cleaner to read here.
 
  mx:HTTPService id=tempXML resultFormat=e4x
  result=onResult(event)
 

url=https://{customer.text}.mysite.net/interface.php?action=showopenam
p;operation=showassetsamp;format=xmlamp;opstatus=critamp;username={us
ername.text}amp;password={password.text}
  /
 
  mx:Script
  ![CDATA[
 
 
  import mx.rpc.Events.ResultEvent;
  import mx.rpc.AsyncToken;
  import mx.rpc.XMLListCollection;
 
  [Bindable]
  private var _xlcMyListData:XMLListCollection;
 
 
  var oRequest:Object = new Object();
  oRequest.Arg1 = value1;
  var callToken:AsyncToken = service.send(oRequest);
  token.callId = myQuery1;
 
  private function onResult(oEvent:ResultEvent):void {
  var xmlResult:XML = XML(event.result);
  var xlMyListData:XMLList = xmlResult.myListData;
  _xlcMyListData = new XMLListCollection(xlMyListData);
  trace(_xlcMyListData.toXMLString());
  var callToken:AsyncToken = oEvent.token;
  var sCallId = callToken.callId;
  switch(sCallId) {
  case myQuery1:
  doQuery2();
  break;
  }
 
 
  }
 
  ]]
  /mx:Script
 
 
  mx:TileList dataProvider={_xlcMyListData}
  width=344 backgroundColor=#00 color=#ff fontSize=27
  borderColor=#00 columnWidth=300 rowHeight=50
  themeColor=#808080 fontWeight=bold allowMultipleSelection=true
  id=TileList1 height=0 y=202 x=178/
 
 
 
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com  
 mailto:flexcoders%40yahoogroups.com, Alger Werft alger.werft@
wrote:
  
   Do you import AsyncToken and XMLListCollection?
  
   markcavins schrieb:
   
Yeah thanks for the advice but I can't seem to get anything on
that
code to work and to be honest I don't even begin to understand
where
to begin on how to modify it to get it to work. Trying to get it
to
work but I get a whole mess of errors
   
1046: Type was not found or was not a compile-time constant:
  AsyncToken.
1046: Type was not found or was not a compile-time constant:
  AsyncToken.
1046: Type was not found or was not a compile-time constant:
XMLListCollection.
1120: Access of undefined property event.
1120: Access of undefined property oRequest.
1120: Access of undefined property service.
1120: Access of undefined property token.
1180: Call to a possibly undefined method doQuery2.
1180: Call to a possibly undefined method XMLListCollection.
   
Thank you for your help Tracey
   

Re: [flexcoders] Imports being lost

2008-01-13 Thread Doug McCune
I also remember seeing this, but I don't think it has happened since the
latest beta. If I remember correctly the issue seems to occur when organize
imports would get run (possibly automatically) before I had edited the file
(ie if it was just opened). I think I noticed that if I just hit ctrl-Z to
undo it would put all the imports back, then if I edited the file and did an
organize imports it would organize them correctly. I also remember seeing
other weird things with organize imports, like the imports for things like
getTimer would get lost, but again I think that was all with a previous
beta.

So if you're not running the latest beta definitely try that.

Doug

On 1/13/08, Douglas Knudsen [EMAIL PROTECTED] wrote:

   Patrick, I have noticed this behavior.  I have not noticed since I
 upgraded to the latest beta 3 though, so far.

 DK

 On Jan 12, 2008 5:20 PM, Dealy, Brian  [EMAIL PROTECTED] wrote:

 Patrick
 
  this may be obvious to most, but sometimes I don't realize that
  flexbuilder collapses the imports
 
  and represents that by putting a plus next to the first one indicating
  it can be expanded by
 
  clicking on plus sign next to the first import…
 
 
 
  sometimes the little things can elude us.
 
  Brian
 
 
 
  *From:*
  [EMAIL PROTECTED]:
  [EMAIL PROTECTED]
  *On Behalf Of *djhatrick
  *Sent:* Saturday, January 12, 2008 12:15 PM
  *To:* flexcoders@yahoogroups.com
  *Subject:* [flexcoders] Imports being lost
 
 
 
  I have noticed several times throughout my AS3 project in Flexbuilder,
  with linked libraries, that sometimes a few of imports at the top of
  the files, all of a sudden go missing? It's a weird bug. Anybody
  notice this?
 
  Thanks,
  Patrick
 
 


 --
 Douglas Knudsen
 http://www.cubicleman.com
 this is my signature, like it?
  



RE: [flexcoders] Using an XML file as a dataProvider and accessing its data

2008-01-13 Thread Tracy Spratt
You can do both.  Bottom line, the DataGrid requires a list of items.
This can be an XMLList or Array, ONLY if you are certain you will not
need to update the data items individually.  Best practice is to use an
XMLListCollection, which is a collection of XML nodes, or an
ArrayCollection of item value objects.  Each item in the collection
produces a row.

 

Given such a list of data items, each row of the DataGrid gets a
reference to the data item producing it. You specify which property or
attribute in the item goes in which column using the DataGridColumn
object.  If the value you want is in a top-level property of the item
(an attribute or first level child node of an XML item, or a top-level
property of the item object) you can specify the dataField.  It the
value you want is nested deeper in the item object, use labelFunction().

 

There are many examples available.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of kenny14390
Sent: Friday, January 11, 2008 7:00 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Using an XML file as a dataProvider and accessing
its data

 

I started with Flex a couple days ago and I'm just learning the
basics. This shouldn't be too hard to answer, but getting me to
understand it would be the hard part! If I have an XML file with
parents, children, and siblings (see the example below), how can I
link say a DataGrid to a child element, but access its children? Refer
to the sample XML file below. Let's call it test.xml

?xml version=1.0 encoding=utf-8?
Schedule
Semester id='Spring08'
Department id='ACCT' name='Accounting'
Course id='211' name='Financial Accounting'
Section id='DIS01' limit='150' enroll='71'
Section id='ACT50' limit='25' enroll='8'/
Section id='ACT51' limit='25' enroll='12'/
/Section
Section id='DIS02' limit='41' enroll='23'
Section id='ACT56' limit='41' enroll='23'/
/Section
/Course
Course 
Section ...

/Section
/Course
...
/Department
...
/Semester
...
/Schedule

From what I understand, one way to get this document into the DataGrid
is to create an HTTPService that connects to the XML file and give it
an id, we'll call it 'file'. So in the DataGrid we would say
dataProvider='file.Schedule.Semester.Department.Course.Section'? If
this is the case, how does the DataGrid know what attributes to pull
out of the elements and how is this displayed?

Let's say I want to do some OOP and make an object for every Semester,
Department, Course, and Section. How would I read this data and create
the objects? Fields of the objects would be equivalent to the
attributes to the elements. 

Thank you all for the support

 



Re: [flexcoders] Imports being lost

2008-01-13 Thread Bjorn Schultheiss

Latest beta will imports protected functions for you :P

mx:HBox
xmlns:mx=http://www.adobe.com/2006/mxml; 
mx:Script
![CDATA[
import mx.core.Container.commitProperties;
override protected function commitProperties():void { }
]]
/mx:Script
/mx:HBox


On 14/01/2008, at 4:10 PM, Doug McCune wrote:

I also remember seeing this, but I don't think it has happened since  
the latest beta. If I remember correctly the issue seems to occur  
when organize imports would get run (possibly automatically) before  
I had edited the file (ie if it was just opened). I think I noticed  
that if I just hit ctrl-Z to undo it would put all the imports back,  
then if I edited the file and did an organize imports it would  
organize them correctly. I also remember seeing other weird things  
with organize imports, like the imports for things like getTimer  
would get lost, but again I think that was all with a previous beta.


So if you're not running the latest beta definitely try that.

Doug


On 1/13/08, Douglas Knudsen  [EMAIL PROTECTED] wrote:
Patrick, I have noticed this behavior.  I have not noticed since I  
upgraded to the latest beta 3 though, so far.


DK

On Jan 12, 2008 5:20 PM, Dealy, Brian  [EMAIL PROTECTED] wrote:
Patrick

this may be obvious to most, but sometimes I don't realize that  
flexbuilder collapses the imports


and represents that by putting a plus next to the first one  
indicating it can be expanded by


clicking on plus sign next to the first import…



sometimes the little things can elude us.

Brian



From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] 
 ] On Behalf Of djhatrick

Sent: Saturday, January 12, 2008 12:15 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Imports being lost



I have noticed several times throughout my AS3 project in Flexbuilder,
with linked libraries, that sometimes a few of imports at the top of
the files, all of a sudden go missing? It's a weird bug. Anybody
notice this?

Thanks,
Patrick





--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?








Re: [flexcoders] flexmdi compiled with flex sdk 2.0.1 hotfix 3

2008-01-13 Thread Joseph Balderson
Thanks Brian!
___

Joseph Balderson, Flash Platform Developer | http://joeflash.ca
Writing partner, Community MX | http://www.communitymx.com
Abobe Certified Developer  Trainer


madflexcoder wrote:
 I compiled the flexmdi framework with flex sdk version 2.0.1 hotfix 3.
 The download can be found in the downloads at the googlecode page.
 
 
 http://code.google.com/p/flexmdi/
 
 
 For those of you that were looking for it or having trouble compiling
 with flex 201 feel free to email me offlist for any specific problems
 that you may encounter. usual caveats apply.
 
 thanks,
 Brian..
 
 
 
 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
 Yahoo! Groups Links
 
 
 
 


Re: [flexcoders] Setting custom component properties in MXML

2008-01-13 Thread Joseph Balderson
If you are defining your component in MXML, then no, id cannot be 
private. When you define a component in MXML, the component class will 
inherit from whatever the main container class is, which in this case is 
Canvas. Canvas extends UIComponent, which defines the id attribute as 
being public. The only way to create a component with a private id 
attribute is to create the component in ActionScript, extend a subclass 
of UIcomponent, then override the id getter setter. And this goes for 
'redefining' any built-in property of a UIComponent class.

___

Joseph Balderson, Flash Platform Developer | http://joeflash.ca
Writing partner, Community MX | http://www.communitymx.com
Abobe Certified Developer  Trainer


Merrill, Jason wrote:
 When using your own custom made components in MXML, what is the best way
 to easily set properties?  I.e., say I have a simple component that has
 an image inside a panel, and I want to set the image source in my MXML,
 like this:
 
c:MyImageComponent imageSource=myPhoto.jpg /
 
 The way I figured was to setup the component like this with a public
 property - this works, but seems kinda kludgy - isn't there a more
 preferred way (WITHOUT doing it all in Actionscript)?
 
mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; 
   width=500 height=800 creationComplete=update()
   mx:Script
   ![CDATA[
   public var imageSource:String;
   
   private function update():void
   {
   userPhotoImage.source = imageSource;
   }
   ]]
   /mx:Script
   mx:Panel x=100 y=100
   mx:Image id=userPhotoImage x=10 y=10/
   /mx:Panel
/mx:Canvas
 
 Bonus question - is there a way to make the component ids inside of the
 main component private?  (i.e., in the example above, make the id for
 the mx:Image component private). Because when I see code hinting, I
 see both the public property imageSource, but also the Image component's
 id, userPhotoImage, which I would prefer to keep private.
 
   
 
 Jason Merrill
 Bank of America  
 GTO LLD Solutions Design  Development 
 eTools  Multimedia 
 
 Bank of America Flash Platform Developer Community
 
 
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
 Yahoo! Groups Links
 
 
 
 


RE: [flexcoders] Re: [flexcomponents] item renderer for list

2008-01-13 Thread Tracy Spratt
You CAN override set data() in UIComponent.

 

Look at the code for ListItemRenderer for a very good example of how to
do an renderer.  Or see Alex's examples.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of learner
Sent: Sunday, January 13, 2008 11:56 PM
To: [EMAIL PROTECTED]
Cc: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: [flexcomponents] item renderer for list

 


but if I don't extend canvas...it does not let me override the set
data method if i don't make a override for set datahow can modify
the properties of the data supplied to item render  from
dataprovider...?? 

On Jan 11, 2008 11:56 PM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

You should extend UIComponent and not Canvas.  You are not using any
Canvas features so you don't need the weight.

 



From: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ] On Behalf Of learner
Sent: Friday, January 11, 2008 2:23 AM
To: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ; flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com 
Subject: [flexcomponents] item renderer for list

 

hi all, 
while creating a Itemrender of for the list , I am facing stranger
problems
1. the data displayed in the itemrendere gets screwed up while scrolling

2. it takes lots of time ( 1 sec ) to render list


Can somebody please anyalyse this and tell me that what is that which is
taking resources ...
Any help would be great. 



here is the itemrendere :


package ms.chatmodule.view
{
import flash.events.MouseEvent;

import ms.chatmodule.controls.ChatController;
import ms.imfusion.model.MemberObject;
import ms.imfusion.util.view.ImageHolder;

import mx.containers.Canvas ;
import mx.controls.Image;
import mx.controls.Label;
import mx.controls.listClasses.BaseListData;
import mx.controls.listClasses.IDropInListItemRenderer;
import mx.controls.listClasses.IListItemRenderer ;
import mx.controls.listClasses.ListData;
import mx.core.BitmapAsset;
import mx.core.IDataRenderer;
import mx.core.UITextField;


/**
 * Displays one row in memberList 
 */
public class MemberBox extends Canvas implements IDataRenderer,
  IDropInListItemRenderer, IListItemRenderer
{
private var memberName:Label;

private var memberStatus:UITextField;

[Embed(source='ms/felix/css/assets/felixStyle.swf',
symbol='memberOnline')]  
private var onlineIcon:Class;

[Embed(source='ms/felix/css/assets/felixStyle.swf',
symbol='memberOffline')]  
private var offlineIcon:Class;

[Embed(source='ms/felix/css/assets/felixStyle.swf',
symbol='memberBusy')]  
private var busyIcon:Class;

[Embed(source='ms/felix/css/assets/felixStyle.swf',
symbol='organizer')]
private var organizerIcon:Class; 

private var memberObject:MemberObject; 
private var statusImage:Image;
private var orgnizerImage:Image;
private var imgObj:BitmapAsset; 
private var avatarHolder:ImageHolder;
private var serviceStatus:String; 
private var memberColor:uint;
private var statusIcon:Object;
private var statusString:String; 
/**
 * Constructor
 */
function MemberBox() { 
super();
this.horizontalScrollPolicy = off;
this.verticalScrollPolicy = off
}

override public function set data(value:Object):void { 
super.data = value;
memberObject = value as MemberObject; 
memberColor = 0xbababa;
orgnizerImage.source =  new organizerIcon();
if(memberObject.userRole == A){
orgnizerImage.visible = true;
}
else{
orgnizerImage.visible = false;
}
avatarHolder.unloadImage();
//trace(setData MemberBox  + memberObject.name +  ---  +
this.listData.owner[listData].label)
serviceStatus = this.listData.owner[listData].label;

statusString = ; 
statusIcon = ;
getMemberStatuts();
getStatusIcon();
invalidateProperties();
}

private function getMemberStatuts():void { 
if(serviceStatus == L) { // event is locked
  if(memberObject.responseToLockedChoice == Y) {
  memberColor = 0x196a0c;
  }else if(memberObject.responseToLockedChoice == N) {
memberColor = 0xff2a0e;
  }
} 
else if(memberObject.hasResponded == 'Y'){
memberColor = 0x0a92cb;
} 
if(memberObject.hasSeen == U) {
  

Re: [flexcoders] Imports being lost

2008-01-13 Thread Doug McCune
oh yeah, I've seen that too, that's a good one :) But at least it's better
than losing all your imports... two steps forward, one step back...

On 1/13/08, Bjorn Schultheiss [EMAIL PROTECTED] wrote:

   Latest beta will imports protected functions for you :P

 mx:HBox
 xmlns:mx=http://www.adobe.com/2006/mxml; 
 mx:Script
 ![CDATA[
 import mx.core.Container.commitProperties;
 override protected function commitProperties():void { }
 ]]
 /mx:Script
 /mx:HBox


 On 14/01/2008, at 4:10 PM, Doug McCune wrote:

 I also remember seeing this, but I don't think it has happened since the
 latest beta. If I remember correctly the issue seems to occur when organize
 imports would get run (possibly automatically) before I had edited the file
 (ie if it was just opened). I think I noticed that if I just hit ctrl-Z to
 undo it would put all the imports back, then if I edited the file and did an
 organize imports it would organize them correctly. I also remember seeing
 other weird things with organize imports, like the imports for things like
 getTimer would get lost, but again I think that was all with a previous
 beta.

 So if you're not running the latest beta definitely try that.

 Doug

 On 1/13/08, Douglas Knudsen  [EMAIL PROTECTED][EMAIL PROTECTED]
 wrote:
 
  Patrick, I have noticed this behavior.  I have not noticed since I
  upgraded to the latest beta 3 though, so far.
 
  DK
 
  On Jan 12, 2008 5:20 PM, Dealy, Brian  [EMAIL PROTECTED] wrote:
 
   Patrick
  
   this may be obvious to most, but sometimes I don't realize that
   flexbuilder collapses the imports
  
   and represents that by putting a plus next to the first one indicating
   it can be expanded by
  
   clicking on plus sign next to the first import…
  
  
  
   sometimes the little things can elude us.
  
   Brian
  
  
  
   *From:*
   [EMAIL PROTECTED]
[EMAIL PROTECTED]
   [mailto:
   [EMAIL PROTECTED]
[EMAIL PROTECTED]
   ] *On Behalf Of *djhatrick
   *Sent:* Saturday, January 12, 2008 12:15 PM
   *To:* flexcoders@yahoogroups.com
   *Subject:* [flexcoders] Imports being lost
  
  
  
   I have noticed several times throughout my AS3 project in Flexbuilder,
   with linked libraries, that sometimes a few of imports at the top of
   the files, all of a sudden go missing? It's a weird bug. Anybody
   notice this?
  
   Thanks,
   Patrick
  
  
 
 
  --
  Douglas Knudsen
  http://www.cubicleman.com  http://www.cubicleman.com
  this is my signature, like it?
 



  


[flexcoders] adding and refering the childs of a container

2008-01-13 Thread shrikant.patil

hi,
here i am with a problem, i m creating a chat based flex application in
which when ever i click on an name of the user it opens a new window, which
contains a text area, input text etc... this happens each time what i want
to chat with a person. ( think like yahoo messanger).

So for creating seprate window i used FLEDMDI framework in flex 2.0.1 which
works well..
when i double click on a user name it opens a new window, inside this new
window i created a MXML component which is added as as a child to this
window container.. this addition is also works fine ,

but the problem is how can i refer these components text box etc... bcoz
when a new message comes form a user then i need to populate it in his
window only

so it is neccssary for me to hold dynamically created component child
reference. 
how may i achive this.??
and in action script 3 we cannot create controls as in AS2 where we can
assign a String+variable name as a control name..

so what might b the solution??
thanks in advance
shri 

-- 
View this message in context: 
http://www.nabble.com/adding-and-refering-the-childs-of-a-container-tp14795865p14795865.html
Sent from the FlexCoders mailing list archive at Nabble.com.



RE: [flexcoders] mx:Grid and drawing grid lines?

2008-01-13 Thread Alex Harui
borderStyle?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Sunday, January 13, 2008 6:37 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] mx:Grid and drawing grid lines?

 

Hey guys,

Is there an easy way to get the mx:Grid layout container to draw grid
lines? I tried using a background colour and then setting colour to
white on the GridRow items, but then I only get horizontal rules. Surely
there's some code out there somewhere to do this? 

Cheers,
-Josh

-- 
This is crazy! Why are we talking about going to bed with Wilma
Flintstone... She'll never leave Fred and we know it. 

:: Josh 'G-Funk' McDonald 
:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  

 



RE: [flexcoders] Easing List Control

2008-01-13 Thread Alex Harui
That would require smooth scrolling which got cut from Flex 3.  The
hooks are potentially in there, but I don't think there's a reference
implementation yet.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of rueter007
Sent: Sunday, January 13, 2008 12:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Easing List Control

 

Hello, does anybody have any idea on how to create a flex list control
which has an easing scrolling? The default list component snaps to the
selected index rather than gently easing. I am wondering if there is a
simple property that I am not aware of or if it is much more than that.
Thanks in advance.

 



[flexcoders] Re: [flexcomponents] item renderer for list

2008-01-13 Thread learner
yes thanks seeing it !
On Jan 14, 2008 11:36 AM, Alex Harui [EMAIL PROTECTED] wrote:

You implement your own setter for data.  You don't need to override
 anything.  See ListItemRenderer or TextInput or Label for examples


  --

 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] *On Behalf Of *learner
 *Sent:* Sunday, January 13, 2008 8:56 PM
 *To:* [EMAIL PROTECTED]
 *Cc:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcomponents] item renderer for list




 but if I don't extend canvas...it does not let me override the set data
 method if i don't make a override for set datahow can modify the
 properties of the data supplied to item render  from dataprovider...??

 On Jan 11, 2008 11:56 PM, Alex Harui [EMAIL PROTECTED] wrote:

 You should extend UIComponent and not Canvas.  You are not using any
 Canvas features so you don't need the weight.


  --

 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] *On Behalf Of *learner
 *Sent:* Friday, January 11, 2008 2:23 AM
 *To:* [EMAIL PROTECTED]; flexcoders@yahoogroups.com
 *Subject:* [flexcomponents] item renderer for list



 hi all,
 while creating a Itemrender of for the list , I am facing stranger
 problems
 1. the data displayed in the itemrendere gets screwed up while scrolling
 2. it takes lots of time ( 1 sec ) to render list


 Can somebody please anyalyse this and tell me that what is that which is
 taking resources ...
 Any help would be great.



 here is the itemrendere :


 package ms.chatmodule.view
 {
 import flash.events.MouseEvent;

 import ms.chatmodule.controls.ChatController;
 import ms.imfusion.model.MemberObject;
 import ms.imfusion.util.view.ImageHolder;

 import mx.containers.Canvas ;
 import mx.controls.Image;
 import mx.controls.Label;
 import mx.controls.listClasses.BaseListData;
 import mx.controls.listClasses.IDropInListItemRenderer;
 import mx.controls.listClasses.IListItemRenderer ;
 import mx.controls.listClasses.ListData;
 import mx.core.BitmapAsset;
 import mx.core.IDataRenderer;
 import mx.core.UITextField;


 /**
  * Displays one row in memberList
  */
 public class MemberBox extends Canvas implements IDataRenderer,
   IDropInListItemRenderer, IListItemRenderer
 {
 private var memberName:Label;

 private var memberStatus:UITextField;

 [Embed(source='ms/felix/css/assets/felixStyle.swf',
 symbol='memberOnline')]
 private var onlineIcon:Class;

 [Embed(source='ms/felix/css/assets/felixStyle.swf',
 symbol='memberOffline')]
 private var offlineIcon:Class;

 [Embed(source='ms/felix/css/assets/felixStyle.swf',
 symbol='memberBusy')]
 private var busyIcon:Class;

 [Embed(source='ms/felix/css/assets/felixStyle.swf',
 symbol='organizer')]
 private var organizerIcon:Class;

 private var memberObject:MemberObject;
 private var statusImage:Image;
 private var orgnizerImage:Image;
 private var imgObj:BitmapAsset;
 private var avatarHolder:ImageHolder;
 private var serviceStatus:String;
 private var memberColor:uint;
 private var statusIcon:Object;
 private var statusString:String;
 /**
  * Constructor
  */
 function MemberBox() {
 super();
 this.horizontalScrollPolicy = off;
 this.verticalScrollPolicy = off
 }

 override public function set data(value:Object):void {
 super.data = value;
 memberObject = value as MemberObject;
 memberColor = 0xbababa;
 orgnizerImage.source =  new organizerIcon();
 if(memberObject.userRole == A){
 orgnizerImage.visible = true;
 }
 else{
 orgnizerImage.visible = false;
 }
 avatarHolder.unloadImage();
 //trace(setData MemberBox  + memberObject.name +  ---  +
 this.listData.owner[listData].label)
 serviceStatus = this.listData.owner[listData].label;

 statusString = ;
 statusIcon = ;
 getMemberStatuts();
 getStatusIcon();
 invalidateProperties();
 }

 private function getMemberStatuts():void {
 if(serviceStatus == L) { // event is locked
   if(memberObject.responseToLockedChoice == Y) {
   memberColor = 0x196a0c;
   }else if(memberObject.responseToLockedChoice == N) {
 memberColor = 0xff2a0e;
   }
 }
 else if(memberObject.hasResponded == 'Y'){
 memberColor = 0x0a92cb;
 }
 if(memberObject.hasSeen == U) {
 statusString = (Not Seen Yet);
 if(memberObject.inviteEmailStatus == FD) {
  

RE: [flexcoders] big problem

2008-01-13 Thread Alex Harui
What happens when you run the debug version of your app on the debugger
player for 9,0,115,0?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of adnane_1979
Sent: Sunday, January 13, 2008 4:13 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] big problem

 

I developed a flex 2 application, and i's been on production for a 
while now.
But last week some of my clients were complaining that the application 
doesn't work anymore, after i've checked with them ,i found out that 
the application doesn't work with the new version of flash player 
9.0.1115.0
When i've tried to run the application with this version of flash 
player ,I've got a blank page.
So i dont know what to do now,should i change some thing on the code of 
the application it self or what?
Please, if some body knows about this issue, help me, because it's very 
urgent.

Thanks in advance

 



[flexcoders] RE: [flexcomponents] item renderer for list

2008-01-13 Thread Alex Harui
You implement your own setter for data.  You don't need to override
anything.  See ListItemRenderer or TextInput or Label for examples

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of learner
Sent: Sunday, January 13, 2008 8:56 PM
To: [EMAIL PROTECTED]
Cc: flexcoders@yahoogroups.com
Subject: Re: [flexcomponents] item renderer for list

 


but if I don't extend canvas...it does not let me override the set
data method if i don't make a override for set datahow can modify
the properties of the data supplied to item render  from
dataprovider...?? 

On Jan 11, 2008 11:56 PM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

You should extend UIComponent and not Canvas.  You are not using any
Canvas features so you don't need the weight.

 



From: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ] On Behalf Of learner
Sent: Friday, January 11, 2008 2:23 AM
To: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ; flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com 
Subject: [flexcomponents] item renderer for list

 

hi all, 
while creating a Itemrender of for the list , I am facing stranger
problems
1. the data displayed in the itemrendere gets screwed up while scrolling

2. it takes lots of time ( 1 sec ) to render list


Can somebody please anyalyse this and tell me that what is that which is
taking resources ...
Any help would be great. 



here is the itemrendere :


package ms.chatmodule.view
{
import flash.events.MouseEvent;

import ms.chatmodule.controls.ChatController;
import ms.imfusion.model.MemberObject;
import ms.imfusion.util.view.ImageHolder;

import mx.containers.Canvas ;
import mx.controls.Image;
import mx.controls.Label;
import mx.controls.listClasses.BaseListData;
import mx.controls.listClasses.IDropInListItemRenderer;
import mx.controls.listClasses.IListItemRenderer ;
import mx.controls.listClasses.ListData;
import mx.core.BitmapAsset;
import mx.core.IDataRenderer;
import mx.core.UITextField;


/**
 * Displays one row in memberList 
 */
public class MemberBox extends Canvas implements IDataRenderer,
  IDropInListItemRenderer, IListItemRenderer
{
private var memberName:Label;

private var memberStatus:UITextField;

[Embed(source='ms/felix/css/assets/felixStyle.swf',
symbol='memberOnline')]  
private var onlineIcon:Class;

[Embed(source='ms/felix/css/assets/felixStyle.swf',
symbol='memberOffline')]  
private var offlineIcon:Class;

[Embed(source='ms/felix/css/assets/felixStyle.swf',
symbol='memberBusy')]  
private var busyIcon:Class;

[Embed(source='ms/felix/css/assets/felixStyle.swf',
symbol='organizer')]
private var organizerIcon:Class; 

private var memberObject:MemberObject; 
private var statusImage:Image;
private var orgnizerImage:Image;
private var imgObj:BitmapAsset; 
private var avatarHolder:ImageHolder;
private var serviceStatus:String; 
private var memberColor:uint;
private var statusIcon:Object;
private var statusString:String; 
/**
 * Constructor
 */
function MemberBox() { 
super();
this.horizontalScrollPolicy = off;
this.verticalScrollPolicy = off
}

override public function set data(value:Object):void { 
super.data = value;
memberObject = value as MemberObject; 
memberColor = 0xbababa;
orgnizerImage.source =  new organizerIcon();
if(memberObject.userRole == A){
orgnizerImage.visible = true;
}
else{
orgnizerImage.visible = false;
}
avatarHolder.unloadImage();
//trace(setData MemberBox  + memberObject.name +  ---  +
this.listData.owner[listData].label)
serviceStatus = this.listData.owner[listData].label;

statusString = ; 
statusIcon = ;
getMemberStatuts();
getStatusIcon();
invalidateProperties();
}

private function getMemberStatuts():void { 
if(serviceStatus == L) { // event is locked
  if(memberObject.responseToLockedChoice == Y) {
  memberColor = 0x196a0c;
  }else if(memberObject.responseToLockedChoice == N) {
memberColor = 0xff2a0e;
  }
} 
else if(memberObject.hasResponded == 'Y'){
memberColor = 0x0a92cb;
} 
if(memberObject.hasSeen == U) {
statusString = (Not Seen Yet);

Re: [flexcoders] Setting custom component properties in MXML

2008-01-13 Thread Doug McCune
To go back to your original example, it does seem a bit kludgy to me too. In
this case I would use databinding like so:

mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=500
height=800
mx:Script
![CDATA[
[Bindable]
public var imageSource:String;
]]
/mx:Script
mx:Panel x=100 y=100
mx:Image source={imageSource} x=10 y=10/
/mx:Panel
/mx:Canvas

If I'm making MXML components I often do stuff like that and just use
bindable public properties to pass through variables, which works well for
these simple cases.

Doug

On 1/13/08, Joseph Balderson [EMAIL PROTECTED] wrote:

   If you are defining your component in MXML, then no, id cannot be
 private. When you define a component in MXML, the component class will
 inherit from whatever the main container class is, which in this case is
 Canvas. Canvas extends UIComponent, which defines the id attribute as
 being public. The only way to create a component with a private id
 attribute is to create the component in ActionScript, extend a subclass
 of UIcomponent, then override the id getter setter. And this goes for
 'redefining' any built-in property of a UIComponent class.

 __

 Joseph Balderson, Flash Platform Developer | http://joeflash.ca
 Writing partner, Community MX | http://www.communitymx.com
 Abobe Certified Developer  Trainer


 Merrill, Jason wrote:
  When using your own custom made components in MXML, what is the best way
  to easily set properties? I.e., say I have a simple component that has
  an image inside a panel, and I want to set the image source in my MXML,
  like this:
 
  c:MyImageComponent imageSource=myPhoto.jpg /
 
  The way I figured was to setup the component like this with a public
  property - this works, but seems kinda kludgy - isn't there a more
  preferred way (WITHOUT doing it all in Actionscript)?
 
  mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml;
  width=500 height=800 creationComplete=update()
  mx:Script
  ![CDATA[
  public var imageSource:String;
 
  private function update():void
  {
  userPhotoImage.source = imageSource;
  }
  ]]
  /mx:Script
  mx:Panel x=100 y=100
  mx:Image id=userPhotoImage x=10 y=10/
  /mx:Panel
  /mx:Canvas
 
  Bonus question - is there a way to make the component ids inside of the
  main component private? (i.e., in the example above, make the id for
  the mx:Image component private). Because when I see code hinting, I
  see both the public property imageSource, but also the Image component's
  id, userPhotoImage, which I would prefer to keep private.
 
 
 
  Jason Merrill
  Bank of America
  GTO LLD Solutions Design  Development
  eTools  Multimedia
 
  Bank of America Flash Platform Developer Community
 
 
 
 
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
 
 
 
 

  



Re: [flexcoders] adding and refering the childs of a container

2008-01-13 Thread yigit
just keep a userVO - window dictionary (which maps users to their windows)
then when a message comes, you can find the corresponding window looking 
at the
dictionary.
through the window, you can reach it's components.
to make this easy,give id's to inner components (text input etc)

shrikant.patil wrote On 01/14/2008 08:10 AM:


 hi,
 here i am with a problem, i m creating a chat based flex application in
 which when ever i click on an name of the user it opens a new window, 
 which
 contains a text area, input text etc... this happens each time what i want
 to chat with a person. ( think like yahoo messanger).

 So for creating seprate window i used FLEDMDI framework in flex 2.0.1 
 which
 works well..
 when i double click on a user name it opens a new window, inside this new
 window i created a MXML component which is added as as a child to this
 window container.. this addition is also works fine ,

 but the problem is how can i refer these components text box 
 etc... bcoz
 when a new message comes form a user then i need to populate it in his
 window only

 so it is neccssary for me to hold dynamically created component child
 reference.
 how may i achive this.??
 and in action script 3 we cannot create controls as in AS2 where we can
 assign a String+variable name as a control name..

 so what might b the solution??
 thanks in advance
 shri

 -- 
 View this message in context: 
 http://www.nabble.com/adding-and-refering-the-childs-of-a-container-tp14795865p14795865.html
  
 http://www.nabble.com/adding-and-refering-the-childs-of-a-container-tp14795865p14795865.html
 Sent from the FlexCoders mailing list archive at Nabble.com.

  



Re: [flexcoders] adding and refering the childs of a container

2008-01-13 Thread shrikant.patil

hi 
thanks for u r response.

as u mentioned, i did like that:

below is mine code:
this is how i m adding the MDIWindow container and i m adding a textbox to
inside of MDIWindow container. this works fine it adds a textbox for
each window...

 var mdiWindow:MDIWindow = new
MDIWindow();
   mdiWindow.id = selectedCLientUid.toString();
   mdiWindow.title = selectedClientName;
   
  var MsgArea:TextArea = new TextArea();
  MsgArea.name = selectedCLientUid.toString();
  mdiWindow.addChild(MsgArea);
  MsgArea.id = selectedCLientUid.toString();
  MsgArea.name = selectedCLientUid.toString();
mdiWindow.addChild(MsgArea);
   
mdiCanvas.windowManager.add(mdiWindow);

later i want to refer a perticular window... how can i refer a
perticulear textArea.. using assigner name ot id?

please help me


yiğit boyar wrote:
 
 just keep a userVO - window dictionary (which maps users to their windows)
 then when a message comes, you can find the corresponding window looking 
 at the
 dictionary.
 through the window, you can reach it's components.
 to make this easy,give id's to inner components (text input etc)
 
 shrikant.patil wrote On 01/14/2008 08:10 AM:


 hi,
 here i am with a problem, i m creating a chat based flex application in
 which when ever i click on an name of the user it opens a new window, 
 which
 contains a text area, input text etc... this happens each time what i
 want
 to chat with a person. ( think like yahoo messanger).

 So for creating seprate window i used FLEDMDI framework in flex 2.0.1 
 which
 works well..
 when i double click on a user name it opens a new window, inside this new
 window i created a MXML component which is added as as a child to this
 window container.. this addition is also works fine ,

 but the problem is how can i refer these components text box 
 etc... bcoz
 when a new message comes form a user then i need to populate it in his
 window only

 so it is neccssary for me to hold dynamically created component child
 reference.
 how may i achive this.??
 and in action script 3 we cannot create controls as in AS2 where we can
 assign a String+variable name as a control name..

 so what might b the solution??
 thanks in advance
 shri

 -- 
 View this message in context: 
 http://www.nabble.com/adding-and-refering-the-childs-of-a-container-tp14795865p14795865.html
  
 http://www.nabble.com/adding-and-refering-the-childs-of-a-container-tp14795865p14795865.html
 Sent from the FlexCoders mailing list archive at Nabble.com.

  
 
 
 

-- 
View this message in context: 
http://www.nabble.com/adding-and-refering-the-childs-of-a-container-tp14795865p14796728.html
Sent from the FlexCoders mailing list archive at Nabble.com.