[flexcoders] Re: Checking if an object exists

2008-07-30 Thread Rafael Faria
For instance

parentApplication.appData['moduleParams'].table_name


'moduleParams' is an object as well. it might not exist, and
table_name might not exist... i need to test if table_name exists...

anything i put it returns

Error: Error #1009: Cannot access a property or method of a null
object reference.
at...


i tried
if ((parentApplication.appData['moduleParams'] == null) ||
(!parentApplication.appData['moduleParams'].moduleFrom)) {
}

i tried

if ((!parentApplication.appData.hasOwnProperty('moduleParams')) ||
(!parentApplication.appData.hasOwnProperty('moduleParams').moduleFrom)) {
}

or

if ((!('moduleParams' in parentApplication.appData)) ||
(!('moduleFrom' in parentApplication.appData['moduleParams']))) {
}

same error...

anyone can help me how i would test if 

parentApplication.appData['moduleParams'].table_name
exists?


rafael




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

 If it's an array, then you want:
 
 if(archive[record_id].length  1)
 {
 //do stuff
 }
 
 -Josh
 
 On Tue, Jul 29, 2008 at 2:05 PM, Rafael Faria
 [EMAIL PROTECTED]wrote:
 
  Hello all,
 
  I'm here for one of my questions again :P
 
  I need to make a  comparison  like this
 
  if (archive[record_id][1].deleted_id == deleted_id) {
 
  }
  My problem is that [1].deleted_id might not exist at this point.
 
  I know that archive[record_id] exists so how can i make this
  comparison above?
 
  [1] might not exists and i can't use hasOwnProperty(1) because it
  throws an error as well.
 
  can someone help me?! :P
 
  raf
 
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
  Links
 
 
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





[flexcoders] Parsing MultiLevel Array

2008-07-30 Thread sudha_bsb
Hi,

I have a requirement wherin I have to parse a multilevel array. 
Suppose we have an array like
mx:Array
   mx:Object label=Control Panel
 mx:children
 mx:Array
   mx:Object label=Five /
   mx:Object label=Six /
 /mx:Array
 /mx:children
   /mx:Object 
   mx:Object label=Selling/
   mx:Object label=Service/
   mx:Object label=Billing/ 
/mx:Array

Now, this array is a dataprovider for a component that basically 
creates a list of buttons. When an array object has children the 
component creates the children as well. 
My question is how do I let the component know that a particular 
object of its dataprovider has children? And how do I let it know 
what those children are? 

I do not have the option to convert the array into XML or XMLList and 
then parse it..I have to let the array remain as it is

Thanks  Regards,
Sudha. 



[flexcoders] Sorting an XMLList on an attribute

2008-07-30 Thread gaurav1146
Hi,
 I am trying to sort an XMLList based on one of the attributes in the
XML node. On trying this I get the following error:

TypeError: Error #1089: Assignment to lists with more than one item is
not supported.

Instead of XMLList if I use XMLListCollection it works fine. The thing
is that I have used XMLList at lot of other places in my code as well
so I cannot easily switch to XMListCollection. I would be prefer a way
if I could sort the XMLList somwehow.

Following is the sample code that I tried for the sorting difference
between XMLList amd XMLListCollection:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
mx:Script
![CDATA[
import mx.collections.XMLListCollection;
import mx.collections.SortField;
import mx.collections.Sort;
private var books:XML = books
book publisher=Addison-Wesley name=Design
Patterns /
book publisher=Addison-Wesley name=The
Pragmatic Programmer /
book publisher=Addison-Wesley name=Test
Driven Development /
book publisher=Addison-Wesley
name=Refactoring to Patterns /
book publisher=O'Reilly Media name=The
Cathedral  the Bazaar /
book publisher=O'Reilly Media name=Unit
Test Frameworks /
/books;

// This does not work.
/*
[Bindable]
private var booksList:XMLList = books.children();
*/
[Bindable]
private var booksList:XMLListCollection = new
XMLListCollection(books.children());


private function sortBooks():void
{
var s:Sort = new Sort();
s.fields = [new  SortField(@name)];
booksList.sort = s;
booksList.refresh();
tree.dataProvider = booksList;
}

]]
/mx:Script
mx:VBox
mx:Tree id=tree dataProvider={booksList} 
labelField=@name/
mx:Button click=sortBooks() label=Sort books/
/mx:VBox
/mx:Application




Re: [flexcoders] Re: Checking if an object exists

2008-07-30 Thread Josh McDonald
Error #1009 Means you're trying to dereference something that is null.

If you get that error on a line like this:

foo.bar

or

foo['bar']

It means that foo itself is null, not that foo exists and doesn't contain a
bar field.

A tip: When you get this exception, try using the Variables window in the
debugger to help track down what it is that's giving you curry!

-Josh

On Wed, Jul 30, 2008 at 4:43 PM, Rafael Faria
[EMAIL PROTECTED]wrote:

 For instance

 parentApplication.appData['moduleParams'].table_name


 'moduleParams' is an object as well. it might not exist, and
 table_name might not exist... i need to test if table_name exists...

 anything i put it returns

 Error: Error #1009: Cannot access a property or method of a null
 object reference.
at...


 i tried
 if ((parentApplication.appData['moduleParams'] == null) ||
 (!parentApplication.appData['moduleParams'].moduleFrom)) {
 }

 i tried

if ((!parentApplication.appData.hasOwnProperty('moduleParams')) ||
 (!parentApplication.appData.hasOwnProperty('moduleParams').moduleFrom)) {
 }

 or

if ((!('moduleParams' in parentApplication.appData)) ||
 (!('moduleFrom' in parentApplication.appData['moduleParams']))) {
 }

 same error...

 anyone can help me how i would test if

 parentApplication.appData['moduleParams'].table_name
 exists?


 rafael




 --- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:
 
  If it's an array, then you want:
 
  if(archive[record_id].length  1)
  {
  //do stuff
  }
 
  -Josh
 
  On Tue, Jul 29, 2008 at 2:05 PM, Rafael Faria
  [EMAIL PROTECTED]wrote:
 
   Hello all,
  
   I'm here for one of my questions again :P
  
   I need to make a  comparison  like this
  
   if (archive[record_id][1].deleted_id == deleted_id) {
  
   }
   My problem is that [1].deleted_id might not exist at this point.
  
   I know that archive[record_id] exists so how can i make this
   comparison above?
  
   [1] might not exists and i can't use hasOwnProperty(1) because it
   throws an error as well.
  
   can someone help me?! :P
  
   raf
  
  
  
   
  
   --
   Flexcoders Mailing List
   FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
   Search Archives:
   http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
   Links
  
  
  
  
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 



 

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






-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

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


Re: [flexcoders] Getting current URL from iFram

2008-07-30 Thread Tom Chiverton
On Tuesday 29 Jul 2008, flexawesome wrote:
 am unable to use the AS to get the parent URL address.
 ExternalInterface.call( window.location.href.toString );

Why, what happens ?
Do you have an allowScriptAccess embed parameter ?


-- 
Tom Chiverton



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 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  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 Solicitors Regulation Authority.

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

For more information about Halliwells LLP visit www.halliwells.com.



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

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* 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: Complete metadata information and Where to Find it???

2008-07-30 Thread anubhav.bisaria
Hi There,

the [Exclude] tag is used to hide the subcomponents. so that they are 
not accessible like

id_of_parentApplication.id_of_childobject

http://www.jeffryhouser.com/index.cfm?mode=entryentry=4DC9B79C-65B3-
D59C-464EC981E0A2EA8F

for [ExcludeClasses] metadata tag, please go through this link:
http://nondocs.blogspot.com/2007/04/metadataexcludeclass.html

Thanks, 
anubhav

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

 Hello,
 
 I have been looking at some of the MX classes that are in the Flex 
SDK
 2.0/frameworks/source folder and there are some metadata properties
 that I cannot find in any documentation. For instance, in the
 RichTextEditor.mxml there is the:
 
 [Exclude(name=alignButtons, kind=property)]
   [Exclude(name=boldButton, kind=property)]
   [Exclude(name=bulletButton, kind=property)]
   [Exclude(name=colorPicker, kind=property)]
   [Exclude(name=defaultButton, kind=property)]
   [Exclude(name=fontFamilyArray, kind=property)]
   [Exclude(name=fontFamilyCombo, kind=property)]
   [Exclude(name=fontSizeArray, kind=property)]
   [Exclude(name=fontSizeCombo, kind=property)]
   [Exclude(name=icon, kind=property)]
   [Exclude(name=italicButton, kind=property)]
   [Exclude(name=label, kind=property)]
   [Exclude(name=layout, kind=property)]
   [Exclude(name=linkTextInput, kind=property)]
   [Exclude(name=toolBar, kind=property)]
   [Exclude(name=toolBar2, kind=property)]
   [Exclude(name=underlineButton, kind=property)]
 
 which I assume just Excludes some properties from a class??
 
 Since I am talking about the richTextEditor.mxml any one know where
 there is information on a mx:ToolBar mxml tag??
 
 and the:
 
 [ExcludeClass]
 
 This one is in just about every class in the mx folder I have no 
idea
 what this refers to.
 
 Just curious because I can't find any information out there.
 
 Rich





[flexcoders] Canvas event

2008-07-30 Thread David Gironella
I have this piece of code.

 

mx:Canvas width=500 height=200 mouseOver={trace('over')}
mouseOut={trace('out')} backgroundColor=0x342453

  

  mx:Canvas width=200 height=100 x=50 y=50
backgroundColor=0x213424



  /mx:Canvas

/mx:Canvas

 

 

When I mouseOver second canvas, first canvas detect a mouseOut event. How
can I prevent this?

 

Giro.



Re: [flexcoders] AdvancedDataGrid: Making certain rows unselectable

2008-07-30 Thread Tom Chiverton
On Monday 28 Jul 2008, whatabrain wrote:
 I would like to make an AdvancedDataGrid where the rows with a depth of
 0 (or a particular RendererProvider, if you prefer), have no select

Could your click handler unset the row ?

-- 
Tom Chiverton



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 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  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 Solicitors Regulation Authority.

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

For more information about Halliwells LLP visit www.halliwells.com.



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

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

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



Re: [flexcoders] Canvas event

2008-07-30 Thread Josh McDonald
You can try setting mouseChildren=false on the outer Canvas.

-Josh

On Wed, Jul 30, 2008 at 8:08 PM, David Gironella [EMAIL PROTECTED]wrote:

  I have this piece of code.



 mx:Canvas width=500 height=200 mouseOver={*trace*(*'over'*)}
 mouseOut={*trace*(*'out'*)} backgroundColor=0x342453



   mx:Canvas width=200 height=100 x=50 y=50 backgroundColor=
 0x213424



   /mx:Canvas

 /mx:Canvas





 When I mouseOver second canvas, first canvas detect a mouseOut event. How
 can I prevent this?



 Giro.
  




-- 
Therefore, send not to know For whom the bell tolls. It tolls for thee.

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


[flexcoders] DataGrid horizontal ScrollBar not shown properly

2008-07-30 Thread rleuthold
Hi,

I'm having a very wide DataGrid ( approx 4000px ).

I'm setting the scroll policies to on. But the horizontal scroll bar is not 
shown properly. It 
doesn't show the right end and arrow of the scroll bar, so the user is never 
able to see the 
columns all to the right in the grid.

It functions very well, with a DataGrid which is around 2000px wide. Does 
anybody know if 
there is a limit for the width of a component to show the scroll bars propely ?

Thank's
rico



[flexcoders] Best event to listen for when ViewStack child becomes active?

2008-07-30 Thread Cameron Childress
What's the best event to listen for when a *specific* child of a
ViewStack becomes active?  I'd like to set some defaults on a specific
child each time it becomes active (not just the first time, and not
just when it is created) and can't seem to find the right combination.
 I'm using a fairly common pattern to change the viewstack...

private function getView(i:int): Container {
if (i == VIEW_MAIN) {
// can't fire event here, main doesn't exist yet!
return main;
} else {
return login;
}
}

mx:ViewStack selectedChild={ getView( viewState ) } 
view:Login id=login mysteryEventToListenFor=???/
view:Main  id=main /
/mx/ViewStack

Advice would be appreciated...

Thanks!

-Cameron

-- 
Cameron Childress
Sumo Consulting Inc
http://www.sumoc.com
---
cell: 678.637.5072
aim: cameroncf
email: [EMAIL PROTECTED]


[flexcoders] disable all controls on stage

2008-07-30 Thread Claudio M. E. Bastos Iorio
I'm trying to access all controls in stage, to disable them (error occurred
in app - disable all controls). 

I'd like to have access to some kind of collection to iterate trough,
something like:

 

Foreach (var mycontrol:Control in CollectionofObjects){

Mycontrol.enabled = false;

}

 

Any idea?

 



Claudio M. E. Bastos Iorio

 http://www.blumer.com.ar/ http://www.blumer.com.ar

 



Re: [flexcoders] Flash 9 localhost socket connection on Windows

2008-07-30 Thread Darren Cook
 What is the problem behaviour? In the flash client it says it has
 connected properly. No other messages. On the server side it says
 nothing; only when I kill the flash client do I get a bunch of log entries:
 ...
 ERROR: failed socket_read from client so closing socket. Last socket
 error: An established connection was aborted by the software in your
 host machine.

Additional information: it doesn't time-out even if left for 15m. When I
then kill the flash client the server finally notices/accepts/completes
the connection. So, I think the above error is a red-herring. I.e.:
 1. I kill flash client
 2. php accepts connection and tries to send data
 3. It fails (because the flash client has just disappeared!)

Something changed between Flash 8 and Flash 9 in the way that sockets
work. Does that ring any bells with anyone? It only affects windows, not
linux. Carriage-returns?

Darren

P.S. I also wrote:

 The swf is trusted (See this blog entry on trusting swfs.).

Sorry, I missed the URL:
http://darrendev.blogspot.com/2008/06/flexflash-accessing-both-network-and.html

-- 
Darren Cook, Software Researcher/Developer
http://dcook.org/mlsn/ (English-Japanese-German-Chinese-Arabic
open source dictionary/semantic network)
http://dcook.org/work/ (About me and my work)
http://darrendev.blogspot.com/ (blog on php, flash, i18n, linux, ...)


Re: [flexcoders] Re: skinning and validation

2008-07-30 Thread Toby Tremayne

Hi Tim,

	On the text field if I remove the focusSkin yes, it then uses the red  
border as it should.  But on the combo box and numeric stepper I can  
confirm that the validation is working fine - when I mouse over the  
field it still brings up the red tooltip to the right hand side, it's  
just not giving me the outline on the control itself.  And importantly  
you can see from the css below that my combo box doesn't even have a  
focusskin specified.


	I've discovered that if I use the tab button to move focus onto the  
combobox after validation has failed, then the focus border appears  
and is red - but it won't appear by itself.


	I would have assumed that you could provide a focusskin and then the  
component would still draw the red border, but I can't find any  
references for it.  Can anyone tell me how to do this?  There doesn't  
seem to be a skin option for the error border itself.


Toby
On 30/07/2008, at 3:42 PM, Tim Hoff wrote:


Hi Toby,

For drawing the error border, flex uses the Focus Manager. If you
use a focusSkin, it lloks like it over-rides the focus rectangle
drawn with the errorColor. Try taking that skin out, to see if it
comes back. Don't know about the comboBox. Have you verified that
the validation failure is actually setting the errorString? You can
try this; to find out if it's a skin or logic problem:

mx:ComboBox errorString=Test/

-TH

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

 Hi all,

 I've googled but every time I find someone with the same
problem the
 questions seem to go unanswered...

 I have skins applied to a flex app and I'm having an issue
where for
 most elements the red border doesn't show up when validation
fails.
 For example, I have this in my css file:

 TextInput
 {
 borderSkin: Embed(source=TextInput.swf,
 symbol=TextInput_borderSkin);
 focusSkin: Embed(source=TextInput.swf,
symbol=TextInput_focusSkin);
 }
 ComboBox
 {
 disabledSkin: Embed(source=ComboBox.swf,
 symbol=ComboBox_disabledSkin);
 downSkin: Embed(source=ComboBox.swf,
symbol=ComboBox_downSkin);
 editableDisabledSkin: Embed(source=ComboBox.swf,
 symbol=ComboBox_editableDisabledSkin);
 editableDownSkin: Embed(source=ComboBox.swf,
 symbol=ComboBox_editableDownSkin);
 editableOverSkin: Embed(source=ComboBox.swf,
 symbol=ComboBox_editableOverSkin);
 editableUpSkin: Embed(source=ComboBox.swf,
 symbol=ComboBox_editableUpSkin);
 overSkin: Embed(source=ComboBox.swf,
symbol=ComboBox_overSkin);
 upSkin: Embed(source=ComboBox.swf,
symbol=ComboBox_upSkin);
 }

 And neither combobox nor textinput show the red validation border
when
 validation fails. What am I missing? Is there a way to specify
