Search the web
Sign In
New User? Sign Up
flexcoders · RIA Development with Adobe Flex
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 109435 - 109466 of 150960   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#109466 From: "jrunrandy" <ranielse@...>
Date: Wed Apr 9, 2008 9:34 pm
Subject: Re: What's wrong with http://livedocs.adobe.com/flex/3/html/help.html
jrunrandy
Offline Offline
Send Email Send Email
 
We're currently seeing a caching corruption problem with LiveDocs in
which random files display instead of the correct pages. You'll see a
variety of symptoms:
* The wrong page displays
* Infinite loops in the TOC (this happens when LD loads a .js file
instead of an HTML file)
* Bad formatting (when a CSS file doesn't load properly)

The good news is that our web team has identified the bug that causes
this. The bad news is that they're still testing the fix and it won't
get rolled out until April 17.

I've had fairly random results over the last few days. Sometimes
changing browsers helps, sometimes it doesn't; sometimes clearing
browser cache fixes it, sometimes it doesn't. One suggestion is to
download the complete Flex doc zip file, which contains usage docs in
PDF and the Language Reference in HTML and access the docs locally.
This is available at
http://livedocs.adobe.com/flex/3/flex3_documentation.zip. Individual
PDFs are available from the Flex Help Resource Center page:
http://www.adobe.com/support/documentation/en/flex/

I sincerely apologize for the inconvenience this is causing.
Randy Nielsen
Flex Documentation Manager

#109465 From: "Douglas Knudsen" <douglasknudsen@...>
Date: Wed Apr 9, 2008 9:33 pm
Subject: Re: Threshold Line in a Chart
dtk_atl
Offline Offline
Send Email Send Email
 
Flex 2?  look for Ely Greenfiedls DataDrawingCanvas  Flex 3?  Look for CartesianDrawingCanvas in the API.  These allow you to draw on the graph based on data values in the data.  If that doesn't work, you might be able to place a chart over a chart.

DK

On Wed, Apr 9, 2008 at 4:58 PM, Tyler Frieling <tfrieling@...> wrote:

Hi,

 I want to add a threshold line across a plot chart to indicate what is normal e.g. Y=10 but I cannot figure out from the documentation how best to go about this. The value will change so putting a component over the graph will not do.

 Any suggestions or examples? I was thinking of iterating through each gridline and setting visible=false for all but y=10 but I cannot figure out how to determine what y value the vertical gridlines represent.

 Thanks

tyler

_ps. After some late night coding I inadvertently replied to "RE: [flexcoders] n00b Sanity Check..." . I attribute the error to Red Bull Light. My bad.




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

#109464 From: "Alex Harui" <aharui@...>
Date: Wed Apr 9, 2008 9:32 pm
Subject: RE: List + bonus code + CS3
alex_harui
Offline Offline
Send Email Send Email
 

I don’t have time to run your code.  The issue of how to size multiline text in a renderer comes up every week.  You’ll see solutions in the archives.

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Kenneth Sutherland
Sent: Wednesday, April 09, 2008 12:54 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] List + bonus code + CS3

 

(first whoops for sending empty message, bad twitchy finger!).

 

Hi I wish to create a List/TileList with a list of ItemRenderers. The height of the renderers is unknown and each one can be slightly different.  When I'm trying to create the said list I can't get the heights to be dynamic enough.  I've had various results while trying out different approaches but essentially none of them worked as I wanted.  So I've attached some test files to explain and show what I'm after.  Also as a bonus for taking time to look at the issue I've included some code which if you've ever wanted to create a canvas with individual corner radii then feel free to take it and modify.  I've been meaning to create a blog and post up some of my work but as yet haven't done it.  My CornerCanvas seemed like a good enough thing to start with (I'm sure that I've seen an example of it online somewhere else but when I needed it I couldn't find it, so I wrote my own).

 

Anyway look at the example (TilelistTest.mxml is the main app file)and you'll see that some of the textArea's are bigger than the text and some are to small (they have scrollbars).  I want the textAreas to be just big enough and the rowHeight should be variable but it never actually seems to work (I know that varibleRowHeight gets ignored by the TileList).

 

Also if you've read this far and run the example, how easy would this be to do in CS3, I've seen a couple of tutorial videos on CS3 for creating Flex components and I was wondering if there were any CS3 experts with a bit of advice.  If CS3 could do this kind of component quicker than in flexbuilder then I'm going to look into learning it otherwise I'll just leave it as a distant thought :)

 

Cheers.

 

 

Kenneth Sutherland

Technical Developer

Realise Ltd

0131 476 7432

www.realise.com

"enlightened e-business solutions"

 



Disclaimer


This electronic message contains information which may be privileged and confidential. The information is intended to be for the use of the individual(s) or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic message in error, please notify us by telephone on 0131 476 6000 and delete the material from your computer.
Registered in Scotland number: SC 172507.
Registered office address: Quay House 142 Commercial Street Edinburgh EH6 6LB.

This email message has been scanned for viruses by Mimecast.



#109463 From: "Alex Harui" <aharui@...>
Date: Wed Apr 9, 2008 9:30 pm
Subject: RE: The issue with duplicate strings in ListBase controls - looking for a workaround
alex_harui
Offline Offline
Send Email Send Email
 

The essence of the problem is that you are trying to show text nodes in a Tree which isn’t really supported.  Converting text nodes to element nodes is the general workaround.

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Nikolaj Selvik
Sent: Wednesday, April 09, 2008 12:26 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] The issue with duplicate strings in ListBase controls - looking for a workaround

 

Hi Alex,

I'm afraid that isn't possible. The code below was just an example, what I need is a global solution to this problem..


On Wed, Apr 9, 2008 at 6:03 AM, Alex Harui <aharui@adobe.com> wrote:

Can you change your data so you don't use text nodes?

 

        <width><data label="300" /></width>


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of nikolajselvik
Sent: Tuesday, April 08, 2008 5:58 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] The issue with duplicate strings in ListBase controls - looking for a workaround

 

Hi,

Take the below example and expand two of the tree nodes so that you have two instances of "300" showing in the tree. Try to select one, and then the other. Right, you can't. This same issue exists in all list ListBase controls. I may just be unlucky but I have run into this problem in just about every Flex app I have developed so far...

Filed a bug report (like many others, a quick search gives me SDK-14764, SDK-13690, SDK-7981, SDK-11307, SDK-13690, SDK-12631) but the problem repeatedly either gets deferred or labeled NAB..

Now I am in a project where this just needs to be fixed so I am looking for some sort of stable workaround. Has anyone else tackled this problem and come up with one yet? I see that the root of the problem in at least the below case is that the "300" leafs do not get assigned a UID - why is this?

Thankful for any answers!



<?xml version="1.0" encoding="utf-8"?>
<! mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" initialize="onInitialize()" xmlns:test="*">
   
    <mx:Script>
        <![CDATA[
        import mx.collections.XMLListCollection;
   
        [Bindable]
        private var treeData:XMLListCollection;
       
        private function onInitialize():void
        {
            treeData = new XMLListCollection(xmlData);
        }
       
        private function treeLabelFunction(node:XML):String
        {

   !  & nbsp;      var label:String = new String();


           
            switch(node.nodeKind())
            {
                case "element":
                label = node.localName();
                break;
                case "text":
                label = node.toString();
                break;
            }
           

&nbs! p;           return label;


        }
        ]]>
    </mx:Script>
   
    <mx:XMLList id="xmlData">
    <box>
        <width>300</width>
        <height>300</height>
        <depth>300</depth>
    </box>
    </mx:XMLList>
   
   
    <mx:Tree dataProvider="{treeData}" labelFunction="treeLabelFunction" width="250" height="400"/>
   
   
</mx:Application>




--
Nikolaj Selvik
Spångatan 14G
21144 Malmö
Sweden

Phone: +46 (0)736 475050
Mail: nikolaj@membla.net
WWW: http://www.membla.net


#109462 From: "Alex Harui" <aharui@...>
Date: Wed Apr 9, 2008 9:29 pm
Subject: RE: What use is Tree.calculateDropIndex(event) ?
alex_harui
Offline Offline
Send Email Send Email
 

In calculateDropIndicatorY, you’ll see code that tries to correct for this.

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of bobpardoe1959
Sent: Wednesday, April 09, 2008 5:46 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] What use is Tree.calculateDropIndex(event) ?

 

In a tree component that is larger than the rows of data in the tree,
is reports the row where data would go if there was data in that
position's x,y coordinates.

Try creating a tree 300 high and putting two rows under a root element
in it and then do a trace of calculateDropIndex in the dragOver event.

Depending on the height of the tree relative to the row height you
will see drop indexes as high as 9

