Re: [flexcoders] Re: Take that Mr Jobs!

2010-05-14 Thread Mac Martine
Dmitri-
 Could you please provide a few more details as to what you're doing?
 1) Did this happen when you migrated a FB3 project to FB4?
 2) Did  your AIR project rely on a library project? If so, how was it linked?

-Mac



On 5/11/10 10:16 PM, mitek17 mite...@gmail.com wrote:






Hi Brendan,

No, export release does not work in FB4. At least in the project with RSL 
libraries. I didn't have time to fully isolate the problem and check the single 
project release, then without RSLs, etc, but it seems  that newly added 
properties are killing export release.

I am glad we have not bought FB4 yet, as it is not suitable for production yet.

PS Why do you need it anyway? (c) Apple fanboys standard reply :)

Dmitri.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , 
Brendan Meutzner bmeutz...@... wrote:

 I'm confused... did you resolve this issue?  It sounds like you ported it to
 FB4, back to FB3, reverted the properties file and it worked?

 Did you ever get the release build to work in FB4?


 Brendan


 On Mon, May 10, 2010 at 10:58 PM, mitek17 mite...@... wrote:

 
 
  Well, I know that no one needs release builds, but I tried to investigate
  this a bit. It looks like that the new properties in .actionscript file are
  causing the corruption in projects with libraries.
 
  If you open the FB4 project in FB3 (strangely, it does not complain) it
  won't make the release build as well. If you revert the changes in .* files
  everything is OK.
 
  PS This is a good achievement - the most simple piece of Flex Builder -
  exporting the release version was always buggy, and now it looks greater
  than ever. I am looking forward to see what will happen to it in Creative
  Builder 5.
 
 
  --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com  
  flexcoders%40yahoogroups.com,
  mitek17 mitek17@ wrote:
  
   Does the Export Release Version suppose to work in FB4? Just curious.
  
   https://bugs.adobe.com/jira/browse/FB-26842
  
 
 
 



 --
 Brendan Meutzner
 http://www.meutzner.com/blog/
 http://www.riajobs.com








Re: [flexcoders] use an actionscript class from a SWC in actionscript

2009-01-08 Thread Mac Martine

If you've added the swc to your project you should be able to access it as if 
the class is in the same project.