an
 error border skin or something? Or should there be some way in
the
 skin file to add an error border?

 cheers,
 Toby
 ---

 Life is poetry, write it in your own words

 ---

 Toby Tremayne
 CEO
 Code Poet and Zen Master of the Heavy Sleep
 Lyricist Software
 0416 048 090
 ICQ: 13107913






---

Life is poetry, write it in your own words

---

Toby Tremayne
CEO
Code Poet and Zen Master of the Heavy Sleep
Lyricist Software
0416 048 090
ICQ: 13107913



[flexcoders] How to copy and move file in the specific directory in AIR

2008-07-30 Thread Pankaj Munjal
Hi 
This is my first post on this blog and joined few minutes back.
I am facing pb. 
I have to copy one file from my specific location to other specific
locaton except applicationDirectory,desktopDirectory etc..
For e.g
I want to copy from d://Test/tst.xml to e://Test/t.xml
How to achive this ...

Thanks in Advance
P



[flexcoders] AS3 or Flex MXML to UML, OO architecture, use cases, object classes, sequence diagrams, and state diagrams

2008-07-30 Thread Pascal Schrafl
Hi all,

Does anyone of you know a tool, to reverse engineer a already existing 
Flex 3 application in order to create the OO architecture, use cases, 
object classes, sequence diagrams and state diagrams in UML?

Thanks a lot for your answers and best regards,


Pascal


[flexcoders] HTML tags in tool tip

2008-07-30 Thread timgerr
Is there a way to have html tags work in the tool tips, if not then
can I embed a text area in tool tips?

Thanks for the help,
timgerr



[flexcoders] Adjacent mx:Label controls and spacing between them?

2008-07-30 Thread Chris W. Rea
Hi flexcoders.  This is my first post, so hello!  I'm relatively new
to Flex, and I am using Flex Builder 3.

I'm trying to lay out some text with Label controls, and this issue is
confusing me.  Basically, I want to display a string such as The
first number is 42 and the second number is 99.  The numbers
themselves vary and areto be conditionally styled.  In fact, the
values are to be controlled by two sliders, and I want an effect such
that when the slider is dragged, the numbers change colour until the
slider is released.

I had originally laid out the text using a single mx:Label control and
setting htmlText within the string to:
mx:Label htmlText=The first number is {firstNumber} and the second
number is {secondNumber}./

However, I'd like more control over the styling of those bound
numbers, individually.  So, I am attempting to factor the string into
multiple Label controls (as in the snippet below.)

However, I can't seem to get the space between the last number and the
period to disappear.  I thought by setting the HBox horizontalGap to
zero and each Label's paddingLeft and paddingRight to zero that there
should be no such space, but that's not the case.  I imagine I am
misunderstanding how the label widths are calculated and being
rendered, and overlooking something obvious.

So, is there a way to make the adjacent mx:Labels render similar to
the single mx:Label above?  Or, is there a better way to accomplish
what I want as I described above?  Thank you.

--- 8 code follows 8 ---

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
mx:Script
![CDATA[
[Bindable]
public var firstNumber:int = 42;
[Bindable]
public var secondNumber:int = 99;
]]
/mx:Script
mx:HBox horizontalGap=0
mx:Label text=The first number is paddingRight=0 /
mx:Label text={firstNumber}  paddingLeft=0 paddingRight=0 /
mx:Label text=and the second number is   paddingLeft=0 
paddingRight=0 /
mx:Label text={secondNumber} paddingLeft=0 paddingRight=0 /
mx:Label text=.  paddingLeft=0 /
/mx:HBox
/mx:Application

--- 8 end code 8 ---

Regards,

Chris W. Rea
[EMAIL PROTECTED]


[flexcoders] Re: Event for shift-click

2008-07-30 Thread Kevin Ford
Nevermind. It was a dumb error on my part. At the beginning of the function
I was calling I had an if-statement testing for...
analysisList.selectedIndex  -1
... which obviously doesn't work for multiple selections. Simply changing it
to...
analysisList.selectedIndices.length  0
... does what I was expecting.


On Tue, Jul 29, 2008 at 6:54 PM, Kevin Ford [EMAIL PROTECTED] wrote:

 I'm running into a bit of frustration on an AdvancedDataGrid control with
 allowMultipleSelection turned on. I currently fire-off a function on the
 ADG's change event and this works perfectly fine if I single-click or
 control-click on a row in the control, but not if I shift-click. I've tried
 triggering on change, itemClick, and click events and none seem to
 trigger when doing a straight shift-click selection. If I do a shift-click
 to highlight several rows, then do a control-click to highlight another then
 everything highlighted does get recognized. Is there a specific event that I
 can trigger on for shift-click selections?
 Without showing too much of the code, here's my definition for the ADG...

 mx:AdvancedDataGrid id=analysisList designViewDataType=flat width=
 100% x=0 sortExpertMode=true change=showFilteredOpportunities()
 top=34 bottom=0 allowMultipleSelection=true


 /mx:AdvancedDataGrid


 Thanks!
 Kevin



[flexcoders] Re: Parsing MultiLevel Array

2008-07-30 Thread Amy
--- In flexcoders@yahoogroups.com, sudha_bsb [EMAIL PROTECTED] wrote:

 Hi,
 
 I have a requirement wherin I have to parse a multilevel array. 
 Suppose we have an array like
 mx:Array
mx:Object label=Control Panel
  mx:children
  mx:Array
mx:Object label=Five /
mx:Object label=Six /
  /mx:Array
  /mx:children
/mx:Object   
mx:Object label=Selling/
mx:Object label=Service/
mx:Object label=Billing/   
 /mx:Array
 
 Now, this array is a dataprovider for a component that basically 
 creates a list of buttons. When an array object has children the 
 component creates the children as well. 
 My question is how do I let the component know that a particular 
 object of its dataprovider has children? And how do I let it know 
 what those children are? 
 
 I do not have the option to convert the array into XML or XMLList 
and 
 then parse it..I have to let the array remain as it is

Can you convert it to HierarchicalData?  It looks like it's already 
the right structure, except I think you'd need to set it as the 
source for an ArrayCollection and then it could go into 
HierarchicalData.

HTH;

Amy



Re: [flexcoders] Adjacent mx:Label controls and spacing between them?

2008-07-30 Thread Flex Frenzy

Hey Chris, welcome!

The easiest solution would be to change the HBox spacing to -6, and  
add the spaces in the text, like so:


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;  
layout=absolute

mx:Script
![CDATA[
[Bindable]
public var firstNumber:int = 42;
[Bindable]
public var secondNumber:int = 99;
]]
/mx:Script
mx:HBox horizontalGap=-6
mx:Label text=The first number is  paddingRight=0 /
mx:Label text={firstNumber} paddingLeft=0 paddingRight=0 /
mx:Label text= and the second number is  paddingLeft=0  
paddingRight=0 /

mx:Label text={secondNumber} paddingLeft=0 paddingRight=0 /
mx:Label text=. paddingLeft=0 /
/mx:HBox
/mx:Application
On Jul 30, 2008, at 7:08 AM, Chris W. Rea wrote:


Hi flexcoders. This is my first post, so hello! I'm relatively new
to Flex, and I am using Flex Builder 3.

I'm trying to lay out some text with Label controls, and this issue is
confusing me. Basically, I want to display a string such as The
first number is 42 and the second number is 99. The numbers
themselves vary and areto be conditionally styled. In fact, the
values are to be controlled by two sliders, and I want an effect such
that when the slider is dragged, the numbers change colour until the
slider is released.

I had originally laid out the text using a single mx:Label control and
setting htmlText within the string to:
mx:Label htmlText=The first number is {firstNumber} and the second
number is {secondNumber}./

However, I'd like more control over the styling of those bound
numbers, individually. So, I am attempting to factor the string into
multiple Label controls (as in the snippet below.)

However, I can't seem to get the space between the last number and the
period to disappear. I thought by setting the HBox horizontalGap to
zero and each Label's paddingLeft and paddingRight to zero that there
should be no such space, but that's not the case. I imagine I am
misunderstanding how the label widths are calculated and being
rendered, and overlooking something obvious.

So, is there a way to make the adjacent mx:Labels render similar to
the single mx:Label above? Or, is there a better way to accomplish
what I want as I described above? Thank you.

--- 8 code follows 8 ---

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;  
layout=absolute

mx:Script
![CDATA[
[Bindable]
public var firstNumber:int = 42;
[Bindable]
public var secondNumber:int = 99;
]]
/mx:Script
mx:HBox horizontalGap=0
mx:Label text=The first number is paddingRight=0 /
mx:Label text={firstNumber} paddingLeft=0 paddingRight=0 /
mx:Label text=and the second number is  paddingLeft=0  
paddingRight=0 /

mx:Label text={secondNumber} paddingLeft=0 paddingRight=0 /
mx:Label text=. paddingLeft=0 /
/mx:HBox
/mx:Application

--- 8 end code 8 ---

Regards,

Chris W. Rea
[EMAIL PROTECTED]






[flexcoders] Re: Loading an ActionScript class from and external swf file

2008-07-30 Thread arunprakash dhanabal
Worked like a charm. Your bog really helped.

Thanks a lot!!!

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

 AS is not Java.  See the modules presentation on my blog.
 
  
 
 You won't want to reference MyScreen as MyScreen in the main app, 
but
 rather as IScreen.  MyScreen should have been created by 
ModuleLoader
 and the child property should be an IScreen.
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of arunprakash dhanabal
 Sent: Wednesday, July 23, 2008 6:09 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Loading an ActionScript class from and 
external
 swf file
 
  
 
 Hi,
 
 Im running into an issue with Flex and need some help.
 
 I have an action script application in flexbuilder. 
 Here is the setup,
 
 * interface named IScreen defined in the application
 * Created a new mxml module(MyScreen.mxml) which is implementing 
the 
 IScreen interface
 * The main application's SWF has just the IScreen.as and the 
 application.mxml
 * The MyScreen.swf has the MyScreen.as and the related dependencies
 
 Im trying to instantiate the class MyScreen from the 
 application.mxml. Im loading the swf file using a ModuleLoader and 
 once the module is loaded, Im trying to create an instance of the 
 MyScreen using the getDefinitionByName.
 
 I get the following error
 Error #1065: Variable MyScreen is not defined.
 
 I get this because MyScreen is a seperate module and not compiled 
 into the main swf file. I dont want the MyScreen to be compiled 
into 
 the main app as my requirement is that I dont know which 
 implementation of the screen, I willbe loading in the runtime.
 
 In Java I would just define the interface in the main application 
and 
 then, load the class that is implementing the interface from the 
 classpath and I should be able to call the methods in the interface.
 
 Any thoughts!!!
 
 I have a sample workspace showing this problem
 
 Thanks for your time in reading this email.





[flexcoders] Resource file

2008-07-30 Thread David Gironella
I know I can create string tags easy in resource file.

 

MESSAGE=we are alone.

 

 

But I can use this tag to complete other tags.

 

Possible example:

 

MESSAGE=we are alone.

MESSAGE2= {MESSAGE} and you

 

Giro.

 

 

 

 



[flexcoders] Re: Best event to listen for when ViewStack child becomes active?

2008-07-30 Thread Cameron Childress
On Wed, Jul 30, 2008 at 7:56 AM, Cameron Childress [EMAIL PROTECTED] wrote:
 What's the best event to listen for when a *specific* child of a
 ViewStack becomes active?

Apparently my question was too easy or (too common) for FlexCoders to
answer, but I got it:

show() and hide() were what I was looking for

-Cameron

-- 
Cameron Childress
Sumo Consulting Inc
http://www.sumoc.com
---
cell: 678.637.5072
aim: cameroncf
email: [EMAIL PROTECTED]


[flexcoders] Re: Programmatically select items in AdvancedDataGrid

2008-07-30 Thread whatabrain
Sorry. I missed a detail... I tried to do:
  grid.selectedItems.push(o).
It did not cause the item to be selected.


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

 You have 2 options, set either adg.selectedItems or 
adg.selectedIndices.
 
 --- In flexcoders@yahoogroups.com, whatabrain junk1@ wrote:
 
  Another old question, I'm sure, but I can't find an answer 
anywhere on 
  the web.
  
  How do I cause a row to be selected in an AdvancedDataGrid? 
Basically, 
  when a top-level element is clicked, I want all of its child 
elements 
  to be selected.
 





RE: [flexcoders] Sorting an XMLList on an attribute

2008-07-30 Thread Tracy Spratt
XMLList does not have a sort method.

 

You could do the sort manually, a single level is pretty easy.

 

Does sorting XMLListCollection sort the underlyingsource XMLList as
well?  If so, why not just use XMLListCollection in the sorting function
only?

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of gaurav1146
Sent: Wednesday, July 30, 2008 2:58 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Sorting an XMLList on an attribute

 

Hi,
I am trying to sort an XMLList based on one of the attributes in the
XML node. On trying this I get the following error:

TypeError: Error #1089: Assignment to lists with more than one item is
not supported.

Instead of XMLList if I use XMLListCollection it works fine. The thing
is that I have used XMLList at lot of other places in my code as well
so I cannot easily switch to XMListCollection. I would be prefer a way
if I could sort the XMLList somwehow.

Following is the sample code that I tried for the sorting difference
between XMLList amd XMLListCollection:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
layout=absolute
mx:Script
![CDATA[
import mx.collections.XMLListCollection;
import mx.collections.SortField;
import mx.collections.Sort;
private var books:XML = books
book publisher=Addison-Wesley name=Design
Patterns /
book publisher=Addison-Wesley name=The
Pragmatic Programmer /
book publisher=Addison-Wesley name=Test
Driven Development /
book publisher=Addison-Wesley
name=Refactoring to Patterns /
book publisher=O'Reilly Media name=The
Cathedral  the Bazaar /
book publisher=O'Reilly Media name=Unit
Test Frameworks /
/books;

// This does not work.
/*
[Bindable]
private var booksList:XMLList = books.children();
*/
[Bindable]
private var booksList:XMLListCollection = new
XMLListCollection(books.children());


private function sortBooks():void
{
var s:Sort = new Sort();
s.fields = [new SortField(@name)];
booksList.sort = s;
booksList.refresh();
tree.dataProvider = booksList;
}

]]
/mx:Script
mx:VBox
mx:Tree id=tree dataProvider={booksList} labelField=@name/
mx:Button click=sortBooks() label=Sort books/
/mx:VBox
/mx:Application

 



Re: [flexcoders] Re: Flex Inspiration and ideas

2008-07-30 Thread Tom Chiverton
On Tuesday 29 Jul 2008, brucewhealton wrote:
 When I go to these sites and find interesting components and such, if
 I find that an application was created for Flex 2.0, is there a good
 chance it will work with Flex 3.0?  

Yup.

-- 
Tom Chiverton



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 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  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 Solicitors Regulation Authority.

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

For more information about Halliwells LLP visit www.halliwells.com.



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

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

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



Re: [flexcoders] HTML tags in tool tip

2008-07-30 Thread Tom Chiverton
On Wednesday 30 Jul 2008, timgerr wrote:
 Is there a way to have html tags work in the tool tips,

http://community.adobe.com/ion/search.html;jsessionid=815CBE1AD362061ECD17B06D69A48BF5?q=htmltooltipx=0y=0meta=area%3D0lbl=flex_product_adobelr

-- 
Tom Chiverton



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 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  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 Solicitors Regulation Authority.

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

For more information about Halliwells LLP visit www.halliwells.com.



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

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* 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] Updating AIR apps - 'version string' nonsense?

2008-07-30 Thread Borek
To update an AIR app, you can use Updater#update() method. This method
accepts 2 parameters - first is 'airFile' and the second is 'version
string'. I am totally confused about the version parameter though -
why do we need it? This is an example from the docs:

var airFile:File = File.applicationStore.resolvePath(Example
Application.air);
var version:String = 2.01;
updater.update(airFile, version);

How can I possibly know that I want to update to 2.01 and not 2.02 or
2.03? Of course I don't - therefore, it's suggested that you first
download the AIR app, extract the version info from the second record
in the AIR/ZIP file () and than call the update() method with the
parsed version string.

Why oh why I need to do this? How does it make my application more
resistant to downgrades (which is the official explanation for the
presence of the version parameter)? Of course it's good to express an
intent to upgrade only but then, you would need some other system,
probably increasing integers or something, definitely not a completely
custom version string (which is good for the install screen, for the
About dialog etc.)

I feel this is completely wrong in AIR. Am I missing something?

Borek




Re: [flexcoders] Refreshing data in dataGrid

2008-07-30 Thread Tom Chiverton
On Wednesday 30 Jul 2008, Joshua Jackson wrote:
 I've got a list of data displayed in a datagrid where the DataProvider
 is from Spring as the backend. Now everytime I add, update or delete
 data, it doesn't refresh the datagrid. How do I do this in Flex?

