[flexcoders] Re: HTML content in Sub Applications

2009-03-18 Thread alex_harui
--- In flexcoders@yahoogroups.com, rob_mcmichael rob_mcmich...@... wrote:

 Hi all,
 
 I was wondering if someone could advise me on the best way to get HTML 
 content working in a sub application.
 
 My sub application is loaded into a separate security and application sandbox 
 in AIR. However All communication needed by the sub application goes via the 
 parent application, via shared events.
 
 However I want to render htmlText in a textbox (I just want to render an RSS 
 article so let me know if there is a better way), but as this html has images 
 (that are loaded in) I get a RTE because of the security violation. 
 
 On a side note, what is the best way to add CSS (as in HTML CSS) to this 
 HTML, so I can style how paragraphs and links are displayed.
 
 Thanks in advance
 
 Rob


Try having the main AIR app create the HTML content and hand the displayobject 
back to the subapp.  Sort of a Factory thing.



[flexcoders] Re: DataGrid sorting problem on variableRowHeight with headerrenderer

2008-11-07 Thread alex_harui
I wouldn't use mx.controls.Text as a headerrenderer.  If you need 
wordwrap, just set wordwrap=true on the DataGridListItemRenderer

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

 Hi,
  I have writing a datagrid using the headerrenderer to make 
some
 controls , and also set up the variableRowHeight to true. But find
 that when you click on the headerrenderer, the screen freeze and
 trigger many redraw action until to click another columns. It work
 well in Flex 3 but no on Flex 2. I have attached the source using a
 similar example.
 can someone help me to fix in Flex2 ?
 
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=horizontal
   mx:ArrayCollection id=adgData
   mx:source
   mx:Object column1=A column2=29/
   mx:Object column1=a column2=3/
   mx:Object column1=b column2=9/

   mx:Object column1=B column2=2/
   mx:Object column1=c column2=1/

   /mx:source
   /mx:ArrayCollection
   mx:DataGrid id=dg dataProvider={adgData} 
variableRowHeight=true
   mx:columns
   mx:DataGridColumn headerText=Column 1
 headerRenderer=mx.controls.Text dataField=column1 /
   mx:DataGridColumn headerText=Column 2 
dataField=column2 /
   /mx:columns
   /mx:DataGrid
 /mx:Application
 
 
 thx
 capho





[flexcoders] Modules at 360Flex conference

2007-03-07 Thread alex_harui
We've seen lots of questions on modules recently.  I just presented on 
Modules at the 360Flex conference where I tried to answer some of these 
questions.  Slides and examples are at http://blogs.adobe.com/aharui



[flexcoders] Re: cursor manager bug

2005-07-18 Thread alex_harui
This is a fact-of-life of how security in loaded SWFs works.  
Assets in subordinate SWFs are not available to the top-level SWF, 
but the cursorManager only can work in the top-level SWF.

The easy workaround is to put a DividedBox in the top-level movie and 
hide it.

The more sophisticated workaround is to embed the assets you need in 
the top-level SWF.

--- In flexcoders@yahoogroups.com, Eric Guesdon [EMAIL PROTECTED] 
wrote:
 
 Hi to All,
 
 It seems to be a bug 
 
 In your first .mxml file copy and paste this peace of code
 // 
* 
\\ 
 
 mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
   mx:Loader source=MainDivider.mxml.swf autoLoad=true
 width=100% height=100%/
 /mx:Application
 
 
 // 
*** \\
 
 In a second one copy and paste this code
 
 // 
* 
\\
 
 mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
   mx:Script
   ![CDATA[
   
   public function getPreferredWidth () {
   if(_parent){
   return _parent.layoutWidth ;
   }
   return _preferredWidth ;
   }
   
   public function getPreferredHeight () {
   if(_parent){
   return _parent.layoutHeight ;
   }
   return _preferredHeight ;
   }
   
   ]]
   /mx:Script
   mx:DividedBox direction=horizontal width=100% 
height=100%
   mx:Panel width=25% height=100%/
   mx:DividedBox direction=vertical width=100%
 height=100%
   mx:Panel width=100% height=100%/
   mx:Panel width=100% height=100% /
   /mx:DividedBox
   /mx:DividedBox
 /mx:Application
 
 // 
* 
\\
 
 At last compile and run first file 
 
 
 Look your cursor when you try to resize Divider, cursor is simply 
invisible.
 Are there any reason for that behaviours?
 Are there any known solutions?
 
 Thanks in advance
 
 Best regards 
 
 Eric 
 
 
 
 This message contains information that may be privileged or 
confidential and is the property of the Capgemini Group. It is 
intended only for the person to whom it is addressed. If you are not 
the intended recipient,  you are not authorized to read, print, 
retain, copy, disseminate,  distribute, or use this message or any 
part thereof. If you receive this  message in error, please notify 
the sender immediately and delete all  copies of this message.




--
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

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: dispatching event from custom swc file

2005-07-18 Thread alex_harui
You didn't explain what the problem is.  Do you get a compile error?  
What is the error?  Does the code listening for the event not run?  
Post a mini-example.

Your sample looks right to me.

--- In flexcoders@yahoogroups.com, m00n_de [EMAIL PROTECTED] 
wrote:
 hi, maybe someone could explain this to me ?
 
 I build a custom component in flash. The class extends UIComponent.
 The default events like initalize and creationcomplete are 
dispatched
 correctly. But i canĀ“t solve it to dispatch custom events.
 
 Before the class definition starts i use:
 [Event(myEvent)].
 
 
 Later in the class I call
 
 var eventObj = new Object();
 eventObj.type = myEvent;
 dispatchEvent(eventObj);
 
 Where is my problem ??




--
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

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Help with loading of some SWF content in an mx:Image tag

2005-07-18 Thread alex_harui
Well, if you are in no-source-code hell, then you have to hack your 
way out.

If you know the internal structure of the loaded SWF, you can try to 
find the place the loadVars is done and try to grab a load event on 
it, or set a timer and check to see if the loadVars is complete.  
After that, you can then pass the variables to the loaded SWF and try 
to get it to render.


--- In flexcoders@yahoogroups.com, cazzaran [EMAIL PROTECTED] wrote:
 I have a banner that I load into my Image tag, and this banner goes
 out to the server it came from to request a TXT file to load up some
 variables.
 
 The problem is that I want to be able to use as much client side as
 possible. Is there a way to override it loading these vars so I can
 put in my own by passing the Image object the names of the vars I 
need
 to load?
 
 For example:
 
 mx:Image source=test.swf id=test/
 
 Then going:
 
 test[_level5].someVar = foo;
 
 I have tested this with other simpler SWFs and it appears that I CAN
 in fact set internal fields as long as I know their name. The 
problem
 with this particular flash movie is that I believe I set the fields,
 but then it overwrites them with values it gets in the TXT file.
 
 Right now, I have no choice but to serve it a TXT file, because if I
 don't regardless of what the values are set to, it wont play until 