Try bringing up code hints as you type 'Tracer' and see if it's listed. 
Otherwise try adding an import to the package that the class is in (assuming 
it's in a package).




On 1/8/09 10:14 AM, dnk d.k.emailli...@gmail.com wrote:




Hi there i have written a very simple class in AS that has ben added
to a personal library (SWC).

Now in mxml I can reference the classes and components easily by
putting a:

xmlns:mycomps=*

Now what I would like to know is how would I reference a class that is
in a SWC from action script?

So i have class called Tracer in my swc.

Now in my project (in some mxml file) I have:

mx:Script
![CDATA[

// how can I use Tracer class in here?

]]
/mx:Script

I tried something like:

mx:Script
![CDATA[

//no go - with the xmlns defined
mycomps.Tracer;

]]
/mx:Script

I can't seem to see any sort of option for an import.

I am sure I am just missing something simple.

d





Re: [flexcoders] Drag-n-dropping images from Mac OS to AIR app

2009-01-07 Thread Mac Martine
Try this:

   if(Capabilities.os.search(Mac) = 0)   
 img1.source = file:// + tempImg.nativePath;else  
  img1.source = tempImg.nativePath;




On 1/7/09 1:26 PM, Jeff Hindman jake...@cox.net wrote:




AIR gurus,

The following code in my AIR app works fine on a PC, but not on a
Mac:

protected function handleDragEnter(event:NativeDragEvent):void {
if (event.clipboard.hasFormat
(ClipboardFormats.FILE_LIST_FORMAT)) {
NativeDragManager.acceptDragDrop(event.currentTarget as
InteractiveObject);}
 }

protected function handleDrop(event:NativeDragEvent):void {
 var temp:Object = event.clipboard.getData
(ClipboardFormats.FILE_LIST_FORMAT);
 var tempImg:File = temp[0] as File;
 if (tempImg.extension == jpg || tempImg.extension == JPG ||
 tempImg.extension == gif || tempImg.extension == GIF ||
 tempImg.extension == png || tempImg.extension == 'PNG') {
 img1.source = tempImg.nativePath;
 img1.maintainAspectRatio = true;
 } else {
 Alert.show(File is not an image., Oops!);
 }

Any clues (or directionts to further research) would be greatly
appreciated.

Thanks!

--jake
}





Re: [flexcoders] Mouse over event alert

2008-03-06 Thread Mac Martine

mx:Script![CDATA[import mx.controls.Alert;
]]/mx:Script mx:LinkButton x=127 y=58 label=Roll Over Me
rollOver={Alert.show('rolled over!')}/





On 3/6/08 8:01 AM, ghus32 [EMAIL PROTECTED] wrote:

  
  
  
 
 Hello Everyone,
 
 How would I go about adding a mouse over alert on a text link?
 
 Thanks
 
  
 




Re: [flexcoders] how to prevent gap between grid rows?

2008-03-05 Thread Mac Martine

Try setting paddingTop and paddingBottom both to 0

Mac


On 3/5/08 8:27 AM, Pan Troglodytes [EMAIL PROTECTED] wrote:

  
  
  
 
 Given the following example:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical
   mx:DataGrid dataProvider={[{x:1}, {x:2}, {x:3}]}
 mx:columns
   mx:DataGridColumn dataField=x backgroundColor=blue
 mx:itemRenderer
   mx:Component
 mx:Canvas width=100% height=100% backgroundColor=red
   mx:Text width=100% height=100% text={data.x}/
 /mx:Canvas
   /mx:Component
 /mx:itemRenderer
   /mx:DataGridColumn
 /mx:columns
   /mx:DataGrid
 /mx:Application
 
 
 It shows up as red rows with blue gaps between each row.  I don't want the
 blue gaps there.  I put those height/widths in to try to avoid it.  I can't
 find any style that seems applicable.  I get the same results using
 AdvancedDataGrid.  Any solutions?




Re: [flexcoders] how to prevent gap between grid rows?

2008-03-05 Thread Mac Martine


Pan-
 Please log a bug or enhancement request for Flex SDK here:
https://bugs.adobe.com/jira
thanks
-Mac


On 3/5/08 8:47 AM, Pan Troglodytes [EMAIL PROTECTED] wrote:

  
  
  
 
 That worked, thanks.  I don't particularly think it SHOULD, though.  It seems
 weird to set the paddingTop/Bottom for a grid when you want the padding for
 each row.  If you set the paddingLeft/Right properties, they don't apply to
 each column but instead apply to the grid.  If it was a VBox, those padding
 properties would apply only to the whole box, not as padding between the
 controls.  That's what verticalGap is for.  Kind of inconsistent, don't you
 think?  Seems like there should probably be column level padding properties,
 possibly with a separate verticalGap property on the grid.  How would you go
 about setting a paddingTop for a grid, without having to throw in a kludge
 where you embedded it in another control and used its padding property?
 
 On Wed, Mar 5, 2008 at 10:32 AM, Mac Martine [EMAIL PROTECTED] wrote:
  
  
  
 
 
 Try setting paddingTop and paddingBottom both to 0
 
 Mac
 
 
 
 On 3/5/08 8:27 AM, Pan Troglodytes [EMAIL PROTECTED] wrote:
 
  
  
  
 
 Given the following example:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical
   mx:DataGrid dataProvider={[{x:1}, {x:2}, {x:3}]}
 mx:columns
   mx:DataGridColumn dataField=x backgroundColor=blue
 mx:itemRenderer
   mx:Component
 mx:Canvas width=100% height=100% backgroundColor=red
   mx:Text width=100% height=100% text={data.x}/
 /mx:Canvas
   /mx:Component
 /mx:itemRenderer
   /mx:DataGridColumn
 /mx:columns
   /mx:DataGrid
 /mx:Application
 
 
 It shows up as red rows with blue gaps between each row.  I don't want the
 blue gaps there.  I put those height/widths in to try to avoid it.  I can't
 find any style that seems applicable.  I get the same results using
 AdvancedDataGrid.  Any solutions?
 
  
 
 
 




Re: [flexcoders] BindingUtils.bindProperty and mx:Binding trigger at different times! Bug?

2007-10-17 Thread Mac Martine

Hi Aman-
 This looks like a bug.
 Would you please log it in the bug base here:
https://bugs.adobe.com/jira
Thanks -
 Mac

On 10/17/07 2:23 AM, cuddlygunchi [EMAIL PROTECTED] wrote:

  
  
  
 
 Hi,
 
 1) I bind the selectedItem property of a List component to a variable
 
 2) View the value of that variable on change event for the List
 
 If the binding is performed by mx:Binding, on change event, the value
 of the bound variable would be the latest value selected.
 
 However, if binding had been done using BindingUtils.bindProperty,
 the value of the variable available on change would be the
 previously selected value and not the latest, unlike the previous
 case.
 
 Test Case:
 
 --
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 creationComplete=init()
  mx:Script
  ![CDATA[
  import mx.binding.utils.BindingUtils;
 
 [Bindable]
 public var boundvar:Object;
 
 public function init():void
 {
 BindingUtils.bindProperty
 (this, boundvar, mylist, selectedItem);
 }
  ]]
  /mx:Script
  
 !--mx:Binding source=mylist.selectedItem
 destination=boundvar/
 --
 mx:Array id=granularity
 mx:Object label =Item1/
 mx:Object label =Item2/
 mx:Object label =Item3/
 mx:Object label =Item4/
 /mx:Array
 mx:List id=mylist dataProvider={granularity}
 labelField=label change=trace(boundvar.label)/
 
 /mx:Application
 --
 
 In the attached case, binding has been done via BindingUtils. It
 would complain when you first select an item as the previous value of
 the variable was null, even though it should have been populated by
 the latest value via Binding before the change event is triggered.
 Comment this and uncomment the mx:Binding line to observe the change
 in behaviour.
 
 Flex Version: 2.0.1
 
 Thanks,
 Aman Thind
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ,
 Alex Harui [EMAIL PROTECTED] wrote:
 
  Binding should run first.  Can you make a small test case?
  
   
  
  You can use callLater to delay processing.
  
   
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On
  Behalf Of cuddlygunchi
  Sent: Thursday, October 11, 2007 7:30 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Ensuring Bindings get executed before using
 bound
  variables
  
   
  
  Hi,
  
  I have a list component whose selectedItem is bound to a variable
 in 
  my model.
  
  On change event i perform an action that expects the variable in
 my 
  model to hold the new selectedItem in the list. However, it still
  contains the old value at that time. Calling executeBindings before
  my action did not help either.
  
  Is it that the change event is triggered before the bindings take
  effect? What event should i use then?
  
  How can I force all bindings on a ui component to get executed
 before 
  moving on to the next step that expects updated values? My bindings
  exist both in actionscript as BindingUtils.bindProperty and in mxml
  as mx:Binding.
  
  Many Thanks,
  Aman
 
 
  
 