Do you want your application to notice automatically that something has 
changed on the server's database ? If so, BlazeDS is your friend.

 I've tried doing
 - dataProvider.refresh();
 - dataGrid.dataProvider.dispatchEvent(new
 CollectionEvent(CollectionEvent.COLLECTION_CHANGE));

Or do you mean that you are removing items from the ArrayCollection that is 
set as the dataprovider, in which case as long as you wrote
dataProvider={myAC}
it should Just Work.

-- 
Tom Chiverton



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 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  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 Solicitors Regulation Authority.

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

For more information about Halliwells LLP visit www.halliwells.com.



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

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

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



Re: [flexcoders] disable all controls on stage

2008-07-30 Thread Tom Chiverton
On Wednesday 30 Jul 2008, Claudio M. E. Bastos Iorio wrote:
 I'm trying to access all controls in stage, to disable them (error occurred
 in app - disable all controls).

Why either use PopUpManager directly to make a model popup, or did into it's 
code to see what it does - maybe it just draws a big rectangle over 
everything...

-- 
Tom Chiverton



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 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  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 Solicitors Regulation Authority.

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

For more information about Halliwells LLP visit www.halliwells.com.



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

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

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



Re: [flexcoders] Form Processing in Flex

2008-07-30 Thread Tom Chiverton
On Tuesday 29 Jul 2008, brucewhealton wrote:
 using Flex. When designing in xhtml, using Dreamweaver, I call the
 form processor from the opening form tag, which calls a php file -

Which does what ? I'm not clear.

 information for form processing.  I am curious as to how to process
 the form data when the form is created in Flex. 
.
 I'm not clear how this would work in Flex. Everything in the
 Flex application is compiled. So, how do you access the content
 entered by the user that comes to the form?

You send it somewhere, such as a HTTP post or SOAP call.

-- 
Tom Chiverton



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 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  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 Solicitors Regulation Authority.

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

For more information about Halliwells LLP visit www.halliwells.com.



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

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

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



RE: [flexcoders] Re: Programmatically select items in AdvancedDataGrid

2008-07-30 Thread Tracy Spratt
How did you get o?  For selectedItem(s) to work, o must be a reference
pointing to an item in the dataProvider.  Is that the case?

 

If so, try assigning the entire selectedItems array, rather than
manipulating its elements individually.  That is just a guess, but is
the way you must handle the columns array in a dataGrid.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of whatabrain
Sent: Wednesday, July 30, 2008 11:12 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Programmatically select items in
AdvancedDataGrid

 

Sorry. I missed a detail... I tried to do:
grid.selectedItems.push(o).
It did not cause the item to be selected.

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

 You have 2 options, set either adg.selectedItems or 
adg.selectedIndices.
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , whatabrain junk1@ wrote:
 
  Another old question, I'm sure, but I can't find an answer 
anywhere on 
  the web.
  
  How do I cause a row to be selected in an AdvancedDataGrid? 
Basically, 
  when a top-level element is clicked, I want all of its child 
elements 
  to be selected.
 


 



RE: [flexcoders] Refreshing data in dataGrid

2008-07-30 Thread Tracy Spratt
If you use the dataProvider API to make the updates, then the UI will
respond automatically.
Tracy

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tom Chiverton
Sent: Wednesday, July 30, 2008 11:29 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Refreshing data in dataGrid

On Wednesday 30 Jul 2008, Joshua Jackson wrote:
 I've got a list of data displayed in a datagrid where the DataProvider
 is from Spring as the backend. Now everytime I add, update or delete
 data, it doesn't refresh the datagrid. How do I do this in Flex?

Do you want your application to notice automatically that something has 
changed on the server's database ? If so, BlazeDS is your friend.

 I've tried doing
 - dataProvider.refresh();
 - dataGrid.dataProvider.dispatchEvent(new
 CollectionEvent(CollectionEvent.COLLECTION_CHANGE));

Or do you mean that you are removing items from the ArrayCollection that
is 
set as the dataprovider, in which case as long as you wrote
dataProvider={myAC}
it should Just Work.

-- 
Tom Chiverton



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 Halliwells LLP, 3 Hardman Square, Spinningfields,
Manchester, M3 3EB.  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
Solicitors Regulation Authority.

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

For more information about Halliwells LLP visit www.halliwells.com.



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







RE: [flexcoders] Parsing MultiLevel Array

2008-07-30 Thread Tracy Spratt
Use a setter function to pass the data into the component, and in tht
function, perform whatever logic you need.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of sudha_bsb
Sent: Wednesday, July 30, 2008 2:51 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Parsing MultiLevel Array

 

Hi,

I have a requirement wherin I have to parse a multilevel array. 
Suppose we have an array like
mx:Array
mx:Object label=Control Panel
mx:children
mx:Array
mx:Object label=Five /
mx:Object label=Six /
/mx:Array
/mx:children
/mx:Object 
mx:Object label=Selling/
mx:Object label=Service/
mx:Object label=Billing/ 
/mx:Array

Now, this array is a dataprovider for a component that basically 
creates a list of buttons. When an array object has children the 
component creates the children as well. 
My question is how do I let the component know that a particular 
object of its dataprovider has children? And how do I let it know 
what those children are? 

I do not have the option to convert the array into XML or XMLList and 
then parse it..I have to let the array remain as it is

Thanks  Regards,
Sudha. 

 



RE: [flexcoders] dynamic remote objects

2008-07-30 Thread Tracy Spratt
I don't do RO much but I do the same thing with HTTPService and
WebService.  What is not working?

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dan Vega
Sent: Wednesday, July 30, 2008 1:00 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] dynamic remote objects

 

I have a remote object that is very dynamic.The user is actually
selecting the source of the component and the method name. So how can I
refer to the remote objects methods dynamically? 

ro[methodname].addEventListenter() ???

var ro:RemoteObject = new RemoteObject();
ro.destination = ColdFusion;
ro.source = something.text
ro.METHODNAME.addEventListener(result, getListResultHandler);
ro.addEventListener(fault, faultHandler);

ro..METHODNAME(deptComboBox.selectedItem.data);

Thank You
Dan Vega

 



RE: [flexcoders] Best event to listen for when ViewStack child becomes active?

2008-07-30 Thread Tracy Spratt
Use the show event on the child views.  You will also need
creationComplete, because show does not fire the first time.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Cameron Childress
Sent: Wednesday, July 30, 2008 7:57 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Best event to listen for when ViewStack child
becomes active?

 

What's the best event to listen for when a *specific* child of a
ViewStack becomes active? I'd like to set some defaults on a specific
child each time it becomes active (not just the first time, and not
just when it is created) and can't seem to find the right combination.
I'm using a fairly common pattern to change the viewstack...

private function getView(i:int): Container {
if (i == VIEW_MAIN) {
// can't fire event here, main doesn't exist yet!
return main;
} else {
return login;
}
}

mx:ViewStack selectedChild={ getView( viewState ) } 
view:Login id=login mysteryEventToListenFor=???/
view:Main id=main /
/mx/ViewStack

Advice would be appreciated...

Thanks!

-Cameron

-- 
Cameron Childress
Sumo Consulting Inc
http://www.sumoc.com http://www.sumoc.com 
---
cell: 678.637.5072
aim: cameroncf
email: [EMAIL PROTECTED] mailto:cameronc%40gmail.com 

 



[flexcoders] Chart not displaying large no. of items nicely

2008-07-30 Thread nehavyas13
Hi,

I have got 3 charts on a page. 2 are Bar chart and 3rd is a Column
Chart. All one below another.

The first two charts on the y axis do not have fixed items. These
items are created at run time. If the no. of items reaches more than
15, the 1st two charts do not show them properly formatted.

i.e It does show the correct data, but the bars are very tiny. Of
course this would be because of the space it has been allocated.

But can somebody suggest any nice solution to this? As, to how do I
get the charts to display a large no. of items nicely, even thought it
has a restricted small space allocated to it. I am not able to find
any examples on this.

Thanks



Re: [flexcoders] dynamic remote objects

2008-07-30 Thread Tom Chiverton
On Wednesday 30 Jul 2008, Dan Vega wrote:
 I have a remote object that is very dynamic.The user is actually selecting
 the source of the component and the method name.

Send the component name, method and arguments list to a generic service method 
that does the invoke for you.
And be sure to check that the object name and method are at least members of a 
list you expect to receive, or you risk creating a security problem.

-- 
Tom Chiverton



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 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  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 Solicitors Regulation Authority.

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

For more information about Halliwells LLP visit www.halliwells.com.



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

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

* Your email settings:
Individual Email | Traditional

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

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* 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] permission based ui

2008-07-30 Thread Derrick Anderson
hi, i have my main UI setup with a ToggleButtonBar whos dataprovider is a
viewstack.  I need to incorporate permissions into my application, some
users won't have access to the 'Setup' section for example- is there an easy
way to do this or do i need to subclass ToggleButtonBar?  how do you all
handle permissions in mxml layout?  i have many examples of this, form
sections that are permission based and such, I don't know the best way to
handle it.

thanks,
derrick anderson


[flexcoders] LCDS : updateItem method

2008-07-30 Thread Bart Ronsyn
On my Livecycle server, I created an assembler extending the 
AbstractAssembler class, overriding
the methods getItem, createItem, updateItem and deleteItem.

Now on the Flex side, I have a DataService-object ds ... the getItem and 
createItem methods work well,
but I noticed that the DataService object had no updateItem method.   
How can I invoke the updateItem method of my
assembler-class on the server ?

Thanks for the help !
Bart


RE: [flexcoders] LCDS : updateItem method

2008-07-30 Thread Jeff Vroom
Updates are tracked automatically as you change properties on your item.  If 
you have autoCommit turned on, each property change of a managed object will 
automatically send the changes to the server and call updateItem.   If you turn 
autoCommit=false, you can call dataService.commit() to commit all pending 
changes or dataService.commit([myObject]) to commit just the changes for a 
specific object.

Jeff

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Bart 
Ronsyn
Sent: Wednesday, July 30, 2008 8:55 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] LCDS : updateItem method


On my Livecycle server, I created an assembler extending the
AbstractAssembler class, overriding
the methods getItem, createItem, updateItem and deleteItem.

Now on the Flex side, I have a DataService-object ds ... the getItem and
createItem methods work well,
but I noticed that the DataService object had no updateItem method.
How can I invoke the updateItem method of my
assembler-class on the server ?

Thanks for the help !
Bart

inline: image001.jpginline: image002.jpg

RE: [flexcoders] permission based ui

2008-07-30 Thread Tracy Spratt
Do not use the ViewStack as the dataProvider.  Build the navigation
system's dataProvider as needed for the curent user, include the view
index in each item. On click, assign the item.viewIndex property value
to the viewStack.selectedItem.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Derrick Anderson
Sent: Wednesday, July 30, 2008 11:55 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] permission based ui

 

hi, i have my main UI setup with a ToggleButtonBar whos dataprovider is
a viewstack.  I need to incorporate permissions into my application,
some users won't have access to the 'Setup' section for example- is
there an easy way to do this or do i need to subclass ToggleButtonBar?
how do you all handle permissions in mxml layout?  i have many examples
of this, form sections that are permission based and such, I don't know
the best way to handle it.

thanks,
derrick anderson

 



[flexcoders] Re: Programmatically select items in AdvancedDataGrid

2008-07-30 Thread fourctv
adg.selectedItems and adg.selectedIndices are arrays.

selectedItems is an array of objects from adg's dataProvider taht are currently 
selected, 
and it is a read/write property.
selectedINdices otoh is an array of ints with indices for those same objects in 
selectedItems.

so, to make it simple, if you want to select rows 2,4,6 you'd do something like:
var mySelection:Array = [2,4,6];
adg.selectedINdices = mySelection;

hth
julio

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

 Sorry. I missed a detail... I tried to do:
   grid.selectedItems.push(o).
 It did not cause the item to be selected.
 
 
 --- In flexcoders@yahoogroups.com, fourctv fourctv@ wrote:
 
  You have 2 options, set either adg.selectedItems or 
 adg.selectedIndices.
  
  --- In flexcoders@yahoogroups.com, whatabrain junk1@ wrote:
  
   Another old question, I'm sure, but I can't find an answer 
 anywhere on 
   the web.
   
   How do I cause a row to be selected in an AdvancedDataGrid? 
 Basically, 
   when a top-level element is clicked, I want all of its child 
 elements 
   to be selected.
  
 






Re: [flexcoders] dynamic remote objects

2008-07-30 Thread Dan Vega
Ok, I figured out what I was doing wrong but I am still getting an error. I
think this is the right way to use remote object in AS3

import mx.rpc.remoting.RemoteObject;
import mx.rpc.remoting.Operation;

// setup the remote method
var service:RemoteObject = new
RemoteObject(ColdFusion);
service.source = component.text;
// the method needs to know about the remote object
var operation:Operation = new Operation(service);
operation.name = method.selectedItem.NAME;

operation.addEventListener(ResultEvent.RESULT,loadGridData);
operation.send();

But I am still getting this error and I am  not sure why?


Can not resolve a multiname reference unambiguously.
mx.rpc.remoting.mxml:RemoteObject (from C:\Program Files\Adobe\Flex Builder
3\sdks\3.0.0\frameworks\libs\rpc.swc(mx/rpc/remoting/mxml/RemoteObject)) and
mx.rpc.remoting:RemoteObject (from C:\Program Files\Adobe\Flex Builder
3\sdks\3.0.0\frameworks\libs\rpc.swc(mx/rpc/remoting/RemoteObject)) are
available.RemoteObject/srcMain.mxmlUnknown1217435341365
1308


Thank You
Dan Vega

On Wed, Jul 30, 2008 at 11:46 AM, Tom Chiverton 
[EMAIL PROTECTED] wrote:

 On Wednesday 30 Jul 2008, Dan Vega wrote:
  I have a remote object that is very dynamic.The user is actually
 selecting
  the source of the component and the method name.

 Send the component name, method and arguments list to a generic service
 method
 that does the invoke for you.
 And be sure to check that the object name and method are at least members
 of a
 list you expect to receive, or you risk creating a security problem.

 --
 Tom Chiverton

 

 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
 Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  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 Solicitors Regulation Authority.

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

 For more information about Halliwells LLP visit www.halliwells.com.

 

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






[flexcoders] AdvancedDataGrid: Disable Dragging Columns

2008-07-30 Thread Paul Whitelock
In the Adobe documentation it says the following about disabling the
ability to re-arrange columns by dragging:

To disable dragging of all columns in a group, set the
AdvancedDataGridColumnGroup.childrenDragEnabled property to false. To
disable dragging for a single column, set the
AdvancedDataGridColumn.dragEnabled property to false.

However, I don't seem to see any trace of the dragEnabled property
for AdvancedDataGridColumn. I'm probably just missing something
obvious, so can someone point me in the right direction? Thanks!

Paul



[flexcoders] Re: Mouse DOUBLE_CLICK not fired in Browser but in AIR

2008-07-30 Thread valdhor
Got me beat.

Someone with more experience with drag/drop will have to chime in.


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

 
 Not so if you add the drag handling code as in my original example:
 private function onMouseDown(event:MouseEvent):void
 {
   trace(onMouseDown);
   var ds:DragSource = new DragSource();
   DragManager.doDrag(this, ds, event);
 }
 
 Works in the AIR version.
 
 --- In flexcoders@yahoogroups.com, valdhor stevedepp@ wrote:
 
  Given the following:
  
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  layout=absolute creationComplete=creationCompleteHandler()
   mx:Script
   ![CDATA[
   private function creationCompleteHandler():void
   {
   but.doubleClickEnabled = true;
   but.addEventListener(MouseEvent.CLICK, onMouseClick);
   but.addEventListener(MouseEvent.DOUBLE_CLICK,
  onMouseDblClick);
   cvs.addEventListener(MouseEvent.MOUSE_DOWN,
  onMouseDown);
   }
  
   private function onMouseClick(event:MouseEvent):void
   {
   trace(onMouseClick);
   }
  
   private function onMouseDown(event:MouseEvent):void
   {
   trace(onMouseDown);
   }
  
   private function onMouseDblClick(event:MouseEvent):void
   {
   trace(onMouseDblClick);
   }
   ]]
   /mx:Script
   mx:Canvas id=cvs width=300 height=200
   mx:Button id=but width=100 height=75 label=Hello/
   /mx:Canvas
  /mx:Application
  
  I get the following output if I double click the button:
  
  onMouseDown
  onMouseClick
  onMouseDown
  onMouseDblClick
  
  
  --- In flexcoders@yahoogroups.com, Vijay Ganesan vijay.k.ganesan@
  wrote:
  
  
   I need to handle MOUSE_DOWN because I'm enabling drag and drop.
   Again the weird thing is that the AIR version works fine.
  
   --- In flexcoders@yahoogroups.com, valdhor stevedepp@ wrote:
   
Don't quote me on this but it is probably because the
MouseEvent.MOUSE_DOWN event is captured before a double click. If
  you