If you then perform the drop operation, the drop index is not the last
index of the data provider i.e 2 as you would expect, but still the
last drop index calculated i.e. 9.

I want to get the index of the last row in the data provider as viewed
on screen - any ideas given that this method that seems to be used by
bloggers (Peter Ent et al), does not work in this way.

Thanks

BOb


#109461 From: "ryanphelan" <ryanphelan@...>
Date: Wed Apr 9, 2008 9:00 pm
Subject: Re: “Multiple sets of visual children have been specified for this component”
ryanphelan
Offline Offline
Send Email Send Email
 
You can call tabNavigator.removeChild( childOfTN ), but you will have
to add some extra logic to make sure it gets added back at the same
position.  (Calling addChild( childOfTN ) will place the tab at the
far right side of the list)  Plus there is some overhead in adding and
removing the contents of your tab...  It might be easier to swap your
TabNavigator out for a TabBar and ViewStack.

-Ryan


<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

	 <mx:Script>
		 <![CDATA[
			 import mx.core.UIComponent;

			 private function toggleTab( tab:UIComponent ):void
			 {
				 if( tn.contains( tab ) )
					 tn.removeChild( tab );
				 else
					 tn.addChild( tab );
			 }
		 ]]>
	 </mx:Script>

     <mx:Panel title="TabNavigator Container Example" height="90%"
width="90%"
         paddingTop="10" paddingLeft="10" paddingRight="10"
paddingBottom="10">

         <mx:Label width="100%" color="blue"
             text="Select the tabs to change the panel."/>

         <mx:TabNavigator id="tn"  width="100%" height="100%">
             <!-- Define each panel using a VBox container. -->

             <mx:VBox id="tab1" label="Panel 1">
                 <mx:Label text="TabNavigator container panel 1"/>
             </mx:VBox>

             <mx:VBox id="tab2" label="Panel 2">
                 <mx:Label text="TabNavigator container panel 2"/>
             </mx:VBox>

             <mx:VBox id="tab3" label="Panel 3">
                 <mx:Label text="TabNavigator container panel 3"/>
             </mx:VBox>
         </mx:TabNavigator>

         <mx:Label width="100%" color="blue"
             text="Programmatically select the panel using a Button
control."/>

         <mx:HBox>
             <mx:Button label="Toggle Tab 1" click="toggleTab(tab1);"/>
             <mx:Button label="Toggle Tab 2" click="toggleTab(tab2);"/>
             <mx:Button label="Toggle Tab 3" click="toggleTab(tab3);"/>
         </mx:HBox>

     </mx:Panel>
</mx:Application>


--- In flexcoders@yahoogroups.com, "Dennis Falling" <dfalling@...> wrote:
>
> I'm using a TabNavigator, which I don't think can take a dataProvder
(can't
> get on livedocs right now, for some reason it's in Chinese.)  The
problem is
> that I want to make the entire tab disappear, not just effect the data
> inside it (which is handled via dataproviders).  Each element in the
tab is
> a (complex) custom mxml component (all based on VBox).
>
> Thanks.
>
> On Wed, Apr 9, 2008 at 2:39 PM, ryanphelan <ryanphelan@...> wrote:
>
> >   What component are you using (TabBar, ToggleButtonBar, TabNavigator,
> > etc.)?
> >
> > Normally, you would have a collection (like an ArrayCollection) as
> > your dataProvider, and then you can add or remove items from the
> > collection and your tab component will update accordingly.
> >
> > -Ryan
> >
> >
> > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>,
"Dennis
> > Falling" <dfalling@> wrote:
> > >
> > > I'm trying to programmatically hide/show a tab in an interface.
I found
> > > that there isn't a way to toggle visibility/include in layout, so
> > decided to
> > > remove it when it's not applicable and add it back when it is.
> > >
> > > When I try to add it back, though, I get the error *"Multiple sets
> > of visual
> > > children have been specified for this component" *and the add fails.
> > I'm
> > > trying to add it back to the same element I removed it from, so what
> > am I
> > > doing wrong? Is there a better way to do this, this feels like a
hack.
> > >
> > > Thanks!
> > >
> >
> >
> >
>

#109460 From: "Tyler Frieling" <tfrieling@...>
Date: Wed Apr 9, 2008 8:58 pm
Subject: Threshold Line in a Chart
frielingts
Offline Offline
Send Email Send Email
 

Hi,

 I want to add a threshold line across a plot chart to indicate what is normal e.g. Y=10 but I cannot figure out from the documentation how best to go about this. The value will change so putting a component over the graph will not do.

 Any suggestions or examples? I was thinking of iterating through each gridline and setting visible=false for all but y=10 but I cannot figure out how to determine what y value the vertical gridlines represent.

 Thanks

tyler

_ps. After some late night coding I inadvertently replied to “RE: [flexcoders] n00b Sanity Check...” . I attribute the error to Red Bull Light. My bad.


#109459 From: "kevin1001_2001" <Kevinmcgann@...>
Date: Wed Apr 9, 2008 4:00 pm
Subject: Wanted Flex Developer for NYC Investment Bank
kevin1001_2001
Offline Offline
Send Email Send Email
 
Sorry for changing the subject here. I am actively searching for a
Flex guru for an elite Investment Bank in NY, if you know of anyone
who might be a good fit, please feel free to pass my information and
job description along. If job postings are prohibited on this board
please let me know and I will remove the message.
Kevin McGann
212-213-2220
http:www.cpi-search.com

One of the world's leading investment banks is searching for strong
front-end developer for their front office Equity Trading Systems
team. This person needs to have at least a years worth of FLEX
experience. You will develop Front End / Middle tier Application
using a combination of Flex / Java. Application is used to display
and modify algorithmic trades that have yet to take place. Position
requires good communication skills and ability to learn advanced
business functions. Flex is the most important skill set. Java his
desired as well.

Required Skills: Adobe Flex and solid understanding of web
architecture and scripting languages Actionscript/Javascript - Adobe
Flex - Sybase - SOAP/XML

Pluses: Java, financial experience.

#109458 From: "Alex Harui" <aharui@...>
Date: Wed Apr 9, 2008 9:21 pm
Subject: RE: combobox with list headers
alex_harui
Offline Offline
Send Email Send Email
 

There’s an example of how to block a list from selecting certain items on my blog.

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Derrick Anderson
Sent: Wednesday, April 09, 2008 7:43 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] combobox with list headers

 

do you guys know how to make a combobox with header items, i.e items that can not be selected in the list, just used as headers for other items.

thanks,
d.


#109457 From: "andrewwestberg" <andrewwestberg@...>
Date: Wed Apr 9, 2008 9:19 pm
Subject: HOWTO: Use Both Native and Flex DragManager in AIR 1.0
andrewwestberg
Online Now Online Now
Send Email Send Email
 
I got fed up with Adobe taking away this ability in final AIR beta and
not putting it back in for AIR 1.0.  It's perfectly logical that you'd
want to use the Flex DragManager inside your app to have control over
the drag proxy alphas and such, but not lose the ability to do Native
drag operations in the same AIR app if you so choose.  I've detailed a
MonkeyPatch solution to this problem in an example on my blog.
View-source is enabled on the code.

http://flexjunk.com/2008/04/08/using-both-native-and-flex-dragmanager-in-air-10/

-Andrew Westberg

#109456 From: "Alex Harui" <aharui@...>
Date: Wed Apr 9, 2008 9:16 pm
Subject: RE: "Multiple sets of visual children have been specified for this component"
alex_harui
Offline Offline
Send Email Send Email
 

Please post the entire stack trace.

 

You should be able to do it.

 

Also, I think SuperTabNavigator can hide tabs.  Google for it.

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Dennis Falling
Sent: Wednesday, April 09, 2008 12:20 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] “Multiple sets of visual children have been specified for this component”

 

I'm trying to programmatically hide/show a tab in an interface.  I found that there isn't a way to toggle visibility/include in layout, so decided to remove it when it's not applicable and add it back when it is.

When I try to add it back, though, I get the error "Multiple sets of visual children have been specified for this component" and the add fails.  I'm trying to add it back to the same element I removed it from, so what am I doing wrong?  Is there a better way to do this, this feels like a hack.

Thanks!


#109455 From: "Alex Harui" <aharui@...>
Date: Wed Apr 9, 2008 9:11 pm
Subject: RE: Memory leak -Debug version Flash Player - Re: Loading Flex apps into Flash (AS3)
alex_harui
Offline Offline
Send Email Send Email
 

A way to explicitly put content in a separate SecurityDomain would be a good thing.

 

I’ve definitely seen an object with weak reference enterFrame listeners go away when GC’d.  Maybe it doesn’t if it came from another SWF.  Hopefully, Grant or somebody filed a bug on that so it can be examined and fixed if it is a problem.

 