Re: [flexcoders] security sandbox violations

2007-10-16 Thread Mac Martine

When you create a Flex workspace, that workspace path is then added to the
list of directories ³trusted² by the Player (in flexbuilder.cfg). Therefore,
on your machine any files that are in that directory (or a subdirectory of
that folder) are trusted. When your friend is trying to run it, the Player
is trying to access an un-trusted location.
-mac


On 10/16/07 8:24 PM, Stephen Roy J. Tang [EMAIL PROTECTED] wrote:

  
  
  
 
 Hi,
 
 How exactly does the Flash Player determine when it will throw a
 security sandbox error? I encountered a problem with a case like this:
 I had an Image object loading a file via relative path, i.e. mx:Image
 source=assets/filename.png /. The swf works fine on my machine.
 
 A coworker checks out the source and compiles it on her own machine,
 and she gets a sandbox violation error. The difference is that she's
 using command line mxmlc to compile, I'm using Flex Builder. Neither
 of us are using the use-network compiler param. Of course, I ask her
 to just set the param and she can then run the swf without error. But
 I'm curious as to why it would behave differently in her case and mine.
 
 Thanks,
 
 Roy
 
  
 




Re: [flexcoders] Re: Flex Builder 2.0.1 the update !

2007-01-16 Thread Mac Martine

If you are running out of memory in plugin, you can increase the memory for
Eclipse with the additional VM argument: -Xmx768m, which lets it use up to
768MB of memory. If you have less free memory, adjust accordingly.

More on that here:
http://ist.berkeley.edu/as/ag/tools/howto/install-eclipse-win.html



On 1/16/07 11:57 AM, Douglas Knudsen [EMAIL PROTECTED] wrote:

  
  
  
 
 using the FDS plugin and Tomcat hereI get out-of-memory errors and eclipse
 crashing often
 
 DK
 
 On 1/16/07, Allen Riddle  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]  wrote:
 I don't think so; I'm running mine on Tomcat, with no embedded fonts. And is
 slower than dirt. The fact that it wasn't slow on 2.0.0 tells us something
 changed in the compilation process, and hopefully isn't environment related.
 
  
 
 
 From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com
 mailto:flexcoders@yahoogroups.com ] On Behalf Of Cato Paus
 Sent: Tuesday, January 16, 2007 1:14 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Flex Builder 2.0.1 the update !
 
  
 
 Hi All :) I have the Build Automatic set to off, end i have tried to
 delete the embeded fonts in my css, but Flex stil going slow, could
 it have somthing to do with that I'm running on fds2 and compailing
 to a JRun4 server ?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ,
 Rick Schmitty [EMAIL PROTECTED]
 wrote:
 
  Do you have embeded fonts in your application?
  
  I was experiencing the same slowdown after upgrading to flex
 2.0.1. I
  had 2.0 installed, updated to 2.0.1, then ran the clean command
 prior
  to opening flex. It was still slow.
  
  Saw the blog about closing projects, closed everything but the one
 I'm
  working on, still slow
  
  Deleted all projects and created a blank application, super fast.
  Ok... so must be something in my project... started hacking away at
  the files until I came down to the fonts.
  
  This took almost 20seconds (on my machine) to compile
  
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  
  
  mx:Style
  @font-face {
  src: url(/assets/fonts/ARIAL.TTF);
  fontFamily: myArial;
  } 
  @font-face {
  src: url(/assets/fonts/BKANT.TTF);
  fontFamily: myBkant;
  } 
  @font-face {
  src: url(/assets/fonts/TAHOMA.TTF);
  fontFamily: myTahoma;
  } 
  @font-face {
  src: url(/assets/fonts/TIMES.TTF);
  fontFamily: myTimes;
  } 
  @font-face {
  src: url(/assets/fonts/TREBUC.TTF);
  fontFamily: myTrebuc;
  }
  /mx:Style 
  
  /mx:Application
  
  
  Deleting the style tag for a blank appliaction, it compiled
 immediately 1-1.5sec
  
  
  Here is what's going on (or so I think)
  
  FlashType support
  
  FlashType is the text rendering engine introduced in Flash Player 8.
  It improves the readability of text, especially at smaller font
 sizes.
  To leverage the FlashType engine in Flex 2, you had to create a SWF
  that embedded a particular font using the Flash authoring tool, and
  then embed that SWF file in your Flex application. With Flex 2.0.1,
  the mxmlc compiler can now embed a font using the FlashType engine
  directly, eliminating a step for many developers.
  
  
  So I'm back to running fast as long as I dont embed fonts via css,
  I'll reenable it when I need to publish a working version (or look
  into creating the SWF file on my own and not use CSS)
  
  
  On 1/16/07, Tom Chiverton [EMAIL PROTECTED] wrote:
   On Tuesday 16 January 2007 08:19, pauscato1 wrote:
I have only one project running in my flex builder, this is
 realy
anoing it uses 20% of my day.
  
   Have you got auto-compilation turned off ?
  
   --
   Tom Chiverton
   Helping to heterogeneously incubate robust meta-services
  
   
  
   This email is sent for and on behalf of Halliwells LLP.
  
   Halliwells LLP is a limited liability partnership registered in
 England and Wales under registered number OC307980 whose registered
 office address is at St James's Court Brown Street Manchester M2
 2JF. A list of members is available for inspection at the registered
 office. Any reference to a partner in relation to Halliwells LLP
 means a member of Halliwells LLP. Regulated by the Law Society.
  
   CONFIDENTIALITY
  
   This email is intended only for the use of the addressee named
 above and may be confidential or legally privileged. If you are not
 the addressee you must not read it and must not use any information
 contained in nor copy it nor inform any person other than Halliwells
 LLP or the addressee of its existence or contents. If you have
 received this email in error please delete it and notify Halliwells
 LLP IT Department on 0870 365 8008.
  
   For more information about Halliwells LLP visit
 www.halliwells.com http://www.halliwells.com .
  
  
  
   --
   Flexcoders Mailing List
   FAQ: 
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
   Search Archives: 