change the event listener from MouseEvent.MOUSE_DOWN to
MouseEvent.CLICK then it works as expected.
   
   
--- In flexcoders@yahoogroups.com, Vijay Ganesan
vijay.k.ganesan@ wrote:

 I have the same code running in an AIR app and in a browser
app -
  the
 only difference being the containing mx:WindowedApplication
versus
 mx:Application. See code below for both. Double clicking on the
  button
 in the AIR app works fine (MouseEvent.DOUBLE_CLICK gets
fired) but
  the
 same does not fire in the browser version. Can someone tell me
  what is
 going on here?

 Thanks
 Vijay

 AIR version:
 ?xml version=1.0 encoding=utf-8?
 mx:WindowedApplication
xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute creationComplete=creationCompleteHandler()
   mx:Script
 ![CDATA[
  import mx.managers.DragManager;
  import mx.core.DragSource;

  private function creationCompleteHandler():void
  {
cvs.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
but.doubleClickEnabled = true;
but.addEventListener(MouseEvent.DOUBLE_CLICK,
onMouseDblClick);
  }

  private function onMouseDown(event:MouseEvent):void
  {
trace(onMouseDown);
var ds:DragSource = new DragSource();
   DragManager.doDrag(this, ds, event);
  }

  private function onMouseDblClick(event:MouseEvent):void
  {
trace(onMouseDblClick); // gets called as expected
  }
  ]]
   /mx:Script

   mx:Canvas id=cvs width=300 height=200
 mx:Button id=but width=100 height=75 label=Hello/
   /mx:Canvas

 /mx:WindowedApplication

 Browser version:
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute creationComplete=creationCompleteHandler()
   mx:Script
 ![CDATA[
  import mx.managers.DragManager;
  import mx.core.DragSource;

  private function creationCompleteHandler():void
  {
cvs.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
but.doubleClickEnabled = true;
but.addEventListener(MouseEvent.DOUBLE_CLICK,
onMouseDblClick);
  }

  private function onMouseDown(event:MouseEvent):void
  {
trace(onMouseDown);
var ds:DragSource = new DragSource();
   DragManager.doDrag(this, ds, event);
  }

  private function onMouseDblClick(event:MouseEvent):void
  {
trace(onMouseDblClick); // does not get called!!!
  }
  ]]
   /mx:Script

   mx:Canvas id=cvs width=300 height=200
 mx:Button id=but width=100 height=75 

[flexcoders] Passing flash variables to an embedded SWF

2008-07-30 Thread Laurent
I'm embedding a swf file in an AS class and I would need to pass to
this file some FlashVars, however I'm not sure how to do it or if it's
possible at all. So far I tried this approach, but I get a compiler error:

[Embed(source=MyFile.swf?myFlashVar=abcd)]
protected var MyClass:Class;

This gives me this error:

MyFile.swf?myFlashVar=abcd does not have a recognized extension

Is there any way to do what I'm trying to do?

Thanks,

Laurent



Re: [flexcoders] Refreshing data in dataGrid

2008-07-30 Thread Joshua Jackson
On Wed, Jul 30, 2008 at 10:29 PM, Tom Chiverton
[EMAIL PROTECTED] wrote:
 On Wednesday 30 Jul 2008, Joshua Jackson wrote:
 I've got a list of data displayed in a datagrid where the DataProvider
 is from Spring as the backend. Now everytime I add, update or delete
 data, it doesn't refresh the datagrid. How do I do this in Flex?

 Do you want your application to notice automatically that something has
 changed on the server's database ? If so, BlazeDS is your friend.

How do we do this with BlazeDS? I'm currently using BlazeDS. Is there
any configuration for notifying the apps that something has changed on
the database?

 I've tried doing
 - dataProvider.refresh();
 - dataGrid.dataProvider.dispatchEvent(new
 CollectionEvent(CollectionEvent.COLLECTION_CHANGE));

 Or do you mean that you are removing items from the ArrayCollection that is
 set as the dataprovider, in which case as long as you wrote
 dataProvider={myAC}
 it should Just Work.

Yes, but the dataProvider is data from the database. Instead of
ArrayCollection that is set on the client.

-- 
Setting a new landmark.

Blog: http://joshuajava.wordpress.com/


[flexcoders] how to delete saved database connection from flex builder 3

2008-07-30 Thread tina wang

Hi All:
  In Flex Builder 3, there is a create application from database 
wizard, in this wizard we can create a new connection. But I cannot any 
way to remove/delete existing connection.

  If you know how to remove, could you please share with me

Regards
-Tina


[flexcoders] Anyone using HTMLComponent? Huge problem here

2008-07-30 Thread gunnar.ulle
Hi.

We're currently using the comp to implement a js-based RTE within our
flex app to get correct formated html back to our database.

The app traverses through a data source and creates elements for
different types of data (like textinput and so on) and finally adds them
to a list element, acting as a conatiner (we need to use a list because
of dragndrop capability). Everything's fine so far.

But when the rte element gets placed and the list gets longer then its
initial height, it seems like the rte (to be precisely: the HTML Comp)
kills the vertical scroll ability of the list element. Flex claims, the
list has no vertical scrollbar... (??)

w/o the html comp placed everything works fine with scrolling the list.

Here's an example code as a testcase:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute xmlns:fc=com.flexcapacitor.controls.*
 mx:Script
 ![CDATA[
 import mx.collections.ArrayCollection;
 [Bindable]
 public var dp:ArrayCollection = new ArrayCollection([
 {type:dummy},
 {type:dummy},
  ]);


 ]]
 /mx:Script


 mx:List x=53 y=37 dataProvider={dp} verticalScrollPolicy=on
height=500 width=600
 mx:itemRenderer
 mx:Component
 fc:HTML  elementType=editor
 borderStyle=solid borderThickness=4
borderColor=#605669
 top=180 bottom=20 right=20 left=20
 configPath=../../myconfig.js
 editorPath=fckeditor/ width=400 height=500
 fc:htmlText
 ![CDATA[h1Lorem ipsum dolor/h1
 Lorem ipsum dolor sit amet, consectetuer adipiscing
elit.
 ]]
 /fc:htmlText
 /fc:HTML
 /mx:Component
 /mx:itemRenderer
 /mx:List

/mx:Application


Note: you need the HTMLComponent to use this example.

Ideas, anyone? Any help is much appreciated.

Cheers,
Gunnar





Re: [flexcoders] Adjacent mx:Label controls and spacing between them?

2008-07-30 Thread Chris W. Rea
Hi Jeremy.  Thanks!  That did the trick.  Brilliant - I hadn't thought
about a negative gap as I was thinking *inside* the box.  :-)  I
expected there would be a positive-valued property or style that I
would zero out.  I'd love to know what that -6 is compensating for,
though.  There is clearly additional padding for the rendering of the
Label that is not represented by paddingLeft, paddingRight... an
internal implementation detail?

Anyway, thank you!

Regards,

Chris W. Rea
[EMAIL PROTECTED]


On Wed, Jul 30, 2008 at 10:18 AM, Flex Frenzy [EMAIL PROTECTED] wrote:
 Hey Chris, welcome!
 The easiest solution would be to change the HBox spacing to -6, and add the
 spaces in the text, like so:
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
 mx:Script
 ![CDATA[
 [Bindable]
 public var firstNumber:int = 42;
 [Bindable]
 public var secondNumber:int = 99;
 ]]
 /mx:Script
 mx:HBox horizontalGap=-6
 mx:Label text=The first number is  paddingRight=0 /
 mx:Label text={firstNumber} paddingLeft=0 paddingRight=0 /
 mx:Label text= and the second number is  paddingLeft=0 paddingRight=0
 /
 mx:Label text={secondNumber} paddingLeft=0 paddingRight=0 /
 mx:Label text=. paddingLeft=0 /
 /mx:HBox
 /mx:Application

 On Jul 30, 2008, at 7:08 AM, Chris W. Rea wrote:

 Hi flexcoders. This is my first post, so hello! I'm relatively new
 to Flex, and I am using Flex Builder 3.

 I'm trying to lay out some text with Label controls, and this issue is
 confusing me. Basically, I want to display a string such as The
 first number is 42 and the second number is 99. The numbers
 themselves vary and areto be conditionally styled. In fact, the
 values are to be controlled by two sliders, and I want an effect such
 that when the slider is dragged, the numbers change colour until the
 slider is released.

 I had originally laid out the text using a single mx:Label control and
 setting htmlText within the string to:
 mx:Label htmlText=The first number is {firstNumber} and the second
 number is {secondNumber}./

 However, I'd like more control over the styling of those bound
 numbers, individually. So, I am attempting to factor the string into
 multiple Label controls (as in the snippet below.)

 However, I can't seem to get the space between the last number and the
 period to disappear. I thought by setting the HBox horizontalGap to
 zero and each Label's paddingLeft and paddingRight to zero that there
 should be no such space, but that's not the case. I imagine I am
 misunderstanding how the label widths are calculated and being
 rendered, and overlooking something obvious.

 So, is there a way to make the adjacent mx:Labels render similar to
 the single mx:Label above? Or, is there a better way to accomplish
 what I want as I described above? Thank you.

 --- 8 code follows 8 ---

 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
 mx:Script
 ![CDATA[
 [Bindable]
 public var firstNumber:int = 42;
 [Bindable]
 public var secondNumber:int = 99;
 ]]
 /mx:Script
 mx:HBox horizontalGap=0
 mx:Label text=The first number is paddingRight=0 /
 mx:Label text={firstNumber} paddingLeft=0 paddingRight=0 /
 mx:Label text=and the second number is  paddingLeft=0 paddingRight=0
 /
 mx:Label text={secondNumber} paddingLeft=0 paddingRight=0 /
 mx:Label text=. paddingLeft=0 /
 /mx:HBox
 /mx:Application

 --- 8 end code 8 ---

 Regards,

 Chris W. Rea
 [EMAIL PROTECTED]

[...]


[flexcoders] ViewStack and Combobox

2008-07-30 Thread cox.blair
Here is my situation,

I have a combobox and a viewstack. The combobox's dataProvider is XML
generated by a php script retrieving information from a db.

The database has two primary entries. The first is a location, the
second is a type of test performed. These are inputed by the user
elsewhere in the application. When the user views the combobox, they
see the list of site entries.

Upon selecting the a site, the viewstack should change to show the
related test information. Should be pretty straight forward. The
problem comes when I want to pass the string value of the test to
viewstack - they have the same names.

As a test of the viewstack, this works fine:
dataProvider={viewstackTestKits.getChildren()}
change={viewstackTestKits.selectedChild=event.currentTarget.selectedItem}

But I want something like this:
change=viewstackTestKits.selectedChild=box.selectedItem.Test_Kit_Used


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
creationComplete=service.send()

mx:Script
![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;


[Bindable]
private var samplepoint:ArrayCollection

[Bindable]
private var currentSlide:Object;

private function SPresultHandler(event:ResultEvent):void
{
samplepoint = event.result.response.data.row;
}

private function getListLabel(item:Object):String
{   
return item.Sample_Point_Name; 
}
private function changeHandler(event:Event):void
{
currentSlide = box.selectedLabel;
}
]]
/mx:Script

mx:HTTPService id=service
url=Define_Sample_Points.php?method=FindAll
result=SPresultHandler(event)/
  
mx:ComboBox id=box dataProvider={samplepoint}
labelFunction=getListLabel
change=changeHandler(event) x=52 y=27
/mx:ComboBox


mx:Text id=lbl text={box.selectedItem.Test_Kit_Used} /


/mx:Application



[flexcoders] Air NativeWindow in StageScaleMode.SHOW_ALL

2008-07-30 Thread george_w_canada
My project includes a main AIR window and another presentation window
to be displayed in a second large monitor. I have to use SHOW_ALL
scale mode to scale everything in that window but not layout for sure.

The problem is the presentation window is built with Flex
containers/components, in my short test, it scaled, but quite buggy. I
know Alex has discussed about this for Flex in browsers, but there's
somewhere else to adjust settings in html, but not Flex nativewindows
in AIR applications.

My experiments code as follow. Any help appriciated.

Thanks,
George

===
main.mxml:


?xml version=1.0 encoding=utf-8?
mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute applicationComplete=this.init()
mx:Script
![CDATA[
import mx.core.Application;
private var subWindow:PresentationWindow = null;

private function init():void
{
}

private function openNewWindow():void
{
if(!this.subWindow){
this.subWindow = new 
PresentationWindow();
this.subWindow.open();
} else {
this.subWindow.open();
}
}

private function maxNewWindow():void
{
if(this.subWindow){
//this.subWindow.maximize();
this.subWindow.test();
}
}

]]
/mx:Script
mx:Button x=165 y=105 label=open presentation window
click=this.openNewWindow()/
mx:Label x=165 y=135 text=Drag presentation window to second
monitor/
mx:Button x=165 y=189 label=maximize new window
click=this.maxNewWindow()/
/mx:WindowedApplication


PresentationWindow.mxml


?xml version=1.0 encoding=utf-8?
mx:Window xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
width=443 height=265 alwaysInFront=true title=Presentation
Window showFlexChrome=false type={NativeWindowType.NORMAL}
mx:Script
![CDATA[

public function test():void
{
this.maximize();
this.stage.scaleMode = StageScaleMode.SHOW_ALL;
/*
trace(this.stage.fullScreenWidth+ ' '+ 
this.stage.fullScreenHeight);
trace(this.x + ' '+ this.y);
trace(this.width + ' '+ this.height);
var tx:Number = this.x;
var ty:Number = this.y;
var tw:Number = this.width;
var th:Number = this.height;
this.stage.displayState = StageDisplayState.NORMAL;
this.x = tx;
this.y = 0;
this.width = tw;
this.height = th;*/
}
]]
/mx:Script
mx:Button label=Presentation Window left=10 top=10 width=148/
/mx:Window




[flexcoders] adding mouse events to annotation items in a chart

2008-07-30 Thread blc187
Using annotations in a chart, creating a few labels and assigning them 
to the annotation property of my line chart.

var annotations:Array = new Array();
var lbl:Label = new Label();
lbl.text = annotation;
annotations.push(lbl);
myChart.annotationElements = annotations;

If I try to listen to mouse events on these annotations, they never 
come through, maybe the chart is swallowing them?
I'd like to be able to add a CLICK listener to tell when I am clicking 
on the annotation label.
Any thoughts on how to do this?



[flexcoders] Enable drag and drop in Cartesian Data Canvas

2008-07-30 Thread Marcela
I read this:

 The data canvases have the following limitations:

* There is no drag-and-drop support for children of the data
canvases. 

Is is possible to manually enable the drag and drop feature on the
data canvas? or is there any major limitation?

Marcela



[flexcoders] Type Cast Error

2008-07-30 Thread donald_d_hook
I receive a type cast error when I try to cast an object I received
from the server (an arraycollection of value objects). I get the
following: 

TypeError: Error #1034: Type Coercion failed: cannot convert
com.spinnaker.model::[EMAIL PROTECTED] to com.spinnaker.model.StockVO

The actionscript object has the correct remoteClass.  On top of that,
this only happens the 2nd time into the page.  Not sure what is
happening behind the scenes, nor do I know what the @3b392b81 is.

Thanks in advance




[flexcoders] link report question

2008-07-30 Thread John Van Horn
Can someone explain where exactly the size and optimizedsize attributes
for a script in a link report come from? The sum of optimizedsize for all
nodes in a link report always seems to be way more than the file size of the
swf.

-- 
John Van Horn
[EMAIL PROTECTED]


[flexcoders] Re: ViewStack and Combobox

2008-07-30 Thread cox.blair
For any other newbie looking for the answer;

myViewStack.selectedChild =
Container(myViewStack.getChildByName(treeMenu.itemToLabel(treeMenu.selectedItem)));

Modify to your usage.



[flexcoders] Re: adding mouse events to annotation items in a chart

2008-07-30 Thread Tim Hoff

Just add an event listener to the label; before you push it to the
array:

var annotations:Array = new Array();

var lbl:Label = new Label();
lbl.text = annotation;
lbl.addEventListener(MouseEvent.CLICK,onAnnotationClick);
annotations.push(lbl);
myChart.annotationElements = annotations;

private function onAnnotationClick(event:MouseEvent) : void
{
 Alert.show(I got clicked);
}

-TH

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

 Using annotations in a chart, creating a few labels and assigning them
 to the annotation property of my line chart.

 var annotations:Array = new Array();
 var lbl:Label = new Label();
 lbl.text = annotation;
 annotations.push(lbl);
 myChart.annotationElements = annotations;

 If I try to listen to mouse events on these annotations, they never
 come through, maybe the chart is swallowing them?
 I'd like to be able to add a CLICK listener to tell when I am clicking
 on the annotation label.
 Any thoughts on how to do this?





[flexcoders] Re: adding mouse events to annotation items in a chart