it
 loads this file. I don't have the source to this file, but I do know
 where the vars need to be set.
 
 Help is much appreciated! Thanks... -Josh




--
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

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: mouse over text for a datagrid column

2005-07-12 Thread alex_harui
You can write a custom header renderer with a tooltip property

--- In flexcoders@yahoogroups.com, nick [EMAIL PROTECTED] wrote:
 Hey everyone, new to the group :-)
 
 Just gotta question regarding mouse over text for a datagrid column
 header...how is it done?  I dont see any properties attribute to set
 it with.  Is it possible?
 
 Thanks




--
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

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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





[flexcoders] Re: Filesize generated swf's

2005-07-12 Thread alex_harui
An empty Application tag should come in at about 128Kb.  Not sure why 
you got 263Kb.  You sure you didn't have any custom theme attributes 
on the application tag?

At any rate, starting from 128K, you'll hit your 150K limit really 
quick.  However, I encourage you to consider the following:

1) Broadband is here.  The main reason for a 150K limit is download 
time.  More and more people are accessing your site over fast 
connections where 150K only represents 1/2 second or less

2) Flex/Flash is streaming media.  The user will see the download 
progress bar, which you can customize, very quickly, long before the 
app has been fully downloaded over slow links, so you can present 
something to the user faster than you could trying to get one 150K 
HTML page parsed and rendered

3) Flex is not page-oriented.  Thus once you get the SWF downloaded 
you don't have to go back to the server for the next screen full, it 
is already there.  This is often much better than having to make the 
user wait as you go get the next 150Kb HTML page, and the one after 
that.

Flex is a new paradigm.  It will require you to think a little 
differently and design your apps differently, but you will probably 
find that there's a payback in terms of usability and productivity on 
the part of your users that is not achievable in the HTML paradigm.

-Alex


--- In flexcoders@yahoogroups.com, Joost Nuijten [EMAIL PROTECTED] 
wrote:
 Hi,
  
 We are working on a Flex-based website. We've discovered that the 
generated
 SWF's are at least 400Kb. This is too large. According to usability 
rules a
 webpage should exceed 150Kb per page.
  
 We created an empty mxml-template (containing only a mx:application-
tag) and
 the filesize was still 263Kb. Does anybody have an idea how to 
reduce the
 filesize?
  
 One thing that will help is to remove all the @embed-codes and load 
images
 at runtime. But that's not enough to get the filesize down to 150Kb.
 
 Regards,
 Joost Nuijten




--
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

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: drag and drop

2005-07-12 Thread alex_harui
Most computer interactions use mouseUp instead of mouseDown.  For 
example, you can mouseDown on the reply button as you read this message 
and it won't set up a reply until you mouseUp.

In Flex we use mouseOut instead of mouseDown/mouseMove to trigger drag 
operations.  In most other frameworks there is some mouse move 
tolerance before the drag starts.

-Alex

--- In flexcoders@yahoogroups.com, Nithya R [EMAIL PROTECTED] wrote:
 hai,
 I have a cnvas with many controls inside... i want a drag 
event on the canvas i use a mouseMove evnet for beginDrag and i 
also have a mousedown event tht takes u to a next view in the 
viewstack... now what happens is when i start dragging the controls 
goes to the next view even before the drag is completed how to 
overcome this?
  
 thanks,
 nithya
 
 Send instant messages to your online friends 
http://uk.messenger.yahoo.com




--
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

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: TileList withh CellRendere.

2005-07-12 Thread alex_harui
I didn't see the code for modelLocator.  It looks like it might be a 
class, in which case it must specify a changeEvent for the activities 
property otherwise when it changes, binding won't know it changed and 
won't update the TileList.

--- In flexcoders@yahoogroups.com, Shahnavaz Alware [EMAIL PROTECTED] 
wrote:
 Hi All,
 
  
 
 I am implementing the TileList with CellRenderer
 
 mx:Application  xmlns:mx=http://www.macromedia.com/2003/mxml
 
 initialize= loadComplete()/
 
  
 
 mx:Script
 
 ![CDATA[
 
 
 
 import com.test.model.ModelLocator;
 
 import com.test.dto.ActivityDTO;
 
 import 
org.nevis.cairngorm.control.EventBroadcaster;
 
 import com.test.control.SfmController;
 
 
 
 
 public var activities : Array;
 
  
 
 
 public var activity : ActivityDTO;
 
 
 
 
 private function loadComplete() : Void {
 
 
 
  
 EventBroadcaster.getInstance().broadcastEvent
 
 (
 SfmController.EVENT_GET_ACTIVITIES_WORK_QUEUE );
 
 
 }   
 
  
 
 
 ]]
 
 /mx:Script
 
  
 
 mx:TileList id=tileListComp width=100% height=100% 
 
 dataProvider={ ModelLocator.activities } 
 
 itemWidth=300 itemHeight=100 
 
  
 cellRenderer=com.test.view.activityview.ActivityDetailThumbnail 
 
  
 change=activityWorkQueueListViewHelper.updateSelectedActivity( 
event )/
 
  
 
  
 
  
 
 CellRenderer
 
  
 
 import com.hmssoftware.sfm.dto.ActivityDTO;
 
 import 
com.hmssoftware.sfm.dto.DeliverableDTO;
 
 import 
com.hmssoftware.sfm.model.ModelLocator;
 
 
 public var activity : ActivityDTO;
 
 public var deliverable : DeliverableDTO;
 
  
 
 public function setValue( str : String, 
item :
 Object ) 
 
 {
 
 
 
 activity = ActivityDTO( 
item ); // This
 is undefined
 
 mx.core.Application.alert(
 activity.activityId:   + activity.activityId );// Resulting in
 activity.activityId: Undefined ??
 
 
 
 }
 
  
 
 I am unsing Cairngorm 0.99. In my onResult() of command when I 
check for
 data ModelLocator.activities its valid.
 
 But the TileList dataprovider when initialized is undefined. I 
guess I need
 some sequence which will help me to initialize CellRenderer 
 
 After the  onResult() where I am assigning event.result to
 ModelLocator.activities. Thanks in advance for any suggestion or 
help.
 
  
 
 Thanks,
 
  
 
 Shahn




--
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

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Background image in button.

2005-07-08 Thread alex_harui
ImageButton is definitely worth a look.

I don't know what you mean by accepts, but Button doesn't use the 
backgroundImage style.  It's visuals can only be changed via skinning 
and ImageButton attempts to simply the skinning process.  If it 
doesn't do what you want, read up on skinning.

-Alex
 
--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] 
wrote:
 Have you looked at ImageButton?  It is in the flex\extras folder.
 Tracy
 
 -Original Message-
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of tony_lic
 Sent: Friday, July 08, 2005 3:41 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Background image in button.
 
 Hi,
  i tried giving a background image to a button. it accepts the 
image, 
 but im not able to see the image in the button. 
  what should be the problem?
 with regards,
 tony
 
 
 
 
 --
 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