Re: [flexcoders] Multiple Selections in a List

2007-01-05 Thread Mac Martine

Here¹s a simple example...

?xml version=1.0 encoding=utf-8? mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
creationComplete=init() mx:Script ![CDATA[import
mx.collections.ArrayCollection;[Bindable]private var
myCollection:ArrayCollection = new ArrayCollection([{label: 'one'}, { label:
'two'}, { label: 'three'}, { label: 'four'}]);public function
getSelectedListItems():void{var theList:List = List(myList);
var selectedItems:Array = theList.selectedItems;for( var i:String in
selectedItems ){showSelected.text +=
selectedItems[i].label + \n;}}]] /mx:Script mx:List
id=myListwidth=200dataProvider={myCollection}
allowMultipleSelection=true/mx:Button label=Show Selected Items
x=232 y=120 click=getSelectedListItems()/ mx:TextArea x=414 y=10
id=showSelected width=186 height=132/ /mx:Application




On 1/5/07 10:55 AM, Lisa Lee [EMAIL PROTECTED] wrote:

  
  
  
 
 I hate asking what I think is probably a very stupid question, but
 being so new to Flex, I am still quite wet behind the earsI have
 an mx:List and I have set the allowMultipleSelection property to
 true...my question is, how do I determine what selection(s) the user
 has selected, if they're selected more than one?
 
 mx:Script
 ![CDATA[
 import mx.controls.List;
 [Bindable] private var serviceTypeTemp:ArrayCollection;
  private function serviceTypeHandler2(event:ResultEvent):void {
  serviceTypeTemp = event.result.serviceTypeData.serviceType;
  }
  ]]
 /mx:Script
 
 mx:HTTPService id=serviceTypeRPC
  
 url=http://development/dev1/workspaces/lisa/webservicedata/se
 rvicetypedata.xml
  result=serviceTypeHandler2(event)/
 
 mx:List id=stComboList
 dataProvider={serviceTypeTemp}
 labelField=description
 allowMultipleSelection=true/
 
  
 




Re: [flexcoders] Rotating mx:Label is not working for me...any ideas??

2007-01-05 Thread Mac Martine

Arial.ttf is not bold, so it is thrown off when you set fontWeight to bold.

?xml version=1.0 encoding=utf-8? mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Style
@font-face { fontFamily:myfont; src:url(arial.ttf); }.myStyle {
fontFamily:myfont; } /mx:Stylemx:Label text=TEST TEXT
fontSize=14 x=200 width=200 rotation=70 styleName=myStyle
textAlign=center/ /mx:Application







On 1/5/07 12:57 PM, tinkiknit [EMAIL PROTECTED] wrote:

  
  
  
 
 Hi all...
 
 Ok, I searched all afternoon on this group for the solution to this
 to no avail.  Here is what I have (when I set the rotation property
 to anything the text disappears)...
 
 mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; maxWidth=19
 verticalScrollPolicy=off horizontalScrollPolicy=off
 paddingTop=130 paddingRight=3 paddingLeft=3
 
 mx:Style
 @font-face { fontFamily:myfont; src:url(arial.ttf); }
 .myStyle { fontFamily:myfont; fontWeight:bold;}
 /mx:Style
 
 mx:Label text=TEST TEXT fontWeight=bold fontSize=14
 styleName=myStyle  textAlign=center fontFamily=myfont/
 
 /mx:VBox
 
 thanks for any help...
 
 Christine
 
  
 




Re: [flexcoders] Re: Flex 2 Updater Available for Download

2007-01-05 Thread Mac Martine

I have reported the broken link. For now, go to the same page, then click
ŒTrial Version¹ under ŒFlex Downloads¹ in the right-hand column.
Thanks!
Mac


On 1/5/07 3:18 PM, DannyT [EMAIL PROTECTED] wrote:

  
  
  
 
 Can't seem to find a link to the SDK only download :( the link in the docs on
 the page posted above seems dead?
 
 On 05/01/07, Paul Whitelock  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]  wrote:
  
  
  
 
 I used the updater to upgrade to 2.0.1 on Windows XP SP2. The update
 completed normally and everything seems to work (haven't done much
 yet, though). I'm just not sure if I got the updates for Flex Charting
 and Flex Data Services with the update or if those products require a
 different updater.
 
 Paul
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ,
 phillips1021 [EMAIL PROTECTED] wrote:
 
  Paul:
  
 Did you upgrade Flex to 2.01?  If so what is your OS (Windows)?
  
 I could not get the update to install correctly and had to
  reinstall Flex Builder from the original CD.
  
  Bruce
  --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ,
 Paul Whitelock news@ wrote:
  
   It can be found here:
   
   http://www.adobe.com/support/flex/downloads_updaters.html
   
   It's not clear to me whether the updater updates Flex Charting and
   Flex Data Services. The page says:
   
   The 2.0.1 updates for these Flex products can be implemented by
   installing the full, updated versions of the products.
   
   So I don't know whether you have to install the product from
  scratch
   if you are using Flex Charting and Flex Data Services.
  
 
 
  
 
 
 