Having a way to punt something or forcibly shut it down would be a good thing too, but it might be harder than it sounds.  Maybe the player team will find a great way to deal with it, but one of the reasons AS3 runs so much faster than AS2 is that the VM verifies an entire method before running it, and it doesn’t check at each instruction in the method to see if references are still good.  AS2 spent time doing that check at each instruction, and you pay for it when at runtime.

 

IMHO, AS2 let you write a bunch of bad code and get away with it.  Excellent from a prototyping perspective, but not how I would want to develop large frameworks or applications.  I’m willing to put up with overhead of being careful to release references when I’m done with something, adding protocols to handshake between child swfs, etc. because then there are fewer mysterious behaviors.  Everything is more predictable.  For example, I probably wouldn’t use weak reference enterframe listeners, I would probably use a strong reference listener and a REMOVED_FROM_STAGE handler to remove the listener so I know that if that object is skipped by GC, it won’t be eating CPU cycles and then when I go to debug it, it does get picked up by GC and the problem goes away.  Yes, it is more code, but I think it is better code.

 

Whenever you host third-party content, you either have to completely trust it or not.  The degree of non-trust you have for it dictates how open you are to betrayal.  If you don’t trust it at all, I’d put it in another player instance.  If I think I can trust it, or have time to figure out it is well-behaved, I’d put it in another securitydomain.  If I’m sure I can trust it, then I can load it into my securitydomain.  It’s one thing to meet a stranger and let him/her stay in a separate guest cottage and keep your doors locked, it is another to let them stay in your house and lock your bedroom, and yet another to let them stay in your bedroom.  And don’t get fooled by how nice and/or sexy they seem when you meet them J

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of bick
Sent: Wednesday, April 09, 2008 12:29 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Memory leak -Debug version Flash Player - Re: Loading Flex apps into Flash (AS3)

 

Check out this article by Grant Skinner. Alex, any thoughts on this?

http://www.gskinner.com/blog/archives/2008/04/failure_to_unlo.html 

--- In flexcoders@yahoogroups.com, "bick" <sbicksubscript@...> wrote:
>
> After further testing, we are finding that the memory leak *only*
> occurs if using the debug version of the Flash 9 Player. It never
> occurs w/ the non-debug version.
>
> Has anyone else experienced memory leaks w/ the debug version?
>
> What's the install base of the debug versus normal version of the player?
>


#109454 From: "jmfillman" <jmfillman@...>
Date: Wed Apr 9, 2008 8:56 pm
Subject: Re: Blank Item in List Control
jmfillman
Offline Offline
Send Email Send Email
 
Thank you for the follow-up response.

--- In flexcoders@yahoogroups.com, "Alex Harui" <aharui@...> wrote:
>
> <mx:dataProvider /> and <mx:dataProvider></mx:dataProvider> are
> equivalent to:
>
>
>
> <mx:dataProvider>""</mx:dataProvider>
>
>
>
> So you got an empty string as the first entry.
>
>
>
> ________________________________
>
> From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com] On
> Behalf Of jmfillman
> Sent: Wednesday, April 09, 2008 12:59 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Blank Item in List Control
>
>
>
> Yes, that appears to work. Thanks!
>
> What's the difference between dataProvider="[]" and
> <mx:dataProvider/>?
>
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%
40yahoogroups.com>
> , "Alex Harui" <aharui@> wrote:
> >
> > Can you do this instead?
> >
> >
> >
> > <mx:List id="myList" width="100" dataProvider="[]" >
> >
> > <mx:itemRenderer>
> >
> > <mx:Component>
> >
> > <mx:Label text="{data.name}"/>
> >
> > </mx:Component>
> >
> > </mx:itemRenderer>
> >
> > </mx:List>
> >
> >
> >
> > ________________________________
> >
> > From: flexcoders@yahoogroups.com <mailto:flexcoders%
40yahoogroups.com>
>
> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%
40yahoogroups.com>
> ] On
> > Behalf Of jmfillman
> > Sent: Tuesday, April 08, 2008 5:19 PM
> > To: flexcoders@yahoogroups.com <mailto:flexcoders%
40yahoogroups.com>
> > Subject: [flexcoders] Blank Item in List Control
> >
> >
> >
> > I don't quite understand why the first item in the list is blank.
I
> > presume that it has to do with this:
> >
> > <mx:dataProvider/>
> >
> > Why does this happen and how do I prevent it? I certainly can
> > programatically remove it(myList.dataProvider.removeItemAt(0)),
but
> > this is sample code, and I've got about 42 lists where this
occurs,
> > and I'd rather not have to script that if there is a better
> > alternative.
> >
> > private function initApp():void {
> > var obj0:Object = {name: "Sam", value: [0x009DFF,0x009DFF]};
> > var obj1:Object = {name: "Ryan", value: [0x0000FF,0x0000FF]};
> > var obj2:Object = {name: "Julie", value: [0x008000,0x008000]};
> > var obj3:Object = {name: "Chris", value: [0x00FF00,0x00FF00]};
> > myList.dataProvider.addItem(obj0);
> > myList.dataProvider.addItem(obj1);
> > myList.dataProvider.addItem(obj2);
> > myList.dataProvider.addItem(obj3);
> > }
> >
> > ************************
> > <mx:List id="myList" width="100">
> > <mx:dataProvider/>
> > <mx:itemRenderer>
> > <mx:Component>
> > <mx:Label text="{data.name}"/>
> > </mx:Component>
> > </mx:itemRenderer>
> > </mx:List>
> >
>

#109452 From: "tchredeemed" <apthorp@...>
Date: Wed Apr 9, 2008 8:37 pm
Subject: Re: <mx:List> Height
tchredeemed
Offline Offline
Send Email Send Email
 
Do you know any other way to get the height of the element in the row?

Since variableRowHeight is true, if i could do some kind of getChildren() or
something, I
could get the height of each child .. :x

--- In flexcoders@yahoogroups.com, "Alex Harui" <aharui@...> wrote:
>
> Try binding the height of the list to dataProvider.length * rowHeight.
>
>
>
> You'll probably have to add in viewMetrics.top and bottom.  I would
> normally do that as a subclass and override of measure()
>
>
>
> ________________________________
>
> From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On
> Behalf Of tchredeemed
> Sent: Wednesday, April 09, 2008 12:53 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] <mx:List> Height
>
>
>
> Question, I know that by default <mx:List> is scrollable, and if the
> list has content with
> height that adds up to a height greater then its own height, it adds
> scrollbars.
>
> My question, and I have had this question many times in similar
> situations, is this:
>
> Code (Simplified Overview):
>
> <mx:Canvas width="100%">
>
> <mx:List width="100%"
> dataProvider="{dataProviderHere}"
> itemRenderer="{itemRendererHere}"
> />
>
> </mx:Canvas>
>
> Problem:
>
> When data is pushed into the list, I want it to resize the entire list,
> and by doing so, resize
> the height of the canvas that is it's parent. I do not want it to add
> scrollbars, which
> verticalScrollPolicy can turn off.
>
> Halp! :(
>

#109450 From: "Ben Marchbanks" <flex@...>
Date: Wed Apr 9, 2008 8:41 pm
Subject: Canvas backgroundImage misbehaving
pdflibpilot
Offline Offline
Send Email Send Email
 
I have a canvas (as a PopUp Window) which gets a swf applied as a
backgroundImage source. This canvas subsequently may get decorated
with new display object children which are editable by the user.
Objects are placed on the canvas at specific locations manually or
programmatically based on content in the canvas backgroundImage.

The problem I am having is that the display is consistent on my PC
running XP, FireFox, Flash Player 9.0.045 with the canvas popping up
displaying the swf as background scaled at 100% filling the canvas
proper.

The issue reported by others on staff using new MacOSX Leopard, Safari
and Flash Player 9.0.115 is that the backgroundImage is much larger
than 100% and not fully visible and is cropped off by the canvas. This
canvas is adjustable in scale but changing scale makes no difference,
background is still bleeding over.

The canvas and backgroundImage size / scale are all set using an
Override....Is this a bug or is there some better method to achieve
the same results more consistently.

#109449 From: "Alex Harui" <aharui@...>
Date: Wed Apr 9, 2008 8:37 pm
Subject: RE: Pop up Manager - canvas
alex_harui
Offline Offline
Send Email Send Email
 

Sure, just get a reference to the popup and call addChild(new Canvas())

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of ghus32
Sent: Wednesday, April 09, 2008 12:47 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Pop up Manager - canvas

 

Is it possible to add a canvas on a popup??

Thanks


#109448 From: "Alex Harui" <aharui@...>
Date: Wed Apr 9, 2008 8:37 pm
Subject: RE: pass a value out of a mx:Component
alex_harui
Offline Offline
Send Email Send Email
 

Tree(combobox.dropdown) should be the Tree.

 

 

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Derrick Anderson
Sent: Wednesday, April 09, 2008 12:52 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] pass a value out of a mx:Component

 