--
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

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: FlashPaperLoader.mxml - contentPath property

2005-06-29 Thread alex_harui
FlashPaperLoader is not an out-of-the-box Flex Component.  Where did 
you get it, from the Macromedia site?  You imply that it is an MXML 
file so it must be an example somewhere.  I'll bet Manish thinks 
you're talking about mx:Loader.

My guess is that it only has a contentPath variable and isn't written 
to support run-time changes.  However if you have the source, it 
should be easy enough to do.  Basically the contentPath property 
needs to be a getter/setter pair so that the rest of the code can 
receive notification of a change to that property's value and 
execute another load sequence.

--- In flexcoders@yahoogroups.com, jozef_pichler [EMAIL PROTECTED] wrote:
  So what does the loader's 'source' property contain once setFile
() 
 has
  been called?
 
 many thanks for your efforts, Manish.
 source is 'undefined' even after changes.
 I cant get any 'variable content' going on the FPLoader.
 the only way I can see the FlashPaper loaded into flex
 is really that line: 
 
  FlashPaperLoader id=myLoader 
 contentPath=http://localhost:8300/.../test.swf; 
 width=100% 
 height=100% /
 
 following the code with the changes:
 mySWF declared outside function.
 
  begin source --
 
 mx:Application
 xmlns:mx=http://www.macromedia.com/2003/mxml;
 xmlns = *
 
 mx:Script
 ![CDATA[
   var mySWF = http://localhost:8300/GPML/test.swf;;
 
   function setFile()
   {
   mySWF = http://localhost:8300/GPML/test.swf;;
   mx.controls.Alert.show(Source:  + myLoader.source);
   }
 ]]
 /mx:Script
 
 mx:Panel
 
 FlashPaperLoader id=myLoader 
 contentPath={mySWF} 
 width=100% 
 height=100% /
 
 /mx:Panel
 
 mx:Button label=set the file name and look if the flash paper 
 loader responds
 click=setFile() /
 
 /mx:Application




--
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

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: how to add cellRender CheckBox to Tree?

2005-06-29 Thread alex_harui
All nodes have a getParent() and getChildNodes() so you can walk up 
and down the tree of nodes

--- In flexcoders@yahoogroups.com, loveewind [EMAIL PROTECTED] wrote:
 This article is helpful for me,
 the article referred CheckRowRenderer.as 
 but how to get all checked Node's label?
 
 thanks!
 
 --- In flexcoders@yahoogroups.com, Tom Jeffery [EMAIL PROTECTED] 
 wrote:
  I just started looking at doing something similar.  I believe 
you're
  going to want to extend TreeRow.  There's an example online here:
  
 
http://www.macromedia.com/support/documentation/en/flex/1/cellrenderer
 s/cellrenderers13.html
  
  The example is not perfect, and I've been really struggling to
  implement the behaviors you described.  Simply getting the 
checkbox 
 to
  display properly with the disclosure button and icons has already
  sidelined me.  Regardless of the _x coordinate I set for the 
 checkbox,
  it seems to want to render itself right on top of the disclosure
  button which has been very frustratng.  I'd love to hear from 
anyone
  who's tackled this already.
  
  Thanks!
  Tom Jeffery
  
  --- In flexcoders@yahoogroups.com, loveewind [EMAIL PROTECTED] 
 wrote:
   1.as referred in Developing Flex Applications document
   
   display custom cell content for each of Tree's rows,
   This customized cell can contain a prebuilt component, such as 
a 
   CheckBox control, or any user interface component that you 
 create.
   
   
   and I want to add CheckBox behind each Node and branch,
   also if check the checkBox, the checkBox can be listened,
   
   for example, if the node's checkBox is checked, this node's all 
   branch's checkBox will be checked.
   
   who has this experience? I am glad to get your help!
   
   thanks!




--
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

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Skinning

2005-06-29 Thread alex_harui
The Pulse themes have fixed-size panel headers that don't respond to 
headerHeight, because it is a graphic (simple MovieClip or JPG) and 
therefore doesn't support the resizing API we use.  In Halo, the 
panel header is a programmatic skin.  You can see similar 
implementations in the SampleTheme we shipped.  Programmatic skins 
can support the resizing API.

--- In flexcoders@yahoogroups.com, Eric Guesdon [EMAIL PROTECTED] 
wrote:
 
 Hello all,
 I have a problem with theme.
 I tried to use ships Flex theme (pulseOrange  pulseBlue).
 So i meet some strange behaviors when i add headerHeight attribute 
in a mx:Panel for example :
 The header height don't care about value of headerHeight attribute.
 Cos i use Flex 1.5 the haloTheme.fla hasn't been distributed with 
flexforflash zip file, so i don't have any original theme file.
 Have you any experience on that
 Best regards
 Eric Guesdon
 
 
 
 This message contains information that may be privileged or 
confidential and is the property of the Capgemini Group. It is 
intended only for the person to whom it is addressed. If you are not 
the intended recipient,  you are not authorized to read, print, 
retain, copy, disseminate,  distribute, or use this message or any 
part thereof. If you receive this  message in error, please notify 
the sender immediately and delete all  copies of this message.




--
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

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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





[flexcoders] Re: how to add cellRender CheckBox to Tree?

2005-06-28 Thread alex_harui
A Tree consists of TreeRows and cell renderers.  The TreeRow places 
the open/close icon and the icon for the row and then its 
cellRenderer.  If a Checkbox is the cell renderer then you'll get see 
the open/close then the folder/leaf icon then the checkbox then the 
checkbox label.

Have you considered just replacing the folder/leaf icon with a 
checkbox icon and writing code to handle it being clicked?

When a checkbox is clicked you are responsible for setting properties 
on all the child nodes so they know whether to display the checked or 
unchecked version.  Use an iconFunction to calculate which icon to 
use.

--- In flexcoders@yahoogroups.com, Tom Jeffery [EMAIL PROTECTED] 
wrote:
 I just started looking at doing something similar.  I believe you're
 going to want to extend TreeRow.  There's an example online here:
 
http://www.macromedia.com/support/documentation/en/flex/1/cellrenderer
s/cellrenderers13.html
 
 The example is not perfect, and I've been really struggling to
 implement the behaviors you described.  Simply getting the checkbox 
to
 display properly with the disclosure button and icons has already
 sidelined me.  Regardless of the _x coordinate I set for the 
checkbox,
 it seems to want to render itself right on top of the disclosure
 button which has been very frustratng.  I'd love to hear from anyone
 who's tackled this already.
 
 Thanks!
 Tom Jeffery
 
 --- In flexcoders@yahoogroups.com, loveewind [EMAIL PROTECTED] 
wrote:
  1.as referred in Developing Flex Applications document
  
  display custom cell content for each of Tree's rows,
  This customized cell can contain a prebuilt component, such as a 
  CheckBox control, or any user interface component that you 