2008-07-30 Thread blc187
The question is not how to add a listener, that was obviously the 
first thing I tried.

The problem is that the chart itself gets click events, not the 
annotations.
So when I add the listener you suggest to the annotation itself, it 
never fires.

So, either listen to the CLICK event on the chart and decifer if it 
is clicking on something specific within the chart, or find another 
way to listen on an annotation item.



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

 
 Just add an event listener to the label; before you push it to the
 array:
 
 var annotations:Array = new Array();
 
 var lbl:Label = new Label();
 lbl.text = annotation;
 lbl.addEventListener(MouseEvent.CLICK,onAnnotationClick);
 annotations.push(lbl);
 myChart.annotationElements = annotations;
 
 private function onAnnotationClick(event:MouseEvent) : void
 {
  Alert.show(I got clicked);
 }
 
 -TH
 
 --- In flexcoders@yahoogroups.com, blc187 blc187@ wrote:
 
  Using annotations in a chart, creating a few labels and assigning 
them
  to the annotation property of my line chart.
 
  var annotations:Array = new Array();
  var lbl:Label = new Label();
  lbl.text = annotation;
  annotations.push(lbl);
  myChart.annotationElements = annotations;
 
  If I try to listen to mouse events on these annotations, they 
never
  come through, maybe the chart is swallowing them?
  I'd like to be able to add a CLICK listener to tell when I am 
clicking
  on the annotation label.
  Any thoughts on how to do this?
 





[flexcoders] Re: Programmatically select items in AdvancedDataGrid

2008-07-30 Thread whatabrain
I tried your suggestion (using selectedItems, since selectedIndices 
is all but meaningless in a tree-view AdvancedDataGrid). Now the 
problem is even stranger. I add a bunch of items from the 
dataProvider into a new array. Then I assign the array to 
selectedItems. By the next line of code, selectedItems is down to 
just the clicked item, and the first item that was programmatically 
selected.


// On click of a top-level item:
private function onGridClick(event:ListEvent):void
{
...
var items:Array = new Array();

// Preserve currently clicked items
for (var idx:int=0; idxgrid.selectedItems.length; idx++)
items.push(grid.selectedItems[x]);

// Add all of the clicked item's children to the list
var children:ArrayCollection = gridData[clickedItemIdx].children;
for (idx=0; idxchildren.length; idx++)
{
items.push(children[x]);
}

// Overwrite selectedItems
grid.selectedItems = items;

// BUG: At this point, both grid.selectedItems and items contain 
// only two elements: the clicked item, and the first of the item's 
// children.

}



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

 adg.selectedItems and adg.selectedIndices are arrays.
 
 selectedItems is an array of objects from adg's dataProvider taht 
are currently selected, 
 and it is a read/write property.
 selectedINdices otoh is an array of ints with indices for those 
same objects in 
 selectedItems.
 
 so, to make it simple, if you want to select rows 2,4,6 you'd do 
something like:
 var mySelection:Array = [2,4,6];
 adg.selectedINdices = mySelection;
 
 hth
 julio
 
 --- In flexcoders@yahoogroups.com, whatabrain junk1@ wrote:
 
  Sorry. I missed a detail... I tried to do:
grid.selectedItems.push(o).
  It did not cause the item to be selected.
  
  
  --- In flexcoders@yahoogroups.com, fourctv fourctv@ wrote:
  
   You have 2 options, set either adg.selectedItems or 
  adg.selectedIndices.
   
   --- In flexcoders@yahoogroups.com, whatabrain junk1@ wrote:
   
Another old question, I'm sure, but I can't find an answer 
  anywhere on 
the web.

How do I cause a row to be selected in an AdvancedDataGrid? 
  Basically, 
when a top-level element is clicked, I want all of its child 
  elements 
to be selected.
   
  
 





[flexcoders] Re: Programmatically select items in AdvancedDataGrid

2008-07-30 Thread whatabrain
Oops. I used grid.selectedItems[x] instead of
grid.selectedItems[idx]. I don't know why x exists.

So the conclusion is: Overwriting selectedItems works. Pushing 
elements onto selectedItems does not.


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

 I tried your suggestion (using selectedItems, since selectedIndices 
 is all but meaningless in a tree-view AdvancedDataGrid). Now the 
 problem is even stranger. I add a bunch of items from the 
 dataProvider into a new array. Then I assign the array to 
 selectedItems. By the next line of code, selectedItems is down to 
 just the clicked item, and the first item that was programmatically 
 selected.
 
 
 // On click of a top-level item:
 private function onGridClick(event:ListEvent):void
 {
 ...
 var items:Array = new Array();
 
 // Preserve currently clicked items
 for (var idx:int=0; idxgrid.selectedItems.length; idx++)
 items.push(grid.selectedItems[x]);
 
 // Add all of the clicked item's children to the list
 var children:ArrayCollection = gridData[clickedItemIdx].children;
 for (idx=0; idxchildren.length; idx++)
 {
 items.push(children[x]);
 }
 
 // Overwrite selectedItems
 grid.selectedItems = items;
 
 // BUG: At this point, both grid.selectedItems and items 
contain 
 // only two elements: the clicked item, and the first of the item's 
 // children.
 
 }
 
 
 
 --- In flexcoders@yahoogroups.com, fourctv fourctv@ wrote:
 
  adg.selectedItems and adg.selectedIndices are arrays.
  
  selectedItems is an array of objects from adg's dataProvider taht 
 are currently selected, 
  and it is a read/write property.
  selectedINdices otoh is an array of ints with indices for those 
 same objects in 
  selectedItems.
  
  so, to make it simple, if you want to select rows 2,4,6 you'd do 
 something like:
  var mySelection:Array = [2,4,6];
  adg.selectedINdices = mySelection;
  
  hth
  julio
  
  --- In flexcoders@yahoogroups.com, whatabrain junk1@ wrote:
  
   Sorry. I missed a detail... I tried to do:
 grid.selectedItems.push(o).
   It did not cause the item to be selected.
   
   
   --- In flexcoders@yahoogroups.com, fourctv fourctv@ wrote:
   
You have 2 options, set either adg.selectedItems or 
   adg.selectedIndices.

--- In flexcoders@yahoogroups.com, whatabrain junk1@ 
wrote:

 Another old question, I'm sure, but I can't find an answer 
   anywhere on 
 the web.
 
 How do I cause a row to be selected in an AdvancedDataGrid? 
   Basically, 
 when a top-level element is clicked, I want all of its 
child 
   elements 
 to be selected.

   
  
 





Re: [flexcoders] dynamic remote objects

2008-07-30 Thread Sid Maskit
ActionScript has two RemoteObject classes. The compiler is telling you that it 
does not know which of them you want to use when you say 'var 
service:RemoteObject = new RemoteObject(ColdFusion);'. From the looks of the 
error message, I would guess that you have a RemoteObject tag in your MXML, or 
that you are otherwise importing the mx.rpc.remoting.mxml:RemoteObject class.

You either need to remove whatever tag or script that is using the MXML version 
of RemoteObject, or you need to fully qualify the class name in your statement, 
something like this:

var service:mx.rpc.remoting.RemoteObject = new 
mx.rpc.remoting.RemoteObject(ColdFusion);'

Hope that helps,

Sid



- Original Message 
From: Dan Vega [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 30, 2008 9:29:54 AM
Subject: Re: [flexcoders] dynamic remote objects


Ok, I figured out what I was doing wrong but I am still getting an error. I 
think this is the right way to use remote object in AS3 

import mx.rpc.remoting. RemoteObject;
import mx.rpc.remoting. Operation;

// setup the remote method
var service:RemoteObjec t = new 
RemoteObject(ColdFusion);
service.source = component.text;
// the method needs to know about the remote object
var operation:Operation = new Operation(service) ;
operation.name = method.selectedItem .NAME;
operation.addEventL istener(ResultEv ent.RESULT, 
loadGridData) ;
operation.send( );

But I am still getting this error and I am  not sure why? 


Can not resolve a multiname reference unambiguously. mx.rpc.remoting. 
mxml:RemoteObjec t (from C:\Program Files\Adobe\ Flex Builder 3\sdks\3.0.0\ 
frameworks\ libs\rpc. swc(mx/rpc/ remoting/ mxml/RemoteObjec t)) and 
mx.rpc.remoting: RemoteObject (from C:\Program Files\Adobe\ Flex Builder 
3\sdks\3.0.0\ frameworks\ libs\rpc. swc(mx/rpc/ remoting/ RemoteObject) ) are 
available.RemoteObject/ srcMain.mxmlUnknown12174353413651308


Thank You
Dan Vega


On Wed, Jul 30, 2008 at 11:46 AM, Tom Chiverton tom.chiverton@ halliwells. 
com wrote:

On Wednesday 30 Jul 2008, Dan Vega wrote:
 I have a remote object that is very dynamic.The user is actually selecting
 the source of the component and the method name.

Send the component name, method and arguments list to a generic service method
that does the invoke for you.
And be sure to check that the object name and method are at least members of a
list you expect to receive, or you risk creating a security problem.

--
Tom Chiverton

 * * * * 

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 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  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 Solicitors Regulation Authority.

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

For more information about Halliwells LLP visit www.halliwells. com.

 - - --


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

   http://groups. yahoo.com/ group/flexcoders /







  

Re: [flexcoders] Adjacent mx:Label controls and spacing between them?

2008-07-30 Thread Flex Frenzy
Must be internal, you will see that -6 for most all of the rendered  
items.


Jeremy
On Jul 30, 2008, at 9:41 AM, Chris W. Rea wrote:


Hi Jeremy. Thanks! That did the trick. Brilliant - I hadn't thought
about a negative gap as I was thinking *inside* the box. :-) I
expected there would be a positive-valued property or style that I
would zero out. I'd love to know what that -6 is compensating for,
though. There is clearly additional padding for the rendering of the
Label that is not represented by paddingLeft, paddingRight... an
internal implementation detail?

Anyway, thank you!

Regards,

Chris W. Rea
[EMAIL PROTECTED]

On Wed, Jul 30, 2008 at 10:18 AM, Flex Frenzy  
[EMAIL PROTECTED] wrote:

 Hey Chris, welcome!
 The easiest solution would be to change the HBox spacing to -6,  
and add the

 spaces in the text, like so:
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;  
layout=absolute

 mx:Script
 ![CDATA[
 [Bindable]
 public var firstNumber:int = 42;
 [Bindable]
 public var secondNumber:int = 99;
 ]]
 /mx:Script
 mx:HBox horizontalGap=-6
 mx:Label text=The first number is  paddingRight=0 /
 mx:Label text={firstNumber} paddingLeft=0 paddingRight=0 /
 mx:Label text= and the second number is  paddingLeft=0  
paddingRight=0

 /
 mx:Label text={secondNumber} paddingLeft=0 paddingRight=0 /
 mx:Label text=. paddingLeft=0 /
 /mx:HBox
 /mx:Application

 On Jul 30, 2008, at 7:08 AM, Chris W. Rea wrote:

 Hi flexcoders. This is my first post, so hello! I'm relatively new
 to Flex, and I am using Flex Builder 3.

 I'm trying to lay out some text with Label controls, and this  
issue is

 confusing me. Basically, I want to display a string such as The
 first number is 42 and the second number is 99. The numbers
 themselves vary and areto be conditionally styled. In fact, the
 values are to be controlled by two sliders, and I want an effect  
such

 that when the slider is dragged, the numbers change colour until the
 slider is released.

 I had originally laid out the text using a single mx:Label control  
and

 setting htmlText within the string to:
 mx:Label htmlText=The first number is {firstNumber} and the second
 number is {secondNumber}./

 However, I'd like more control over the styling of those bound
 numbers, individually. So, I am attempting to factor the string into
 multiple Label controls (as in the snippet below.)

 However, I can't seem to get the space between the last number and  
the

 period to disappear. I thought by setting the HBox horizontalGap to
 zero and each Label's paddingLeft and paddingRight to zero that  
there

 should be no such space, but that's not the case. I imagine I am
 misunderstanding how the label widths are calculated and being
 rendered, and overlooking something obvious.

 So, is there a way to make the adjacent mx:Labels render similar to
 the single mx:Label above? Or, is there a better way to accomplish
 what I want as I described above? Thank you.

 --- 8 code follows 8 ---

 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;  
layout=absolute

 mx:Script
 ![CDATA[
 [Bindable]
 public var firstNumber:int = 42;
 [Bindable]
 public var secondNumber:int = 99;
 ]]
 /mx:Script
 mx:HBox horizontalGap=0
 mx:Label text=The first number is paddingRight=0 /
 mx:Label text={firstNumber} paddingLeft=0 paddingRight=0 /
 mx:Label text=and the second number is  paddingLeft=0  
paddingRight=0

 /
 mx:Label text={secondNumber} paddingLeft=0 paddingRight=0 /
 mx:Label text=. paddingLeft=0 /
 /mx:HBox
 /mx:Application

 --- 8 end code 8 ---

 Regards,

 Chris W. Rea
 [EMAIL PROTECTED]

[...]






[flexcoders] Re: LineChart Legend

2008-07-30 Thread kamelkev
I am having this same exact issue with PieCharts in Flex3.

I utilized the fillFunction callback for PieCharts in order to customize the 
colors - the adobe 
documentation even indicates that this is the appropriate use of this 
callback... however once 
you play with the coloring the legend doesn't seem to receive notification that 
the original 
coloring changed.

Do I need to invalidate something? I have tried calling all sorts of random 
methods as the 
documentation doesn't seem to address this specific issue.

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

 When a line chart series stroke color is bound using a binding
 element, and the color is changed through the binding, shouldn't the
 legend reflect the color change? Or must I do that manually. If so,
 that's a real pain in the butt.






[flexcoders] Catch Browser Exit with Flex

2008-07-30 Thread gjessup1
I'm having some issues with catching a browser exit with firefox. I
can get it to work with IE (not exactly how I'd like, but it works).
Does anyone have a good working example available...here is my code if
you can help from that.
Thanks

Greg

My javascript looks like this:
script language=JavaScript type=text/javascript
!--
alert (This is a Javascript Alert); //just a message which will be
removed

// Give user a chance to save modified data
window.onbeforeunload = function() {
var warning=;
var fxControl = document.SharedObjectBoard || window.SharedObjectBoard;
 if (!${application}.unsavedAlert())
 {
warning = fxControl.getUnsavedDataWarning();
 }

if (typeof fxControl.getUnsavedDataWarning==function) {
warning = fxControl.getUnsavedDataWarning();
}
if (warning!=)

return warning;
else

return;
}
 --
/script


in my init I have ---

if ( ExternalInterface.available ) {

ExternalInterface.addCallback(getUnsavedDataWarning,unsavedAlert);


Here are the functions triggered:

  private function unsavedAlert():String {
   Alert.show(Do you want to dave?, Save Alert,
Alert.YES|Alert.NO ,this,SaveAlertHandler,null,Alert.YES);
//Alert.show(function);
if (commitRequired) return 
UNSAVED_DATA_WARNING;
else return ;
  }
  
  private function SaveAlertHandler(e:Event):void {
   
Alert.show( e.type.toString());
  }
}




[flexcoders] Text components of Gumbo

2008-07-30 Thread haykelbj
Hi,

I'm developing a flex app that should support displaying and editing
arabic text. So I'm exploring Gumbo and the new Astro text engine and
I'm willing to test and debug these features extensively!

Any hints where to start?

What I tried till now is to test the TextBox, TextArea, TextInput and
TextView components. I can set visual text properties (alignment, font
size etc.) on a TextView and TextBox, but I can only set text
direction (ie. 'rtl') on a TextView. On TextArea and TextInput I can
set none of these properties!

Also I think the new text engine support a markup language, is this
right (XFL?, FXG?). If yes is there a document about it?

I'm using Gumbo from SVN and I'm updating daily!

Thanx,
Haykel




[flexcoders] ViewStack, Combobox Dataprovider

2008-07-30 Thread cox.blair
Here is my situation,

I have a combobox and a viewstack. The combobox's dataProvider is XML
generated by a php script retrieving information from a db.

The database has two primary entries. The first is a location, the
second is a type of test performed. These are inputed by the user
elsewhere in the application. When the user views the combobox, they
see the list of site entries.

Upon selecting the a site, the viewstack should change to show the
related test information. Should be pretty straight forward. The
problem comes when I want to pass the string value of the test to
viewstack - they have the same names.

As a test of the viewstack, this works fine:
dataProvider={viewstackTestKits.getChildren()}
change={viewstackTestKits.selectedChild=event.currentTarget.selectedItem}

But I want something like this:
change=viewstackTestKits.selectedChild=box.selectedItem.Test_Kit_Used


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
creationComplete=service.send()

mx:Script
![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;


[Bindable]
private var samplepoint:ArrayCollection

[Bindable]
private var currentSlide:Object;

private function SPresultHandler(event:ResultEvent):void
{
samplepoint = event.result.response.data.row;
}

private function getListLabel(item:Object):String
{   
return item.Sample_Point_Name; 
}
private function changeHandler(event:Event):void
{
currentSlide = box.selectedLabel;
}
]]
/mx:Script