Hi,

I have a mxml class that extends ComboBox but using a tree instead of the usual list to show the data

<mx:dropdownFactory>
     <mx:Component className="comboTreeComponent">
        <mx:Tree creationComplete="outerDocument.expandTree(event);" change="outerDocument.updateLabel(event)" height="300" width="500" />
     </mx:Component>
    </mx:dropdownFactory>

now my expandTree function is not able to talk to the tree, how do i call into this component from the containing class?  i added the ID for the classReference and read a bunch of docs on the subject but I still have no idea how to reference into an item renderer.

btw, the goal here is to expand all items in the tree when the tree loads- if there's an easier way than this- i'm all ears :)

thanks,
d.


#109447 From: "valdhor" <stevedepp@...>
Date: Wed Apr 9, 2008 8:37 pm
Subject: menubar using objects
valdhor
Offline Offline
Send Email Send Email
 
I have a menubar setup and working perfectly with XML.

I would like to recreate this menubar using objects retrieved via
AMFPHP. I have setup my service in AMFPHP and it is returning the
objects properly. The problem is that when I set the menubar
dataprovider property to the arraycollection returned from AMFPHP, my
menubar is empty.

Is there any example code anywhere that uses objects instead of XML?

Has anyone tried this before?

#109446 From: "Greg Morphis" <gmorphis@...>
Date: Wed Apr 9, 2008 8:35 pm
Subject: Re: Re: setting a tree node visible=false?
gmorphis@...
Send Email Send Email
 
Also the XML is an XMLList, not an XMLListCollection..
Is there a work around?

On Wed, Apr 9, 2008 at 3:29 PM, Greg Morphis <gmorphis@...> wrote:
> Thanks for helping. I still can't get it.. Nothing displays in the tree now.
>  I thought maybe it was due to the isvisible being a 1 or 0 (but I'm
>  sure Flex/AS knows that it's boolean value).
>  Anyways I tried 'true' and tried '1'. I even reversed them thinking
>  that perhaps there was something wrong with the value.
>
>  I even tried adding an Alert
>  Alert.show(col.toString());
>  and I got about 4 empty Alerts.
>  So I wonder if it has to do with the time it's loading?
>
>  The xml coming in looks like this..
>  <node activity="LOA_Sick" label="LOA_Sick" isvisible="0">
>         <node activity="LOA_Sick" label="Sick" isvisible="0"></node>
>         <node activity="LOA_Sick" label="LOA" isvisible="0"></node>
>  </node>
>
>  and it's loaded in the model (using Cairngorm)
>
>
>
>
>
>  On Wed, Apr 9, 2008 at 1:21 PM, nothsaevets <steve.ashton@...> wrote:
>  > For filtering top-level elements, all you need to do is specify a
>  >  filter function for the XMLListCollection which you are using as the
>  >  dataprovider for the tree. It is important to call the refresh()
>  >  function on the XMLListCollection after setting the filter function.
>  >  Let me know if you need more code than this.
>  >
>  >
>  >  <mx:Tree dataProvider="{filteredCollection}" />
>  >
>  >  private function filterInvisibleNode(item:Object):Boolean {
>  >   if( item != null && item.@isvisible == 'true'){
>  >     return true;
>  >   }
>  >   else {
>  >     return false;
>  >   }
>  >  }
>  >
>  >  private function get filteredCollection():XMLListCollection {
>  >   var col:XMLListCollection = new XMLListCollection( myxml );
>  >   col.filterFunction = filterInvisibleNode;
>  >   col.refresh();
>  >   return col;
>  >
>  > }
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >  --- In flexcoders@yahoogroups.com, "Greg Morphis" <gmorphis@...>
>  >  wrote:
>  >  >
>  >
>  > > The parent nodes are the ones I'm focusing on.
>  >  >
>  >  > On Wed, Apr 9, 2008 at 12:53 PM, nothsaevets <steve.ashton@...>
>  >
>  >
>  > wrote:
>  >  > > Are you trying to make the top-level nodes invisible, or nodes
>  >  that
>  >  > >  are themselves children of other nodes?
>  >  > >
>  >  > >
>  >  > >
>  >  > >  --- In flexcoders@yahoogroups.com, "Greg Morphis" <gmorphis@>
>  >  > >  wrote:
>  >  > >  >
>  >  > >
>  >  > >
>  >  > > > I'm feeding an XMLList into a mx:Tree component and want to set
>  >  the
>  >  > >  > visible of the parent node to false when the data has the
>  >  > >  isvisible=0.
>  >  > >  > I've tried editing the <mx:Tree to show
>  >  visible="{data.isvisible}"
>  >  > >  > But that didn't work.
>  >  > >  >
>  >  > >  > We have an itemRenderer for the Tree but all that handles is a
>  >  > >  > mousedown event..
>  >  > >  > I've tried playing with that but haven't got anywhere..
>  >  > >  > I googled some but that wasn't much help..
>  >  > >  >
>  >  > >  > So if I have a tree
>  >  > >  >       <mx:Tree height="100%"
>  >  > >  >                       width="100%"
>  >  > >  >                       dataProvider="{ MyModel.getInstance
>  >  ().myXML}"
>  >  > >  >                       showRoot="false"
>  >  > >  >                       labelField="@label"
>  >  > >  >                       borderStyle="none"
>  >  > >  >                       dragEnabled="true"
>  >  > >  >                       dragMoveEnabled="false"
>  >  > >  >
>  >  > >         itemRenderer="com.renderers.ActivityTreeRenderer"
>  >  > >  >                        />
>  >  > >  >
>  >  > >  >
>  >  > >  >  how do I make the parent nodes invisible?
>  >  > >  >
>  >  > >
>  >  > >
>  >  > >
>  >  > >
>  >  > >
>  >  > > ------------------------------------
>  >  > >
>  >  > >  --
>  >  > >  Flexcoders Mailing List
>  >  > >  FAQ:
>  >  http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>  >  > >  Search Archives: http://www.mail-archive.com/flexcoders%
>  >  40yahoogroups.comYahoo! Groups Links
>  >  > >
>  >  > >
>  >  > >
>  >  > >
>  >  >
>  >
>  >
>  >
>  >  ------------------------------------
>  >
>  >  --
>  >  Flexcoders Mailing List
>  >  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>  >  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
>  >
>  >
>  >
>  >
>

#109445 From: "Alex Harui" <aharui@...>
Date: Wed Apr 9, 2008 8:34 pm
Subject: RE: <mx:List> Height
alex_harui
Offline Offline
Send Email Send Email
 

Try binding the height of the list to dataProvider.length * rowHeight.

 

You’ll probably have to add in viewMetrics.top and bottom.  I would normally do that as a subclass and override of measure()

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of tchredeemed
Sent: Wednesday, April 09, 2008 12:53 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] <mx:List> Height

 

Question, I know that by default <mx:List> is scrollable, and if the list has content with
height that adds up to a height greater then its own height, it adds scrollbars.

My question, and I have had this question many times in similar situations, is this:

Code (Simplified Overview):

<mx:Canvas width="100%">

<mx:List width="100%"
dataProvider="{dataProviderHere}"
itemRenderer="{itemRendererHere}"
/>

</mx:Canvas>

Problem:

When data is pushed into the list, I want it to resize the entire list, and by doing so, resize
the height of the canvas that is it's parent. I do not want it to add scrollbars, which
verticalScrollPolicy can turn off.