create.
  
  
  and I want to add CheckBox behind each Node and branch,
  also if check the checkBox, the checkBox can be listened,
  
  for example, if the node's checkBox is checked, this node's all 
  branch's checkBox will be checked.
  
  who has this experience? I am glad to get your help!
  
  thanks!




--
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

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Sort data grid that has a check box cell renderer

2005-06-24 Thread alex_harui
One common problem is that the cellrenderer is only written to turn on 
the checkbox and not to turn it off.  Follow the setValue method in a 
debugger to make sure.

--- In flexcoders@yahoogroups.com, Joe [EMAIL PROTECTED] wrote:
 I have a data gris that is sortable. One of the colums has a check 
box 
 in it from a cellrendering file. For some reason when I sort
 the check box does not sort. So If I have a check box checked and 
then 
 i sort every thing sort according to how I sorted except for the 
check 
 box column and now the checkbox that is checked is on another row





--
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

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Flash V2 Components and Flex Compatibility

2005-06-13 Thread alex_harui
You'll probably have to provide more details about how the List is 
being used, but in general, we don't promise that Flash V2 modules drop 
into Flex.

One of the main issues is that Flex is entirely dynamic.  It 
instantiates all of the components on-the-fly.  In Flash one can easily 
place components on the stage or in other symbols.  If you did that, it 
probably won't run in Flex as that is non-dynamic and the instantiation 
sequence in that case is not supported in Flex.

Now, if you haven't done that, that implies that your app is pretty muc 
script-driven, in which case the best option is probably just to copy 
the script into .as files and compile them from MXML.

--- In flexcoders@yahoogroups.com, Dennis Baldwin [EMAIL PROTECTED] 
wrote:
 We're in the process of porting some of our existing RIA 
functionality from
 Flash to Flex.  In certain situations we'd like for pieces of our 
existing
 Flash RIA to live inside of Flex.  We've had moderate success with 
this
 approach, but the biggest problem has been with the V2 components.  I 
know
 there are interoperability issues when using these components with 
Flex so
 I've gone through the process of setting up the flexforflash file 
within the
 Flash IDE.  It appears that Button, Radio, and Checkbox components 
work fine
 but whenever there's a component that utilizes the Listbox it doesn't 
work
 at all.  In fact, the Listbox doesn't even display





 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Inline editing on double click in datagrid

2005-06-13 Thread alex_harui
Unfortunately, I can't think of a documented way to do this.  I will 
suggest looking in DataGridRow.as source in Flash MX 2004.  It might 
give you a clue how to do it, but we can't officially support it from 
Macromedia.

--- In flexcoders@yahoogroups.com, Pradeep Chaudhary 
[EMAIL PROTECTED] wrote:
 I want to implement cell editing in datagrid based upon mouse double
 click. I have already implemented logic to fire doubleClick event on
 either cellPress or mouseUp event. Only problem is that I'am not able
 to stop default cell editing on single mouse click.
 
 Can anybody please suggest as to how can i stop default cell editing.
 Also suggest which is a better place for dispatching doubleClick
 event, in cellPress or mouseUp ?
 
 Pradeep





 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: TileList Databinding -- showing undefined

2005-06-10 Thread alex_harui
Your sample didn't show a call to setValue().  The list calls 
setValue with the object from the dataprovider.  Your setValue call 
would set the singleGroup variable.  See cell renderer examples for 
implementations of setValue

--- In flexcoders@yahoogroups.com, jeremybruck [EMAIL PROTECTED] wrote:
 Everyone,
 
 This one has unfortunately has had me beating my head against a wall
 and I am sure it is something little.  I have a TileList that I am
 trying to pass an array of objects (gotten from remote AMF call to
 CFMX CFC) to the cellRenderer and am having problems seeing the 
object
 in the cellRenderer.  The problem is my Object in the cellRenderer 
is
 just showing everything as undefined.
 
 I originally had this as a repeater and it worked great, but now I
 need it as 2 columns of data and thus the TileList is a good 
solution.
 
 Here is the code:
 mx:TileList id=groupList cellRenderer=selectableGroupList
 dataProvider={myGroups} width=100%
 height={distributionTab.height*.20} itemWidth=350 
itemHeight=20
 columnCount=2/
 
 CellRenderer Code:
 ?xml version=1.0 encoding=utf-8?
 mx:VBox xmlns:mx=http://www.macromedia.com/2003/mxml; width=100%
 height=100%
   mx:Script
   ![CDATA[
   var singleGroup:Object;
   ]]
   /mx:Script
  
   mx:CheckBox id=groupID label={singleGroup.groupname} /
 /mx:VBox
 
 Here is a sampling of the Array of Objects that is the variable: 
 myGroups
 [0] (object #3)
 b_fname: Jeremy
 b_lname: Bruck
 g_buyercid: 18946
 groupname: Bearing Cage Coders
 grouptype: I
 nameid: 30048
 suppliercount: 4
 [1] (object #4)
 b_fname: Jeremy
 b_lname: Bruck
 g_buyercid: 18946
 groupname: Group Test
 grouptype: I
 nameid: 30034
 suppliercount: 5
 
 
 Thanks,
 Jeremy




 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: How to use flash swc file in flex

2005-06-10 Thread alex_harui
Flex4Flash did not ship in 1.5 or we hid it in a legacy directory, I 
can't remember.  You will still be better off by using the new CompC 
workflow to just port your source to Flex.

--- In flexcoders@yahoogroups.com, Manish Jethani [EMAIL PROTECTED] 
wrote:
 On 6/9/05, yhsphil [EMAIL PROTECTED] wrote:
  thanks a lot, btw where can i download flex4flash.zip , can't find 
it
  macromedia homepage, google,etc and no luck.
 
 Search for it in your Flex installation directory. :)




 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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





[flexcoders] Re: Memory Useage with Flex

2005-06-10 Thread alex_harui
Start commenting out portions of the app and see if you find a 
subsection that is sucking up the memory.

Make sure you've optimized the number of layout containers used.  
Should you be using a Grid instead of a network of VBox/HBox?

Are you using Repeaters?  They can be memory hungry.  Consider Lists 
with custom cell renderers instead.

Is your app resizable?  If not, and you're really desperate, take out 
the layout containers and use a single Canvas and your own layout logic.

There's no single process to go through, but if you can figure out what 
is the most memory hungry someone will have an idea for you

--- In flexcoders@yahoogroups.com, Joel Parish [EMAIL PROTECTED] 
wrote:
 Hello all :)
 Is there any way to optimize flex to use less memory? At the momment
 flex is quite a resource hog and uses about 400mB. Any and all help is
 appriceiated.
 
 Thanks,
 Joel




 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Contract between DataProvider and ComboBox or DataGrid

2005-06-06 Thread alex_harui
The combobox measures every row in order to figure out how wide it 
should be.  The datagrid trusts the width information in the columns.

-Alex

--- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote:
 Yep, the DG will probably call getItemAt for every visible row
 regardless of how many items are actually in the dataProvider.  
Multiple
 calls to length() are simply done as the measurement, layout, and
 drawing mechanisms are doing their thing.  Same would apply to 
ComboBox
 but obviously there's less to compute and draw there.
 
  
 
 Matt
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of rbelknap
 Sent: Sunday, June 05, 2005 11:13 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Contract between DataProvider and 
ComboBox or
 DataGrid
 
  
 
 I hooked up the dataProvider to a ComboBox and the result was more 
 what I expected.  The ComboBox seems to make 0 to length-1 calls to 
 getItemAt and then stops.  The DataGrid seems to make a fixed 
number 
 of calls - perhaps a default grid size?
 
 
 [Debug] cbTest initialized
 [Debug] TestDP(undefined)
 [Debug] getItemAt(undefined)
 [Debug] get length():5
 [Debug] get length():5
 [Debug] get length():5
 [Debug] get length():5
 [Debug] get length():5
 [Debug] get length():5
 [Debug] get length():5
 [Debug] get length():5
 [Debug] getItemAt(0)
 [Debug] getItemAt(1)
 [Debug] getItemAt(2)
 [Debug] getItemAt(3)
 [Debug] getItemAt(4)
 [Debug] get length():5
 [Debug] get length():5
 [Debug] getItemAt(undefined)
 
 
 --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] 
wrote:
  I'd imagine that if you're seeing numerous calls to length 
 interspersed
  with getItemAt that we simply didn't do an optimal loop.
  
   
  
  for (var idx = 0; idx  dataProvider.length; ++idx)
  
  {
  
var item = getItemAt(idx);
  
  }
  
   
  
  get length() is going to be called on every iteration of the 
loop.  
 It'd
  obviously be more efficient to store length in a local variable 
and 
 just
  use that, but maybe we didn't somewhere.
  
   
  
  Matt
  
  
  
  From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On
  Behalf Of rbelknap
  Sent: Friday, June 03, 2005 3:24 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Contract between DataProvider and ComboBox 
or
  DataGrid
  
   
  
  Hi,
  
  I'm struggling to figure out the implied contract between 
  DataProviders and their users like ComboBox or DataGrid. When 
 either 
  a ComboBox or DataGrid first uses a DataProvider they seem to 
make 
  numerous calls to:
  
 public function get length():Number
  
  and 
  
 function getItemAt(index : Number)
  
  but it isn't obvious what the logic is behind these calls.  
  
  I was expecting to see a call to get the length followed by a 
 series 
  of calls to getItemAt starting at index 0 and running to index 
 length-
  1, but that's not what I see.
  
  Has anyone run across any good discussions of DataProviders and 
 their 
  users?
  
  Thanks,
  
  Randy
  
  
  
  
  
  
  
  
  Yahoo! Groups Links
  
  *  To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
  
  *  To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
subject=Unsubscribe 
  
  *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
  Service http://docs.yahoo.com/info/terms/ .
 
 
 
 
 
 
 
 
 Yahoo! Groups Links
 
 * To visit your group on the web, go to:
   http://groups.yahoo.com/group/flexcoders/
 
 * To unsubscribe from this group, send an email to:
   [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] 
 
 * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
 Service http://docs.yahoo.com/info/terms/ .





 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: horizontal numeric stepper

2005-06-06 Thread alex_harui
Your sample didn't have a call to inputField.move(), which should 
reposition the inputfield.

You may have to override drawFocus() or adjustFocusRect() to get the 
focus ring to look right.


--- In flexcoders@yahoogroups.com, Alistair McLeod [EMAIL PROTECTED] 
wrote:
 Hi Paulo.
  
 Since you're overriding layoutChildren(), you probably need to 
override
 measure() too. Check the code for NumericStepper in 
FlexForFlash1.5.zip for
 a clue to whats going on there.
  
 Cheers,
  
 Ali
  
 --
 Alistair McLeod
 Development Director
 iteration::two
  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
  
 Office:  +44 (0)131 338 6108
  
 This e-mail and any associated attachments transmitted with it may 
contain
 confidential information and must not be copied, or disclosed, or 
used by
 anyone other than the intended recipient(s). If you are not the 
intended
 recipient(s) please destroy this e-mail, and any copies of it, 
immediately.
  
 Please also note that while software systems have been used to try 
to ensure
 that this e-mail has been swept for viruses, iteration::two do not 
accept
 responsibility for any damage or loss caused in respect of any 
viruses
 transmitted by the e-mail. Please ensure your own checks are 
carried out
 before any attachments are opened.
  
  
 
   _  
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of Paolo Bernardini
 Sent: 05 June 2005 15:02
 To: flexcoders@yahoogroups.com
 Subject: R: [flexcoders] horizontal numeric stepper
 
 
 
 Thanks for the reply but it doesn't look that easy. First of all 
I'm not
 able to move the input field even if I hardcoded a numeric value, 
second
 when the componet get focus you see the focus highlight with the 
same shape
 of the original NumericStepper.
 
 This is the code that I'm using:
 
  
 
 class HorizontalNumericStepper extends mx.controls.NumericStepper
 
 {
 
 public function HorizontalNumericStepper()
 
 {
 
 }
 
 //
 
 function layoutChildren():Void
 
 {
 
 var w = nextButton_mc.preferredWidth;
 
 var h = prevButton_mc.preferredHeight;
 
 var h2 = nextButton_mc.preferredHeight;
 
 
 
 nextButton_mc._x = 0;
 
 nextButton_mc._y = 0;
 
 nextButton_mc.setSize(w, h2);
 
 prevButton_mc._x = layoutWidth - w;
 
 prevButton_mc._y = layoutHeight - h;
 
 prevButton_mc.setSize(w, h);
 
 
 
 inputField.setSize(layoutWidth - w + 1,
 layoutHeight);
 
 StepTrack_mc._width = w;
 
 StepTrack_mc._x = 18; // this doesn't do 
anything
 
 StepTrack_mc._height = layoutHeight - (h2 + 
h);
 
 StepTrack_mc._y = h;
 
 
 
 }
 
 }
 
  
 
  
 
   _  
 
 Da: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