mx:HTTPService id=service
url=Define_Sample_Points.php?method=FindAll
result=SPresultHandler(event)/
  
mx:ComboBox id=box dataProvider={samplepoint}
labelFunction=getListLabel
change=changeHandler(event) x=52 y=27
/mx:ComboBox


mx:Text id=lbl text={box.selectedItem.Test_Kit_Used} /


/mx:Application



[flexcoders] Re: Specifying pie chart fill based on data set

2008-07-30 Thread kamelkev

I think we have the same problem - I posted here:

http://tech.groups.yahoo.com/group/flexcoders/message/120610

No reply yet, but at this point I think that we will need to build our own 
dataset in code via 
the PieSeries object and assign that to our chart - otherwise your legend will 
have the 
wrong color (I got far enough to find worse problems :/)


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

 Is there any way to override how the fill color is determined for a
 PieSeries? I would like to use specific colors based on the data. For
 example, I have a series of data like this
 
 monday, 30
 tuesday, 20
 wednesday, 20
 thursday, 20
 monday, 10
 sunday, 5
 
 I would like to make sure both items with the label monday have the
 same color. I don't want them grouped together; I need to maintain the
 proper order of the data. Any suggestions?
 
 Thanks






[flexcoders] Can we subclass Application yet?

2008-07-30 Thread chigwell23
As far as I can tell the Flex2 problems with subclassing Application
still exist in Flex3 i.e. bye-bye mxml components on parent class? Is
this correct and has anybody worked around this? TIA,

Mic.



[flexcoders] Form Processing in Flex

2008-07-30 Thread brucewhealton
Hello all,
   I think I wasn't clear when I discussed something related to
this previously in a posting.  I see some very useful and elegant
tools for creating form elements using Flex.  When designing in xhtml,
using Dreamweaver, I call the form processor from the opening form
tag, which calls a php file - that's I have been using, mainly for
form processing.  It returns the values entered.
  I'm not clear how this would work in Flex.  Everything in the
Flex application is compiled.  So, how do you access the content
entered by the user that comes to the form?  Can someone explain how
this works, please?  Does this require a certain type of form processor?
Thanks,
Bruce



[flexcoders] Datagrid filterfunction results

2008-07-30 Thread Don Kerr
I have a dataProvider feeding a dataGrid. I have a filterFunction that
filters the DP down to a subset of the dataProvider. I reference the
dataProvider , myDG.dataProvider. But, how do I reference just the
filtered down data? myDG.dataProvider gives me all data, not filtered
data.

Having trouble finding the property where the filterFunction result
set is stored. I'm hoping it lives in an ArrayCollection somewhere
already. If not, how would I build an ArrayCollection of the results
as it filter all items?

I want to pass just the filtered down data to another component.

Thanks,
Don

Below is an example of one of my filters:

public function processFilter(item:Object):Boolean
{
var result:Boolean=false;

//make sure there is a search term
if(term.text != null  term.text.length  0)
{ 
//get the search term as upper case
var searchTerm:String = term.text.toUpperCase();
//check against the title
if(item.crNumber != null  item.title.length  0)
{
result = (item.crNumber.toUpperCase().indexOf(searchTerm) != -1);
}
//no need to check doc number if title already matched or if there is
no docNumber
if(result == false  item.docNumber != null  item.docNumber.length  0)
{
result = (item.docNumber.toUpperCase().indexOf(searchTerm) != -1);
}
if(result == false  item.title != null  item.title.length  0)
{
result = (item.title.toUpperCase().indexOf(searchTerm) != -1);
}
}
return result;
}



RE: [flexcoders] Text components of Gumbo

2008-07-30 Thread Gordon Smith
Hi, Haykel.

 

In current builds of Gumbo, you can set all FXG text attributes (plus
verticalAlign) on what we consider the Gumbo text primitives: TextBox,
TextGraphic, and TextView. You have to currently set them as properties,
not CSS styles; support for CSS will come later, probably within a month
or two.

 

Higher-level components like the Gumbo Button, TextInput, TextArea, etc.
do not yet support setting text attributes. You have to work on the
primitive in their skin. This will be fixed in the same time frame.

 

Astro's text engine is known as FTE (Flash Text Engine). It does not
support a markup language. TCAL, the Text Component ActionScript
Library, which implemented in the three text_xxx SWCs, adds support for
a markup language which is a superset of FXG. I'm not sure whether we
have published the spec for FXG or not yet. (Do you know?) I don't think
we have a spec for the superset that TCAL supports, but you can see
TCAL's API by looking at the ASDoc for the text.* packages in the Gumbo
ASDoc at http://livedocs.adobe.com/flex/gumbo/langref/.

 

I'm happy to hear that you're interested in Gumbo's text features. I'm
the engineer who is integrating FTE and TCAL into the Flex framework.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of haykelbj
Sent: Wednesday, July 30, 2008 11:30 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Text components of Gumbo

 

Hi,

I'm developing a flex app that should support displaying and editing
arabic text. So I'm exploring Gumbo and the new Astro text engine and
I'm willing to test and debug these features extensively!

Any hints where to start?

What I tried till now is to test the TextBox, TextArea, TextInput and
TextView components. I can set visual text properties (alignment, font
size etc.) on a TextView and TextBox, but I can only set text
direction (ie. 'rtl') on a TextView. On TextArea and TextInput I can
set none of these properties!

Also I think the new text engine support a markup language, is this
right (XFL?, FXG?). If yes is there a document about it?

I'm using Gumbo from SVN and I'm updating daily!

Thanx,
Haykel

 



[flexcoders] Re: adding mouse events to annotation items in a chart

2008-07-30 Thread Tim Hoff

hmm, worked for me.  But, I wasn't using the chart's itemClick event. 
In theory, you could listen for mouse over on the label and set the
chart's mouse enabled to false (vise-versa on mouse out).

-TH

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

 The question is not how to add a listener, that was obviously the
 first thing I tried.

 The problem is that the chart itself gets click events, not the
 annotations.
 So when I add the listener you suggest to the annotation itself, it
 never fires.

 So, either listen to the CLICK event on the chart and decifer if it
 is clicking on something specific within the chart, or find another
 way to listen on an annotation item.



 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
 
  Just add an event listener to the label; before you push it to the
  array:
 
  var annotations:Array = new Array();
 
  var lbl:Label = new Label();
  lbl.text = annotation;
  lbl.addEventListener(MouseEvent.CLICK,onAnnotationClick);
  annotations.push(lbl);
  myChart.annotationElements = annotations;
 
  private function onAnnotationClick(event:MouseEvent) : void
  {
  Alert.show(I got clicked);
  }
 
  -TH
 
  --- In flexcoders@yahoogroups.com, blc187 blc187@ wrote:
  
   Using annotations in a chart, creating a few labels and assigning
 them
   to the annotation property of my line chart.
  
   var annotations:Array = new Array();
   var lbl:Label = new Label();
   lbl.text = annotation;
   annotations.push(lbl);
   myChart.annotationElements = annotations;
  
   If I try to listen to mouse events on these annotations, they
 never
   come through, maybe the chart is swallowing them?
   I'd like to be able to add a CLICK listener to tell when I am
 clicking
   on the annotation label.
   Any thoughts on how to do this?
  
 






[flexcoders] Re: adding mouse events to annotation items in a chart

2008-07-30 Thread Tim Hoff

Sorry, meant to say the chart series's mousEnabled = false/true;

-TH

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


 hmm, worked for me. But, I wasn't using the chart's itemClick event.
 In theory, you could listen for mouse over on the label and set the
 chart's mouse enabled to false (vise-versa on mouse out).

 -TH

 --- In flexcoders@yahoogroups.com, blc187 blc187@ wrote:
 
  The question is not how to add a listener, that was obviously the
  first thing I tried.
 
  The problem is that the chart itself gets click events, not the
  annotations.
  So when I add the listener you suggest to the annotation itself, it
  never fires.
 
  So, either listen to the CLICK event on the chart and decifer if it
  is clicking on something specific within the chart, or find another
  way to listen on an annotation item.
 
 
 
  --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
  
  
   Just add an event listener to the label; before you push it to the
   array:
  
   var annotations:Array = new Array();
  
   var lbl:Label = new Label();
   lbl.text = annotation;
   lbl.addEventListener(MouseEvent.CLICK,onAnnotationClick);
   annotations.push(lbl);
   myChart.annotationElements = annotations;
  
   private function onAnnotationClick(event:MouseEvent) : void
   {
   Alert.show(I got clicked);
   }
  
   -TH
  
   --- In flexcoders@yahoogroups.com, blc187 blc187@ wrote:
   
Using annotations in a chart, creating a few labels and
assigning
  them
to the annotation property of my line chart.
   
var annotations:Array = new Array();
var lbl:Label = new Label();
lbl.text = annotation;
annotations.push(lbl);
myChart.annotationElements = annotations;
   
If I try to listen to mouse events on these annotations, they
  never
come through, maybe the chart is swallowing them?
I'd like to be able to add a CLICK listener to tell when I am
  clicking
on the annotation label.
Any thoughts on how to do this?
   
  
 






[flexcoders] Re: disable all controls on stage

2008-07-30 Thread Laurent
The best way would probably be to set Application.application.enabled
= false; since it should also disable the children components of the app.

If it doesn't work, you can loop through all the components using a
recursive function. For example:


function recursiveDisable(component) {
   for (var i = 0; i  component.numChildren; i++) {
  recursiveDisable(component.getChildAt(i));
   }
   component.enabled = false;
}

recursiveDisable(Application.application);




--- In flexcoders@yahoogroups.com, Claudio M. E. Bastos Iorio
[EMAIL PROTECTED] wrote:

 I'm trying to access all controls in stage, to disable them (error
occurred
 in app - disable all controls). 
 
 I'd like to have access to some kind of collection to iterate trough,
 something like:
 
  
 
 Foreach (var mycontrol:Control in CollectionofObjects){
 
 Mycontrol.enabled = false;
 
 }
 
  
 
 Any idea?
 
  
 
 
 
 Claudio M. E. Bastos Iorio
 
  http://www.blumer.com.ar/ http://www.blumer.com.ar





[flexcoders] Re: Flex MDI and View States Error

2008-07-30 Thread Faisal Abid

HEy thanks that worked, I was using Addchild because of this post
http://www.returnundefined.com/2008/03/flexmdi-sans-mxml-2

thanks it worked.


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

 Hi Faisal,
 
 I think the problem is in the way you are adding the window. Since you
 are just using addChild(), the window is never assigned a
 windowManager and I think that is what is null. If you say
 mdic.windowManager.add( window ), it will addChild() for you and also
 set the windowManager property correctly. Try that and I think you
 will be all set.
 
 That said, I think its completely reasonable to expect things to work
 the way you had them coded. I am going to look at overriding
 addChild() in MDICanvas to support that workflow so look for that in a
 future release.
 
 Thanks,
 Ben
 
 
 
 --- In flexcoders@yahoogroups.com, Faisal Abid flex_abid@ wrote:
 
  I have an application where the FlexMDI windows are being created
  dynamicly via actionscript however the MDICanvas is being created on
  inital application creation. When i make the state go to another state
  other then the default and try to add an mdiwindow, it adds fine
  however when you click on it it gives errors about titlebar being
  pressed and bringtofrontproxy . here is the basic code.
  
  btw im using the latest flexlib build (downloaded it today) , i tried
  this with the old flexmdi build also , same problem. 
  
  // on second state call create widgetfunction
  private function createWidgets():void{
  this.mdic.effects = new MDIVistaEffects
   var widgetWindow:MDIWindow = new MDIWindow();
   widgetWindow.title = Your Live Widgets;
  widgetWindow.width = 400;
  widgetWindow.height = 400;
  this.mdic.addChild(widgetWindow);
  }
  
  when i do that the window creates, but when i click on the window i
  get this error
  
  TypeError: Error #1009: Cannot access a property or method of a null
  object reference.
  at
 

flexmdi.containers::MDIWindow/onTitleBarPress()[/_projects/flexmdi/src/flexmdi/containers/MDIWindow.as:1406]
  
  and then this error right after
  
  ypeError: Error #1009: Cannot access a property or method of a null
  object reference.
  at
 

flexmdi.containers::MDIWindow/bringToFrontProxy()[/_projects/flexmdi/src/flexmdi/containers/MDIWindow.as:1316]
 





[flexcoders] Interesting problem: dynamically creating id's and later referencing them.

2008-07-30 Thread Thatcher
Hi Guys (and Girls),

Ok, so I have been fighting a couple of days to figure this out. 

In order to make a large and compliated form with drag and drop in of 
more form fields I want to dynamically add an id to an display 
object, and then be able to reference it later to get data out.

Somehow it only seems possible to find these objects by navigating 
trough the the displaylist, and I cannot assign any 'real' id to a 
newly created child.

The following example should illustrate what I want to do (it should 
run). You will find it quite imposssible to get the object by it's id 
(or uid). 

Why is that?? Is there any other way of referencing an object of 
which you do not know who his parent is?


Thank you in advance and greetings,
Thatcher



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

mx:Script
![CDATA[
import mx.controls.Text;

private function addMyChild():void {
var myChild:Text = new Text();
myChild.text = Hello World!!;
myChild.id = kid1;
myChild.name = kid1;
myChild.uid = kid1;
myPanel.addChild(myChild);
}

private function getMyChildById():void {
var childReference:Text = this[kid1] as Text;
trace (childReference);
}

private function getMyChildByName():void {
var childReference:Text = myPanel.getChildByName
(kid1) as Text;
trace (childReference);
}

]]
/mx:Script

mx:Button label=add my child click=addMyChild() /

mx:Panel id=myPanel/mx:Panel

mx:Button label=get my child by id click=getMyChildById() /
mx:Button label=get my child by name click=getMyChildByName() /


/mx:Application




[flexcoders] Re: Controlling slice colors within PieChart objects

2008-07-30 Thread kamelkev

After digging like crazy through the archive I can see that there have been a 
large number 
of questions related to this exact topic - I think that stems from people 
mostly not 
understanding the callback procedures involved.

For example I ultimately did discover the fillfunction callback for the 
piechart object, but I 
don't understand how that data gets propogated back to the legend. Right now 
the legend 
actually displays a different set of colors.

I found a (not quite as effective) alternate solution to my problem by just 
filling in an array 
with the colors I want in the order that I expect them - I then use that as the 
fill source for 
the chart after I populate it with data.

This creates the correct looking chart and legend, but ultimately colors are 
not explicitly 
bound to slice - there is a chance things can go wrong, so I'm still interested 
in the 
correct solution.