Halp! :(


#109444 From: "Alex Harui" <aharui@...>
Date: Wed Apr 9, 2008 8:30 pm
Subject: RE: Re: Blank Item in List Control
alex_harui
Offline Offline
Send Email Send Email
 

<mx:dataProvider /> and <mx:dataProvider></mx:dataProvider> are equivalent to:

 

<mx:dataProvider>””</mx:dataProvider>

 

So you got an empty string as the first entry.

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of jmfillman
Sent: Wednesday, April 09, 2008 12:59 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Blank Item in List Control

 

Yes, that appears to work. Thanks!

What's the difference between dataProvider="[]" and
<mx:dataProvider/>?

--- In flexcoders@yahoogroups.com, "Alex Harui" <aharui@...> wrote:
>
> Can you do this instead?
>
>
>
> <mx:List id="myList" width="100" dataProvider="[]" >
>
> <mx:itemRenderer>
>
> <mx:Component>
>
> <mx:Label text="{data.name}"/>
>
> </mx:Component>
>
> </mx:itemRenderer>
>
> </mx:List>
>
>
>
> ________________________________
>
> From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com] On
> Behalf Of jmfillman
> Sent: Tuesday, April 08, 2008 5:19 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Blank Item in List Control
>
>
>
> I don't quite understand why the first item in the list is blank. I
> presume that it has to do with this:
>
> <mx:dataProvider/>
>
> Why does this happen and how do I prevent it? I certainly can
> programatically remove it(myList.dataProvider.removeItemAt(0)), but
> this is sample code, and I've got about 42 lists where this occurs,
> and I'd rather not have to script that if there is a better
> alternative.
>
> private function initApp():void {
> var obj0:Object = {name: "Sam", value: [0x009DFF,0x009DFF]};
> var obj1:Object = {name: "Ryan", value: [0x0000FF,0x0000FF]};
> var obj2:Object = {name: "Julie", value: [0x008000,0x008000]};
> var obj3:Object = {name: "Chris", value: [0x00FF00,0x00FF00]};
> myList.dataProvider.addItem(obj0);
> myList.dataProvider.addItem(obj1);
> myList.dataProvider.addItem(obj2);
> myList.dataProvider.addItem(obj3);
> }
>
> ************************
> <mx:List id="myList" width="100">
> <mx:dataProvider/>
> <mx:itemRenderer>
> <mx:Component>
> <mx:Label text="{data.name}"/>
> </mx:Component>
> </mx:itemRenderer>
> </mx:List>
>


#109443 From: "Greg Morphis" <gmorphis@...>
Date: Wed Apr 9, 2008 8:29 pm
Subject: Re: Re: setting a tree node visible=false?
gmorphis@...
Send Email Send Email
 
Thanks for helping. I still can't get it.. Nothing displays in the tree now.
I thought maybe it was due to the isvisible being a 1 or 0 (but I'm
sure Flex/AS knows that it's boolean value).
Anyways I tried 'true' and tried '1'. I even reversed them thinking
that perhaps there was something wrong with the value.

I even tried adding an Alert
Alert.show(col.toString());
and I got about 4 empty Alerts.
So I wonder if it has to do with the time it's loading?

The xml coming in looks like this..
<node activity="LOA_Sick" label="LOA_Sick" isvisible="0">
	 <node activity="LOA_Sick" label="Sick" isvisible="0"></node>
	 <node activity="LOA_Sick" label="LOA" isvisible="0"></node>
</node>

and it's loaded in the model (using Cairngorm)



On Wed, Apr 9, 2008 at 1:21 PM, nothsaevets <steve.ashton@...> wrote:
> For filtering top-level elements, all you need to do is specify a
>  filter function for the XMLListCollection which you are using as the
>  dataprovider for the tree. It is important to call the refresh()
>  function on the XMLListCollection after setting the filter function.
>  Let me know if you need more code than this.
>
>
>  <mx:Tree dataProvider="{filteredCollection}" />
>
>  private function filterInvisibleNode(item:Object):Boolean {
>   if( item != null && item.@isvisible == 'true'){
>     return true;
>   }
>   else {
>     return false;
>   }
>  }
>
>  private function get filteredCollection():XMLListCollection {
>   var col:XMLListCollection = new XMLListCollection( myxml );
>   col.filterFunction = filterInvisibleNode;
>   col.refresh();
>   return col;
>
> }
>
>
>
>
>
>
>
>
>  --- In flexcoders@yahoogroups.com, "Greg Morphis" <gmorphis@...>
>  wrote:
>  >
>
> > The parent nodes are the ones I'm focusing on.
>  >
>  > On Wed, Apr 9, 2008 at 12:53 PM, nothsaevets <steve.ashton@...>
>
>
> wrote:
>  > > Are you trying to make the top-level nodes invisible, or nodes
>  that
>  > >  are themselves children of other nodes?
>  > >
>  > >
>  > >
>  > >  --- In flexcoders@yahoogroups.com, "Greg Morphis" <gmorphis@>
>  > >  wrote:
>  > >  >
>  > >
>  > >
>  > > > I'm feeding an XMLList into a mx:Tree component and want to set
>  the
>  > >  > visible of the parent node to false when the data has the
>  > >  isvisible=0.
>  > >  > I've tried editing the <mx:Tree to show
>  visible="{data.isvisible}"
>  > >  > But that didn't work.
>  > >  >
>  > >  > We have an itemRenderer for the Tree but all that handles is a
>  > >  > mousedown event..
>  > >  > I've tried playing with that but haven't got anywhere..
>  > >  > I googled some but that wasn't much help..
>  > >  >
>  > >  > So if I have a tree
>  > >  >       <mx:Tree height="100%"
>  > >  >                       width="100%"
>  > >  >                       dataProvider="{ MyModel.getInstance
>  ().myXML}"
>  > >  >                       showRoot="false"
>  > >  >                       labelField="@label"
>  > >  >                       borderStyle="none"
>  > >  >                       dragEnabled="true"
>  > >  >                       dragMoveEnabled="false"
>  > >  >
>  > >         itemRenderer="com.renderers.ActivityTreeRenderer"
>  > >  >                        />
>  > >  >
>  > >  >
>  > >  >  how do I make the parent nodes invisible?
>  > >  >
>  > >
>  > >
>  > >
>  > >
>  > >
>  > > ------------------------------------
>  > >
>  > >  --
>  > >  Flexcoders Mailing List
>  > >  FAQ:
>  http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>  > >  Search Archives: http://www.mail-archive.com/flexcoders%
>  40yahoogroups.comYahoo! Groups Links
>  > >
>  > >
>  > >
>  > >
>  >
>
>
>
>  ------------------------------------
>
>  --
>  Flexcoders Mailing List
>  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
>
>
>
>

#109442 From: "Daniel Freiman" <FreimanCQ@...>
Date: Wed Apr 9, 2008 8:29 pm
Subject: Re: Re: Graphics class optimization
FreimanCQ@...
Send Email Send Email
 
That makes sense, but I wouldn't expect a UIComponent that has done nothing other than be added to the application to have a significant amount of graphics already on it.

- Dan

On Wed, Apr 9, 2008 at 3:30 PM, ryanphelan <ryanphelan@...> wrote:

Glad to hear you fixed your problem.

If you are completely redrawing something, you should Always call
clear() first. If you don't, those graphics will keep getting layered
on top of each other like coats of paint. Even if you can't see the
layers underneath, the flash player still has to render them and do
all kinds of calculations to figure out which ones to show. Thats
what was slowing it down...

Cheers,
Ryan



--- In flexcoders@yahoogroups.com, "Daniel Freiman" <FreimanCQ@...> wrote:
>
> I've found the solution. I need to call graphics.clear() first.
Why? I
> don't know. The object I'm testing on is a pure UIComponent (not a
> subclass). Interestingly, if I use a Sprite I don't have this
problem, so
> it has something to do with the UIComponent.
>
> Ryan, I tried out your code and it does work as you have stated, (except
> code claims to run in milliseconds, but the clock on my wall says it
took
> over 5 to render the graphic? In any event) Somehow I noticed that
you were
> calling graphics.clear() in the existing component example, and I
tried that
> and it worked quicker than any other method I have tried.
>
> I don't think this is a bug, but it's definitely an idiosyncrasy.
>
> Thanks for the help,
>
> - Daniel Freiman
>
>
> On Wed, Apr 9, 2008 at 12:50 PM, ryanphelan <ryanphelan@...> wrote:
>
> > Daniel,
> >
> > I'm still unable to reproduce your problem. Here's what I've got...
> > two buttons - one draws on an existing UIComponent, the other creates
> > one then draws on it then adds it to the display list. Both take the
> > same amount of time. Are you sure your problem isn't coming from
> > somewhere else?
> >
> > -Ryan
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <mx:Application layout="absolute"
> > xmlns:mx="http://www.adobe.com/2006/mxml">
> >
> > <mx:Script>
> > <![CDATA[
> > import mx.core.UIComponent;
> >
> > // tests drawing in an existing UIComponent
> > private function test1():void
> > {
> > drawingCanvas1.visible = true;
> > drawingCanvas2.visible = false;
> >
> > preRenderedComponent.graphics.clear();
> > massiveDraw( preRenderedComponent.graphics );
> > }
> >
> > // tests creating a new UIComponent, drawing, then adding it
> > private function test2():void
> > {
> > drawingCanvas1.visible = false;
> > drawingCanvas2.visible = true;
> >
> > drawingCanvas2.removeAllChildren();
> > var postRenderedComponent:UIComponent = new UIComponent();
> > postRenderedComponent.percentWidth = 100;
> > postRenderedComponent.percentHeight = 100;
> >
> > massiveDraw( postRenderedComponent.graphics );
> >
> > drawingCanvas2.addChild( postRenderedComponent );
> >
> > }
> >
> > private function massiveDraw( g:Graphics ):void
> > {
> > var startTime:int = getTimer();
> >
> > g.lineStyle( 0, 0, 1 );
> > for( var i:int = 0; i < 10000; ++i )
> > {
> > g.moveTo( getRandomCoord(), getRandomCoord() );
> > g.lineTo( getRandomCoord(), getRandomCoord() );
> > }
> >
> > var endTime:int = getTimer();
> > trace( "massiveDraw took: "+(endTime-startTime)+"ms" );
> > }
> >
> > private function getRandomCoord():uint
> > {
> > return Math.round(Math.random()*1000);
> > }
> >
> > ]]>
> > </mx:Script>
> >
> > <mx:Canvas id="drawingCanvas1" width="100%" height="100%">
> > <mx:UIComponent id="preRenderedComponent" width="100%"
> > height="100%" />
> > </mx:Canvas>
> >
> > <mx:Canvas id="drawingCanvas2" width="100%" height="100%" />
> >
> > <mx:HBox>
> > <mx:Button label="Test 1" click="test1();" />
> >
> > <mx:Button label="Test 2" click="test2();" />
> > </mx:HBox>
> >
> > </mx:Application>
> >
> > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>,