Per conto
 di JesterXL
 Inviato: sabato 4 giugno 2005 19.41
 A: flexcoders@yahoogroups.com
 Oggetto: Re: [flexcoders] horizontal numeric stepper
 
  
 
 Override NumericStepper's layoutChildren method.
 
 Currently, it's:
 
 function layoutChildren():Void
 {
   var w = nextButton_mc.preferredWidth;
   var h = prevButton_mc.preferredHeight;
   var h2 = nextButton_mc.preferredHeight;
   
   nextButton_mc._x = layoutWidth - w;
   nextButton_mc._y = 0;
nextButton_mc.setSize(w, h2);
   prevButton_mc._x = layoutWidth - w;
   prevButton_mc._y = layoutHeight - h;
prevButton_mc.setSize(w, h);
 
   inputField.setSize(layoutWidth - w + 1, layoutHeight);
   StepTrack_mc._width = w;
   StepTrack_mc._x = layoutWidth - StepTrack_mc._width;
   StepTrack_mc._height = layoutHeight - (h2 + h);
   StepTrack_mc._y = h;
 }
 
 simply override, and modify the positoin of next and prev button.
 
 - Original Message - 
 From: Paolo Bernardini [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Saturday, June 04, 2005 9:39 AM
 Subject: [flexcoders] horizontal numeric stepper
 
 
 Any idea how to implement an horizontal numeric stepper with left 
and 
 right arrows instead of up and down ones. like this:  10 
 
 
 
 
 
 Yahoo! Groups Links
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
   _  
 
 
 Passa a QUIZIL SuperMail !
 
 Con 40 MBytes di spazio per casella (a richiesta anche 100), 
spedizione ad
 alta velocit` di messaggi grandi fino a 20 Mbytes, 
 WebMail di alta qualit`, la configurazione gratuita di SPF e, 
naturalmente,
 Antivirus, Antispam, POP e IMAP, piy il backup settimanale. 
 SuperMail h integrabile con WebFax e WebAdmin.
 Se preferisci l'indipendenza puoi portare un MailGateway entro la 
tua
 azienda, ed usarlo per attivare le funzioni cooperative di Outlook !
 
 Attiva QUIZIL SuperMail con una email a [EMAIL PROTECTED]
 
 
   _  
 
 
 
 
 
 

[flexcoders] Re: Tree dataProviders backingObject

2005-06-06 Thread alex_harui
Ah yes, the ol' convert arrays to children problem.  The 
TreeDataProvider is guilty of trying to hard to figure out which 
parts of a complex object are children.  I can only think of two ways 
to deal with this:

1) write your own implementation of TreeDataProvider that doesn't 
munge your data.

2) convert your data into the TreeNodes by using addTreeNodeAt then 
adding the arrays later.

I'd go with #1, it'll be hard to get started but the best solution in 
the end.


--- In flexcoders@yahoogroups.com, Jeff Beeman [EMAIL PROTECTED] 
wrote:
 It looks like I just need to look more into the TreeDataProvider 
API.
 I'm not very familiar with it (as you can tell), and I guess the
 behavior I'm experiencing does make sense.  It just gets difficult 
when
 I'm trying to make an object that has multiple properties, including
 arrays, be the 'data' part of the tree node, as the arrays end up
 showing as children (which does make sense).
 
 I guess, my recommendation to MM would be to document this 
component a
 bit better, as I really had no clue where to start with looking for 
a
 solution :)
 
 Thanks, all!
 
 
 /**
 * Jeff Beeman
 **/
 -Original Message-
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of alex_harui
 Sent: Friday, June 03, 2005 4:29 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Tree dataProviders  backingObject
 
 The Tree needs a hierarchy of objects each of which implement 
 TreeDataProvider.  That way, at each level in the tree we can ask 
the 
 current node for its children and other data.
 
 Built-in Flash types like XMLNode don't support TreeDataProvider 
and 
 it is too hard to mix it in (and bad practice as well).  Thus we 
take 
 each XMLNode and wrap it in a TreeDataProvider and put the original 
 node in a backingObject.
 
 There is no API for limiting tree depth.  I'd think twice before 
 implementing it because it would seem to me that the tree should 
 faithfully represent its data so, if the data has only two levels 
 then fine, but if it has more you should show that too.
 
 However, if you really gotta do it, you have a couple of choices 
 depending on what you want the UI to look like.  You could override 
 setIsOpen on the Tree and block opening of things that are too 
deep, 
 but the those nodes at level 2 with children will still look like 
 folders.  You could customize a TreeDataProvider to pretend that 
 nodes of level 2 have no children.  That's probably the best option.
 
 --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] 
wrote:
  Check out the TreeDataProvider API in the ASDoc.  The 
backingObject 
 is
  used by one implementation of that API (called TreeNode) which is 
 used
  when the object you are passing to the Tree does not implement
  TreeDataProvider itself.  
  
   
  
  I don't think we provide an easy way to limit the depth of the 
 tree.  I
  suppose you could simply implement the TreeDataProvider API 
 yourself to
  make sure that children that are too deep aren't displayed.
  
   
  
  Matt
  
   
  
  
  
  From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On
  Behalf Of Jeff Beeman
  Sent: Friday, June 03, 2005 2:50 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Tree dataProviders  backingObject
  
   
  
  Is there any sort of documentation on the way the Tree component 
 deals
  with it's dataProvider?  
  
  Using the Object Inspector from
  http://www.coenraets.com/viewarticle.jsp?articleId=83 I can see 
that
  binding my dataProvider for the tree to an object creates a 
 subobject
  called backingObject that actually holds the data.
  
  So, I've got 2 additional questions - Why does it do this?  And, a
  related question is, how do I limit how many nodes of an object 
the 
 tree
  actually uses for it's display?  (For example, I only want it to 
go 
 2
  levels into a dataProvider)
  
  
  /***
  * Jeff Beeman
  * Digital Media  Instructional Technologies
  * Arizona State University
  ***/
  
  
  
  
  
  
  
  Yahoo! Groups Links
  
  *   To visit your group on the web, go to:
  http://groups.yahoo.com/group/flexcoders/

  *   To unsubscribe from this group, send an email to:
  [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]
subject=Unsubscribe 

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





 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Tree dataProviders backingObject

2005-06-03 Thread alex_harui
The Tree needs a hierarchy of objects each of which implement 
TreeDataProvider.  That way, at each level in the tree we can ask the 
current node for its children and other data.

Built-in Flash types like XMLNode don't support TreeDataProvider and 
it is too hard to mix it in (and bad practice as well).  Thus we take 
each XMLNode and wrap it in a TreeDataProvider and put the original 
node in a backingObject.

There is no API for limiting tree depth.  I'd think twice before 
implementing it because it would seem to me that the tree should 
faithfully represent its data so, if the data has only two levels 
then fine, but if it has more you should show that too.

However, if you really gotta do it, you have a couple of choices 
depending on what you want the UI to look like.  You could override 
setIsOpen on the Tree and block opening of things that are too deep, 
but the those nodes at level 2 with children will still look like 
folders.  You could customize a TreeDataProvider to pretend that 
nodes of level 2 have no children.  That's probably the best option.

--- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote:
 Check out the TreeDataProvider API in the ASDoc.  The backingObject 
is
 used by one implementation of that API (called TreeNode) which is 
used
 when the object you are passing to the Tree does not implement
 TreeDataProvider itself.  
 
  
 
 I don't think we provide an easy way to limit the depth of the 
tree.  I
 suppose you could simply implement the TreeDataProvider API 