Re: [flexcoders] Can't view source code on Mac Martine's website

2006-09-13 Thread Mac Martine
Title: Re: [flexcoders] Can't view source code on Mac Martine's website





Sorry about that. Its Beta code, so the Publish Source code changed as well.
I just made the source code directories browseable, so you should be able to go see all the source code now.
However, note that it is Beta code so it may very well need to be ported.
-Mac


On 9/13/06 12:58 PM, wayneposner [EMAIL PROTECTED] wrote:

 



keep getting Timer could not be found error when tyring to view your 
source. Your custom tree item renderer is kind of like what I need 
only I need the icon to appear at the end of the label. HELP!

Wayne






__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___





RE: [flexcoders] Reusing code blocks

2006-06-28 Thread Mac Martine










Add the common Canvas to a base
state. Then create two more states, and in the Create States dialog,
choose Based on Base
 State. Your new
state will then include all the components as your base state until you make
changes to that state 











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of mthielman11
Sent: Wednesday, June 28, 2006
7:58 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Reusing code
blocks











Ok I have a MXML file that has 3 states. All of them
have one coommon canvas in common 
that holds an accordian. It should look the same in all 3 states. Is there a
way to only define 
the accordian (and canvas) container once and have it appear on all thre
states??

Right now in the code the accordian is there 3 times which seems a bit bloated
to me.






__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___






RE: [flexcoders] Expand all items of a tree

2006-06-28 Thread Mac Martine












Its working for me. Heres an
example. Im not sure what you are wanting to do, but in this example you
have to select a tree item, then click the Expand All button. You can modify it
as desired.



?xml version=1.0
encoding=utf-8?

!-- Tree control example. --

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



 mx:Script

 ![CDATA[



 [Bindable]

 public var
selectedNode:Object;



 // Event handler for the Tree
control change event.

 public function
treeChanged(event:Event):void {


selectedNode=Tree(event.target).selectedItem;

 }

 

 private function expand():void

 {

  myTree.expandChildrenOf(myTree.selectedItem,
true); 

 }

 ]]

 /mx:Script



 mx:XMLList
id=treeData

 node label=Mail
Box

 node
label=Inbox

 node
label=Marketing/

 node
label=Product Management/

 node
label=Personal/

 /node

 node
label=Outbox

 node
label=Professional/

 node
label=Personal/

 /node

 node
label=Spam/

 node
label=Sent/

 /node 

 /mx:XMLList

 mx:Tree
id=myTree width=427 height=410
labelField=@label

 showRoot=false
dataProvider={treeData} change=treeChanged(event)/



 mx:Button label=Expand
all click=expand()/

/mx:Application











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jonas Windey
Sent: Wednesday, June 28, 2006
7:31 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Expand
all items of a tree













Sorry to bump this, but Im desperately looking for a
solution..



Jonas











From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com] On Behalf Of Jonas Windey
Sent: woensdag 28 juni 2006 12:01
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Expand all
items of a tree













Hi, in
flex2b3, I could open all nodes of my tree by doing this:



treeTest.selectedIndex
= 0;

treeTest.expandChildrenOf(treeTest.selectedItem,
true); 



Unfortunately,
this isnt working anymore.



I tried
treeTest.expandItem(treeData.node[0],true, false); ,
teeTest.expandChildrenOf(treeTest.firstVisibleItem), but no luck.



Who helps?



Jonas






__ NOD32 1.1629 (20060628) Information __

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














__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___






RE: [flexcoders] Using HTTPService in a function

2006-06-17 Thread Mac Martine












Its because at the point that you do:

myXML =
http.lastResult.toString();



 the result of the service has not
yet been received. You need to create an event listener to let you know when
the service has completed its call.

The event listener will then trigger a
result function that you create, and in that function is where you should get
the result (myXML =
http.lastResult.toString();

) and do whatever you want with it.



-Mac











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of NZEYIMANA Emery Fabrice
Sent: Friday, June 16, 2006 5:07
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Using
HTTPService in a function













Hello Group, 





I am new here and seeking help from you. 





I have created a function in my Flex application and would
like to use the HTTPService object from retreiving XML data from my webservice
(based on PHP). 





All the examples I have seen on the Adobe website use same
approach (that I don't like) of binding the object to some controls. 





What I trying to achieve is: Create an HTTP object, instruct
that object to retreive a web XML string, store that string locally in a
variable. 





Using the code I have provided below, the application gives
an error saying that the object is not yet created (null). And if I watch the
task bar after the error message (in Firefox), I see that the flash application
is accessing the webXML. 





What might be wrong?























private function SampleFunction():void
{
var
http:HTTPService;
var
myXML:String;

http = new
HTTPService();
http.url =
"">http://www.domain.com/my_xml.php;
http.method=POST;
http.useProxy
= false;
http.showBusyCursor
= true;
http.resultFormat
= text;
http.send();











myXML =
http.lastResult.toString();











// Do something with XML






}








__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___






RE: [flexcoders] List dataProvider bug?

2006-04-12 Thread Mac Martine














You need to implement IUID for the items
to be given unique ids otherwise only the last item will be
selected. 















From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Oriol Gual
Sent: Wednesday, April 12, 2006
4:49 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] List
dataProvider bug?





Hi all,

If I set the dataProvider of a mx:List to an
array, the list isn't updated when the array is modified, and also, if there
are two or more equal items, only one can be selected (this last one I don't
know if it is a bug, because a combobox behaves equally). 

Another one that I don't know when it's produced,
is when the mouse goes over it shows an error such as: null has no properties.