"Daniel
> > Freiman" <FreimanCQ@> wrote:
> > >
> > > Toggling the UIComponent's visible property does help a significant
> > amount,
> > > but not as much adding a new object. Interestingly, removing an
> > object from
> > > the display list, drawing on it, and then adding it back, helps
> > exactly the
> > > same amount as toggling the visible property so I'm guessing that
> > calling
> > > removeChild simply hides the child and marks it to be removed.
> > >
> > > So if I'm going to use the double-buffer method, now I've got to
> > figure out
> > > when children are actually added/removed so that I make sure that
> > when I'm
> > > drawing on an object that appears to be removed from the display
> > list, it
> > > actually is removed from the display list.
> > >
> > > Thanks for the input,
> > >
> > > - Daniel Freiman
> > >
> > > On Wed, Apr 9, 2008 at 1:02 AM, Alex Harui <aharui@> wrote:
> > >
> > > > I spent a few minutes poking at this. First:
> > > >
> > > >
> > > >
> > > > -calls to the graphics object do not invalidate the UIComponent.
> > Those
> > > > calls are not watched.
> > > >
> > > > -in creationComplete, the display objects are not on the
display list.
> > > > That happens after creationComplete and just before
> > applicaitonComplete in
> > > > order to save on startup time.
> > > >
> > > > -callLater can be called before everything gets drawn again, it
> > just makes
> > > > sure that some code runs "later"
> > > >
> > > >
> > > >
> > > > I think you hit on the reason we don't put the display object
on the
> > > > display list until they are fully validated. It takes longer
to make
> > > > graphics calls when an object is on the displaylist. IIRC, it
> > also wastes
> > > > time for the rendering code too. I think rendering code visits
> > invisible
> > > > things as well (of course, it doesn't do as much), so tricks with
> > .visible
> > > > aren't likely to help. I'd have to dig through player code to
> > prove what is
> > > > really going on, but I'd bet that it is because the transform
> > properties
> > > > need to be updated for every call when you're on the display list.
> > > >
> > > >
> > > >
> > > > If you're going to make that many calls repeatedly, I would
> > double-buffer
> > > > by using two Shapes, draw into a Shape that is not on the display
> > list and
> > > > then addChild it to the UIComponent and removeChild the other
Shape.
> > > >
> > > >
> > > > ------------------------------
> > > >
> > > > *From:* flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>
> > [mailto:flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>] *On

> > > > Behalf Of *Daniel Freiman
> > > > *Sent:* Tuesday, April 08, 2008 7:51 PM
> > > > *To:* flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>

> > > > *Subject:* Re: [flexcoders] Re: Graphics class optimization
> > > >
> > > >
> > > >
> > > > I'm not a low-level graphics person, but I've had a lot of
second hand
> > > > exposure to graphics so I have some guesses about what's going on
> > under the
> > > > hood. These guesses (or assumptions) may be completely wrong, but
> > here they
> > > > are. This isn't an issue with the Flex framework, and I doubt I'm
> > running
> > > > into issues even with how the actionscript is written or the
> > > > Graphics/Sprites/DisplayObjects themselves. I think this has
> > something to
> > > > do with how the the flash player itself renders graphics and deals
> > with
> > > > image buffers and whatnot.
> > > >
> > > > My guess is that drawing using the graphics object is affected by
> > whether
> > > > or not the Sprite of the graphics object is currently rendered
> > (which at any
> > > > given moment could be different that the visible property). So in
> > Ryan's
> > > > example, it wouldn't matter whether the graphics calls were placed
> > before or
> > > > after drawing commands, because in neither case is the UIComponent
> > rendered
> > > > until the next frame (and in my own test I just ran this
appears to be
> > > > true). FYI, the only relevant differences between Ryan's example
> > and my
> > > > code is that my Ryan's runs on creationComplete and mine runs in
> > response to
> > > > the a button click, and that in one of my tests, the UIcomponent
> > is added to
> > > > the stage well before the button click (which is the slow
> > example), and in
> > > > the other test it is added (anywhere) in the same function as the
> > drawing.
> > > > If this is true, I think callLater continues execution after
the next
> > > > rendering event, so if this happens: execution is set to !
invisible,
> > > > callLater, draw, set in visible, then that will probably be pretty
> > quick,
> > > > but it would also cause the object to flicker.
> > > >
> > > > Keep in mind, these are all guesses, so I may be complete wrong.
> > > >
> > > > If this is true, maybe I can keep two buffers, and alway render to
> > hidden
> > > > one and toggle which one is hidden immediately after that. It
> > feels like a
> > > > hack, but part of my brain also thinks it sounds like
pre-buffering
> > > > mechanism which might have some science behind it. If I can get a
> > 90% speed
> > > > increase out if it, I guess it can't be a bad idea.
> > > >
> > > > If anyone actually knows what's going on, I'd still appreciate
info on
> > > > that.
> > > >
> > > > - Daniel Freiman
> > > >
> > > > On Tue, Apr 8, 2008 at 10:12 PM, Josh McDonald <dznuts@> wrote:
> > > >
> > > > What do you mean that you tried using a callLater()?
> > > >
> > > > Was it along the lines of click="callLater(doDrawing)"?
> > > >
> > > > Are you drawing on the clicked button, or on something else?
> > > >
> > > > What's stopping you from drawing in a new canvas?
> > > >
> > > > Does the drawing rely on something that won't be calculated /
> > available
> > > > until the click? Perhaps you should do your drawing in advance and
> > only
> > > > reveal it on click?
> > > >
> > > > -J
> > > >
> > > >
> > > >
> > > > On Wed, Apr 9, 2008 at 9:51 AM, ryanphelan <ryanphelan@> wrote:
> > > >
> > > > I just made an application that draws 5000 lines randomly on a
> > > > UIComponent, and it doesn't affect the draw time at all
whether I add
> > > > the component to the display list before or after drawing...
both were
> > > > about 14ms.
> > > >
> > > > private function onCreationComplete():void
> > > > {
> > > > var comp:UIComponent = new UIComponent();
> > > > comp.percentWidth = 100;
> > > > comp.percentHeight = 100;
> > > >
> > > > // try switching these two lines
> > > > massiveDraw( comp.graphics );
> > > > this.addChild( comp );
> > > > }
> > > >
> > > > private function massiveDraw( g:Graphics ):void
> > > > {
> > > > var startTime:int = getTimer();
> > > > g.lineStyle( 0, 0, 1 );
> > > > for( var i:int = 0; i < 5000; ++i )
> > > > {
> > > > g.moveTo( getRandomCoord(), getRandomCoord() );
> > > > g.lineTo( getRandomCoord(), getRandomCoord() );
> > > > }
> > > > var endTime:int = getTimer();
> > > > trace( "massiveDraw took: "+(endTime-startTime)+"ms" );
> > > > }
> > > >
> > > > private function getRandomCoord():uint
> > > > {
> > > > return Math.round(Math.random()*1000);
> > > > }
> > > >
> > > > -Ryan
> > > > http://www.rphelan.com
> > > >
> > > >
> > > >
> > > > --- In flexcoders@yahoogroups.com
<flexcoders%40yahoogroups.com><flexcoders%

> > 40yahoogroups.com>,
> >
> > "Daniel
> > > > Gold" <danielggold@> wrote:
> > > > >
> > > > > Have you checked out Degrafa and possibly SVG paths?
> > > > >
> > > > > http://www.degrafa.com/category/svg/
> > > > >
> > > > > As far as drawing on the UIComponent, are you creating a custom
> > > > component
> > > > > that draws itself by overriding updateDisplayList, or are you
> > adding a
> > > > > component to the stage and then grabbing it's graphics
object and
> > > > drawing
> > > > > with that? I believe if its the latter you're probably
causing an
> > > > > invalidateDisplayList with each call to the graphics object. I'm
> > > > honestly
> > > > > not sure on that though.
> > > > >
> > > > > I would think if you're not already overriding
updateDisplayList in
> > > > a custom
> > > > > component, that would be the way to go since your entire object
> > > > would get
> > > > > drawn in that single frame and would not rely on any external
> > > > components.
> > > > >
> > > >
> > > > > On Tue, Apr 8, 2008 at 4:44 PM, Daniel Freiman <FreimanCQ@>
wrote:
> > > > >
> > > > > > I need to draw a very complex object (1528 calls to the
graphics
> > > > > > object). If i use a graphics object to draw on an UIComponent
> > that's
> > > > > > already been added to the stage, the drawing takes 3
seconds. If
> > > > I create a
> > > > > > new UIComponent, draw on it, and then add it to the stage, the
> > > > whole process
> > > > > > takes 0.2 seconds. Before I make a convoluted attempt to
> > exploit this
> > > > > > difference, does anyone know of a good way to draw complex
> > shapes on a
> > > > > > UIComponent?
> > > > > >
> > > > > > - Daniel Freiman
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > "Therefore, send not to know For whom the bell tolls, It tolls for
> > thee."
> > > >
> > > > :: Josh 'G-Funk' McDonald
> > > > :: 0437 221 380 :: josh@
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> >
>



#109441 From: "Oscar Cortes" <ocortess@...>
Date: Wed Apr 9, 2008 8:16 pm
Subject: Re: What's wrong with http://livedocs.adobe.com/flex/3/html/help.html
ocortess
Offline Offline
Send Email Send Email
 
Same issue here with IE7, it worked for me on Firefox .




--- In flexcoders@yahoogroups.com, ivo <cervantes_vive@...> wrote:
>
> I've been having issues as well for a day or two, getting pages not
found & redirected to the wrong page often. I finally just downloaded
the offline content
>
> http://livedocs.adobe.com/flex/3/flex3_documentation.zip
>
> - Ivo
>
> ----- Original Message ----
> From: markgoldin_2000 markgoldin_2000@...
> To: flexcoders@yahoogroups.com
> Sent: Wednesday, April 9, 2008 12:54:51 PM
> Subject: [flexcoders] What's wrong with
http://livedocs.adobe.com/flex/3/html/help.html
>
> Is it working?
>
>
>
>
> <!--
>
> #ygrp-mkp{
> border:1px solid #d8d8d8;font-family:Arial;margin:14px 0px;padding:0px
14px;}
> #ygrp-mkp hr{
> border:1px solid #d8d8d8;}
> #ygrp-mkp #hd{
>
color:#628c2a;font-size:85%;font-weight:bold;line-height:122%;margin:10p\
x 0px;}
> #ygrp-mkp #ads{
> margin-bottom:10px;}
> #ygrp-mkp .ad{
> padding:0 0;}
> #ygrp-mkp .ad a{
> color:#0000ff;text-decoration:none;}
> -->
>
> <!--
>
> #ygrp-sponsor #ygrp-lc{
> font-family:Arial;}
> #ygrp-sponsor #ygrp-lc #hd{
> margin:10px 0px;font-weight:bold;font-size:78%;line-height:122%;}
> #ygrp-sponsor #ygrp-lc .ad{
> margin-bottom:10px;padding:0 0;}
> -->
>
> <!--
>
> #ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean,
sans-serif;}
> #ygrp-mlmsg table {font-size:inherit;font:100%;}
> #ygrp-mlmsg select, input, textarea {font:99% arial, helvetica, clean,
sans-serif;}
> #ygrp-mlmsg pre, code {font:115% monospace;}
> #ygrp-mlmsg * {line-height:1.22em;}
> #ygrp-text{
> font-family:Georgia;
> }
> #ygrp-text p{
> margin:0 0 1em 0;}
> #ygrp-tpmsgs{
> font-family:Arial;
> clear:both;}
> #ygrp-vitnav{
> padding-top:10px;font-family:Verdana;font-size:77%;margin:0;}
> #ygrp-vitnav a{
> padding:0 1px;}
> #ygrp-actbar{
> clear:both;margin:25px
0;white-space:nowrap;color:#666;text-align:right;}
> #ygrp-actbar .left{
> float:left;white-space:nowrap;}
> .bld{font-weight:bold;}
> #ygrp-grft{
> font-family:Verdana;font-size:77%;padding:15px 0;}
> #ygrp-ft{
> font-family:verdana;font-size:77%;border-top:1px solid #666;
> padding:5px 0;
> }
> #ygrp-mlmsg #logo{
> padding-bottom:10px;}
>
> #ygrp-reco {
> margin-bottom:20px;padding:0px;}
> #ygrp-reco #reco-head {
> font-weight:bold;color:#ff7900;}
>
> #reco-grpname{
> font-weight:bold;margin-top:10px;}
> #reco-category{
> font-size:77%;}
> #reco-desc{
> font-size:77%;}
>
> #ygrp-vital{
> background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;}
> #ygrp-vital #vithd{
>
font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-trans\
form:uppercase;}
> #ygrp-vital ul{
> padding:0;margin:2px 0;}
> #ygrp-vital ul li{
> list-style-type:none;clear:both;border:1px solid #e0ecee;
> }
> #ygrp-vital ul li .ct{
>
font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;pa\
dding-right:.5em;}
> #ygrp-vital ul li .cat{
> font-weight:bold;}
> #ygrp-vital a{
> text-decoration:none;}
>
> #ygrp-vital a:hover{
> text-decoration:underline;}
>
> #ygrp-sponsor #hd{
> color:#999;font-size:77%;}
> #ygrp-sponsor #ov{
> padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;}
> #ygrp-sponsor #ov ul{
> padding:0 0 0 8px;margin:0;}
> #ygrp-sponsor #ov li{
> list-style-type:square;padding:6px 0;font-size:77%;}
> #ygrp-sponsor #ov li a{
> text-decoration:none;font-size:130%;}
> #ygrp-sponsor #nc{
> background-color:#eee;margin-bottom:20px;padding:0 8px;}
> #ygrp-sponsor .ad{
> padding:8px 0;}
> #ygrp-sponsor .ad #hd1{
>
font-family:Arial;font-weight:bold;color:#628c2a;font-size:100%;line-hei\
ght:122%;}
> #ygrp-sponsor .ad a{
> text-decoration:none;}
> #ygrp-sponsor .ad a:hover{
> text-decoration:underline;}
> #ygrp-sponsor .ad p{
> margin:0;}
> o{font-size:0;}
> .MsoNormal{
> margin:0 0 0 0;}
> #ygrp-text tt{
> font-size:120%;}
> blockquote{margin:0 0 0 4px;}
> .replbq{margin:4;}
> -->
>