yourself to
 make sure that children that are too deep aren't displayed.
 
  
 
 Matt
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of Jeff Beeman
 Sent: Friday, June 03, 2005 2:50 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Tree dataProviders  backingObject
 
  
 
 Is there any sort of documentation on the way the Tree component 
deals
 with it's dataProvider?  
 
 Using the Object Inspector from
 http://www.coenraets.com/viewarticle.jsp?articleId=83 I can see that
 binding my dataProvider for the tree to an object creates a 
subobject
 called backingObject that actually holds the data.
 
 So, I've got 2 additional questions - Why does it do this?  And, a
 related question is, how do I limit how many nodes of an object the 
tree
 actually uses for it's display?  (For example, I only want it to go 
2
 levels into a dataProvider)
 
 
 /***
 * Jeff Beeman
 * Digital Media  Instructional Technologies
 * Arizona State University
 ***/
 
 
 
 
 
 
 
 Yahoo! Groups Links
 
 * To visit your group on the web, go to:
   http://groups.yahoo.com/group/flexcoders/
 
 * To unsubscribe from this group, send an email to:
   [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] 
 
 * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
 Service http://docs.yahoo.com/info/terms/ .




 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: flex swc theme flash

2005-06-01 Thread alex_harui
And it turns out that both work fine unless you are using a custom 
theme swc with an non-actionscript skin for the title bar.  That 
exposes a bug in the Panel code that can be worked around as follows:

mx:Panel id=foo creationComplete=foo.back_mc._visible = false...

--- In flexcoders@yahoogroups.com, Andy Goodfellow [EMAIL PROTECTED] 
wrote:
 You can also use mx:Panel headerHeight=0/mx:Panel
 
 -Andy
 
 On 5/31/05, alex_harui [EMAIL PROTECTED] wrote:
  
   Did you try setStyle(headerHeight, 0);
  
  That's supposed to hide the header.
  
  
   
  --
  *Yahoo! Groups Links*
  
 - To visit your group on the web, go to:
 http://groups.yahoo.com/group/flexcoders/
 - To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]flexcoders-
[EMAIL PROTECTED]
 - Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
 Service http://docs.yahoo.com/info/terms/. 
  
 




 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: flex swc theme flash

2005-05-31 Thread alex_harui
Did you try setStyle(headerHeight, 0);

That's supposed to hide the header.




 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Flex Style Explorer

2005-05-31 Thread alex_harui
Do you mean the tabs in the right half?  They are done via actionscript-
based skins.  We write code that checks some styles, calculates 
gradients and rounds some corners.  Panel headers are done the same way.

You can, however, use image-based skins if you want, but they may not 
re-size correctly.




 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Cell margins

2005-05-31 Thread alex_harui
The renderer will always be drawn at x=0.  I'd probably just add a 
wrapper around my cell renderer and force it to x=2, or get its 
contents to layout with the appropriate offset.





 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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





[flexcoders] Re: Hiding 'Null'...

2005-05-31 Thread alex_harui
The TextInput is kind enough to do a toString() on anything passed to 
its .text property, which is great for Number and other things, but 
is the root of your problem.

My advice, subclass TextInput and put the null check on the text 
setter.

-Alex

--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] 
wrote:
 First, I haven't noticed this behavior, but that doesn't mean 
much.  I
 assume you are binding the textInput to the selectedItem of the
 datagrid? If you don't have control over the data source, you can 
use
 the ternary expression format:
 Text={(myDataGrid.selectedItem.myProperty == null ) ?  :
 myDataGrid.selectedItem.myProperty }
 
 Also, when a value in a dataProvider is null or undefined, it can 
cause
 some odd display behaviors in the Datagrid, where a newly updated 
cell
 does not display until you mouseover or select it.
 
 Tracy
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of jamiebadman
 Sent: Tuesday, May 31, 2005 10:25 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Hiding 'Null'...
 
 Hi,
 
 I have a datagrid and some detail boxes (mostly textInput). If a 
 column is null on the grid, it shows as an empty cell - which is 
what 
 I want (looks best that way) but the data is shown as 'null' in the 
 textInput box.
 
 Is there an easy way to prevent this from happening - and simply 
not 
 showing anything at all in the textInput box when there's a null in 
 the data ?
 
 The 'null' appears as actual text in the textInput box btw - so if 
I 
 then save the data, I'll get the string 'null' saved to the DB!
 
 Thanks in advance,
 
 Jamie.
 
 
 
 
 
  
 Yahoo! Groups Links




 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: margintop in textarea?

2005-05-31 Thread alex_harui
Deepa is correct, but that affects your .text property.  
Unfortunately, there's no official way to do it.  I'd subclass 
TextArea and override the layoutChildren method to get the inner text 
field to layout at the desired position.

--- In flexcoders@yahoogroups.com, Deepa Subramaniam 
[EMAIL PROTECTED] wrote:
 If you're just trying to force some space between the text and the 
top
 of the component, you can programmatically insert a newline before 
the
 text. This keeps the scrollbar in place but the text pushed down. 
 
 -Original Message-
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of rockmoyosa
 Sent: Tuesday, May 31, 2005 1:37 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] margintop in textarea?
 
 Is ther a way to set a margintop in a textarea?
 I can force a top margin with:
 
 .content_txt.border_mc.borderMetrics.top = 10;
 
 but than the scrollbar has also an margin-top but that's very very 
ugly.
 So only the content needs a margin-top.
 
 
 
 
 
  
 Yahoo! Groups Links





 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: showDataTips for the List within a ComboBox

2005-05-31 Thread alex_harui
Are you setting those fields in an override of get dropdown()?  If 
the ComboBox gets resized or re-styled, it destroys the dropdown and 
makes a new one.


--- In flexcoders@yahoogroups.com, DavidLand [EMAIL PROTECTED] wrote:
 Im trying to get data tips for the list component embedded within the 
 ComboBox and not having much luck. Works fine for normal List boxes 
 but cant seem to get anything off of the child one within the CB.
 
 Within the class extending the ComboBox I have this:
 
this.dropdown.showDataTips = true;
this.dropdown.dataTipField = pos;
 
 
 This works just fine on a normal List:
 mx:List id=ll dataProvider={samp} dataTipField=pos 
 showDataTips=false labelField=name/
 
 Any help would of course be very appreciated.  Thnx.
 
 d.




 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Bug? image (html) in textarea

2005-05-31 Thread alex_harui
Unfortunately, there are some known Flash Player bugs with img in 
TextFields, so you may or may not be successful at working around 
this.

--- In flexcoders@yahoogroups.com, Manish Jethani 
[EMAIL PROTECTED] wrote:
 On 5/30/05, rockmoyosa [EMAIL PROTECTED] wrote:
  --- In flexcoders@yahoogroups.com, rockmoyosa [EMAIL PROTECTED] 
wrote:
   --- In flexcoders@yahoogroups.com, Manish Jethani
   [EMAIL PROTECTED] wrote:
On 5/20/05, rockmoyosa [EMAIL PROTECTED] wrote:
 