Also - does *anyone* know how to pull the PieSeries out of a PieChart. Once the 
chart is 
populated how do you pull out just the pieseries? If I had a get method for 
that data I 
could probably parse it and figure this whole thing out, but I don't have one 
so far :( 


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

 Hi,
 
   I'm sure someone has run into this before, but I search and search
 and find nothing that sounds right.
 
   I am creating an applet that loads a remote xml document containing
 the necessary data I want to render within the pie chart.
 
   I pass the labels, the value for the slice, along with a color -
 but it seems that the PieChart object and the related PieSeries object
 don't have the ability to save this data anywhere. Odd, but I
 figured I could just work around it.
 
   My idea was more or less to iterate through the object slices within
 the HTTPservice response method, populate the chart, perform an
 invalidate to force the chart to load. After I did this I want to
 iterate through each slice using getnextitem or something and (using
 the data from my xml) set the colors explicitely within the chart
 directly.
 
   This all sounded great this morning - but it's 8 hours later and I
 still haven't quite figured out how to do it. Am I chasing some
 impossible goal here? It's pretty important for me to explicitly bind
 specific colors to slice data so I see no way around this given the
 charting suite.
 
   Also while I'm asking, does anyone know of any open source flex
 charting tools? I went to a conference in Portland last week where
 some Adobe guys mentioned it... but I can't seem to find the url with
 google.
 
 thanks in advance
 
   Kevin Kamel






Re: [flexcoders] dynamic remote objects

2008-07-30 Thread Dan Vega
That makes total sense because I also have an mxml tag in the document.I
changed the code

// setup the remote method
var service:mx.rpc.remoting.RemoteObject = new
mx.rpc.remoting.RemoteObject();
service.destination = ColdFusion;
service.source = component.text;

// the method needs to know about the remote object
var operation:Operation = new Operation(service);
operation.name = method.selectedItem.NAME;

operation.addEventListener(ResultEvent.RESULT,loadGridData);
operation.send();

and it still gives me the same error.


Thank You
Dan Vega


On Wed, Jul 30, 2008 at 2:29 PM, Sid Maskit [EMAIL PROTECTED] wrote:

   ActionScript has two RemoteObject classes. The compiler is telling you
 that it does not know which of them you want to use when you say 'var
 service:RemoteObject = new RemoteObject(ColdFusion);'. From the looks of
 the error message, I would guess that you have a RemoteObject tag in your
 MXML, or that you are otherwise importing the
 mx.rpc.remoting.mxml:RemoteObject class.

 You either need to remove whatever tag or script that is using the MXML
 version of RemoteObject, or you need to fully qualify the class name in your
 statement, something like this:

 var service:mx.rpc.remoting.RemoteObject = new
 mx.rpc.remoting.RemoteObject(ColdFusion);'

 Hope that helps,

 Sid

 - Original Message 
 From: Dan Vega [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Wednesday, July 30, 2008 9:29:54 AM
 Subject: Re: [flexcoders] dynamic remote objects

  Ok, I figured out what I was doing wrong but I am still getting an error.
 I think this is the right way to use remote object in AS3

 import mx.rpc.remoting. RemoteObject;
 import mx.rpc.remoting. Operation;

 // setup the remote method
 var service:RemoteObjec t = new
 RemoteObject(ColdFusion);
 service.source = component.text;
 // the method needs to know about the remote object
 var operation:Operation = new Operation(service) ;
 operation.name = method.selectedItem 
 .NAMEhttp://method.selectedItem.NAME
 ;
 operation.addEventL istener(ResultEv ent.RESULT,
 loadGridData) ;
 operation.send( );

 But I am still getting this error and I am  not sure why?


 Can not resolve a multiname reference unambiguously. mx.rpc.remoting.
 mxml:RemoteObjec t (from C:\Program Files\Adobe\ Flex Builder 3\sdks\3.0.0\
 frameworks\ libs\rpc. swc(mx/rpc/ remoting/ mxml/RemoteObjec t)) and
 mx.rpc.remoting: RemoteObject (from C:\Program Files\Adobe\ Flex Builder
 3\sdks\3.0.0\ frameworks\ libs\rpc. swc(mx/rpc/ remoting/ RemoteObject) )
 are available.RemoteObject/ srcMain.mxmlUnknown
 12174353413651308


 Thank You
 Dan Vega

 On Wed, Jul 30, 2008 at 11:46 AM, Tom Chiverton tom.chiverton@
 halliwells. com [EMAIL PROTECTED] wrote:

 On Wednesday 30 Jul 2008, Dan Vega wrote:
  I have a remote object that is very dynamic.The user is actually
 selecting
  the source of the component and the method name.

 Send the component name, method and arguments list to a generic service
 method
 that does the invoke for you.
 And be sure to check that the object name and method are at least members
 of a
 list you expect to receive, or you risk creating a security problem.

 --
 Tom Chiverton

  * * * * 

 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 Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.
  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 Solicitors Regulation Authority.

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

 For more information about Halliwells LLP visit www.halliwells. 
 comhttp://www.halliwells.com
 .

  - - --

 --
 Flexcoders Mailing List
 FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder 
 sFAQ.txthttp://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail- archive.com/ 

Re: [flexcoders] Height Question

2008-07-30 Thread Richard Rodseth
I haven't thought about the dynamic adding to the extent Josh has, but
my initial reaction was it sounded like two VBoxes in an HBox.

On Tue, Jul 29, 2008 at 5:45 PM, Josh McDonald [EMAIL PROTECTED] wrote:
 What you're asking is doable, but you're definitinely going the wrong way
 about it. Put the two vboxes in a canvas that doesn't have its height set,
 and set the height on each vbox to 100%. Example:

 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute

 mx:Script
 ![CDATA[
 import mx.controls.Button;
 import mx.core.Container;

 private var buttonCount:Number = 2;

 private function addTo(container : Container) : void
 {
 var b : Button = new Button();
 b.label = Button  + ++buttonCount;
 container.addChild(b);
 }

 private function removeFrom(container : Container) : void
 {
 container.removeChildAt(container.numChildren - 1);
 }
 ]]
 /mx:Script

 mx:HBox top=5 horizontalCenter=0
 mx:Button label=Remove LHS click=removeFrom(lhs)/
 mx:Button label=Remove RHS click=removeFrom(rhs)/
 /mx:HBox

 mx:Canvas borderColor=green borderThickness=3 borderStyle=solid

 mx:VBox width=100 id=lhs borderColor=blue borderThickness=3
 borderStyle=solid height=100%
 mx:Button label=Button 1 click=addTo(lhs)/
 /mx:VBox

 mx:VBox width=100 left=110 id=rhs borderColor=red
 borderThickness=3 borderStyle=solid height=100%
 mx:Button label=Button 2 click=addTo(rhs)/
 /mx:VBox

 /mx:Canvas

 /mx:Application


 On Wed, Jul 30, 2008 at 10:21 AM, tchredeemed [EMAIL PROTECTED] wrote:

 Ok, I have two VBoxes, side by side, that need to both be the height
 of the biggest of the two (children added dynamically on show).

 I do it this way:
 leftVBox.minHeight = rightVBox.height;
 rightVBox.minHeight = leftVBox.height;

 (if this is a stupid way to do it, let me know).

 The problem is this.

 When I add the children, and switch view states, I remove the children.

 If I come back to that page, and add a different set of children, I
 only want them to be the biggest they have to be, but I cannot get
 them to resize back down to the right height, they hold the height of
 the biggest set of children that has been added since launch time.

 Any ideas?


 

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






 --
 Therefore, send not to know For whom the bell tolls. It tolls for thee.

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


[flexcoders] Re: LineChart Legend

2008-07-30 Thread George
--- In flexcoders@yahoogroups.com, kamelkev [EMAIL PROTECTED] wrote:

 I am having this same exact issue with PieCharts in Flex3.
 
 I utilized the fillFunction callback for PieCharts in order to
customize the colors - the adobe 
 documentation even indicates that this is the appropriate use of
this callback... however once 
 you play with the coloring the legend doesn't seem to receive
notification that the original 
 coloring changed.
 
 Do I need to invalidate something? I have tried calling all sorts of
random methods as the 
 documentation doesn't seem to address this specific issue.
 

I finally figured it out. You use a change watcher on the variables
which define the stroke colors for the chart. When these change, the
changewatcher is fired. In the handler, you call
chart.legendDataChanged(); This will tell the legend to update it's
colors from the chart series. I don't think that you should have to do
that, but you do. I consider it either a design flaw, or a bug.



RE: [flexcoders] Datagrid filterfunction results

2008-07-30 Thread Alex Harui
toArray()

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Don Kerr
Sent: Wednesday, July 30, 2008 11:57 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datagrid filterfunction results

 

I have a dataProvider feeding a dataGrid. I have a filterFunction that
filters the DP down to a subset of the dataProvider. I reference the
dataProvider , myDG.dataProvider. But, how do I reference just the
filtered down data? myDG.dataProvider gives me all data, not filtered
data.

Having trouble finding the property where the filterFunction result
set is stored. I'm hoping it lives in an ArrayCollection somewhere
already. If not, how would I build an ArrayCollection of the results
as it filter all items?

I want to pass just the filtered down data to another component.

Thanks,
Don

Below is an example of one of my filters:

public function processFilter(item:Object):Boolean
{
var result:Boolean=false;

//make sure there is a search term
if(term.text != null  term.text.length  0)
{ 
//get the search term as upper case
var searchTerm:String = term.text.toUpperCase();
//check against the title
if(item.crNumber != null  item.title.length  0)
{
result = (item.crNumber.toUpperCase().indexOf(searchTerm) != -1);
}
//no need to check doc number if title already matched or if there is
no docNumber
if(result == false  item.docNumber != null  item.docNumber.length 
0)
{
result = (item.docNumber.toUpperCase().indexOf(searchTerm) != -1);
}
if(result == false  item.title != null  item.title.length  0)
{
result = (item.title.toUpperCase().indexOf(searchTerm) != -1);
}
}
return result;
}

 



RE: [flexcoders] DataGridColumn issue: Passing an array.

2008-07-30 Thread Alex Harui
Already posted, already answered

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Manu Dhanda
Sent: Monday, July 28, 2008 3:41 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] DataGridColumn issue: Passing an array.

 


Hii Guyz,

The problem is:
I am passing an array of weekdays as datafield for a DataGridColumn as
follows:

mx:DataGridColumn dataField=days headerText=S 
itemRenderer=customRenderer/
mx:DataGridColumn dataField=days headerText=M 
itemRenderer=customRenderer/
mx:DataGridColumn dataField=days headerText=T 
itemRenderer=customRenderer/
mx:DataGridColumn dataField=days headerText=W 
itemRenderer=customRenderer/
mx:DataGridColumn dataField=days headerText=T 
itemRenderer=customRenderer/
mx:DataGridColumn dataField=days headerText=F 
itemRenderer=customRenderer/
mx:DataGridColumn dataField=days headerText=S 
itemRenderer=customRenderer/

days is an array.
It has values true,false,false,true.. like that for all 7 days.

Now in my customRenderer, I want to toggle the particular cells based on
the
[true/false] passed in for that individual cell from the array(days)
passed
in.
Can anyone suggest me a solution for doing it??

Thanks.
-- 
View this message in context:
http://www.nabble.com/DataGridColumn-issue%3A-Passing-an-array.-tp186877
91p18687791.html
http://www.nabble.com/DataGridColumn-issue%3A-Passing-an-array.-tp18687
791p18687791.html 
Sent from the FlexCoders mailing list archive at Nabble.com.

 



RE: [flexcoders] Can we subclass Application yet?

2008-07-30 Thread Alex Harui
You can certainly subclass Application via AS.  Are you trying to do it
in MXML?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of chigwell23
Sent: Wednesday, July 30, 2008 11:51 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Can we subclass Application yet?

 

As far as I can tell the Flex2 problems with subclassing Application
still exist in Flex3 i.e. bye-bye mxml components on parent class? Is
this correct and has anybody worked around this? TIA,

Mic.

 



RE: [flexcoders] ViewStack, Combobox Dataprovider

2008-07-30 Thread Alex Harui
That didn't make sense.  I don't see viewstack or box in your sample
code.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of cox.blair
Sent: Wednesday, July 30, 2008 9:30 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ViewStack, Combobox  Dataprovider

 

Here is my situation,

I have a combobox and a viewstack. The combobox's dataProvider is XML
generated by a php script retrieving information from a db.

The database has two primary entries. The first is a location, the
second is a type of test performed. These are inputed by the user
elsewhere in the application. When the user views the combobox, they
see the list of site entries.

Upon selecting the a site, the viewstack should change to show the
related test information. Should be pretty straight forward. The
problem comes when I want to pass the string value of the test to
viewstack - they have the same names.

As a test of the viewstack, this works fine:
dataProvider={viewstackTestKits.getChildren()}
change={viewstackTestKits.selectedChild=event.currentTarget.selectedIte
m}

But I want something like this:
change=viewstackTestKits.selectedChild=box.selectedItem.Test_Kit_Used

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
layout=absolute
creationComplete=service.send()

mx:Script
![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;


[Bindable]
private var samplepoint:ArrayCollection

[Bindable]
private var currentSlide:Object;

private function SPresultHandler(event:ResultEvent):void
{
samplepoint = event.result.response.data.row;
}

private function getListLabel(item:Object):String
{ 
return item.Sample_Point_Name; 
}
private function changeHandler(event:Event):void
{
currentSlide = box.selectedLabel;
}
]]
/mx:Script

mx:HTTPService id=service
url=Define_Sample_Points.php?method=FindAll
result=SPresultHandler(event)/

mx:ComboBox id=box dataProvider={samplepoint}
labelFunction=getListLabel
change=changeHandler(event) x=52 y=27
/mx:ComboBox


mx:Text id=lbl text={box.selectedItem.Test_Kit_Used} / 


/mx:Application

 



RE: [flexcoders] Catch Browser Exit with Flex

2008-07-30 Thread Alex Harui
There have been past threads on this, and no perfect solution.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of gjessup1
Sent: Wednesday, July 30, 2008 11:38 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Catch Browser Exit with Flex

 

I'm having some issues with catching a browser exit with firefox. I
can get it to work with IE (not exactly how I'd like, but it works).
Does anyone have a good working example available...here is my code if
you can help from that.
Thanks

Greg

My javascript looks like this:
script language=JavaScript type=text/javascript
!--
alert (This is a Javascript Alert); //just a message which will be
removed

// Give user a chance to save modified data
window.onbeforeunload = function() {
var warning=;
var fxControl = document.SharedObjectBoard || window.SharedObjectBoard;
if (!${application}.unsavedAlert())
{
warning = fxControl.getUnsavedDataWarning();
}

if (typeof fxControl.getUnsavedDataWarning==function) {
warning = fxControl.getUnsavedDataWarning();
}
if (warning!=)

return warning;
else

return;
}
--
/script

in my init I have ---

if ( ExternalInterface.available ) {

ExternalInterface.addCallback(getUnsavedDataWarning,unsavedAlert);

Here are the functions triggered:

private function unsavedAlert():String {
Alert.show(Do you want to dave?, Save Alert,
Alert.YES|Alert.NO ,this,SaveAlertHandler,null,Alert.YES);
//Alert.show(function);
if (commitRequired) return UNSAVED_DATA_WARNING;
else return ;
}

private function SaveAlertHandler(e:Event):void {

Alert.show( e.type.toString());
}
}

 



[flexcoders] Re: Flex 3 Preloader broken when using deep linking ?

2008-07-30 Thread Adnan Doric
Okay I found this:

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

It was deferred to Flash Player bugs (I guess) so I'm pretty sure now
it is not Flex issue but FP issue.

Anyway I can only wait and see if it is resolved in next FP release :)

Thank you all for your input.