#109440 From: ivo <cervantes_vive@...>
Date: Wed Apr 9, 2008 8:11 pm
Subject: Re: What's wrong with http://livedocs.adobe.com/flex/3/html/help.html
cervantes_vive
Offline Offline
Send Email Send Email
 
I've been having issues  as well for a day or two, getting pages not found & redirected to the wrong page often. I finally just downloaded the offline content

http://livedocs.adobe.com/flex/3/flex3_documentation.zip

- Ivo

----- Original Message ----
From: markgoldin_2000 <markgoldin_2000@...>
To: flexcoders@yahoogroups.com
Sent: Wednesday, April 9, 2008 12:54:51 PM
Subject: [flexcoders] What's wrong with http://livedocs.adobe.com/flex/3/html/help.html

Is it working?



#109439 From: "jmfillman" <jmfillman@...>
Date: Wed Apr 9, 2008 7:58 pm
Subject: Re: Blank Item in List Control
jmfillman
Offline Offline
Send Email Send Email
 
Yes, that appears to work. Thanks!

What's the difference between dataProvider="[]" and
<mx:dataProvider/>?

--- In flexcoders@yahoogroups.com, "Alex Harui" <aharui@...> wrote:
>
> Can you do this instead?
>
>
>
>             <mx:List id="myList" width="100" dataProvider="[]" >
>
>             <mx:itemRenderer>
>
>             <mx:Component>
>
>             <mx:Label text="{data.name}"/>
>
>             </mx:Component>
>
>             </mx:itemRenderer>
>
>             </mx:List>
>
>
>
> ________________________________
>
> From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com] On
> Behalf Of jmfillman
> Sent: Tuesday, April 08, 2008 5:19 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Blank Item in List Control
>
>
>
> I don't quite understand why the first item in the list is blank. I
> presume that it has to do with this:
>
> <mx:dataProvider/>
>
> Why does this happen and how do I prevent it? I certainly can
> programatically remove it(myList.dataProvider.removeItemAt(0)), but
> this is sample code, and I've got about 42 lists where this occurs,
> and I'd rather not have to script that if there is a better
> alternative.
>
> private function initApp():void {
> var obj0:Object = {name: "Sam", value: [0x009DFF,0x009DFF]};
> var obj1:Object = {name: "Ryan", value: [0x0000FF,0x0000FF]};
> var obj2:Object = {name: "Julie", value: [0x008000,0x008000]};
> var obj3:Object = {name: "Chris", value: [0x00FF00,0x00FF00]};
> myList.dataProvider.addItem(obj0);
> myList.dataProvider.addItem(obj1);
> myList.dataProvider.addItem(obj2);
> myList.dataProvider.addItem(obj3);
> }
>
> ************************
> <mx:List id="myList" width="100">
> <mx:dataProvider/>
> <mx:itemRenderer>
> <mx:Component>
> <mx:Label text="{data.name}"/>
> </mx:Component>
> </mx:itemRenderer>
> </mx:List>
>