Sorry if that was already submitted or if I'm
doing something wrong and it's not a bug. 

Oriol.








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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Re: how is this TabNavigator is done?

2006-04-06 Thread Mac Martine










I have just logged a bug on this. Thanks.











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of ben.clinkinbeard
Sent: Thursday, April 06, 2006
10:52 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: how is
this TabNavigator is done?





Simply because that is what the design stipulates. Aesthetic choice
really. I just don't understand why the property
does not work as
specified.












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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Re: ActionScript APIs

2006-04-06 Thread Mac Martine












Is this the kind of thing youre
looking for?





import
com.macromedia.webapis.flickr.FlickrService; 

import
com.macromedia.webapis.flickr.events.FlickrResultEvent;



public var service:FlickrService;



service.addEventListener(
FlickrResultEvent.PHOTOS_SEARCH, handleSearchResults );

service.photos.search ( nsid, tagname );



private function handleSearchResults(
event:FlickrResultEvent ):void

{

var dp:Array =
event.data.photos.photos;

photoCollection = new
ArrayCollection(dp);

}

















From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of zane.hejduk
Sent: Thursday, April 06, 2006
4:55 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re:
ActionScript APIs





Hey Jignesh, thanks for the response. I've seen the docs, but I
still
don't know what to do with the APIs. For
instance, if I want to
search for photos with a specific tag in Flickr, I
can't figure out
how the functions within the API are supposed to
be called.

-Z

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

 some good links
 http://flexapps.macromedia.com/fast/docs/apiAsDoc/index.html
 
 http://livedocs.macromedia.com/labs/1/flex/langref/index.html
 
 http://weblogs.macromedia.com/flex_samples/flex_explorer/explorer.html
 
 http://weblogs.macromedia.com/mc/archives/FlexStyleExplorer.html
 
 
 
 
 --
 Regards,
 
 Jignesh Dodiya













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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Bug in list.selectedIndices

2006-03-23 Thread Mac Martine











Its number 162791

Its supposedly fixed now but I
havent tried it. 



Tobias, The fix should be in the next
public release.



Thanks!











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Joan Tan
Sent: Thursday, March 23, 2006
2:15 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Bug in
list.selectedIndices







I can reproduce the bug. Do you remember the bug # that you filed.
Or, I will file a new one. I cant seem to find the original bug.



Thanks,

Joan











From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf
Of Tobias Patton
Sent: Thursday, March 23, 2006
11:01 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Bug in
list.selectedIndices







Just a quick
note to Adobe:



I reported a
bug in Flex 2 Beta 1 where the selectedIndices property of a list control would
not contain the correct values if the user selected multiple entries using the
shift key. The problems is still in Beta 2.



Thanks.

Tobias.



Creo Inc., a subsidiary of Kodak



Tobias Patton | Software Developer | Tel: 1.604.451.2700
ext: 5148 | mailto:[EMAIL PROTECTED] | http://www.creo.com 






















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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Flex2 beta2 bug - Focus does not work on lists

2006-03-22 Thread Mac Martine













You need to implement IUID, because
otherwise the renderers do not have unique ids.



I have an example here:



http://www.macmartine.com/blog/2006/03/binding_custom_objects_to_tile.html















From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alisdair Mills
Sent: Wednesday, March 22, 2006
3:05 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex2
beta2 bug - Focus does not work on lists







thanks Benoit for tracking that bug down. I noticed the same thing
happening with lists yesterday when moving an app over to beta 2. Was going to
spend some time this afternoon looking into but you have saved me both the time
and frustration :)











cheers, Al









On 22 Mar 2006, at 10:51, Benoit Hediard wrote:







There is a pretty annoying
bug in the new Beta2... ;)
The mouse over and focus does not work anymore on
lists, when using class
instances as items.
The focus is always on the last visible list row.

To reproduce the problem.

-
ItemVO.as
-
package {

public class ItemVO {
 
 public var label:String;
 
 public function ItemVO() {
 label = ;
 }

}

}

-
ListFocusBug.mxml
-
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
xmlns=*
layout=vertical
 
 mx:Script

![CDATA[

import mx.collections.*;



[Bindable]

public var collection:ArrayCollection;



public function loadWithClassInstances():void {

 var item1:ItemVO = new ItemVO();

 item1.label = Item 1 (class);

 var item2:ItemVO = new ItemVO();

 item2.label = Item 2 (class);

 var item3:ItemVO = new ItemVO();

 item3.label = Item 3 (class);

 collection=new ArrayCollection([item1, item2,
item3]);

}



public function loadWithObjects():void {

 collection = new ArrayCollection(


[{label:Item 1 (object)},


{label:Item 2 (object)},


{label:Item 3 (object)}]);

}
 ]]
 /mx:Script
 
 mx:Button
label=Load with class instances
click=loadWithClassInstances() /
 
 mx:Button
label=Load with objects click=loadWithObjects() /
 
 mx:List
id=list 

 dataProvider={collection}

 rowCount=5

 width=180 /

/mx:Application

When loaded with objects, it works.
When loaded with class instances, it does not
work.

I haven't found any workaround right now...

Benoit Hediard





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





 Visit your group flexcoders on
 the web.
  
 To unsubscribe from this group, send an
 email to:
 [EMAIL PROTECTED]
  
 Your use of Yahoo! Groups is subject to the
 Yahoo! Terms of Service.
 


























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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Re: Tree itemRenderer - flex 2

2006-03-22 Thread Mac Martine













Theres an example here:



http://www.macmartine.com/blog/2006/03/post.html