PS: hitting SWF directly has same behavior on my computer, preloader
shows only if there is no # in the URL (firefox 3 fp 9.0.124).

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

 When I hit the SWF directly, with or without #, it doesn't stream in
 (not sure why), the status bar (in IE) shows downloading progress.
 
  
 
 When it hit the html wrapper with the # I don't see the loading...
 screen. Makes me think that it isn't streaming the SWF if there's a #.
 That may be a known issue, not sure.  One way you might be able to tell
 is when the debugger fires up.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Adnan Doric
 Sent: Monday, July 28, 2008 1:30 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Flex 3 Preloader broken when using deep
 linking ?
 
  
 
 Hello Rick (and Alex) and thank you for your input,
 
 I am talking about the preloader not showing when using # in URL, I
 can't find a single application on the whole Internet where the
 preloader is showing in that particular case.
 
 I am NOT talking about deep linking application at all, because it is
 not possible considering this bug. Let's just concentrate on Preloader
 and URLs containing #:
 
 Can you see the preloader on this URL (7Mb + # + view source enabled)
 ?
 
 http://astronaute.net/_temp/PreloaderBug/PreloaderBug.html#
 http://astronaute.net/_temp/PreloaderBug/PreloaderBug.html 
 
 If anyone here can see the preloader there, then sorry, the problem is
 probably somewhere on my computer.
 
 If no one can see it, the problem is probably in Flex or Flash player
 right ?
 
 I am still looking for some kind of workaround if possible :)
 for Alex : You can try to load only SWF :
 
 http://astronaute.net/_temp/PreloaderBug/PreloaderBug.swf#
 http://astronaute.net/_temp/PreloaderBug/PreloaderBug.swf 
 
 As you can see, there is no wrapper issue, as the SWF alone is not
 showing the preloader.
 
 Thank you again for your help,
 Adnan
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Rick Winscot rick.winscot@
 wrote:
 
  I've used deep linking with a custom pre-loader in many apps without
  problems. Can you verify your configuration?
  
  
  
  *. What html template are you using
  
  *. What are your compiler options
  
  *. Are you using any additional JavaScript goodies like FAB?
  
  
  
  Rick Winscot
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of Adnan Doric
  Sent: Saturday, July 26, 2008 6:17 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: Flex 3 Preloader broken when using deep
 linking ?
  
  
  
  You are absolutely right, but the preloading part is completely
 missing :)
  
  Well, maybe it is Flash Player bug, I don't know, but it is very
  annoying for deep linking as you can imagine.
  
  I tried to create custom preloader but same thing is happening, there
  is no progress events.
  
  Maybe have some kind of workaround to show the progress ?
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com ,
  Alex Harui aharui@ wrote:
  
   I saw the initializing progress bar.
   
   
   
   
   
   From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com ]
  On
   Behalf Of Adnan Doric
   Sent: Friday, July 25, 2008 12:50 PM
   To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
   Subject: [flexcoders] Re: Flex 3 Preloader broken when using deep
   linking ?
   
   
   
   Sorry to bump this, but... am I the only one with this issue ? :)
   
   Even the Flex 3 style explorer have same issue :
   
   1. clear the cache
   2. load
  
 http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplo
 http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExpl
 o 
   rer.html
  
 http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExpl
 http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExpl
  
   orer.html 
   
   You see the preloader
   
   3. clear the cache
   4. load (note the # at the end of the URL)
  
 http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplo
 http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExpl
 o 
   rer.html#
  
 

RE: [flexcoders] Type Cast Error

2008-07-30 Thread Alex Harui
It is picking up the class from a different application domain.  See the
modules presentation on my blog.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of donald_d_hook
Sent: Wednesday, July 30, 2008 10:22 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Type Cast Error

 

I receive a type cast error when I try to cast an object I received
from the server (an arraycollection of value objects). I get the
following: 

TypeError: Error #1034: Type Coercion failed: cannot convert
com.spinnaker.model::[EMAIL PROTECTED] to com.spinnaker.model.StockVO

The actionscript object has the correct remoteClass. On top of that,
this only happens the 2nd time into the page. Not sure what is
happening behind the scenes, nor do I know what the @3b392b81 is.

Thanks in advance



 



Re: [flexcoders] Form Processing in Flex

2008-07-30 Thread Sid Maskit
I'm not sure if I am understanding your question, but maybe this will help. 

Flex can communicate with a server in several ways.

One way that flex can communicate with a server is by pretty much acting the 
same as a browser: i.e. it can submit get and post requests which will look 
exactly the same to the server as get and post requests submitted by a browser. 
Thus you can probably process form submissions on the server using exactly the 
same PHP code that you are using for browser-submitted forms.

Similarly, flex can get the server's response to such a request, and can 
process the provided information. However, unless you are simply going to 
display it to the user, you probably do not want the server to respond with a 
page of HTML, but rather was something that will be useful for flex. Thus this 
might be where you would want to start changing your server-side code to act 
differently for flex as opposed to the browser.

Flex also has built-in classes for communicating with web services, Flash 
Remoting, and LiveCycle Data Services.

One of the nice things about the latter two approaches is that a gateway takes 
care of translating data between flash and the server so that each can work in 
its native datatypes. For example, if one is using a PHP server, the gateway 
will take submitted flash data and convert it to PHP data, and take the 
returned PHP data and convert it to flash data. Thus you can work with native 
datatypes on both the client and server without having to worry about 
conversions.

Obviously, none of the above tells you how to do any of this, but hopefully it 
gives you some starting points for further research, or asking more specific 
questions.



- Original Message 
From: brucewhealton [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, July 28, 2008 3:26:30 PM
Subject: [flexcoders] Form Processing in Flex


Hello all,
I think I wasn't clear when I discussed something related to
this previously in a posting.  I see some very useful and elegant
tools for creating form elements using Flex.  When designing in xhtml,
using Dreamweaver, I call the form processor from the opening form
tag, which calls a php file - that's I have been using, mainly for
form processing.  It returns the values entered.
I'm not clear how this would work in Flex.  Everything in the
Flex application is compiled.  So, how do you access the content
entered by the user that comes to the form?  Can someone explain how
this works, please?  Does this require a certain type of form processor?
Thanks,
Bruce




  

RE: [flexcoders] link report question

2008-07-30 Thread Alex Harui
I don't know what they fully mean given that classes share constant
pools, but there is an optimization pass where some byte code is pulled
from swf, but then the SWF is compressed so it will always be smaller
than the sum of sizes.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of John Van Horn
Sent: Wednesday, July 30, 2008 10:47 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] link report question

 

Can someone explain where exactly the size and optimizedsize
attributes for a script in a link report come from? The sum of
optimizedsize for all nodes in a link report always seems to be way more
than the file size of the swf.

-- 
John Van Horn
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 

 



[flexcoders] Flex woes, wo-iz-o, i hate it (sometimes)

2008-07-30 Thread djhatrick
I am having one of those days where i want to throw this computer off
the 30th floor of midtown Manhattan onto a taxi-cab's hood, and leave
for the day never come back.

This is the problem, I can't get, getDefinitionByName to work right,
what a load of horse pucky... Sorry for being so salty, but if you are
a developer and you have tried to use this function, it must have
given you the same type of error, if it hasn't it will...

I've tried classes with variables and public classes and the whole
nine-yards, it always gives me this stupid error.  

Any suggestions, that don't require me to lose life or limb?

Thanks,
Patrick

import mx.containers.VBox;
import flash.utils.getDefinitionByName;
private function init():void
{
var ClassReference:Class =
getDefinitionByName(mx.containers.VBox) as Class; // throws error

//var ClassReference:Class =
getDefinitionByName(flash.display.Sprite) as Class; // works
var instance:Object = new ClassReference();
  
   // addChild(DisplayObject(instance));
}

ReferenceError: Error #1065: Variable VBox is not defined.
at global/flash.utils::getDefinitionByName()
at TotalBullshitIHavetodoThisTest/init()



Re: [flexcoders] Re: Complete metadata information and Where to Find it???

2008-07-30 Thread Sid Maskit
We just had a thread discussing this. It turns out that the [Exclude] tag does 
not limit the ability to use what is excluded, but only keeps it from showing 
up in FlexBuilder's code hinting. In this sense, it sounds as though it works 
exactly the same as [ExcludeClass] except for a different type of item.



- Original Message 
From: anubhav.bisaria [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 30, 2008 2:28:33 AM
Subject: [flexcoders] Re: Complete metadata information and Where to Find it???


Hi There,

the [Exclude] tag is used to hide the subcomponents. so that they are 
not accessible like

id_of_parentApplic ation.id_ of_childobject

http://www.jeffryho user.com/ index.cfm? mode=entry entry=4DC9B79C- 65B3-
D59C-464EC981E0A2EA 8F

for [ExcludeClasses] metadata tag, please go through this link:
http://nondocs. blogspot. com/2007/ 04/metadataexclu declass.html

Thanks, 
anubhav

--- In [EMAIL PROTECTED] ups.com, flexnadobe flexnadobe@ ... 
wrote:

 Hello,
 
 I have been looking at some of the MX classes that are in the Flex 
SDK
 2.0/frameworks/ source folder and there are some metadata properties
 that I cannot find in any documentation. For instance, in the
 RichTextEditor. mxml there is the:
 
 [Exclude(name= alignButtons , kind=property )]
   [Exclude(name= boldButton , kind=property )]
   [Exclude(name= bulletButton , kind=property )]
   [Exclude(name= colorPicker , kind=property )]
   [Exclude(name= defaultButton , kind=property )]
   [Exclude(name= fontFamilyArray , kind=property )]
   [Exclude(name= fontFamilyCombo , kind=property )]
   [Exclude(name= fontSizeArray , kind=property )]
   [Exclude(name= fontSizeCombo , kind=property )]
   [Exclude(name= icon, kind=property )]
   [Exclude(name= italicButton , kind=property )]
   [Exclude(name= label, kind=property )]
   [Exclude(name= layout, kind=property )]
   [Exclude(name= linkTextInput , kind=property )]
   [Exclude(name= toolBar , kind=property )]
   [Exclude(name= toolBar2 , kind=property )]
   [Exclude(name= underlineButton , kind=property )]
 
 which I assume just Excludes some properties from a class??
 
 Since I am talking about the richTextEditor. mxml any one know where
 there is information on a mx:ToolBar mxml tag??
 
 and the:
 
 [ExcludeClass]
 
 This one is in just about every class in the mx folder I have no 
idea
 what this refers to.
 
 Just curious because I can't find any information out there.
 
 Rich





  

RE: [flexcoders] Air NativeWindow in StageScaleMode.SHOW_ALL

2008-07-30 Thread Alex Harui
I haven't tried it with AIR, but I'd assume the same principle applies.
There is a default size for the window and UI needs to map to it in
order to scale.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of george_w_canada
Sent: Wednesday, July 30, 2008 10:09 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Air NativeWindow in StageScaleMode.SHOW_ALL

 

My project includes a main AIR window and another presentation window
to be displayed in a second large monitor. I have to use SHOW_ALL
scale mode to scale everything in that window but not layout for sure.

The problem is the presentation window is built with Flex
containers/components, in my short test, it scaled, but quite buggy. I
know Alex has discussed about this for Flex in browsers, but there's
somewhere else to adjust settings in html, but not Flex nativewindows
in AIR applications.

My experiments code as follow. Any help appriciated.

Thanks,
George

===
main.mxml:


?xml version=1.0 encoding=utf-8?
mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
layout=absolute applicationComplete=this.init()
mx:Script
![CDATA[
import mx.core.Application;
private var subWindow:PresentationWindow = null;

private function init():void
{
}

private function openNewWindow():void
{
if(!this.subWindow){
this.subWindow = new PresentationWindow();
this.subWindow.open();
} else {
this.subWindow.open();
}
}

private function maxNewWindow():void
{
if(this.subWindow){
//this.subWindow.maximize();
this.subWindow.test();
}
}

]]
/mx:Script
mx:Button x=165 y=105 label=open presentation window
click=this.openNewWindow()/
mx:Label x=165 y=135 text=Drag presentation window to second
monitor/
mx:Button x=165 y=189 label=maximize new window
click=this.maxNewWindow()/
/mx:WindowedApplication


PresentationWindow.mxml


?xml version=1.0 encoding=utf-8?
mx:Window xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  layout=absolute
width=443 height=265 alwaysInFront=true title=Presentation
Window showFlexChrome=false type={NativeWindowType.NORMAL}
mx:Script
![CDATA[

public function test():void
{
this.maximize();
this.stage.scaleMode = StageScaleMode.SHOW_ALL;
/*
trace(this.stage.fullScreenWidth+ ' '+ this.stage.fullScreenHeight);
trace(this.x + ' '+ this.y);
trace(this.width + ' '+ this.height);
var tx:Number = this.x;
var ty:Number = this.y;
var tw:Number = this.width;
var th:Number = this.height;
this.stage.displayState = StageDisplayState.NORMAL;
this.x = tx;
this.y = 0;
this.width = tw;
this.height = th;*/
}
]]
/mx:Script
mx:Button label=Presentation Window left=10 top=10 width=148/
/mx:Window

 



RE: [flexcoders] Passing flash variables to an embedded SWF

2008-07-30 Thread Alex Harui
Not sure you can do that.  You'll have to implement some communication
between the two swfs.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Laurent
Sent: Wednesday, July 30, 2008 6:10 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Passing flash variables to an embedded SWF

 

I'm embedding a swf file in an AS class and I would need to pass to
this file some FlashVars, however I'm not sure how to do it or if it's
possible at all. So far I tried this approach, but I get a compiler
error:

[Embed(source=MyFile.swf?myFlashVar=abcd)]
protected var MyClass:Class; 

This gives me this error:

MyFile.swf?myFlashVar=abcd does not have a recognized extension

Is there any way to do what I'm trying to do?

Thanks,

Laurent

 



RE: [flexcoders] DataGrid horizontal ScrollBar not shown properly

2008-07-30 Thread Alex Harui
Pixel limits should be 8000px.  But since parts of the SB stretch, maybe
there is occlusion due to some scaling problem.  File a bug.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of rleuthold
Sent: Wednesday, July 30, 2008 4:56 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] DataGrid horizontal ScrollBar not shown properly

 

Hi,

I'm having a very wide DataGrid ( approx 4000px ).

I'm setting the scroll policies to on. But the horizontal scroll bar is
not shown properly. It 
doesn't show the right end and arrow of the scroll bar, so the user is
never able to see the 
columns all to the right in the grid.

It functions very well, with a DataGrid which is around 2000px wide.
Does anybody know if 
there is a limit for the width of a component to show the scroll bars
propely ?

Thank's
rico

 



RE: [flexcoders] Sorting an XMLList on an attribute

2008-07-30 Thread Alex Harui
XMLList doesn't support Sort

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of gaurav1146
Sent: Tuesday, July 29, 2008 11:58 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Sorting an XMLList on an attribute

 

Hi,
I am trying to sort an XMLList based on one of the attributes in the
XML node. On trying this I get the following error:

TypeError: Error #1089: Assignment to lists with more than one item is
not supported.

Instead of XMLList if I use XMLListCollection it works fine. The thing
is that I have used XMLList at lot of other places in my code as well
so I cannot easily switch to XMListCollection. I would be prefer a way
if I could sort the XMLList somwehow.

Following is the sample code that I tried for the sorting difference
between XMLList amd XMLListCollection:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
layout=absolute
mx:Script
![CDATA[
import mx.collections.XMLListCollection;
import mx.collections.SortField;
import mx.collections.Sort;
private var books:XML = books
book publisher=Addison-Wesley name=Design
Patterns /
book publisher=Addison-Wesley name=The
Pragmatic Programmer /
book publisher=Addison-Wesley name=Test
Driven Development /
book publisher=Addison-Wesley
name=Refactoring to Patterns /
book publisher=O'Reilly Media name=The
Cathedral  the Bazaar /
book publisher=O'Reilly Media name=Unit
Test Frameworks /
/books;

// This does not work.
/*
[Bindable]
private var booksList:XMLList = books.children();
*/
[Bindable]
private var booksList:XMLListCollection = new
XMLListCollection(books.children());


private function sortBooks():void
{
var s:Sort = new Sort();
s.fields = [new SortField(@name)];
booksList.sort = s;
booksList.refresh();
tree.dataProvider = booksList;
}

]]
/mx:Script
mx:VBox
mx:Tree id=tree dataProvider={booksList} labelField=@name/
mx:Button click=sortBooks() label=Sort books/
/mx:VBox
/mx:Application

 



RE: [flexcoders] Flex woes, wo-iz-o, i hate it (sometimes)

2008-07-30 Thread Alex Harui
Some way you have to create a dependency on VBox to actually get it
linked into the SWF, otherwise it isn't there to be found.  One way is
to use the shared RSL, but otherwise, you have to actually use the class
somewhere.  In import statement doesn't actually create a link
dependency, it simply says what the fully qualified name is when you
just use VBox.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of djhatrick
Sent: Wednesday, July 30, 2008 1:17 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex woes, wo-iz-o, i hate it (sometimes)

 

I am having one of those days where i want to throw this computer off
the 30th floor of midtown Manhattan onto a taxi-cab's hood, and leave
for the day never come back.

This is the problem, I can't get, getDefinitionByName to work right,
what a load of horse pucky... Sorry for being so salty, but if you are
a developer and you have tried to use this function, it must have
given you the same type of error, if it hasn't it will...

I've tried classes with variables and public classes and the whole
nine-yards, it always gives me this stupid error. 

Any suggestions, that don't require me to lose life or limb?

Thanks,
Patrick

import mx.containers.VBox;
import flash.utils.getDefinitionByName;
private function init():void
{
var ClassReference:Class =
getDefinitionByName(mx.containers.VBox) as Class; // throws error

//var ClassReference:Class =
getDefinitionByName(flash.display.Sprite) as Class; // works
var instance:Object = new ClassReference();

// addChild(DisplayObject(instance));
}

ReferenceError: Error #1065: Variable VBox is not defined.
at global/flash.utils::getDefinitionByName()
at TotalBullshitIHavetodoThisTest/init()

 



[flexcoders] Re: Flex woes, wo-iz-o, i hate it (sometimes)

2008-07-30 Thread djhatrick
Alex,

Say for instance, you want to create this instance, from a class name
defined in XML, and make it totally dynamic, using this work-around
does not solve that problem.  

This function should really be improved, or, at least the
documentation should really be supplemented to explain more in detail
why this works for the flash namespace, and not the flex name space (
or my own classes)

Thanks for your time and quick response.

Patrick





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

 Some way you have to create a dependency on VBox to actually get it
 linked into the SWF, otherwise it isn't there to be found.  One way is
 to use the shared RSL, but otherwise, you have to actually use the class
 somewhere.  In import statement doesn't actually create a link
 dependency, it simply says what the fully qualified name is when you
 just use VBox.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of djhatrick
 Sent: Wednesday, July 30, 2008 1:17 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Flex woes, wo-iz-o, i hate it (sometimes)
 
  
 
 I am having one of those days where i want to throw this computer off
 the 30th floor of midtown Manhattan onto a taxi-cab's hood, and leave
 for the day never come back.
 
 This is the problem, I can't get, getDefinitionByName to work right,
 what a load of horse pucky... Sorry for being so salty, but if you are
 a developer and you have tried to use this function, it must have
 given you the same type of error, if it hasn't it will...
 
 I've tried classes with variables and public classes and the whole
 nine-yards, it always gives me this stupid error. 
 
 Any suggestions, that don't require me to lose life or limb?
 
 Thanks,
 Patrick
 
 import mx.containers.VBox;
 import flash.utils.getDefinitionByName;
 private function init():void
 {
 var ClassReference:Class =
 getDefinitionByName(mx.containers.VBox) as Class; // throws error
 
 //var ClassReference:Class =
 getDefinitionByName(flash.display.Sprite) as Class; // works
 var instance:Object = new ClassReference();
 
 // addChild(DisplayObject(instance));
 }
 
 ReferenceError: Error #1065: Variable VBox is not defined.
 at global/flash.utils::getDefinitionByName()
 at TotalBullshitIHavetodoThisTest/init()





  1   2   >