#109438 From: rob@...
Date: Wed Apr 9, 2008 7:42 pm
Subject: Updated/working version of audioManager?
rvrzl
Offline Offline
Send Email Send Email
 
Does anyone know where to find an updated and working version of
dhtmlnirvanas audioManager.as?

#109437 From: "tchredeemed" <apthorp@...>
Date: Wed Apr 9, 2008 7:53 pm
Subject: <mx:List> Height
tchredeemed
Offline Offline
Send Email Send Email
 
Question, I know that by default <mx:List> is scrollable, and if the list has
content with
height that adds up to a height greater then its own height, it adds scrollbars.

My question, and I have had this question many times in similar situations, is
this:

Code (Simplified Overview):

<mx:Canvas width="100%">

<mx:List width="100%"
dataProvider="{dataProviderHere}"
itemRenderer="{itemRendererHere}"
/>

</mx:Canvas>

Problem:

When data is pushed into the list, I want it to resize the entire list, and by
doing so, resize
the height of the canvas that is it's parent.  I do not want it to add
scrollbars, which
verticalScrollPolicy can turn off.

Halp! :(

#109436 From: "sk_acura" <skommineni@...>
Date: Wed Apr 9, 2008 7:55 pm
Subject: Re: AdvancedDataGrid - Changing the background color on a row.
sk_acura
Offline Offline
Send Email Send Email
 
Hi All,

   I am using the Derived class of DataGrid which is given in one of
the posts in this Forum ( which i copied at the end of the post) and
when i try to run my sample i am getting the following Error:

[ERROR]
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
	 at com.ui.desktop.components::RowColorDataGrid/drawRowBackground()
	 at mx.controls::DataGrid/drawRowBackgrounds()
	 at mx.controls::DataGrid/updateDisplayList()
	 at mx.core::UIComponent/validateDisplayList()
	 at mx.managers::LayoutManager/validateClient()
	 at mx.core::UIComponent/validateNow()
	 at mx.managers::PopUpManagerImpl/centerPopUp()
	 at mx.managers::PopUpManager$/centerPopUp()
	 at MethodInfo-605()
	 at flash.events::EventDispatcher/dispatchEventFunction()
	 at flash.events::EventDispatcher/dispatchEvent()
	 at ModuleInfoProxy/moduleEventHandler()
	 at flash.events::EventDispatcher/dispatchEventFunction()
	 at flash.events::EventDispatcher/dispatchEvent()
	 at ModuleInfo/readyHandler()
	 at flash.events::EventDispatcher/dispatchEventFunction()
	 at flash.events::EventDispatcher/dispatchEvent()
	 at mx.core::FlexModuleFactory/update()
	 at mx.core::FlexModuleFactory/docFrameHandler()
[/ERROR]

In my Panel i have the following code to display the Grid..

[CODE]

<mx:script>

  var contextNode:Node = null;

private function setRowColor(data:Object, color:uint):uint{
				 var tmpNode:Node = null;

				 if(contextNode!=null){
					 tmpNode = Node(data);
					 if(tmpNode.nodeId==contextNode.nodeId){
						 return 0xFFFF00;
					 }
				 }
            	 return color;
         	 }

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

				 var m:Matrix = new Matrix();
				 m.createGradientBox(unscaledWidth,unscaledHeight);

				 var g:Graphics = graphics;
				 var colors:Array = [0x0000CC];

				 g.clear();
				 g.beginGradientFill(GradientType.LINEAR, colors, [0.2,0.6],
[0,255], m);

				 // the rectangle is drawn a little high and a little tall to
compensate for the gap
				 // the DataGrid introduces between rows.
				 g.drawRect(0, -2, unscaledWidth, unscaledHeight+4 );
				 g.endFill();
			 }
</mx:script>


<containers:RowColorDataGrid  id="dataTypeProperties" width="100%"
editable="true" height="100%" rowColorFunction="setRowColor">
				 <containers:columns>
					 <mx:DataGridColumn headerText="Display Name "
dataField="nodeLabel" editable="false" >
						 <mx:itemRenderer>
                			 <mx:Component>
                			    <mx:HBox>
                			   		 <mx:Script>
                 						 <![CDATA[
                 							 import com.lmco.dpa.ui.desktop.util.DPAUtil;
                 						 ]]>
                 					 </mx:Script>
                					 <mx:Image
source="{MyUtil.getPrefixURL()}/actions/info.png"
click="outerDocument.showMetadata(1)" width="15" height="15"/>
                					 <mx:Image
source="{MyUtil.getPrefixURL()}actions/network.png"
click="outerDocument.gotoInfoMap(1)" width="15" height="15"/>
                					 <mx:Image
source="{MyUtil.getPrefixURL()}mimetypes/ascii.png"
click="outerDocument.showEventMetadata(1)" width="15" height="15"/>
                					 <mx:Image
source="{MyUtil.getPrefixURL()}apps/kwrite.png"
click="outerDocument.annotate(1)" width="15" height="15"/>
                					 <mx:Label text="{data.nodeLabel}" />
                			    </mx:HBox>
                			 </mx:Component>
                		 </mx:itemRenderer>
					 </mx:DataGridColumn>
					 <mx:DataGridColumn headerText="Item Id" 	 dataField="nodeId"
editable="false" />
					 <mx:DataGridColumn headerText="Date Created"
dataField="dateCreated"  editable="false" />
					 <mx:DataGridColumn headerText="Description Note"
dataField="Description" editable="false"/>
				 </containers:columns>
 	   	 </containers:RowColorDataGrid>
[/CODE]

and the RowColorDataGrid Code:

[CODE]
public class RowColorDataGrid extends DataGrid
	 {
		 public function RowColorDataGrid()
		 {
			 super();
		 }
		 private var _rowColorFunction:Function;

		 public function set rowColorFunction(f:Function):void
		 {
			 this._rowColorFunction = f;
		 }

		 public function get rowColorFunction():Function
		 {
			 return this._rowColorFunction;
		 }

		 private var displayWidth:Number;

		 override protected function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void
	    	 {
	    		 super.updateDisplayList(unscaledWidth, unscaledHeight);
			 if (displayWidth != unscaledWidth - viewMetrics.right -
viewMetrics.left)
			 {
				 displayWidth = unscaledWidth - viewMetrics.right - viewMetrics.left;
			 }
	    	 }
	     override protected function drawRowBackground(s:Sprite, rowIndex:int,
												 y:Number, height:Number, color:uint, dataIndex:int):void
	     {
	    	 if( this._rowColorFunction != null )
	    	 {
	    		 if( dataIndex < (this.dataProvider as ArrayCollection).length )
	    		 {
		    		 var item:Object = (this.dataProvider as
ArrayCollection).getItemAt(dataIndex);
		    		 color = this._rowColorFunction.call(this, item, color);
	    		 }
	    	 }

	    	 super.drawRowBackground(s, rowIndex, y, height, color, dataIndex);
	     }

	 }
[/CODE]


Initially i had the updateDisplayList() function in RowColorDataGrid
and even then i had the same Error.!!

I am not sure why i am getting the Error:

Thanks
Mars

#109435 From: "markgoldin_2000" <markgoldin_2000@...>
Date: Wed Apr 9, 2008 7:54 pm
Subject: What's wrong with http://livedocs.adobe.com/flex/3/html/help.html
markgoldin_2000
Online Now Online Now
Send Email Send Email
 
Is it working?

Messages 109435 - 109466 of 150960   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help