Thanks to Joan for providing the
foundation for this!!!















From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of pasflex
Sent: Wednesday, March 22, 2006
11:32 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Tree
itemRenderer - flex 2





I have tried extending the
TreeItemRenderer class similar to your 
example, the problem that I have is that the item
is still rendered 
by a single label. It's not clear to me how I
can create a more 
complex item renderer, for example, one that
consists of a label and 
an image.
Is there a way to do this in flex 2 short of
writing a custom 
renderer that handles it's own indentation and
controls?
Thanks.

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

 You cannot just drop in any renderer for a
Tree component or Menu 
which
 need to deal with indentation because your
renderer doesn't know
 anything about it. Instead, the easiest thing
to do is to use an
 itemRenderer that subclasses the
TreeItemRenderer class. Here is an
 example of a Tree item renderer. The renderer
will change the font
 weight and color of parent nodes and add text
as to how many 
children
 each node has.
 
 
 
 
 
 package 
 
 {
 
 
 
 import mx.controls.treeClasses.*;
 
 import mx.collections.*;
 
 
 

public class MyTreeItemRenderer extends 
TreeItemRenderer
 

{
 


 

public function MyTreeItemRenderer() 
 

{
 

super();
 

mouseEnabled = false;
 


 

}
 


 

override public function set data
(value:Object):void
 

{
 

super.data = "">
 

if(TreeListData
(super.listData).hasChildren)
 

{
 

setStyle(color, 0xff);
 

setStyle(fontWeight, 'bold');
 

}
 

else
 

{
 

setStyle(color, 0x00);
 

setStyle(fontWeight, 'normal');
 

}
 

}
 


 

override protected function
 updateDisplayList(unscaledWidth:Number,

unscaledHeight:Number):void
 

{
 

super.updateDisplayList(unscaledWidth,
 unscaledHeight);
 

if(super.data)
 

{
 
 
 if(TreeListData(super.listData).hasChildren)
 

{
 

var tmp:XMLList = new
 XMLList(TreeListData(super.listData).node);
 

var myStr:int =
 tmp[0].children().length();
 

super.label.text =
 TreeListData(super.listData).text +
( + myStr + );
 

}
 

}
 

}
 
 }
 
 }
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of pasflex
 Sent: Wednesday, March 22, 2006 9:52 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Tree itemRenderer -
flex 2
 
 
 
 When setting an itemRenderer for a tree in
flex2, the tree 
controls 
 and indentation disappear. For example,
if I try to display a 
label 
 and an image for each node in the tree and I
create an 
itemrenderer to 
 do so, the tree will only display the root
node using the 
itemrenderer 
 with no controls to open it (basically
turning the tree into a one 
 item list).
 In flex 1.5 a cellrenderer assigned to a tree
didn't override the 
 default tree behavior, it only changed the
renderering of the item 
in 
 the node.
 How does one accomplish this is flex2?
 
 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 
 
 
 
 * Visit your
group flexcoders
 http://groups.yahoo.com/group/flexcoders
 on the web.
   
 * 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/
. 
 
 
 
 


















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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Re: list.selectedIndices has the wrong values

2006-03-14 Thread Mac Martine










Tobias-

I have just submitted this issue to the
Flex team. Thanks!

-Mac











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of tobiaspatton
Sent: Monday, March 13, 2006 4:34
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re:
list.selectedIndices has the wrong values





One more strange thing: if I
select five and then shift-
select one, the selectedIndices
attribute is correct.

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

 Hello list;
 
 I have a list with multiple selection turned
on. When I examine 
the 
 selectedIndices attribute of the list, the
values seem to be 
 erroneous. For example, if my list looks like
this:
 
 one
 two
 three
 four
 five
 
 I click on one and then
shift-click on two. At this point 
 selectedIndices contains [1,2] when it should
be [0,1]. If I click 
 on one and shift-click on
five, selectedIndices contains 
 [4,8,5,6,7] when it should contain
[0,1,2,3,4]. Strangely, 
 selectedItems contains the correct
dataObjects. However, I want 
 access to the item renderers, not the data
objects, so this is not 
 of no use to me.
 
 Using ctrl-click to create a multi-selection
works fine. That is, 
 the value of selectedIndices is correct when
ctrl-click is used 
 instead of shift-click.
 
 Here's small program to illustrate the
problem:
 
 ?xml version=1.0
encoding=utf-8?
 mx:Application xmlns:mx=http://www.macromedia.com/2005/mxml

 
xmlns=* 
 
layout=absolute
  
  mx:List
id=l1
 
 width=200
 
 multipleSelection=true
  
 
dataProvider=[ 'one', 'two', 'three', 'four', 'five' ]
  
 
/mx:List
  mx:Button
x=10 y=152 
 
 label=Trace 
 
 click=trace( l1.selectedIndices, 
 l1.selectedItems )/
 /mx:Application
 
 
 Thanks.
 Tobias.













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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Flex 2.0 beta TextArea question

2006-02-09 Thread Mac Martine












If I understand you correctly, heres
the difference between your examples



In your example where you set the
vPosition from a Button:



private function setLogVPosition():void
{
 txtLog.vPosition =
txtLog.maxVPosition; 
}



the text in the text area was
already set and fully drawn prior to setting the scroll position . All you are
doing here is setting the vPosition on the text that is currently (and already)
loaded into the textArea.. so theres no problem.



In your other example, you were first changing
the text of the textArea, and on the next line you set the vPosition. In this
case, by the time you set the vPosition, the textArea had not fully updated
with its new text. 