Try setting a mask on the TextArea object.  See 
UIObject.setMask()
  
   How? beneath textarea there is an form. It appears on resize. 
So how
   do i use setMask
  
  Still got this bug. masking and executing an init() is not a 
solution
  if you want an resizeEffect. unless it's possible with masking.
  butt... anybody..
 
 This is what I meant by applying a mask.  See this example of 
masking:
 
 ?xml version=1.0?
 mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
   xmlns=*
 
   mx:Script
 public function mySetMask():Void
 {
   var m = outerBox.createObjectWithStyles
(BoundingBox, clipMask, 1);
 
   var w:String = _width;
   var h:String = _height;
 
   m[w] = outerBox.width;
   m[h] = outerBox.height;
 
   outerBox.setMask(m);
 }
   /mx:Script
 
   mx:Box id=outerBox width=200 height=200 clipContent=false
 backgroundColor=yellow
 marginLeft=10 marginRight=10 marginTop=10 
marginBottom=10
 mx:Box width=225 height=225 backgroundColor=blue /
   /mx:Box
 
   mx:Button label=Set Mask click=mySetMask() /
 /mx:Application
 
 Try this, I think it'll fix your problem.




 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Custom ComboBoxCellRenderer Issue

2005-05-27 Thread alex_harui
You're not missing anything.  There's a super-secret mouseDown 
handler in the datagrid that is messing you up.  Lots of folks have 
tried various ways to workaround it and I think they've succeeded.

Last time we tried it, we subclassed the DataGrid and overrode its 
onMouseDown method to see if it hittest the combobox which is acting 
as the cellEditor

function onMouseDown() : Void
{
var pt = new Object();
pt.x = _root._xmouse;
pt.y = _root._ymouse;
_root.localToGlobal(pt);

if (cellEditor._visible  cellEditor.isCellEditor)
{
if (cellEditor.hitTest(pt.x, pt.y))
return;
// if comboheight  30, then dropdown is visible
if (cellEditor.combo.height  30  
cellEditor.combo.dropdown._visible  
cellEditor.combo.dropdown.hitTest(pt.x, pt.y))
return;
}
super.onMouseDown();
}

The the cell renderer watches for the close event on the combobox and 
destroys its dropdown.

function close() {

size();
combo.dropdown.removeMovieClip();
combo.mask.removeMovieClip();
}






 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Tree change event

2005-05-27 Thread alex_harui
Yeah, looks like a bug.  Don't see any obvious workarounds either.

One questions:  Do you even want to allow de-selecting a row?  It might 
be possible to block that by overriding the onPress handlers in the 
SelectableRows in the Tree.




 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Panel Mouse Down Problem

2005-05-27 Thread alex_harui
There are some idiosyncracies when objects appear and disappear under 
the mouse.  In general, by listening to all mouse events (down, up, 
over, out) you can see a pattern that you can look for (you may see an 
over instead of a down for example).

In other situations, this can be remedied by not changing the object 
under the mouse in response to a mouse event, which can be done by 
taking the functionality in the mouse event, wrapping it in a function 
and calling it via doLater.

function showAlertLater()
{
   Alert.show(...)
}
mousedown=doLater(this, 'showAlertLater')

No guarantees, but we've worked around these kinds of issues 
successfully.




 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Disabling individual list items

2005-05-26 Thread alex_harui
Unfortunately, there's no built-in API for disabling a row.

There's no official API to get at individual rows either.  You could 
set an enabled property on a row using setPropertiesAt, then have a 
custom cellRenderer look for it and disable itself.






 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Serious corruption in Flex-generated SWF

2005-05-18 Thread alex_harui
In the original post, I see that things are collapsing horizontally, 
and in two of the three pictures I see a horizontal divider.  My guess 
is that there is a timing issue where the width of the divided box 
comes up 0 at the time of the layout, then pops back to the right size 
later, but does not layout the children again.  I'd be adding some 
trace statements to the app to see if that's true.  If there's an 
effect controlling the divider that can contribute to the problem.  You 
might need to delay component instantiation until the effect ends.

Could you be seeing something similar?

To stick in trace statements, you can listen for move and resize events 
on various components and examine the parent and grandparent width and 
height values.




 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Image not being resized in mx:Image tag

2005-05-18 Thread alex_harui
Smells like a timing issue.  What are you loading?  JPG?  SWF?  I think 
you've replaced the example on your site with another thread's example 
so I couldn't see what you're talking about.

If you load SWFs there is a timing issue where, once the SWF is loaded, 
we wait one frame and then ask the SWF for its size (_width/_height) 
then use that to calculate the stretch.

If the SWF is multi-frame or code-driven, it can finish its rendering 
and alter its size after we took the snapshot of its size and then it 
won't look right.

Manish proposes the right code, but you probably have to come up with a 
more sophisticated way to find out the true size of the SWF and run the 
Manish's fix at a later time.




 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: cell render problem

2005-05-18 Thread alex_harui
The main reason is isn't working is an issue of types.  You are setting 
the dataProvider to an array of XMLNodes.

So, go back and set the dataProvider on the result of the webservice, 
then let's get the cells to display the right thing.

You have proven that it works if you set the dataProvider to an array 
of strings.  However an array of XMLNodes does not have properties on 
it like label.  Instead it is attributes.label.  So you have to use 
labelFunction instead, or a custom cell renderer that picks apart the 
XMLNode and find the attributes.label.






 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: Custom Component Help

2005-05-17 Thread alex_harui
I could be wrong, but I think you are trying to specify data for a 
component in xml.  The only way I know to do this is to specify a 
property of type XML then assign it and pick it apart.  Here's a mini-
example:

Test.MXML

alexButton 
xmlData
mx:XML
node name=Barney /
/mx:XML
/xmlData
/alexButton

alexButton.as

class alexButton extends Button
{
function init()
{
super.init();
label = foo;
}

var __data:XML;

function get xmlData():XML
{
return __data;
}

function set xmlData(data:XML)
{
__data = data;
invalidateProperties();
}

function commitProperties()
{
if (__data)
{
trace(setting label for  + this +   + 
__data.firstChild.nodeName);
label = __data.firstChild.attributes.name;
}
}

}

In theory you could drop your entire XML structure where my node 
name=Barney is and then write more code in commitProperties to 
initialize the component.




 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: DataGrid.labelFunction

2005-05-17 Thread alex_harui
The DataGrid has a labelFunction property that it inherits from its 
base classes, but it does not use it.  Instead each column has a 
labelFunction property that you want to set.




 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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




[flexcoders] Re: combobox selectedIndex

2005-05-17 Thread alex_harui
The code snippet worked fine for me if the intervals property is an 
array of strings.  Is it possible you are initializing intervals from a 
web service call?  If so, you have a timing problem in that the 
selected index was set long before the data arrived (actually it 
thought it had zero rows of data).  In such a case you should reset the 
selected index when the data arrives.





 
Yahoo! Groups Links

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

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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