So, by calling validateNow() in between changing
the textArea contents and setting the vPosition, you are telling the textArea
to perform any necessary property updates, including redrawing if need be. So
then by the time you set the vPosition, the textArea is ready to go.



Let me know if that doesnt clear
things up.



-Mac













From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Gordon Smith
Sent: Thursday, February 09, 2006
6:37 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex 2.0
beta TextArea question





Sorry, I'm not following you.
If you can be more explicit about what did
and didn't work (i.e., what's in the body of the
function, and how you
call it), I can probably explain what's going on.

- Gordon


-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On
Behalf Of Jonas Windey
Sent: Thursday, February 09, 2006 1:26 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex 2.0 beta TextArea
question

Thanks, validateNow() did the trick.

Still weird though that calling the same function
from a button did the
event, but from code didn't work. Probably because
all client-events
trigger
the validateNow() function automatically?

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On
Behalf Of Gordon Smith
Sent: donderdag 9 februari 2006 8:29
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex 2.0 beta TextArea
question

There should be no need for callLater() or a
Timer. These are
workarounds from Flex 1.X that we want to banish
in Flex 2.

Mac Martine wrote:
 I believe you will find a detailed answer in
the thread
 from Feb 1 with  the Subject:
 [flexcoders] Scrolling a TextArea to the
bottom?

This thread explained that setting a property like
the 'text' of a
TextArea does not immediately update other
properties such as
maxVPosition; by default this happens latter, for
performance reasons.

However, you can force all properties to update
immediately by calling
validateNow() on a UIComponent. So if you set the
text, call
validateNow(), and then set the vPosition to the
maxVPosition, it should
scroll to the bottom.

If there are problem with making this work, please
file bugs.

- Gordon




-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On
Behalf Of Manish Jethani
Sent: Wednesday, February 08, 2006 12:10 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex 2.0 beta TextArea
question

On 2/8/06, Manish Jethani
[EMAIL PROTECTED] wrote:

 Okay, the problem is that the TextArea's
maxVPosition is 0 even after
 the text is set. The new value of maxVPosition
is calculated only on
 the next screen update.

. and the solution for now is to use
callLater() or a timer or
something.


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











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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups 

RE: [flexcoders] Flex 2.0 beta TextArea question

2006-02-08 Thread Mac Martine










I believe you will find a detailed answer
in the thread from Feb 1 with the Subject:



[flexcoders] Scrolling a TextArea to the
bottom?















From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jonas Windey
Sent: Wednesday, February 08, 2006
1:08 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex 2.0
beta TextArea question





Yea, that example works too
for me, I think the problem is somewhere else.

private function setLogVPosition():void
{
 txtLog.vPosition =
txtLog.maxVPosition; 
}

If I trigger this function on a button click, it
works

mx:Button click=setLogVPosition()
x=29 y=105 label=Button/

But I want to use it in a function that changes
the txtLog's text, like
this:

private function
socketDataHandler(event:ProgressEvent):void 
{
 txtLog.text +=
\n + oSocket.readUTFBytes(oSocket.bytesAvailable);
 
setLogVPosition();
}

And this one doesn't work. It sets the text with
the correct data, but it
can't set the VPosition. It seems it has to be
wired to some clientside
event, and can't be triggered from code. Is that
correct?


-Original Message-
From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On
Behalf Of Manish Jethani
Sent: dinsdag 7 februari 2006 19:29
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex 2.0 beta TextArea
question

On 2/7/06, Jonas Windey [EMAIL PROTECTED]
wrote:


 How would I set the scrollPosition of a
textarea to it's maximum position?
I'm trying to create an msn-like socket
application, and need to have my
textArea scrolled to the lowest position.


 I tried txtLog.vPosition =
txtLog.maxVPosition; and txtLog.vPosition =
txtLog.textField.height, but no luck.

This seems to work for me in Beta 1.

mx:TextArea id=textArea
 mx:text

 ![CDATA[
This is some text.

And I love the way I can write code so quickly
in Flex Builder 2.0!

Woohoo!!!

 ]]
 /mx:text
/mx:TextArea
mx:Button click=textArea.vPosition =
textArea.maxVPosition /


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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Flex Builder, auto-horizontal scrolling and Eclipse

2006-02-02 Thread Mac Martine










Regarding the scrolling behavior, this is
a known issue for Beta 1, and will be fixed by Beta 2.



-Mac











From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf
Of Jonathan Miranda
Sent: Thursday, February 02, 2006
8:51 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex
Builder, auto-horizontal scrolling and Eclipse





First off, anyone else notice a real annoying
auto feature of the flex builder that scrolls the window, even if
your cursor isnt there. Take the following line of code and put your
cursor after the second / and hit the spacebar and wait. It
scrolls back left. Hit spacebar again, it scrolls to the rightthen goes
back left. Its really annoying  can this be turned off? If
Im in mid-thought, half the time it scrolls back off the screen and
its getting to be a real hassle.

VisitText.text = Your last visit was  +
mySharedObject.data.lastvisit.date + / +
mySharedObject.data.lastvisit.month + / +
mySharedObject.data.lastvisit.fullYear;

I just moved to the Flex Builder in the Beta to try it outand Im
wondering, whats the benefit to the Builder over the Eclipse/CFEclipse
plugin? Is it true the builder is going to be $1000 and the plugin is going to
be free?

Having a real hard time understanding why people would use the builder
(especially when opening .cfm opens another application, when in Eclipse
its all the same thing).



_

Jonathan Miranda

Flexible Master of
the Web

In the game of
chess, it's important to never let your opponent see your pieces.











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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.