RE: {Disarmed} [flexcoders] Just getting started, hitting walls...

2007-06-01 Thread Gordon Smith
 Hello Flex Community, 
 I am a very experienced CF developer, and I want to get into Flex. 
 
Based on your first impressions, how does the support from the Flex
community compare with than in the ColdFusion community?
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dave @ VitalPodcasts.com
Sent: Wednesday, May 30, 2007 1:04 PM
To: flexcoders@yahoogroups.com
Subject: Re: {Disarmed} [flexcoders] Just getting started, hitting
walls...



Thanks for all the help everyone!



 


[flexcoders] Re: Disable Clicks while on busyCursor

2007-06-01 Thread Bjorn Schultheiss
This is quite slow.
I wait for the app to disable, then any animations running while the
app is disabled lag.



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

 Did you try Application.application.enabled = false?
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Troy Gilbert
 Sent: Thursday, May 31, 2007 10:19 AM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Disable Clicks while on busyCursor
 
  
 
 Is it just me, or is it a bit surprising that we've got to hack
 something together to handle this? Come on, Adobe... what's a proper
 solution (and why wasn't it built into the CursorManager!)? I've got
 enough asynchronous problems to deal with than have to worry that the
 user's going to go off willy-nilly clicking buttons while the busy
 cursor is being shown. I understand that some folks may not want it to
 *always* prevent mouse clicks, but a little boolean flag (or two) in the
 CursorManager that prevents mouse clicks and/or focus changes/keyboard
 events would be very, very nice. 
 
 Troy.
 
 
 
 On 5/31/07, Anthony Lee [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]  wrote:
 
  - Make all your active components register themselves then loop
 through 
  and disable/enable them according to your busy state 
 
  Too taxing on cpu...
 
 How many components are we talking about?
 
 Hack #3
 Generate an Alert and position it outside the viewable area. They're
 modal by default... meaning the user shouldn't be able to click on
 anything till you clear it. 
 
 Anthony





RE: [flexcoders] My problems with Events

2007-06-01 Thread Gordon Smith
If you're listening for MouseEvent.CLICK, you're not going to get it
when the mouse pointer simply enters anything. You get it only when you
click the mouse button!
 
If you want to detect entering and leaving sprites, use
MouseEvent.ROLL_OVER and MouseEvent.ROLL_OUT.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jairokan
Sent: Sunday, May 27, 2007 6:58 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] My problems with Events



Hi,
I'm doing a little application example while learning different
topics. I'm in the Events topic now ,which I'm still struggling to
understand (Capture, bubble phases). The application is very simple
having a display list as follows.
MainSprite
ChildSprite
TextField

The Child Sprite has a certain dimension width, height. It contains
the Text Field, width also dimension set smaller than Child Sprite.
I've added an EventListener to the Child Sprite, the Event type is
CLICK. The event handler will change the backgroung of the Child Sprite.

The problem is that the event is triggered only if the mouse pointer
enters the TextFiled area, which is a non expected behaviour. The
Event should be dispatched as soon as the mouse pointer enters the
Child Sprite area. 
Can please someone explain brievely if this is the correct behaviour
and what should I do to trigger the handler event as soon as the mouse
pointer enters the Child Sprite are, not until it goes the the text
field area.
Thanks 



 


RE: [flexcoders] Re: Treat a string as a reference to an object?

2007-06-01 Thread Gordon Smith
I'm not sure what obj1, obj2, etc. are in your example. But if they're
instance variables in your class, then
 
obj1.foo
this.obj1.foo
this.obj1[foo]
this[obj1].foo
this[obj1][foo]
 
are all equivalent. So you can look up a property by name on an object
by name as
 
this[object_name][property_name]
 
Keep in mind that when you write a class in MXML, the id's of MXML tags
become instance variables of the class. For example, if you have
 
mx:Button id=b label=OK/
 
then
 
this[b][label]
 
will be OK.
 
- Gordon
 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of tedgies
Sent: Friday, May 25, 2007 9:35 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Treat a string as a reference to an object?



Thanks Gordon,

Following your example, can you create the name of the root object 
dynamically and have it be treated as a valid property reference at 
runtime? 

example: If i wanted obj1.foo, obj2.foo, or objsome_string.foo

thanks,

Ted

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

  I was wondering if Flex/Actionscript allows you to create 
references 
  to object properties on the fly with a dynamically created 
string. 
 
 Yes. If obj is an object and s is the String foo, then obj[s] is
 obj.foo.
 
 - Gordon
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of tedgies
 Sent: Friday, May 25, 2007 10:43 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Treat a string as a reference to an object?
 
 
 
 Hi,
 
 I was wondering if Flex/Actionscript allows you to create 
references 
 to object properties on the fly with a dynamically created string. 
 For example i would like to add a new series to a chart series at 
 runtime and dynamically create the reference to dataprovider (an 
 httpservice) with a string.
 
 var numJournals:String = new String;
 numJournals = 3;
 var series = chartC.series;
 var dataXMLStr:String = new String;
 var newSeries:LineSeries = new LineSeries;
 dataXMLStr = series + numJournals + .lastResult.item;
 newSeries.dataProvider = dataXMLStr
 
 series.push(newSeries)
 chartC.series = series;
 
 The problem is that on the 7th line above newSeries does not 
 recognize dataXMLStr as a reference to my httpservice dataprovider. 
 So is there a function i can use to make dataXMLStr appear as a 
 reference to my dataprovider, e.g. so flex will read:
 
 newSeries.dataProvider = series3.lastResult.item
 
 thanks,
 Ted




 


[flexcoders] Application file doesn't launch

2007-06-01 Thread Kevin
Does anyone know the reason an flex application would not launch and  
instead just fail silently in Eclipse?

I am trying to run the main application file and the launcher starts  
up, but then stops and nothing is launched in the browser.  However,  
if I create a new blank test project, then everything works fine.   
There must be something in this project that is causing it to not  
launch.

I am trying to rebuild a project from my SVN after a hard drive crash.

Thanks, Kevin


[flexcoders] More DataBinding problems

2007-06-01 Thread asherritt9
So I have a singleton object holding data that I've bound controls to.
To make sure changes in the control affect the object's properties 
I've explictly bound the other way in the mxml.

Problem is when I want to use the same page for Updating, one Binding 
is firing before the other and essentially reading the empty 
interface into my object, instead of reading the object's properties 
and putting them in to the controls.

Is there a way to force one bind before the other?  Hold off on one 
set of bindings?

Maybe wait till the screen's controls are initialized and then set up 
my object?

Help?



[flexcoders] Re: mx:Image / centering loaded content

2007-06-01 Thread joshspooning
I think that is working. I haven't had time to accurately check it
because I've been on other project but I know that is the right
direction or right.

Thank you!
--- In flexcoders@yahoogroups.com, dr_stone_1024 [EMAIL PROTECTED] wrote:

 --- In flexcoders@yahoogroups.com, joshspooning joshspooning@ 
 wrote:
 
  I'm using the Image component for yes an image gallery. I'm not
  finding any info in Google search. All I want to do is center the
  component with each image loaded.
  
  Any takers? Cake, for you pros out there.
 
 
 Have you tried adding horizontalAlign=center to your Image component?





[flexcoders] form post to url

2007-06-01 Thread boybles
How do you implement a form post in Flex to a url which will then go to 
that URL in the browser (where the target is _self?  
Thanks
Boybles



[flexcoders] Re: Flex and Yahoo Pipes

2007-06-01 Thread joshspooning
Ok,

I've tried a different approach w/ another pipe I made but I'm still
getting nothing. How do you correctly set up vars to go w/ a request?


CODE
?xml version=1.0 encoding=utf-8?
mx:ApolloApplication xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical
mx:Script
![CDATA[

import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;

 [Bindable]
private var myData:ArrayCollection;
[Bindable]
private var urlString:String = 
http://del.icio.us/rss/eisenbergInc;;
[Bindable]
private var idString:String = XD8j1R8K3BGQgjzKyzUFzw;
[Bindable]
private var runString:String = 1;

 private function resultHandler(event:ResultEvent):void { 
myData = event.result.rss.channel.item
trace(myData);
   }
]]
/mx:Script
!--
full URL

http://pipes.yahoo.com/pipes/pipe.info?url=http%3A%2F%2Fdel.icio.us%2Frss%2FeisenbergInc_id=XD8j1R8K3BGQgjzKyzUFzw_run=1
--
mx:HTTPService id=service
url=http://pipes.yahooapis.com/pipes/pipe.info;
result=resultHandler(event)
mx:request
url
{urlString}
/url
_id
{idString}
/_id
_run
{runString}
/_run
/mx:request
/mx:HTTPService
/mx:ApolloApplication

-/CODE--




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

 joshspooning wrote:
  I see. That's weird Yahoo has set there cross-domain wide open. I'll
  look into the docs. Do you mean I mean I need to allow yahoo's domain?
  
  --- In flexcoders@yahoogroups.com, huangnankun HuangNankun@ wrote:
  
 Its the security sandbox issue, read up the flex 2 docs about this.
 Alternatively, you can attach a security error handler to your http
 service and read the error msg yourself =)
 
 --- In flexcoders@yahoogroups.com, joshspooning joshspooning@
 wrote:
 
 I am currently trying to build a Flex app for me to search for places
 to eat lunch at work. I'm stuck on my first step. I'm having a
problem
 parsing the the pipes just to a DataGrid. When I use a local copy it
 works but when I use the Yahoo! copy, it comes up blank. If any one
 could help me see what's wrong I'd be happy.
 
 
 If i hit this url in firefox I get a blank page.
 
 
url=http://pipes.yahooapis.com/pipes/pipe.run?location=Dallassearch=sandwhich_id=tEaG60rj2xGl7hOLn0artA_run=1_render=rss;





RE: [flexcoders] Error #1009 - Problem running swf on production server

2007-06-01 Thread Alex Harui
The MyTreeItemRenderer class is compiled in otherwise you'd get a verify
error.  Somewhere in the data setter it is getting a null reference.  If
you turn on verbose-stacktrace it will give you the line number.  If the
item renderer loads images/icons dynamically, the timing of when the
loading completes can be really different on a production server.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Flexing...
Sent: Thursday, May 31, 2007 8:57 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Error #1009 - Problem running swf on
production server

 

This is basically a null pointer exception. 

In your itemrenderer you must be trying to access the variable of an
object to probably display the value.

The object in this case is null.

You need to add nullity check in your code. 

 

 

On Jun 1, 2007, at 12:19 AM, sarah_e_boys wrote:






I get the following error when I try and run my application on a 
production server:

TypeError: Error #1009: Cannot access a property or method of a null 
object reference.
at samples::MyTreeItemRenderer/set data()

The application works fine if I reference it with http://localhost
http://localhost  or 
run if from Flex Builder. I hope it is something very simple regarding 
a reference to the MyTreeItemRenderer.as class not being compiled into 
the swf file. I would be grateful for any suggestions...




 

 



Re: [flexcoders] Hyperlink in datagrid

2007-06-01 Thread Hara Jn

One way is to use the changeEvent. The other way is to use the itemRender
and insert a Txt component in to the cells. The you can play with the text
and make it like a actual hyper link

On 6/1/07, Ekta Aggarwal [EMAIL PROTECTED] wrote:


   Hi,

I am displaying some data in a datagrid where dataprovider is a XML file.
Now, I have a requirement where I need to provide a hyperlink on each data
cell of the datagrid, so that clicking on the item can take me to some other
page. e.g.


--
column1column2
-
 FailPass
 FailPass
--

Clicking on fail/pass should display the log results.

Any idea, how to provide the hyperlink?

Regards,
Ekta


Ekta Gupta

 www.geocities.com/aggarwalekta

--
Take the Internet to Go: Yahoo!Go puts the Internet in your 
pocket:http://us.rd.yahoo.com/evt=48253/*http://mobile.yahoo.com/go?refer=1GNXICmail,
 news, photos more.





[flexcoders] Re: Flexbook - always open?

2007-06-01 Thread bjorn -

No one has done this?

I've experimented with updating the canTurnForward() method in FlexBook.as,
like this:

 private function canTurnForward():Boolean
 {
  if((_currentPageIndex+2) = maximumPageIndex) {
   return false;
  }

  return (_state == STATE_NONE)? (_currentPageIndex+1  maximumPageIndex):
(_state == STATE_TEASING)? (_targetPageIndex  maximumPageIndex):
_targetPageIndex+1  maximumPageIndex;
 }

.. adding the first check. One should think this would be enough, but it
seems it isn't used everywhere since I can still turn the last page :|

- Bjørn





On 29/05/07, bjorn - [EMAIL PROTECTED] wrote:


Hi,

is it possible to use Ely's FlexBook in a way that makes it always
stay open? (e.g. the front/back cover cannot be grabbed and closed)
Best regards,
Bjørn
--


http://www.juicability.com - flex blog
http://www.43min.com - funny movies





--


http://www.juicability.com - flex blog
http://www.43min.com - funny movies


Re: [flexcoders] Re: Actionscript SAX Parser ?

2007-06-01 Thread Peter Hall

For my use-case, the XML is not large at all (~20k). However, the user
experience of having something displayed immediately, and the remaining
content displaying as it loads, is really noticeable. Even if the difference
is sub-second. It's small things that make the application feel faster.

Peter


On 6/1/07, Gordon Smith [EMAIL PROTECTED] wrote:


   I'd be interested to know what your use case is that requires a SAX
parser. How large is your XML? Did you run into a memory or performance
problem with AS3's E4X capabilities?

- Gordon

 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *powertool786
*Sent:* Thursday, May 31, 2007 6:21 AM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Re: Actionscript SAX Parser ?

 The XML4JS SAX Parser seems to be written pretty reasonably... I think
I'll have a go at automatically porting it to AS3.0 with a Perl script.

If it works at all, I'll continue by doing some profiling, then fill
out the API a little.

I don't need much working for my purposes.

-David

--- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Peter
Hall [EMAIL PROTECTED] wrote:
 Just last week, I had an unsuccessful look around for an AS3 SAX
 parser. I thought about making one myself, but couldn't justify the
 time to fit inside the project schedule.

 Peter

 



RE: [flexcoders] Re: DataGrid HeaderRenderer Recreates every click

2007-06-01 Thread Alex Harui
When a header gets clicked a HEADER_RELEASE event fires.  That's a good
opportunity to save away the sort information somewhere.  I once
recommended to someone that they actually subclass ArrayCollection and
override the sort property so it didn't actually sort the underlying
data, but instead called to the server.  In doing so, the DG would check
the sort on the collection and update the arrows correctly.  I don't
know if they got that to work, but it should.

 

Other than, simply storing the column index somewhere should be good
enough.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of e_baggg
Sent: Thursday, May 31, 2007 11:21 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: DataGrid HeaderRenderer Recreates every click

 

Alex-
Thanks. The issue is when a user clicks a column header, all the
column headers are re-created and now there is no way to know what
just happened since any state of that click event is lost. So I guess
I am forced to save it outside the headerRenderer. 

I suppose I can store the column index of what was clicked, then each
column when it redraws itself can get that int (if it's not -1), look
that value up in the 'columns' array and see if itself is it. If so,
then display the appropriate up/down arrow. 

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

 People do some really tricky things in customized DGs like having
 headers grow and shrink or other rows grow and shrink based on
rollover
 states and selection and what not. Right now the DG aggressively
 redraws to make sure we don't make assumptions about what can change.
 
 
 
 In theory, your custom header renderers should derive their state from
 some description of the sort. That's a good model/view design and the
 cost should be insignificant. Maybe the way you're checking is
 non-optimal.
 
 
 
 -Alex
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of e_baggg
 Sent: Thursday, May 31, 2007 10:18 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] DataGrid HeaderRenderer Recreates every click
 
 
 
 I have a server-side sort on my DataGrid which means I had to
 implement my own headerRenderer to handle the click event, sort, and
 server calls. 
 
 I am trying to create the asc/desc arrow now but I realized that any
 click event on the DataGrid instantiates a new Object of the
 headerRenderer (all of them actually). In other words, my
 headerRenderer mxml implementation, the creationComplete event gets
 called any time ANYTHING is clicked in the grid, including a row.
 
 This is a problem for many reasons, but the most significant one being
 that I cannot store the state if the column is ascending/descending
 based on the user's click. I could store this externally in the model
 but that is very bad b/c then I'd also have to store which column was
 clicked and then the other columns have to check if it is itself and
 remove the arrow if they have one. Does anyone know why the
 headerRenderer is re-creating an instance of itself every time or
 faced this issue?
 
 Thanks in advance.


 



RE: [flexcoders] Re: Disable Clicks while on busyCursor

2007-06-01 Thread Alex Harui
Try calling validateNow after setting enabled to false.

 

Animations can shut down validatiom.  If you can disable and re-validate
before the animations start, that would be best.

 

However, what it does, and what modal dialogs do is put up a mouse
shield over the whole app.  It's a relatively easy thing to do, and I
wouldn't want to put it in CursorManager as it really doesn't have
anything to do with cursors.  You could have a progress bar and no busy
cursor and still want to block.  Maybe we need to see if we can come up
with a best practice for how to use application.enabled.

 

-Alex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Bjorn Schultheiss
Sent: Thursday, May 31, 2007 11:13 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Disable Clicks while on busyCursor

 

This is quite slow.
I wait for the app to disable, then any animations running while the
app is disabled lag.

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

 Did you try Application.application.enabled = false?
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Troy Gilbert
 Sent: Thursday, May 31, 2007 10:19 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: Re: [flexcoders] Disable Clicks while on busyCursor
 
 
 
 Is it just me, or is it a bit surprising that we've got to hack
 something together to handle this? Come on, Adobe... what's a proper
 solution (and why wasn't it built into the CursorManager!)? I've got
 enough asynchronous problems to deal with than have to worry that the
 user's going to go off willy-nilly clicking buttons while the busy
 cursor is being shown. I understand that some folks may not want it to
 *always* prevent mouse clicks, but a little boolean flag (or two) in
the
 CursorManager that prevents mouse clicks and/or focus changes/keyboard
 events would be very, very nice. 
 
 Troy.
 
 
 
 On 5/31/07, Anthony Lee [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]  wrote:
 
  - Make all your active components register themselves then loop
 through 
  and disable/enable them according to your busy state 
 
  Too taxing on cpu...
 
 How many components are we talking about?
 
 Hack #3
 Generate an Alert and position it outside the viewable area. They're
 modal by default... meaning the user shouldn't be able to click on
 anything till you clear it. 
 
 Anthony


 



RES: [flexcoders] Flex Builder 2 HTML wrapper will not launch MyApp.html with Tomcat

2007-06-01 Thread Luciano Ricardo Santos
Joe,

 

You forgot the AC_OETags.js file. Put it in your MyApp directory. This
file is also generated by Flex Builder.

 

Luciano.

 

  _  

De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Em nome
de joseph_freemaker
Enviada em: quarta-feira, 30 de maio de 2007 18:42
Para: flexcoders@yahoogroups.com
Assunto: [flexcoders] Flex Builder 2 HTML wrapper will not launch MyApp.html
with Tomcat

 

When http://127.0. http://127.0.0.1:8080/MyApp/MyApp.swf
0.1:8080/MyApp/MyApp.swf is opened in a browser,
Tomcat launches the Flex 2.01 MyApp.swf application in a browser.

However if http://127.0. http://127.0.0.1:8080/MyApp/MyApp.html
0.1:8080/MyApp/MyApp.html or
http://127.0. http://127.0.0.1:8080/MyApp 0.1:8080/MyApp are used, the
MyApp.html wrapper generated
by Flex Builder 2 does not launch MyApp.swf. Instead a white screen is
recieved. If a view source is performed, the MyApp.html wrapper
generated by Flex Builder 2 source code is displayed.

Please help!

Have reviwed the Flex documentation and discussion in the newsgroups
and it is not clear what the issue is.

The 'C:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\MyApp' directory contains the following files from Flex
Builder 2:

Directory of C:\Program Files\Apache Software Foundation\Tomcat
5.5\webapps\MyApp

05/30/2007 02:10 PM DIR .
05/30/2007 02:10 PM DIR ..
05/30/2007 10:08 AM 1,272 history.htm
05/30/2007 10:08 AM 1,292 history.js
05/30/2007 10:08 AM 2,656 history.swf
05/30/2007 10:08 AM 657 playerProductInstall.swf
05/30/2007 10:08 AM 4,364 MyApp.html
05/30/2007 10:08 AM 1,675,586 MyApp.swf
05/24/2007 06:26 AM DIR style
05/24/2007 06:55 AM DIR WEB-INF

The WEB-INF directory contains a web.xml file. It contains:

?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app 
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN 
http://java. http://java.sun.com/dtd/web-app_2_3.dtd
sun.com/dtd/web-app_2_3.dtd
web-app
display-nameMyApp/display-name
description
MyApp 2.0
/description
context-param
param-namewebmaster/param-name
param-value[EMAIL PROTECTED] mailto:joe%40abc.com /param-value
description
EMAIL address to whom questions about this application should
be addressed.
/description
/context-param
session-config
session-timeout30/session-timeout 
/session-config
/web-app

Thanks in advance.

Joe

 



RE: [flexcoders] Re: PopUpManager.createPopUp

2007-06-01 Thread Tracy Spratt
Rohan, did you miss the solutions posted by Mike and Flexing?  I would
prefer Mikes solution myself.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rohan Pinto
Sent: Thursday, May 31, 2007 10:59 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: PopUpManager.createPopUp

 

exactly..

see my demo app: http://demo.rohanpinto.com http://demo.rohanpinto.com


if you click on the logo, the TileWindow opens over and over again...
i want to restrict that to just one instance.. any advise.. please.. ?

Rohan
http://konkan.tv http://konkan.tv 

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

 Hi,
 
 There is no problem with what you have but... his question was,
 
  how to i prevent a popup if the popup TileWindow is already Open..
 
 That means, he is asking how does he only create ONE TitleWindow after
a
 user has clicked the button to create it the first time.
 
 There are two ways, using a boolean flag in the application that
holds the
 button or doing what I showed by checking if the instance is not
null in the
 application.
 
 What you said the first time would work IF the boolean flag is in
the actual
 application. It wouldn't work if the flag was in the title window
because
 the popup manager would have already created another popup on top of
the
 first popup.
 
 Peace, Mike
 
 On 5/31/07, Flexing... [EMAIL PROTECTED] wrote:
 
  Hi Mike,
 
   The manager will have already created the instance and the
TitleWindow
  would have to use removePopUp() which is not optimum.
  I didn't understand what is the issue in using removePopup inside
  Titlewindow ?
 
  Let say if I write the following to handle window closure , is
there any
  issue in this ?
 
 
  mx:TitleWindow showCloseButton=true close={onClose(event)}
  mx:Script
  ![CDATA[
  public var isOpen : Boolean = true;
 
  private function onClose(event : Event) : void
  {
  PopUpManager.removePopUp(this);
  isOpen = false;
  }
 
  public function setOpen() : void
  {
  isOpen = true;
  }
  ]]
  /mx:TitleWindow
 
 
  Thanks
 
  On May 31, 2007, at 5:46 PM, Michael Schmalle wrote:
 
  Hi,
 
  I don't think a boolean flag will help here. The manager will have
already
  created the instance and the TitleWindow would have to use
removePopUp()
  which is not optimum.
 
  You need to take that call out of the mxml and create a click
handler for
  the button.
 
  .. in your app
 
  private var popUpWindow:TitleWindow;
 
  private function button_clickHandler(event:MouseEvent):void
  {
  if (!popUpWindow)
  {
  popUpWindow = TitleWindow(
PopUpManager.createPopUp(this,main,false));
 
  }
  }
 
  
 
  mx:Button click=button_clickHandler(event) ;/
 
  Peace, Mike
 
  On 5/31/07, Flexing... [EMAIL PROTECTED] wrote:
  
   Store a boolean (flag) in your titlewindow to indicate whether the
   Window is already open or not.
  
   On May 31, 2007, at 9:56 AM, Rohan Pinto wrote:
  
   how to i prevent a popup if the popup TileWindow is already Open..
  
   ie: in my conrtol i have
  
   click=PopUpManager.createPopUp( this,main,false);
  
   if the user clicks this several times, it opens up multiple
popups of
   the same window. how do i prevent the popup to just 1 instance ?
  
  
  
 
 
  --
  Teoti Graphix
  http://www.teotigra http://www.teotigraphix.com
http://www.teotigraphix.com phix.com
 
  Blog - Flex2Components
  http://www.flex2com http://www.flex2components.com
http://www.flex2components.com ponents.com
 
  You can find more by solving the problem then by 'asking the
question'.
 
 
  
 
 
 
 
 -- 
 Teoti Graphix
 http://www.teotigraphix.com http://www.teotigraphix.com 
 
 Blog - Flex2Components
 http://www.flex2components.com http://www.flex2components.com 
 
 You can find more by solving the problem then by 'asking the
question'.


 



[flexcoders] hotfix 2 and webservices

2007-06-01 Thread Paolo Bernardini

Hi,
I've a problem with webservices after updating to hotfix 2 for flex builder.
this is the soap for the method I'm having problems with:

soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap=
http://schemas.xmlsoap.org/soap/envelope/;
 soap:Body
   loginUtenteObjResponse xmlns=
http://www.mamateam.net/schemas/services/sso;
 loginUtenteObjResult
   *Items* xmlns=http://www.mamateam.net/schemas/services/users/;
 DataSetUtenteUtenteObj
   IDUtente*int*/IDUtente
   email*string*/email
   username*string*/username
   nome*string*/nome
   cognome*string*/cognome
   password*string*/password
   language*string*/language
   passExpires*dateTime*/passExpires
   userExpires*dateTime*/userExpires
   locked*boolean*/locked
   SecretQuestion*string*/SecretQuestion
   SecretAnswer*string*/SecretAnswer
   isGroup*boolean*/isGroup
   imported*boolean*/imported
 /DataSetUtenteUtenteObj
 DataSetUtenteUtenteObj
   IDUtente*int*/IDUtente
   email*string*/email
   username*string*/username
   nome*string*/nome
   cognome*string*/cognome
   password*string*/password
   language*string*/language
   passExpires*dateTime*/passExpires
   userExpires*dateTime*/userExpires
   locked*boolean*/locked
   SecretQuestion*string*/SecretQuestion
   SecretAnswer*string*/SecretAnswer
   isGroup*boolean*/isGroup
   imported*boolean*/imported
 /DataSetUtenteUtenteObj
   /Items
 /loginUtenteObjResult
   /loginUtenteObjResponse
 /soap:Body
/soap:Envelope

as you can see *Items* is an Array of DataSetUtenteUtenteObj.
Before installing hotfix 2 it was working fine, but after I see *Items* as
an Object instead of Array so my code break.
Note that the *Items* Array contains only 1 object, I couldn't test if with
the array lenght greater than one I would see as an Array.


Re: [flexcoders] Re: PopUpManager.createPopUp

2007-06-01 Thread Michael Schmalle

Hi,

I gave an answer to this a couple threads back. See all the threads to this
post and you will see the answer.

Peace, Mike

On 5/31/07, Rohan Pinto [EMAIL PROTECTED] wrote:


  exactly..

see my demo app: http://demo.rohanpinto.com

if you click on the logo, the TileWindow opens over and over again...
i want to restrict that to just one instance.. any advise.. please.. ?

Rohan
http://konkan.tv

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

 Hi,

 There is no problem with what you have but... his question was,

  how to i prevent a popup if the popup TileWindow is already Open..

 That means, he is asking how does he only create ONE TitleWindow after a
 user has clicked the button to create it the first time.

 There are two ways, using a boolean flag in the application that
holds the
 button or doing what I showed by checking if the instance is not
null in the
 application.

 What you said the first time would work IF the boolean flag is in
the actual
 application. It wouldn't work if the flag was in the title window
because
 the popup manager would have already created another popup on top of the
 first popup.

 Peace, Mike

 On 5/31/07, Flexing... [EMAIL PROTECTED] wrote:
 
  Hi Mike,
 
   The manager will have already created the instance and the
TitleWindow
  would have to use removePopUp() which is not optimum.
  I didn't understand what is the issue in using removePopup inside
  Titlewindow ?
 
  Let say if I write the following to handle window closure , is
there any
  issue in this ?
 
 
  mx:TitleWindow showCloseButton=true close={onClose(event)}
  mx:Script
  ![CDATA[
  public var isOpen : Boolean = true;
 
  private function onClose(event : Event) : void
  {
  PopUpManager.removePopUp(this);
  isOpen = false;
  }
 
  public function setOpen() : void
  {
  isOpen = true;
  }
  ]]
  /mx:TitleWindow
 
 
  Thanks
 
  On May 31, 2007, at 5:46 PM, Michael Schmalle wrote:
 
  Hi,
 
  I don't think a boolean flag will help here. The manager will have
already
  created the instance and the TitleWindow would have to use
removePopUp()
  which is not optimum.
 
  You need to take that call out of the mxml and create a click
handler for
  the button.
 
  .. in your app
 
  private var popUpWindow:TitleWindow;
 
  private function button_clickHandler(event:MouseEvent):void
  {
  if (!popUpWindow)
  {
  popUpWindow = TitleWindow(
PopUpManager.createPopUp(this,main,false));
 
  }
  }
 
  
 
  mx:Button click=button_clickHandler(event) ;/
 
  Peace, Mike
 
  On 5/31/07, Flexing... [EMAIL PROTECTED] wrote:
  
   Store a boolean (flag) in your titlewindow to indicate whether the
   Window is already open or not.
  
   On May 31, 2007, at 9:56 AM, Rohan Pinto wrote:
  
   how to i prevent a popup if the popup TileWindow is already Open..
  
   ie: in my conrtol i have
  
   click=PopUpManager.createPopUp( this,main,false);
  
   if the user clicks this several times, it opens up multiple
popups of
   the same window. how do i prevent the popup to just 1 instance ?
  
  
  
 
 
  --
  Teoti Graphix
  http://www.teotigra http://www.teotigraphix.comphix.com
 
  Blog - Flex2Components
  http://www.flex2com http://www.flex2components.components.com
 
  You can find more by solving the problem then by 'asking the
question'.
 
 
 




 --
 Teoti Graphix
 http://www.teotigraphix.com

 Blog - Flex2Components
 http://www.flex2components.com

 You can find more by solving the problem then by 'asking the question'.


 





--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.


Re: [flexcoders] Disable Clicks while on busyCursor

2007-06-01 Thread Bjorn Schultheiss

This is quite slow.
I wait for the app to disable, then any animations running while the  
app is disabled lag.





On 01/06/2007, at 3:51 AM, Alex Harui wrote:



Did you try Application.application.enabled = false?



From: flexcoders@yahoogroups.com  
[mailto:[EMAIL PROTECTED] On Behalf Of Troy Gilbert

Sent: Thursday, May 31, 2007 10:19 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Disable Clicks while on busyCursor



Is it just me, or is it a bit surprising that we've got to hack  
something together to handle this? Come on, Adobe... what's a  
proper solution (and why wasn't it built into the CursorManager!)?  
I've got enough asynchronous problems to deal with than have to  
worry that the user's going to go off willy-nilly clicking buttons  
while the busy cursor is being shown. I understand that some folks  
may not want it to *always* prevent mouse clicks, but a little  
boolean flag (or two) in the CursorManager that prevents mouse  
clicks and/or focus changes/keyboard events would be very, very nice.


Troy.


On 5/31/07, Anthony Lee [EMAIL PROTECTED] wrote:

 - Make all your active components register themselves then loop  
through

 and disable/enable them according to your busy state

 Too taxing on cpu...

How many components are we talking about?

Hack #3
Generate an Alert and position it outside the viewable area.  
They're modal by default... meaning the user shouldn't be able to  
click on anything till you clear it.


Anthony








Regards,

Bjorn Schultheiss
Senior Developer

Personalised Communication Power

Level 2, 31 Coventry St.
South Melbourne 3205,
VIC Australia

T:  +61 3 9674 7400
F:  +61 3 9645 9160
W:  http://www.qdc.net.au

((This transmission is confidential and intended solely  
for the person or organization to whom it is addressed. It may  
contain privileged and confidential information. If you are not the  
intended recipient, you should not copy, distribute or take any  
action in reliance on it. If you believe you received this  
transmission in error, please notify the sender.---))




RE: [flexcoders] Access a viewstack

2007-06-01 Thread Gordon Smith
I didn't look at your code, but the simplest solution is to use
parentDocument (not parent). However, this will make your component
usable only within that ViewStack.
 
- Gordon



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Giro
Sent: Tuesday, May 29, 2007 8:24 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Access a viewstack



I solve it using this:

http://www.nielsbruin.nl/flex_examples/modelexample/ModelExample.html
http://www.nielsbruin.nl/flex_examples/modelexample/ModelExample.html 

But for me is strange that flex dont have a more easy solution.

Giro.

-Mensaje original-
De: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] En nombre
de Tom Chiverton
Enviado el: martes, 29 de mayo de 2007 16:56
Para: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
Asunto: Re: [flexcoders] Access a viewstack

On Tuesday 29 May 2007, Giro wrote:
 How can I do it?

Either give your component a function call back (onClick ?) so it can
fire 
code in the parent directly when stuff happens, refer to the view via 
parent., or investigate something like a ModelLocator.

-- 
Tom Chiverton
Helping to ambassadorially restore best-of-breed partnerships
on: http://thefalken.livejournal.com http://thefalken.livejournal.com 



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England
and
Wales under registered number OC307980 whose registered office address
is at
St James's Court Brown Street Manchester M2 2JF. A list of members is
available for inspection at the registered office. Any reference to a
partner in relation to Halliwells LLP means a member of Halliwells LLP.
Regulated by the Law Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and
may
be confidential or legally privileged. If you are not the addressee you
must not read it and must not use any information contained in nor copy
it
nor inform any person other than Halliwells LLP or the addressee of its
existence or contents. If you have received this email in error please
delete it and notify Halliwells LLP IT Department on 0870 365 8008.

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

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



 


Re: [flexcoders] Problem removing popup window

2007-06-01 Thread Peter Hall

Having the same problem here.

Stepping through the code, I get to this function in
mx.managers.SystemChildrenList.

public function removeChild(child:DisplayObject):DisplayObject
{
 var index:int = owner.mx_internal::rawChildren_getChildIndex(child);
 if (owner[lowerBoundReference] = index 
  index  owner[upperBoundReference])
 {
  owner.mx_internal::rawChildren_removeChild(child);
  owner[upperBoundReference]--;
 }
 return child;
}

Where:

index = 2
owner[lowerBoundReference] = 1
owner[upperBoundReference] = 2


So the child is not being removed.


Any ideas?

Peter



On 4/20/07, Alex Harui [EMAIL PROTECTED] wrote:


   Time for trace statements to make sure it does get called when there
are no break points.  I'd even trace out the numChildren of systemManager to
see if it changed at all.  Could it be that a replacement is being popped
up?

 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Rick Root
*Sent:* Friday, April 20, 2007 10:46 AM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] Problem removing popup window

 I also tried this within my progressWindow component...

public function remove():void
{
callLater(remove2);
}
public function remove2():void
{
PopUpManager.removePopUp(this);
}

Which also didn't work. I mean, it still works in at all times in
debug mode with the breakpoint.. but not without.

Frustrating!

Rick

 



RE: [flexcoders] layout help

2007-06-01 Thread Alex Harui
Try setting minHeight on the Canvas to 0

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rohan Pinto
Sent: Thursday, May 31, 2007 11:49 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] layout help

 

hi folks,

i'm building this app (a video sharing app) and am having issues with
layout..

app URL: http://demo.rohanpinto.com http://demo.rohanpinto.com  

if you notice the right TileWindow titled Desktop Control i have an
accordion which loads data from my backend webservice...

here's the issue:
in the control titled Video Channels
i can't seem to get the vertical scrollbar to work.. (i need to
DISABLE the horizontal scrollbar and enable just the vertical scrollbar)

in the desktopcontrol mxml I have the following:

mx:Canvas scroll=false verticalScrollPolicy=off
horizontalScrollPolicy=off label=Video Channels width=160
ns1:videochannels/
/mx:Canvas

and in videochannels mxml i have the following:

mx:VBox scroll=true verticalScrollPolicy=on
horizontalScrollPolicy=off width=160 
mx:Repeater id=rp2 dataProvider={videoFeed.channel}

com:Hyperlink launchUrl=true colorNormal=#FF
colorHover=#00FF00
linkText={rp2.currentItem.name}
dataUrl=/channels/{rp2.currentItem.id}/ /

/mx:Repeater 
/mx:VBox

could somone tell me what i'm doing wrong?

Rohan Pinto
http://konkan.tv http://konkan.tv 

 



[flexcoders] Re: Deploying Flex app to web server

2007-06-01 Thread sarah_e_boys

The problem relates to the class samples.MyTreeItemRenderer.as.  If I 
remove the reference to this class the flex app deploys correctly to 
the web server.  Should I be compiling the app with a particular 
option so that the .as class gets included? 


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

 I think this is happening because you are trying to access a 
property 
 or method of a null object reference.
 
 :) I couldn't help myself.
 
 But really, if this is happening after a deploy, maybe one of your 
web 
 service calls or server data calls are failing and in your code you 
are 
 not checking for valid data before operating on it. Make sure the 
paths 
 you are using work on the server too, and if your data calls are to 
web 
 pages that can be viewed in a browser directly, use a browser to 
view 
 them to make sure there are no errors preventing valid data from 
being 
 returned in the production environment.
 
 --- In flexcoders@yahoogroups.com, sarah_e_boys sarah_e_boys@ 
 wrote:
 
  I get the following error when I deploy and access my Flex app on 
a 
 web 
  server.  Can anyone help?
  
  TypeError: Error #1009: Cannot access a property or method of a 
null 
  object reference.
  at samples::MyTreeItemRenderer/set data()
 





[flexcoders] Re: Error #1009 - Problem running swf on production server

2007-06-01 Thread sarah_e_boys

Thanks Bhuvan, I added a check for null as you suggested and that 
fixed the problem.  I am confused why it the extended renderer would 
work without this check when run locally in the Flex builder but 
needed it when the app was compiled and moved to the server.


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

 This is basically a null pointer exception.
 In your itemrenderer you must be trying to access the variable of 
an  
 object to probably display the value.
 The object in this case is null.
 You need to add nullity check in your code.
 
 
 On Jun 1, 2007, at 12:19 AM, sarah_e_boys wrote:
 
 
  I get the following error when I try and run my application on a
  production server:
 
  TypeError: Error #1009: Cannot access a property or method of a 
null
  object reference.
  at samples::MyTreeItemRenderer/set data()
 
  The application works fine if I reference it with 
http://localhost or
  run if from Flex Builder. I hope it is something very simple 
regarding
  a reference to the MyTreeItemRenderer.as class not being compiled 
into
  the swf file. I would be grateful for any suggestions...
 
 
 





[flexcoders] Re: Dead space in TabNavigator

2007-06-01 Thread Nick Durnell
I tried to create a sample app which showed the problem but it worked 
flawlessly :)

I think it must be the way I am instantiating/setting the properties 
 styles of the TabNavigator and its content in my main app.  The 
entire UI is built at runtime by parsing an external XML file so 
perhaps I am adding content to the TabNavigator before it is ready or 
the paddingTop style has been applied.  I'll have to do some more 
digging to find out what is wrong.

Nick.

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

 Hmmm I may have spoken too soon.
 
 I have set paddingTop to zero and the content now starts at the top 
 of the tab with no gap.  However - there is now a 9 pixel gap at 
the 
 *bottom* of the tab!  I tried setting paddingBottom to zero as well 
 but then the gap at the bottom *increases* to 18 pixels!
 
 Any ideas what is causing this?
 
 Thanks,
 
 Nick.
 




Re: [flexcoders] Hyperlink in datagrid

2007-06-01 Thread Hara Jn

As you say.. you are right when we use a small text like fail in pass. I was
trying to be generic that is all.
But still when you use a link button it will not replicate the style of the
datagrid. It will look different in the DG. But thats my point of view.

As a matter of fact I am using the link in the datagrid. In my case I am
using domains and urls. And I tried using it with link button. But since my
datagrid was not that big to occupy a bug URL I got scrolls and even some
URl didnto appear in the DG. Thats why I shared that with you guys. I dont
want you guys to experience the one which I had.




On 6/1/07, Harish Sivaramakrishnan [EMAIL PROTECTED] wrote:


  well , I was following the example which has fail and pass which needs
to be hyperlinked. I still feel link button is the best as it is *not* very
common to display the url itself as a link in the applicattion

On 6/1/07, Hara Jn [EMAIL PROTECTED] wrote:

   LInk button wont solve your problem unless if the link is very text is
 very small. when you use a domain name or a long URL Text component is the
 best.


 On 6/1/07, Harish Sivaramakrishnan [EMAIL PROTECTED]  wrote:
 
it you are going the itemRenderer way, you could use the link button
  to open the link. I personally wont do the rowIndex, colIndex based way
  because it is not intutive to me as to what triggered the opening of URL
  since the click is done on the cell itself.
 
  On 6/1/07, Hara Jn [EMAIL PROTECTED]  wrote:
  
 One way is to use the changeEvent. The other way is to use the
   itemRender and insert a Txt component in to the cells. The you can play 
with
   the text and make it like a actual hyper link
  
   On 6/1/07, Ekta Aggarwal [EMAIL PROTECTED]  wrote:
   
   Hi,
   
I am displaying some data in a datagrid where dataprovider is a
XML file. Now, I have a requirement where I need to provide a hyperlink 
on
each data cell of the datagrid, so that clicking on the item can take 
me to
some other page. e.g.
   
   
--
column1column2
-
 FailPass
 FailPass
--
   
Clicking on fail/pass should display the log results.
   
Any idea, how to provide the hyperlink?
   
Regards,
Ekta
   
   
Ekta Gupta
   
 www.geocities.com/aggarwalekta
   
--
Take the Internet to Go: Yahoo!Go puts the Internet in your
pocket:

http://us.rd.yahoo.com/evt=48253/*http://mobile.yahoo.com/go?refer=1GNXICmail,
news, photos more.
   
   


 



[flexcoders] Mask Financial

2007-06-01 Thread rafael_magalhaes007
Good night everyone!

Im using an maskedTextInput component to mak field like CEP, etc. it 
works really well!!! but I need one mask
for financial values and have a good precision. could anybody help 
me? i tried to do the way its shown down below
but it didnt work. when mopre than 5 digits are entered the numbers 
disapear!!

Here's the code:

Function:

Component:

Could Anybody help me?


I apreciate your atencion!!!

[]'s
Rafael



[flexcoders] Creating Local Folder on user HDD thru Flex

2007-06-01 Thread Gaurav Kaushik
Hi Guys,
 
I am working on Apollo Application where I need to create Local Folder
Structure on the Client System.
I am using Flex builder 2 for the same.
 
Can anyone help in as to how to create Local Folders thru Flex?
 
Thanks Guys.
Cheers!!
Best Regards
Gaurav Kaushik
Flash Application Development
ICREON Communications
M: +91-985434
Business Solutions:  http://www.icreon.net www.icreon.net
Design Solutions:  http://www.icreon.com www.icreon.com
-
An ISO 9001:2000 Certified Co.
- 
DISCLAIMER
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution or any action taken or omitted to be taken in reliance
on it, is prohibited and may be unlawful. When addressed to our customers,
any opinions or advice contained in this email are subject to the terms and
conditions expressed in the governing Icreon-client engagement letter.
 


[flexcoders] Re: Labels on inner side of axis for Charts

2007-06-01 Thread Aaron Wright
Yeah, I tested it on the horizontal axis to avoid that problem, hehe.

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

 Yep... thought of that... but if your label widths change that labelGap
 value is bunk...  I've tried playing around with binding to the
gutterWidth
 and such, but have had no success so far...
 
 
 Brendan
 
 
 On 5/31/07, Aaron Wright [EMAIL PROTECTED] wrote:
 
You can simply specify a negative labelGap for the AxisRenderer to
  get the labels on the inside of the chart. It's not elegant, but...
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Brendan
  Meutzner bmeutzner@
  wrote:
  
   Hi,
  
   Before I go digging through the charting framework, I thought
I'd see if
   anyone else has accomplished placing the labels on the inside of the
  chart
   axis (and better yet, having them align left when placed there),
and are
   willing to share code/ideas?
  
   Thanks,
  
   Brendan
  
   --
   Brendan Meutzner
   Stretch Media - RIA Adobe Flex Development
   brendan.meutzner@
   http://www.stretchmedia.ca
  
 
   
 
 
 
 
 -- 
 Brendan Meutzner
 Stretch Media - RIA Adobe Flex Development
 [EMAIL PROTECTED]
 http://www.stretchmedia.ca





RE: [flexcoders] Best way to set styles in actionscript?

2007-06-01 Thread Mark Ingram
Thanks -
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhel
p.htm?context=LiveDocs_Book_Partsfile=skinstyle_149_7.html - was the
link I needed!


Mark
 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Muzak
Sent: 01 June 2007 11:10
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Best way to set styles in actionscript?

http://livedocs.adobe.com/flex/2/docs/1747.html
http://livedocs.adobe.com/flex/2/docs/1748.html
http://livedocs.adobe.com/flex/2/docs/1752.html
http://livedocs.adobe.com/flex/2/docs/1753.html

http://livedocs.adobe.com/flex/2/docs/1661.html



- Original Message - 
From: Mark Ingram [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, June 01, 2007 11:58 AM
Subject: [flexcoders] Best way to set styles in actionscript?


Hi, I have a custom component that I want to define styles for. What is
the best way of setting up styles? I understand that if a style has been
set, getStyle never returns undefined? So, should I have something like:

Any help much appreciated!



Mark











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





Re: [flexcoders] Best way to set styles in actionscript?

2007-06-01 Thread Muzak
http://livedocs.adobe.com/flex/2/docs/1747.html
http://livedocs.adobe.com/flex/2/docs/1748.html
http://livedocs.adobe.com/flex/2/docs/1752.html
http://livedocs.adobe.com/flex/2/docs/1753.html

http://livedocs.adobe.com/flex/2/docs/1661.html



- Original Message - 
From: Mark Ingram [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, June 01, 2007 11:58 AM
Subject: [flexcoders] Best way to set styles in actionscript?


Hi, I have a custom component that I want to define styles for. What is
the best way of setting up styles? I understand that if a style has been
set, getStyle never returns undefined? So, should I have something like:

Any help much appreciated!



Mark











[flexcoders] Re: Dead space in TabNavigator

2007-06-01 Thread Nick Durnell
--- In flexcoders@yahoogroups.com, Michael Schmalle 
[EMAIL PROTECTED] wrote:

 Hi,
 
 that is because the TabNavigator has a default paddingTop style of 
10
 pixels.
 
 TabNavigator {
 paddingTop:0;
 }
 
 will solve it for all of them in your application.
 
 Peace, Mike
 

It does indeed!  Many thanks.  I'd passed over this style in the 
online docs as TabNavigator paddingTop inherits from ViewStack and 
there it says the default is 0!

Nick.




[flexcoders] Re: Dead space in TabNavigator

2007-06-01 Thread Nick Durnell
Hmmm I may have spoken too soon.

I have set paddingTop to zero and the content now starts at the top 
of the tab with no gap.  However - there is now a 9 pixel gap at the 
*bottom* of the tab!  I tried setting paddingBottom to zero as well 
but then the gap at the bottom *increases* to 18 pixels!

Any ideas what is causing this?

Thanks,

Nick.

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

 --- In flexcoders@yahoogroups.com, Michael Schmalle 
 teoti.graphix@ wrote:
 
  Hi,
  
  that is because the TabNavigator has a default paddingTop style 
of 
 10
  pixels.
  
  TabNavigator {
  paddingTop:0;
  }
  
  will solve it for all of them in your application.
  
  Peace, Mike
  
 
 It does indeed!  Many thanks.  I'd passed over this style in the 
 online docs as TabNavigator paddingTop inherits from ViewStack and 
 there it says the default is 0!
 
 Nick.





RE: [flexcoders] Charts and Business day axis

2007-06-01 Thread Sunil Bannur
Pierre, You should ideally be using DateTimeAxis, by which you can
control the labels and ticks.

 

-Sunil

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of pgherveou
Sent: Thursday, May 31, 2007 8:16 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Charts and Business day axis

 

Hello there,

I try to display a chart based on a one year business day axis. (no
week ends for the moment)

I used a categoryAxis to draw my chart. It works perfectly. the only
problem is the axis. There are not enough space to display all ticks
and labels (one per business day). 

Ideally what I would like to do is to controls label and ticks to
display for example only the label of the first business day of each
month.

I tried to use a custom LabelFunction to do that, but I can't fix the
labelSize (they are still to small)

Thanks in advance for your help

Pierre

 



Re: [flexcoders] Deploying Flex app to web server

2007-06-01 Thread Hara Jn

Its a common error... anybody can get it... I dont think there is nothing
related to the webservice.

Few things you need to check with are..

1. Check is any component is being processed even before it has been
created.
Example if you use a viewstack, you can show only one tab at a time. But you
might be trying to load a component at the other tab which is never created.
Say if you have a chart in one tab and a tree in the other and by default
the chart displays first. But when you try to load the app and you also try
to load the data to the tree it might throw the error what you get. Because
the tree component is not yet created. By default the components visible to
the eye are first loaded. To overide this aspect just use creationPolicy =
all in the viewstack.

2. The one or more of the objects used inside the file might be null and yu
still try to use to access its functions. like when a array object is null
and when you try to use the length function of the object you get this
error.

3. To avoid the default error you can use a try catch in the functions and
have your own error alerts.

To trace the line where the bug exisits you can use a trial and error
method. But it consumes lot of time. Or use some Alerts here and there to
trace.

Hara


On 6/1/07, sarah_e_boys [EMAIL PROTECTED] wrote:


  I get the following error when I deploy and access my Flex app on a web
server. Can anyone help?

TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at samples::MyTreeItemRenderer/set data()





Re: [flexcoders] Hyperlink in datagrid

2007-06-01 Thread Harish Sivaramakrishnan

it you are going the itemRenderer way, you could use the link button to open
the link. I personally wont do the rowIndex, colIndex based way because it
is not intutive to me as to what triggered the opening of URL since the
click is done on the cell itself.

On 6/1/07, Hara Jn [EMAIL PROTECTED] wrote:


  One way is to use the changeEvent. The other way is to use the
itemRender and insert a Txt component in to the cells. The you can play with
the text and make it like a actual hyper link

On 6/1/07, Ekta Aggarwal [EMAIL PROTECTED] wrote:

Hi,

 I am displaying some data in a datagrid where dataprovider is a XML
 file. Now, I have a requirement where I need to provide a hyperlink on each
 data cell of the datagrid, so that clicking on the item can take me to some
 other page. e.g.


 --
 column1column2
 -
  FailPass
  FailPass
 --

 Clicking on fail/pass should display the log results.

 Any idea, how to provide the hyperlink?

 Regards,
 Ekta


 Ekta Gupta

  www.geocities.com/aggarwalekta

 --
 Take the Internet to Go: Yahoo!Go puts the Internet in your pocket:
 
http://us.rd.yahoo.com/evt=48253/*http://mobile.yahoo.com/go?refer=1GNXICmail, 
news, photos more.




Re: [flexcoders] Hyperlink in datagrid

2007-06-01 Thread Hara Jn

LInk button wont solve your problem unless if the link is very text is very
small. when you use a domain name or a long URL Text component is the best.

On 6/1/07, Harish Sivaramakrishnan [EMAIL PROTECTED] wrote:


  it you are going the itemRenderer way, you could use the link button to
open the link. I personally wont do the rowIndex, colIndex based way because
it is not intutive to me as to what triggered the opening of URL since the
click is done on the cell itself.

On 6/1/07, Hara Jn [EMAIL PROTECTED] wrote:

   One way is to use the changeEvent. The other way is to use the
 itemRender and insert a Txt component in to the cells. The you can play with
 the text and make it like a actual hyper link

 On 6/1/07, Ekta Aggarwal [EMAIL PROTECTED]  wrote:
 
 Hi,
 
  I am displaying some data in a datagrid where dataprovider is a XML
  file. Now, I have a requirement where I need to provide a hyperlink on each
  data cell of the datagrid, so that clicking on the item can take me to some
  other page. e.g.
 
 
  --
  column1column2
  -
   FailPass
   FailPass
  --
 
  Clicking on fail/pass should display the log results.
 
  Any idea, how to provide the hyperlink?
 
  Regards,
  Ekta
 
 
  Ekta Gupta
 
   www.geocities.com/aggarwalekta
 
  --
  Take the Internet to Go: Yahoo!Go puts the Internet in your pocket:
  
http://us.rd.yahoo.com/evt=48253/*http://mobile.yahoo.com/go?refer=1GNXICmail,
  news, photos more.
 
 




RE: [flexcoders] What functions do I need to override to return correct component size?

2007-06-01 Thread Mark Ingram
Hi Mike, that sounds pretty similar to what I'm trying to implement.
Drag selecting via mouse and one or more component selection (either
from drag select, or clicking with mouse).

 

I've implemented drag selection by using a UIComponent and the following
function - startSelection, updateSelection and stopSelection (called
from a parent controls mouseDown, mouseMove and mouseUp, respectively).

 

What do you have a selection queue for?? I figured I would have a list
of selected objects, but not much more than that.

 

With the popup overlay, do you use the popupManager? And I presume for
client overlay you just add the selection as a child of the control?

 

Thanks for your insight!

 

Mark

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Schmalle
Sent: 31 May 2007 17:33
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] What functions do I need to override to return
correct component size?

 

Hi,

Actually I have a really complicated selection manager component. It
works great.

It does multi selection so there is client selection rectangles and then
a popup selection rectangle that encompases all selected components in a
canvas. 

basically you have the option of a popup overlay or client overlays.

I use both. it gets complicated if you want more than just basic
functionality.

As far as moving, just add listeners to the component that is selected,
MOVE, RESIZE and handle it from there. 

Mine even has a mouse selection rectangle and all that but, then I use a
selectionQueue in the manager. complicated ;-)

Peace, Mike




On 5/31/07, Mark Ingram [EMAIL PROTECTED] wrote:

So if you go via the manager approach, the manager adds the selection as
a child to the component? e.g.
textArea.addChild(selectionManager.newSelection) ?

 

The way I was thinking was for the main page (extension of Canvas) to
add the selection to itself, and just position it over the component to
be selected. I suppose the downsides of that are that you need to
manually update the selection location when the component moves or
sizes...

 

Thanks,

 

Mark

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] ups.com
http://ups.com ] On Behalf Of Michael Schmalle
Sent: 31 May 2007 16:45


To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] What functions do I need to override to return
correct component size?

 

Hi,

Yeah, I have a manager that does exactly this.

Basically my advice is, keep the UIComponents seperate from your
selection.

Use some sort of singleton manager that you register selections with.
Then when a user or application geasture allows a selection, use the
manager to create an instance of your selection, embed it into the
UIComponent and either offset the graphix or create the overlay -10
pixels from the components x and y and adjust the width of the selection
overlay by 10X2. 

This way you are only dealing with the overlay's size not the
component's.

Another simpler approach is if you have certain components that are
selectable. just create the overlay in each in their createChildren(). 

Create an ISelectable interface interface;

function get selected():Boolean
function set selected(value):Boolean;

Then when your components are selected they turn the visible to tru on
the overlay and size it to the dimensions you need with the offset. 

This way you are not even messing with the measure dealing with the
selection overlay.

Peace, Mike

On 5/31/07, Mark Ingram  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Hi Mike, essentially I am drawing a selection rectangle around controls,
for the time being it's a 10pixel wide red rectangle (it will be
configurable later).

 

If you have any better suggestions for doing a selection rectangle
that'd be great :-) 

 

My current train of thought is that the page container should place the
selection component over the top of each control.

 

Mark

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] ups.com
http://ups.com ] On Behalf Of Michael Schmalle
Sent: 31 May 2007 15:58


To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] What functions do I need to override to return
correct component size?

 

Hi,

Yes it does. 

Here is the way it works,

You need to figure out why you need a - offset because really, this does
not fit into the framework. The only time, a negative offset is viable
is an overlay(that is not measured with the component's children). 

Think 4th dimensionally here, why do you need the offset? The layout
manager assumes every component is a rectangle inside it's x,y width and
height bounds. This is where measure comes in. 

Your measured values must comply with the actual content you are
measuring inside your UIComponent virtual rectangle. Any deviation from
this will just result in layout bugs and unexpected behavior. 

Give me a little more info about 

[flexcoders] Applying filters to an image to use as a icon asset for a button

2007-06-01 Thread Paolo Bernardini

Hi,
I want to applying some filters to an image before I use it as an icon asset
for a button.
I tryied this:
**public function getButtonIcon(btn:String):Class
 {
  var result : Class;

  switch ( btn ) {
case cart:
result = model.assets.cartIconBig;
break;
case find:
result = model.assets.searchIconBig;
break;
   }
  var temp:BitmapAsset = BitmapAsset(result);
  temp.filters = [shadowFilter];

  return temp;
 }

then


icon={getButtonIcon(*'find'*)}



of Course I get a conversion type error becouse I return BitmapAsset instead
of a Class, I tryied many solutions but no luck.

How do I solve it?


[flexcoders] Best way to set styles in actionscript?

2007-06-01 Thread Mark Ingram
Hi, I have a custom component that I want to define styles for. What is
the best way of setting up styles? I understand that if a style has been
set, getStyle never returns undefined? So, should I have something like:

 

public class MyClass extends UIComponent

{

public function MyClass()

{

this.setStyle(borderColor, 0xFF);

this.setStyle(borderAlpha, 1.0);

}

 

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

{

super.updateDisplayList(unscaledWidth,
unscaledHeight);

 

var borderColor:uint =
this.getStyle(borderColor);

var borderAlpha:number =
this.getStyle(borderAlpha);

 

// Now do something with these colours!

}

}

 

Any help much appreciated!

 

Mark

 

 

 



[flexcoders] Mask Financial

2007-06-01 Thread rafael_magalhaes007
Good night everyone!

Im using an maskedTextInput component to mak field like CEP, etc. it
works really well!!! but I need one mask
for financial values and have a good precision. could anybody help
me? i tried to do the way its shown down below
but it didnt work. when mopre than 5 digits are entered the numbers
disapear!!

Here's the code:

Function:
__
private function Format(campo:TextInput):void {
   var temp:Number = Number(campo.text); 
   campo.text = moeda.format(temp);
}
__
Components:
mx:CurrencyFormatter id=moeda precision=2 
currencySymbol= decimalSeparatorFrom=.
decimalSeparatorTo=. useNegativeSign=true 
useThousandsSeparator=true alignSymbol=left/

mx:TextInput id=nome maxChars=30 width=100% keyUp=FOrmat
(nome)/



Could Anybody help me?


I apreciate your atencion!!!

[]'s
Rafael




Re: [flexcoders] Hyperlink in datagrid

2007-06-01 Thread Harish Sivaramakrishnan

well , I was following the example which has fail and pass which needs to be
hyperlinked. I still feel link button is the best as it is *not* very common
to display the url itself as a link in the applicattion

On 6/1/07, Hara Jn [EMAIL PROTECTED] wrote:


  LInk button wont solve your problem unless if the link is very text is
very small. when you use a domain name or a long URL Text component is the
best.


On 6/1/07, Harish Sivaramakrishnan [EMAIL PROTECTED] wrote:

   it you are going the itemRenderer way, you could use the link button
 to open the link. I personally wont do the rowIndex, colIndex based way
 because it is not intutive to me as to what triggered the opening of URL
 since the click is done on the cell itself.

 On 6/1/07, Hara Jn [EMAIL PROTECTED]  wrote:
 
One way is to use the changeEvent. The other way is to use the
  itemRender and insert a Txt component in to the cells. The you can play with
  the text and make it like a actual hyper link
 
  On 6/1/07, Ekta Aggarwal [EMAIL PROTECTED]  wrote:
  
  Hi,
  
   I am displaying some data in a datagrid where dataprovider is a XML
   file. Now, I have a requirement where I need to provide a hyperlink on 
each
   data cell of the datagrid, so that clicking on the item can take me to 
some
   other page. e.g.
  
  
   --
   column1column2
   -
FailPass
FailPass
   --
  
   Clicking on fail/pass should display the log results.
  
   Any idea, how to provide the hyperlink?
  
   Regards,
   Ekta
  
  
   Ekta Gupta
  
www.geocities.com/aggarwalekta
  
   --
   Take the Internet to Go: Yahoo!Go puts the Internet in your pocket:
   
http://us.rd.yahoo.com/evt=48253/*http://mobile.yahoo.com/go?refer=1GNXICmail,
   news, photos more.
  
  




Re: [flexcoders] Best way to set styles in actionscript?

2007-06-01 Thread Muzak
FYI, each livedoc page has a shortcut url at the bottom of the page, which is 
more readable (and usually doesn't wrap in emails)

Same page as you posted..
http://livedocs.adobe.com/flex/201/html/skinstyle_149_7.html

regards,
Muzak

- Original Message - 
From: Mark Ingram [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, June 01, 2007 12:31 PM
Subject: RE: [flexcoders] Best way to set styles in actionscript?


Thanks -
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhel
p.htm?context=LiveDocs_Book_Partsfile=skinstyle_149_7.html - was the
link I needed!


Mark


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Muzak
Sent: 01 June 2007 11:10
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Best way to set styles in actionscript?

http://livedocs.adobe.com/flex/2/docs/1747.html
http://livedocs.adobe.com/flex/2/docs/1748.html
http://livedocs.adobe.com/flex/2/docs/1752.html
http://livedocs.adobe.com/flex/2/docs/1753.html

http://livedocs.adobe.com/flex/2/docs/1661.html



- Original Message - 
From: Mark Ingram [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, June 01, 2007 11:58 AM
Subject: [flexcoders] Best way to set styles in actionscript?


Hi, I have a custom component that I want to define styles for. What is
the best way of setting up styles? I understand that if a style has been
set, getStyle never returns undefined? So, should I have something like:

Any help much appreciated!



Mark




[flexcoders] Re: Deploying Flex app to web server

2007-06-01 Thread sarah_e_boys
I solved the problem by checking for nulls in the extended 
treeitemrenderer class.  I am confused why the check for nulls wasn't 
needed in Flex builder but was necessary when the code was compiled 
and moved to the server.

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

 I think this is happening because you are trying to access a 
property 
 or method of a null object reference.
 
 :) I couldn't help myself.
 
 But really, if this is happening after a deploy, maybe one of your 
web 
 service calls or server data calls are failing and in your code you 
are 
 not checking for valid data before operating on it. Make sure the 
paths 
 you are using work on the server too, and if your data calls are to 
web 
 pages that can be viewed in a browser directly, use a browser to 
view 
 them to make sure there are no errors preventing valid data from 
being 
 returned in the production environment.
 
 --- In flexcoders@yahoogroups.com, sarah_e_boys sarah_e_boys@ 
 wrote:
 
  I get the following error when I deploy and access my Flex app on 
a 
 web 
  server.  Can anyone help?
  
  TypeError: Error #1009: Cannot access a property or method of a 
null 
  object reference.
  at samples::MyTreeItemRenderer/set data()
 





Re: [flexcoders] Best way to set styles in actionscript?

2007-06-01 Thread Muzak
You need to create the CSSStyleDeclaration only once.

var css:CSSStyleDeclaration = new CSSStyleDeclaration();
css.setStyle(borderColor, 0x316AC5);
css.setStyle(tileAlphas, [1,1]);
css.setStyle(borderColor, 0x316AC5);
css.setStyle(borderAlpha, 1.0);
css.setStyle(fillColor, 0x316AC5);
css.setStyle(fillAlpha, 0.5);
StyleManager.setStyleDeclaration(DragSelection, css, true);

regards,
Muzak

- Original Message - 
From: Mark Ingram [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, June 01, 2007 12:53 PM
Subject: RE: [flexcoders] Best way to set styles in actionscript?


OK, that doesn't work. What's wrong with my code?

private static var m_staticInitialised:Boolean =
DragSelection.staticConstructor();
private static function staticConstructor():Boolean
{
if (!StyleManager.getStyleDeclaration(DragSelection))
{
// If there is no CSS definition for DragSelection,
// then create one and set the default value.
var borderColorStyle:CSSStyleDeclaration = new CSSStyleDeclaration();
borderColorStyle.setStyle(borderColor, 0x316AC5);
var borderAlphaStyle:CSSStyleDeclaration = new CSSStyleDeclaration();
borderAlphaStyle.setStyle(borderAlpha, 1.0);
var fillColorStyle:CSSStyleDeclaration = new CSSStyleDeclaration();
fillColorStyle.setStyle(fillColor, 0x316AC5);
var fillAlphaStyle:CSSStyleDeclaration = new CSSStyleDeclaration();
fillAlphaStyle.setStyle(fillAlpha, 0.5);

StyleManager.setStyleDeclaration(DragSelection, borderColorStyle, true);
StyleManager.setStyleDeclaration(DragSelection, borderAlphaStyle, true);
StyleManager.setStyleDeclaration(DragSelection, fillColorStyle, true);
StyleManager.setStyleDeclaration(DragSelection, fillAlphaStyle, true);
}

return true;
}

The values that come out during updateDisplayList are:
borderColor: 0xb7babc (grey)
borderAlpha: 1
fillColor: 0xff (white)
fillAlpha: 0.5

It seems the border and fill colours are being overwritten somewhere
(the parent background is white)!

I checked in styleChanged function, but the styleProp value just came
through as null every time!

Thanks,

Mark





[flexcoders] Re: Disable Clicks while on busyCursor

2007-06-01 Thread Bjorn Schultheiss
Al, 

you mentioned the 'mouse shield' in the modal situation.
This is cool, but does the alpha setting of this shield have an affect
on the application rendering speed?
Hence, animations running behind this shield slowing in performance?




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

 Try calling validateNow after setting enabled to false.
 
  
 
 Animations can shut down validatiom.  If you can disable and re-validate
 before the animations start, that would be best.
 
  
 
 However, what it does, and what modal dialogs do is put up a mouse
 shield over the whole app.  It's a relatively easy thing to do, and I
 wouldn't want to put it in CursorManager as it really doesn't have
 anything to do with cursors.  You could have a progress bar and no busy
 cursor and still want to block.  Maybe we need to see if we can come up
 with a best practice for how to use application.enabled.
 
  
 
 -Alex
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Bjorn Schultheiss
 Sent: Thursday, May 31, 2007 11:13 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Disable Clicks while on busyCursor
 
  
 
 This is quite slow.
 I wait for the app to disable, then any animations running while the
 app is disabled lag.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Did you try Application.application.enabled = false?
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of Troy Gilbert
  Sent: Thursday, May 31, 2007 10:19 AM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: Re: [flexcoders] Disable Clicks while on busyCursor
  
  
  
  Is it just me, or is it a bit surprising that we've got to hack
  something together to handle this? Come on, Adobe... what's a proper
  solution (and why wasn't it built into the CursorManager!)? I've got
  enough asynchronous problems to deal with than have to worry that the
  user's going to go off willy-nilly clicking buttons while the busy
  cursor is being shown. I understand that some folks may not want it to
  *always* prevent mouse clicks, but a little boolean flag (or two) in
 the
  CursorManager that prevents mouse clicks and/or focus changes/keyboard
  events would be very, very nice. 
  
  Troy.
  
  
  
  On 5/31/07, Anthony Lee anthony.f.lee@
  mailto:anthony.f.lee@  wrote:
  
   - Make all your active components register themselves then loop
  through 
   and disable/enable them according to your busy state 
  
   Too taxing on cpu...
  
  How many components are we talking about?
  
  Hack #3
  Generate an Alert and position it outside the viewable area. They're
  modal by default... meaning the user shouldn't be able to click on
  anything till you clear it. 
  
  Anthony
 





RE: [flexcoders] Best way to set styles in actionscript?

2007-06-01 Thread Mark Ingram
OK, that doesn't work. What's wrong with my code?

private static var m_staticInitialised:Boolean =
DragSelection.staticConstructor();
private static function staticConstructor():Boolean
{
if (!StyleManager.getStyleDeclaration(DragSelection))
{
// If there is no CSS definition for DragSelection, 
// then create one and set the default value.
var borderColorStyle:CSSStyleDeclaration = new
CSSStyleDeclaration();
borderColorStyle.setStyle(borderColor, 0x316AC5);
var borderAlphaStyle:CSSStyleDeclaration = new
CSSStyleDeclaration();
borderAlphaStyle.setStyle(borderAlpha, 1.0);
var fillColorStyle:CSSStyleDeclaration = new
CSSStyleDeclaration();
fillColorStyle.setStyle(fillColor, 0x316AC5);
var fillAlphaStyle:CSSStyleDeclaration = new
CSSStyleDeclaration();
fillAlphaStyle.setStyle(fillAlpha, 0.5);

StyleManager.setStyleDeclaration(DragSelection,
borderColorStyle, true);
StyleManager.setStyleDeclaration(DragSelection,
borderAlphaStyle, true);
StyleManager.setStyleDeclaration(DragSelection,
fillColorStyle, true);
StyleManager.setStyleDeclaration(DragSelection,
fillAlphaStyle, true);
}

return true;
}

The values that come out during updateDisplayList are:
borderColor: 0xb7babc (grey)
borderAlpha: 1
fillColor: 0xff (white)
fillAlpha: 0.5

It seems the border and fill colours are being overwritten somewhere
(the parent background is white)!

I checked in styleChanged function, but the styleProp value just came
through as null every time!

Thanks,

Mark

 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Ingram
Sent: 01 June 2007 11:31
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Best way to set styles in actionscript?

Thanks -
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhel
p.htm?context=LiveDocs_Book_Partsfile=skinstyle_149_7.html - was the
link I needed!


Mark
 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Muzak
Sent: 01 June 2007 11:10
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Best way to set styles in actionscript?

http://livedocs.adobe.com/flex/2/docs/1747.html
http://livedocs.adobe.com/flex/2/docs/1748.html
http://livedocs.adobe.com/flex/2/docs/1752.html
http://livedocs.adobe.com/flex/2/docs/1753.html

http://livedocs.adobe.com/flex/2/docs/1661.html



- Original Message - 
From: Mark Ingram [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, June 01, 2007 11:58 AM
Subject: [flexcoders] Best way to set styles in actionscript?


Hi, I have a custom component that I want to define styles for. What is
the best way of setting up styles? I understand that if a style has been
set, getStyle never returns undefined? So, should I have something like:

Any help much appreciated!



Mark











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





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





[flexcoders] Remote controlling multiple Flex2 apps - Push, sockets anything ?

2007-06-01 Thread oneproofdk
I'm looking for a way to control several Flex2 apps, running on their
own client.

This is my scenario:
We need to build a videowall using 6-8 30 monitors, where our
monthly magazine is displayed spread by spread. This is to be able to
see the flow of the magazine in real time (it changes by the hour
almost, advertisers coming and going)

So what I'd like to be able to do, is to control each of the monitors,
that are attached to their own PC/Mac. I want to be able to control
what pages are shown on which monitor.

How can I remotecontrol the flex2 app ? I need to make them reload
pages, zoom, etc. from a central control app - also Flex2.

Can I broadcast an event to the other clients (propably not)
Can I use some socket connection to control them ?

Any pointers or ideas will be greatly appreciated.

Thanks,
Mark



[flexcoders] FileReference and dragdrop

2007-06-01 Thread Ivor Paul

Hi

I am playing around with an apollo/rails app that allows you to
upload/download files between the server and the apollo client.
I am using FileReference to do the upload and download and this works like a
charm.

What I would like to do is to create 2 lists - local and server (like total
commander/ftp client) and be able to drag and drop between the server and
the client.

I would need to use FileReference without the dialog boxes and I would need
to get a list of files in a directory on the local machine.
I have read many comments about attempts to use FileReference without dialog
boxes and havent seen anyone who got this to work.

Does anyone have any suggestions? Whether regarding the drag and drop
instead of dialog boxes or ways to get a local file/folder list?

Regards


RE: [flexcoders] Best way to set styles in actionscript?

2007-06-01 Thread Mark Ingram
That's brilliant - thanks Muzak!
(And thanks for the hint about URLs)

Mark
 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Muzak
Sent: 01 June 2007 13:03
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Best way to set styles in actionscript?

You need to create the CSSStyleDeclaration only once.

var css:CSSStyleDeclaration = new CSSStyleDeclaration();
css.setStyle(borderColor, 0x316AC5);
css.setStyle(tileAlphas, [1,1]);
css.setStyle(borderColor, 0x316AC5);
css.setStyle(borderAlpha, 1.0);
css.setStyle(fillColor, 0x316AC5);
css.setStyle(fillAlpha, 0.5);
StyleManager.setStyleDeclaration(DragSelection, css, true);

regards,
Muzak

- Original Message - 
From: Mark Ingram [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, June 01, 2007 12:53 PM
Subject: RE: [flexcoders] Best way to set styles in actionscript?


OK, that doesn't work. What's wrong with my code?

private static var m_staticInitialised:Boolean =
DragSelection.staticConstructor();
private static function staticConstructor():Boolean
{
if (!StyleManager.getStyleDeclaration(DragSelection))
{
// If there is no CSS definition for DragSelection,
// then create one and set the default value.
var borderColorStyle:CSSStyleDeclaration = new CSSStyleDeclaration();
borderColorStyle.setStyle(borderColor, 0x316AC5);
var borderAlphaStyle:CSSStyleDeclaration = new CSSStyleDeclaration();
borderAlphaStyle.setStyle(borderAlpha, 1.0);
var fillColorStyle:CSSStyleDeclaration = new CSSStyleDeclaration();
fillColorStyle.setStyle(fillColor, 0x316AC5);
var fillAlphaStyle:CSSStyleDeclaration = new CSSStyleDeclaration();
fillAlphaStyle.setStyle(fillAlpha, 0.5);

StyleManager.setStyleDeclaration(DragSelection, borderColorStyle,
true);
StyleManager.setStyleDeclaration(DragSelection, borderAlphaStyle,
true);
StyleManager.setStyleDeclaration(DragSelection, fillColorStyle, true);
StyleManager.setStyleDeclaration(DragSelection, fillAlphaStyle, true);
}

return true;
}

The values that come out during updateDisplayList are:
borderColor: 0xb7babc (grey)
borderAlpha: 1
fillColor: 0xff (white)
fillAlpha: 0.5

It seems the border and fill colours are being overwritten somewhere
(the parent background is white)!

I checked in styleChanged function, but the styleProp value just came
through as null every time!

Thanks,

Mark





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





Re: [flexcoders] Disable Clicks while on busyCursor

2007-06-01 Thread robert was

What about Cairngorm or another architectural solutions. If user actions
trigger interactions with server they may be disabled via event manager.
--
Robert


Re: [flexcoders] What functions do I need to override to return correct component size?

2007-06-01 Thread Michael Schmalle

Hi Mark,

The selectionQueue is a queue that holds a list of all the selected
UIComponents. I use this for my resize, snap, rotation and move managers.

Basically, you add a component as a client of the selection manager, it then
registers listeners to the client like mouseDown, mouseOver, add, remove,
etc.

When the component receives an event such as mouseDown, it activates the
selectionManager's mouseDown handler. this way all of the interaction is
delegated to the manager. The manager does the necessary function to the
client and adds the client to it's queue. It also activates or deactivates
the clients selection overlay while updating it's own popup overlay.

The popup overlay is placed in the systemManager's popupChildren list. I
don't use the popupmanager. I manage the popup overlay throught the
selection manager.

I have a lot of extra stuff in my manager because it works with all of the
other managers I mentioned. This way you abstract a selection algorithm and
you can easily use the manager for group resize, move and other function
dealing with group selection.

Peace, Mike

On 6/1/07, Mark Ingram [EMAIL PROTECTED] wrote:


   Hi Mike, that sounds pretty similar to what I'm trying to implement.
Drag selecting via mouse and one or more component selection (either from
drag select, or clicking with mouse).



I've implemented drag selection by using a UIComponent and the following
function – startSelection, updateSelection and stopSelection (called from a
parent controls mouseDown, mouseMove and mouseUp, respectively).



What do you have a selection queue for?? I figured I would have a list of
selected objects, but not much more than that.



With the popup overlay, do you use the popupManager? And I presume for
client overlay you just add the selection as a child of the control?



Thanks for your insight!



Mark




  --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Michael Schmalle
*Sent:* 31 May 2007 17:33
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] What functions do I need to override to return
correct component size?



Hi,

Actually I have a really complicated selection manager component. It works
great.

It does multi selection so there is client selection rectangles and then a
popup selection rectangle that encompases all selected components in a
canvas.

basically you have the option of a popup overlay or client overlays.

I use both. it gets complicated if you want more than just basic
functionality.

As far as moving, just add listeners to the component that is selected,
MOVE, RESIZE and handle it from there.

Mine even has a mouse selection rectangle and all that but, then I use a
selectionQueue in the manager. complicated ;-)

Peace, Mike


 On 5/31/07, *Mark Ingram* [EMAIL PROTECTED] wrote:

So if you go via the manager approach, the manager adds the selection as a
child to the component? e.g. textArea.addChild(
selectionManager.newSelection) ?



The way I was thinking was for the main page (extension of Canvas) to add
the selection to itself, and just position it over the component to be
selected. I suppose the downsides of that are that you need to manually
update the selection location when the component moves or sizes…



Thanks,



Mark




  --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] ups.com] *On
Behalf Of *Michael Schmalle
*Sent:* 31 May 2007 16:45


*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] What functions do I need to override to return
correct component size?



Hi,

Yeah, I have a manager that does exactly this.

Basically my advice is, keep the UIComponents seperate from your
selection.

Use some sort of singleton manager that you register selections with. Then
when a user or application geasture allows a selection, use the manager to
create an instance of your selection, embed it into the UIComponent and
either offset the graphix or create the overlay -10 pixels from the
components x and y and adjust the width of the selection overlay by 10X2.

This way you are only dealing with the overlay's size not the component's.

Another simpler approach is if you have certain components that are
selectable. just create the overlay in each in their createChildren().

Create an ISelectable interface interface;

function get selected():Boolean
function set selected(value):Boolean;

Then when your components are selected they turn the visible to tru on the
overlay and size it to the dimensions you need with the offset.

This way you are not even messing with the measure dealing with the
selection overlay.

Peace, Mike

On 5/31/07, *Mark Ingram*  [EMAIL PROTECTED] wrote:

Hi Mike, essentially I am drawing a selection rectangle around controls,
for the time being it's a 10pixel wide red rectangle (it will be
configurable later).



If you have any better suggestions for doing a selection rectangle that'd
be great J



My current train of 

[flexcoders] Module Mania

2007-06-01 Thread Dave @ VitalPodcasts.com
Im trying to create a modular application using SuperPanel.  

I have the Main application, which calls a funciton that creates a 
SuperPanel ( a floating Panel ) which loads a Module.

Now in this Module, I load a Tab Navigator that loads up a bunch of 
buttons,  which on click, runs a function that creates a SuperPanel, 
and loads a module in it.

2 Problems.

With what I described, when the first Module loads up everything is 
fine, but when I have that try and laod a module, it loads the panel 
within its panel, and I want new windows to be loaded on the main app 
so it is not bound by the creating module.

Second issue, is how to I make a loaded module expand to the width and 
height of a resizable parent object?




[flexcoders] Re: Flash Poll Application but with Flex Integration Charts

2007-06-01 Thread dazweeja
Hi Sher,

Did you solve your problem? That pie chart looks quite nice to me. Did
you create the pie chart component yourself? The reason I am asking is
 I'm doing a similar project right now and would appreciate your advice.

It's my understanding that the Flex Component Kit allows you to import
your Flash movie into Flex to use as a component in a Flex app. This
might be overkill for your purposes as the resulting Flex app might
end up over 200KB and will require Flash Player 9 to play.

Cheers,
Darren.


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

 Hello,
 
 I have created a poll application in flash which you can see the demo
 in the current state:
 http://www.arcoint.com/wes/poll/flash_poll_01.html
 
 My application is going good so far, but I have problem with the 3d
 pie charts. My current pie chart doesn't look real 3d pie chart and
 also my coding is limiting to achieve the desired effects.
 
 I know that flash component kit allows to bring flash assets into flex
 and use them as you want, but I have never used this so far.
 
 What I need?
 
 I just want the charting support of flex for my application, but I
 don't understand how can I achieve this, as I have coded all the flash
 poll application in flash and data in flash is also coming from a
 database in the form of xml generated using php.
 
 Can I pass an array to flex from the flash swf file to flex when
 needed so that i can generate chart.
 
 I need suggestions and tips.
 
 Thank You All.
 
 
 Regards,
 Sher Ali





[flexcoders] Re: Module Mania

2007-06-01 Thread Dave @ VitalPodcasts.com
for anyone wanting to find this out...

Use: parentApplication

and your golden.



[flexcoders] Re: Flash Poll Application but with Flex Integration Charts

2007-06-01 Thread sher_ali2004
Hello Darren,

No the problem is still there.

Yes I coded this pie chart following some tutorials from online
communities but this is not pure 3D like you can see on many sites
which sell these 3d charts on license basis, but I cannot also use
those because those charts don't allow smooth integration with my
application.


Regards,
Sher Ali




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

 Hi Sher,
 
 Did you solve your problem? That pie chart looks quite nice to me. Did
 you create the pie chart component yourself? The reason I am asking is
  I'm doing a similar project right now and would appreciate your advice.
 
 It's my understanding that the Flex Component Kit allows you to import
 your Flash movie into Flex to use as a component in a Flex app. This
 might be overkill for your purposes as the resulting Flex app might
 end up over 200KB and will require Flash Player 9 to play.
 
 Cheers,
 Darren.
 
 
 --- In flexcoders@yahoogroups.com, sher_ali2004 sher_ali2004@
 wrote:
 
  Hello,
  
  I have created a poll application in flash which you can see the demo
  in the current state:
  http://www.arcoint.com/wes/poll/flash_poll_01.html
  
  My application is going good so far, but I have problem with the 3d
  pie charts. My current pie chart doesn't look real 3d pie chart and
  also my coding is limiting to achieve the desired effects.
  
  I know that flash component kit allows to bring flash assets into flex
  and use them as you want, but I have never used this so far.
  
  What I need?
  
  I just want the charting support of flex for my application, but I
  don't understand how can I achieve this, as I have coded all the flash
  poll application in flash and data in flash is also coming from a
  database in the form of xml generated using php.
  
  Can I pass an array to flex from the flash swf file to flex when
  needed so that i can generate chart.
  
  I need suggestions and tips.
  
  Thank You All.
  
  
  Regards,
  Sher Ali
 





[flexcoders] Re: Actionscript SAX Parser ?

2007-06-01 Thread powertool786
--- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote:
 I'd be interested to know what your use case is that requires a SAX
 parser. 

In my application, I had two list/search forms which:
  * query billing-related events (fairly static)
  * query/rank/prioritise tickets in a ordering/support system

In both cases, there can be anywhere between 200 and 50,000 rows
returned from a database for each query, sent to the Flex client via
SOAP. (That number could grow to 100,000 in three years.)

It's *not* useful to have paged views of that many results in the
client application; it makes it much more difficult for the user to
skim the records and have a good mental picture of what has occurred
in the back-end systems.

Also, the user wants to type/customise a query, and expects to get
back *something* within 1 second, even if the full results take much
longer to arrive.

 How large is your XML? Did you run into a memory or
 performance problem with AS3's E4X capabilities?

AS3 on my laptop (Athlon64-2700, WinXP, Firefox 2, non-debug) takes 70
seconds to retrieve the full SOAP response (5 rows, 8 variable
length string columns - about 14MB - over 1-3mbit broadband). I assume
about 1 second of error in this measurement because I could only
measure when the server stopped sending data. 

After the response has been fully sent, the Flex client takes 10-12
seconds (seems to depend on system memory utilisation) to parse,
E4Xify, bind and update that data into a very simple DataGrid component. 

The performance of the DataGrid component is actually pretty damn good
(even with 10,000+ rows)... no complaints there.

I'm *not* complaining about the AS3 E4X parser's performance... it's
remarkable that it does it that fast (my perl client using a c-based
XML parser library only does it 3.5 times faster on average).

I realise that my example is extreme, but in *many* use cases the data
takes quite a bit longer to download than to parse... if the whole
document must be parsed, an unacceptable amount of time elapses
between sending the query, and getting something back to the user.

The second important issue is memory usage. Very unscientific viewing
of the task manager leads me to believe that the Flash plug-in
allocates about 34MB while parsing the XML response. 34MB is not so
bad when objectifying a document of that size... but it does have a
large performance impact... it makes *much* more sense to parse the
document with a constant 4-12kbyte buffered approach.

- I'd skip this part if I were you -
Years of service software development has led me to construct my
service APIs so that they return data in a streaming fashion - whether
the client supports it or not - because it provides much greater
flexibility in how that data is used by different client applications.

All databases in almost all server-side languages have APIs allowing
the user to perform a query then iterate over the result set, only
retrieving each row from the database as it is needed. It is well
accepted that this results in much higher performance for non-trivial
amounts of data. 

Web-service (say SOAP) libraries that allow streaming are relatively
new, but have been available to Java developers for at least 5 years,
and to Python developers for at least 3 years. (I use Perl... I
actually had to modify SOAP::Lite to make streaming work).
---

Basically, with large amounts of data if you retrieve the full
response it takes too long to finish and allocates too much memory...
both degrade the user experience.

-David.










[flexcoders] Drag Drop functionality in Flex/AS3

2007-06-01 Thread zzberthod
I would like to do drag and drop on panels. To do this, I'm using a
Canvas containing 3 panels like this:
-|
||
|  PANEL 1   |
||
-
-
||
||
|  PANEL 2   |
||
||
-
-
||
||
|  PANEL 3   |
||
||
||
-

The 3 panels are vertical align manually.
Using panels on a Canvas, the panels move correctly. I would like that
when we drag a panel, it can't be drop to another.
Thus, we would be able to exchange panel's position without superimposing.

Notice 1: The 3 panels can have a different height
Notice 2: The top would be to be able add more than 3 panels

Have you got an idea how to do this?
Thanks for your help.




RE: [flexcoders] hotfix 2 and webservices

2007-06-01 Thread Peter Farland
I think this is the same as an issue we're looking at internally. I'll
contact you offlist with details so that we can test a fix - please
email me directly at [EMAIL PROTECTED]
 
Pete



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paolo Bernardini
Sent: Friday, June 01, 2007 6:47 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] hotfix 2 and webservices



Hi,
I've a problem with webservices after updating to hotfix 2 for flex
builder. this is the soap for the method I'm having problems with:
 
soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
http://www.w3.org/2001/XMLSchema-instance 
xmlns:xsd=http://www.w3.org/2001/XMLSchema
http://www.w3.org/2001/XMLSchema 
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/
http://schemas.xmlsoap.org/soap/envelope/ 
  soap:Body
loginUtenteObjResponse xmlns=
http://www.mamateam.net/schemas/services/sso
http://www.mamateam.net/schemas/services/sso 
  loginUtenteObjResult
Items xmlns= http://www.mamateam.net/schemas/services/users/
http://www.mamateam.net/schemas/services/users/ 
  DataSetUtenteUtenteObj
IDUtenteint/IDUtente
emailstring/email
usernamestring/username
nomestring/nome
cognomestring/cognome
password string/password
languagestring/language
passExpires dateTime/passExpires
userExpiresdateTime/userExpires
locked boolean/locked
SecretQuestionstring/SecretQuestion
SecretAnswer string/SecretAnswer
isGroupboolean/isGroup
imported boolean/imported
  /DataSetUtenteUtenteObj
  DataSetUtenteUtenteObj
IDUtente int/IDUtente
emailstring/email
username string/username
nomestring/nome
cognome string/cognome
passwordstring/password
language string/language
passExpiresdateTime/passExpires
userExpires dateTime/userExpires
lockedboolean/locked
SecretQuestion string/SecretQuestion
SecretAnswerstring/SecretAnswer
isGroup boolean/isGroup
importedboolean/imported
  /DataSetUtenteUtenteObj
/Items 
  /loginUtenteObjResult
/loginUtenteObjResponse
  /soap:Body
/soap:Envelope
 
as you can see Items is an Array of DataSetUtenteUtenteObj.
Before installing hotfix 2 it was working fine, but after I see Items as
an Object instead of Array so my code break.
Note that the Items Array contains only 1 object, I couldn't test if
with the array lenght greater than one I would see as an Array.

 


[flexcoders] Data Grid Column Headings

2007-06-01 Thread one786786
I am binding an ArrayCollections of objects to a data grid. The
objects are of a custom type. The data grid column headings show the
variable names of the custom object. 
For example, let us assume that object has the following variables
declared: questionId, questionType, questionText. Then, I see
the datagrid showing headings as: questionId, questionType,
questionText.

How could I change the column headings in the datagrid?

Thanks.



[flexcoders] Re: PopUpManager.createPopUp

2007-06-01 Thread Rohan Pinto
thanks bhavan

that really really helped... thanks a ton...

whew !!

Rohan

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

 Rohan,
 
 Its not complex.
 Here's a sample app which will demonstrate what I had suggested in my  
 email:
 
 http://www.geocities.com/bhuvangupta/flexblog/TWTest.swf
 
 and Here's the code:
 
 Code of TWTest.mxml
 =
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;  
 layout=absolute
   mx:Button id=btn label=Show Window click=showWindow()/
   mx:Script
   ![CDATA[
   
   private var tw : MyTitleWindow = new MyTitleWindow();
   private function showWindow() : void
   {
   if(tw == null)
   {
   tw = new MyTitleWindow();
   tw.width =200;
   tw.height = 300;
   }
   tw.showTW();
   }
   ]]
   /mx:Script
 /mx:Application
 ===
 
 
 Code of MyTitleWindow.mxml
 
 ?xml version=1.0 encoding=utf-8?
 mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml;  
 layout=vertical width=400 height=300
   showCloseButton=true close={onClose()} title=Hello World  
 horizontalAlign=center verticalAlign=middle
   mx:Label text=Hello World !!/
   mx:Script
   ![CDATA[
   import mx.core.Application;
   import mx.managers.PopUpManager;
   
   
   public var isOpen : Boolean = false;
   
   private function onClose(): void
   {
   isOpen = false;
   PopUpManager.removePopUp(this);
   }
   
   public function showTW() : void
   {
   if(isOpen)
   return;
   
   isOpen = true;
   
 PopUpManager.addPopUp(this,Application.application as  
 DisplayObject);
   PopUpManager.centerPopUp(this);
   }
   ]]
   /mx:Script
   
 /mx:TitleWindow
 =
 On May 31, 2007, at 8:29 PM, Rohan Pinto wrote:
 
  exactly..
 
  see my demo app: http://demo.rohanpinto.com
 
  if you click on the logo, the TileWindow opens over and over again...
  i want to restrict that to just one instance.. any advise.. please.. ?
 
  Rohan
  http://konkan.tv
 
  --- In flexcoders@yahoogroups.com, Michael Schmalle
  teoti.graphix@ wrote:
  
   Hi,
  
   There is no problem with what you have but... his question was,
  
how to i prevent a popup if the popup TileWindow is already Open..
  
   That means, he is asking how does he only create ONE TitleWindow  
  after a
   user has clicked the button to create it the first time.
  
   There are two ways, using a boolean flag in the application that
  holds the
   button or doing what I showed by checking if the instance is not
  null in the
   application.
  
   What you said the first time would work IF the boolean flag is in
  the actual
   application. It wouldn't work if the flag was in the title window
  because
   the popup manager would have already created another popup on top  
  of the
   first popup.
  
   Peace, Mike
  
   On 5/31/07, Flexing... eaiesb@ wrote:
   
Hi Mike,
   
 The manager will have already created the instance and the
  TitleWindow
would have to use removePopUp() which is not optimum.
I didn't understand what is the issue in using removePopup inside
Titlewindow ?
   
Let say if I write the following to handle window closure , is
  there any
issue in this ?
   
   
mx:TitleWindow showCloseButton=true close={onClose(event)}
mx:Script
![CDATA[
public var isOpen : Boolean = true;
   
private function onClose(event : Event) : void
{
PopUpManager.removePopUp(this);
isOpen = false;
}
   
public function setOpen() : void
{
isOpen = true;
}
]]
/mx:TitleWindow
   
   
Thanks
   
On May 31, 2007, at 5:46 PM, Michael Schmalle wrote:
   
Hi,
   
I don't think a boolean flag will help here. The manager will have
  already
created the instance and the TitleWindow would have to use
  removePopUp()
which is not optimum.
   
You need to take that call out of the mxml and create a click
  handler for
the button.
   
.. in your app
   
private var popUpWindow:TitleWindow;
   
private function button_clickHandler(event:MouseEvent):void
{

[flexcoders] itemRenderer null object error

2007-06-01 Thread pdflibpilot
I am so happy I was able to create an itemRenderer with an initialize
event that dynamically set the style for each item based on the source
data. This worked flawlessly for one HorizontalList ( List A) so I
tried to implement the same on a TileList (List B) on the same layout.
They have virtually the same dataProvider - List B items are
originally drag/dropped to List A.

These list are nearly identical in every way yet when the event fires
for the itemRenderer in List B it fails with null object error. It
seems that the data is not available when the event dispatches.  I am
at a loss as to why it works for one list and not the other. The data
used by the event is not null when it renders since all the items
(data) are accounted for.

here my itemRenderer code that works - 

?xml version=1.0 encoding=utf-8?
!-- itemRenderers\navScreenRender.mxml --

mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; 
width=200 
height=200
horizontalScrollPolicy=off
verticalScrollPolicy=off
borderStyle=solid backgroundImage=assets/images/{data.imageID}
alpha=1.0 backgroundAlpha=1.0 borderColor=#33

mx:Script
![CDATA[

private function setContentButton(event:Event,V):void{
var e = event.currentTarget
if(V==''){
e.styleName = 'customcontentbuttonOff'
e.alpha = 1.0
e.toolTip = Content Editor is not enabled for this 
screen - click
to complete the setup
}
else if(V!=(preset)){
e.styleName = 'customcontentbuttonOn'
e.alpha = 1.0
e.toolTip = Content Editor is enabled for this 
screen - click to
change the setup
}
else if(V==(preset)){
e.alpha = 0.0
}
}
]]

/mx:Script
mx:Text id=layoutLabel text = {data.label}
fontSize=8
color=#ff
textAlign=center
letterSpacing=0
 horizontalCenter=0 verticalCenter=-38/
mx:Image   source = assets/images/{data.imageID} 
toolTip={data.description}
scaleContent=false alpha=1 
 visible=false/
mx:Button label={data.displaySeq-0+1} width=25 height=20
cornerRadius=12 styleName=adminbutton fontWeight=bold
fontSize=9 verticalCenter=20 horizontalCenter=0/
mx:Button id=contentButton
initialize={setContentButton(event,data.contentLocation)} 
label=C width=18 height=18 
cornerRadius=12 
styleName=customcontentbuttonOff 
fontWeight=bold fontSize=10 
verticalCenter=-1 horizontalCenter=0 
alpha=1.0/

  /mx:Canvas



Re: [flexcoders] [SOLVED] itemRenderer null object error

2007-06-01 Thread Ben Marchbanks
After experimenting I found the solution was to change the event trigger from 
initialize to render.

Happy to have resolved the problem but still puzzled why initialize worked 
for 
one itemRenderer and not the other since from all appearances the 
implementations are identical ???



pdflibpilot wrote:
 I am so happy I was able to create an itemRenderer with an initialize
 event that dynamically set the style for each item based on the source
 data. This worked flawlessly for one HorizontalList ( List A) so I
 tried to implement the same on a TileList (List B) on the same layout.
 They have virtually the same dataProvider - List B items are
 originally drag/dropped to List A.
 
 These list are nearly identical in every way yet when the event fires
 for the itemRenderer in List B it fails with null object error. It
 seems that the data is not available when the event dispatches.  I am
 at a loss as to why it works for one list and not the other. The data
 used by the event is not null when it renders since all the items
 (data) are accounted for.
 
 here my itemRenderer code that works - 
 
 ?xml version=1.0 encoding=utf-8?
 !-- itemRenderers\navScreenRender.mxml --
 
 mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; 
   width=200 
   height=200
   horizontalScrollPolicy=off
   verticalScrollPolicy=off
   borderStyle=solid backgroundImage=assets/images/{data.imageID}
 alpha=1.0 backgroundAlpha=1.0 borderColor=#33
 
 mx:Script
 ![CDATA[
   
 private function setContentButton(event:Event,V):void{
   var e = event.currentTarget
   if(V==''){
   e.styleName = 'customcontentbuttonOff'
   e.alpha = 1.0
   e.toolTip = Content Editor is not enabled for this 
 screen - click
 to complete the setup
   }
   else if(V!=(preset)){
   e.styleName = 'customcontentbuttonOn'
   e.alpha = 1.0
   e.toolTip = Content Editor is enabled for this 
 screen - click to
 change the setup
   }
   else if(V==(preset)){
   e.alpha = 0.0
   }
   }
   ]]
   
 /mx:Script
   mx:Text id=layoutLabel text = {data.label}
   fontSize=8
   color=#ff
   textAlign=center
   letterSpacing=0
horizontalCenter=0 verticalCenter=-38/
   mx:Image   source = assets/images/{data.imageID} 
   toolTip={data.description}
   scaleContent=false alpha=1 
visible=false/
   mx:Button label={data.displaySeq-0+1} width=25 height=20
 cornerRadius=12 styleName=adminbutton fontWeight=bold
 fontSize=9 verticalCenter=20 horizontalCenter=0/
   mx:Button id=contentButton
 initialize={setContentButton(event,data.contentLocation)} 
   label=C width=18 height=18 
   cornerRadius=12 
   styleName=customcontentbuttonOff 
   fontWeight=bold fontSize=10 
   verticalCenter=-1 horizontalCenter=0 
   alpha=1.0/
   
   /mx:Canvas
 
 

-- 
Ben Marchbanks

::: alQemy ::: transforming information into intelligence
http://www.alQemy.com

::: magazooms ::: digital magazines
http://www.magazooms.com

Greenville, SC
864.284.9918


[flexcoders] Re: PopUpManager.createPopUp

2007-06-01 Thread Rohan Pinto
I tried running the example code as is.. COPY/PASTE.. and get this error:

private var tw:MyTitleWindow = new MyTitleWindow(); 
1046: Type was not found or was not a compile-time constant: MyTitleWindow
1080: Call to a possibly undefined method MyTitleWindow

tw = new TitleWindow();
1080: Call to a possibly undefined method MyTitleWindow

any tips/advise.. ?
(I'm a flex (infant)newbee, so if i'm doing something wrong here,
please do correct me, it's been less than a week since i have been
playing around with this... )

Rohan
http://demo.rohanpinto.com
--- In flexcoders@yahoogroups.com, Flexing... [EMAIL PROTECTED] wrote:

 Rohan,
 
 Its not complex.
 Here's a sample app which will demonstrate what I had suggested in my  
 email:
 
 http://www.geocities.com/bhuvangupta/flexblog/TWTest.swf
 
 and Here's the code:
 
 Code of TWTest.mxml
 =
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;  
 layout=absolute
   mx:Button id=btn label=Show Window click=showWindow()/
   mx:Script
   ![CDATA[
   
   private var tw : MyTitleWindow = new MyTitleWindow();
   private function showWindow() : void
   {
   if(tw == null)
   {
   tw = new MyTitleWindow();
   tw.width =200;
   tw.height = 300;
   }
   tw.showTW();
   }
   ]]
   /mx:Script
 /mx:Application
 ===
 
 
 Code of MyTitleWindow.mxml
 
 ?xml version=1.0 encoding=utf-8?
 mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml;  
 layout=vertical width=400 height=300
   showCloseButton=true close={onClose()} title=Hello World  
 horizontalAlign=center verticalAlign=middle
   mx:Label text=Hello World !!/
   mx:Script
   ![CDATA[
   import mx.core.Application;
   import mx.managers.PopUpManager;
   
   
   public var isOpen : Boolean = false;
   
   private function onClose(): void
   {
   isOpen = false;
   PopUpManager.removePopUp(this);
   }
   
   public function showTW() : void
   {
   if(isOpen)
   return;
   
   isOpen = true;
   
 PopUpManager.addPopUp(this,Application.application as  
 DisplayObject);
   PopUpManager.centerPopUp(this);
   }
   ]]
   /mx:Script
   
 /mx:TitleWindow
 =
 On May 31, 2007, at 8:29 PM, Rohan Pinto wrote:
 
  exactly..
 
  see my demo app: http://demo.rohanpinto.com
 
  if you click on the logo, the TileWindow opens over and over again...
  i want to restrict that to just one instance.. any advise.. please.. ?
 
  Rohan
  http://konkan.tv
 
  --- In flexcoders@yahoogroups.com, Michael Schmalle
  teoti.graphix@ wrote:
  
   Hi,
  
   There is no problem with what you have but... his question was,
  
how to i prevent a popup if the popup TileWindow is already Open..
  
   That means, he is asking how does he only create ONE TitleWindow  
  after a
   user has clicked the button to create it the first time.
  
   There are two ways, using a boolean flag in the application that
  holds the
   button or doing what I showed by checking if the instance is not
  null in the
   application.
  
   What you said the first time would work IF the boolean flag is in
  the actual
   application. It wouldn't work if the flag was in the title window
  because
   the popup manager would have already created another popup on top  
  of the
   first popup.
  
   Peace, Mike
  
   On 5/31/07, Flexing... eaiesb@ wrote:
   
Hi Mike,
   
 The manager will have already created the instance and the
  TitleWindow
would have to use removePopUp() which is not optimum.
I didn't understand what is the issue in using removePopup inside
Titlewindow ?
   
Let say if I write the following to handle window closure , is
  there any
issue in this ?
   
   
mx:TitleWindow showCloseButton=true close={onClose(event)}
mx:Script
![CDATA[
public var isOpen : Boolean = true;
   
private function onClose(event : Event) : void
{
PopUpManager.removePopUp(this);
isOpen = false;
}
   
public function setOpen() : void
{
isOpen = true;
}
]]
/mx:TitleWindow
   
   
Thanks
   
On May 31, 2007, at 

[flexcoders] YouTube style video (Video vs VideoDisplay)

2007-06-01 Thread Mark Ingram
Hi, I need to create a YouTube style video control. What is the best
starting point - Video or VideoDisplay? I've seen this code which
automatically downloads a preview of the video, but is it the best
solution? http://www.flashcomguru.com/tutorials/progressive_preview.cfm

 

Essentially I want to show a thumbnail of the movie, then allow the user
to click the thumbnail to continue watching the whole movie.

 

Cheers,

 

Mark

 

 

 



[flexcoders] Re: [SOLVED] itemRenderer null object error

2007-06-01 Thread Aaron Wright
Maybe I've a little naive but I like making nearly everything in
actionscript 3, especially itemRenderers. Then, you can handle all the
positioning and styles in the updateDisplayList function if you want.
This generally follows the Adobe approach to it as well. I say start
with looking over Adobe code for itemRenderers, and see where you need
to add your code to make it do what you want.

In the end you avoid listening for events, and not knowing what event
is going to fire in what occasion.

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

 After experimenting I found the solution was to change the event
trigger from 
 initialize to render.
 
 Happy to have resolved the problem but still puzzled why
initialize worked for 
 one itemRenderer and not the other since from all appearances the 
 implementations are identical ???
 
 
 
 pdflibpilot wrote:
  I am so happy I was able to create an itemRenderer with an initialize
  event that dynamically set the style for each item based on the source
  data. This worked flawlessly for one HorizontalList ( List A) so I
  tried to implement the same on a TileList (List B) on the same layout.
  They have virtually the same dataProvider - List B items are
  originally drag/dropped to List A.
  
  These list are nearly identical in every way yet when the event fires
  for the itemRenderer in List B it fails with null object error. It
  seems that the data is not available when the event dispatches.  I am
  at a loss as to why it works for one list and not the other. The data
  used by the event is not null when it renders since all the items
  (data) are accounted for.
  
  here my itemRenderer code that works - 
  
  ?xml version=1.0 encoding=utf-8?
  !-- itemRenderers\navScreenRender.mxml --
  
  mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; 
  width=200 
  height=200
  horizontalScrollPolicy=off
  verticalScrollPolicy=off
  borderStyle=solid backgroundImage=assets/images/{data.imageID}
  alpha=1.0 backgroundAlpha=1.0 borderColor=#33
  
  mx:Script
  ![CDATA[
  
  private function setContentButton(event:Event,V):void{
  var e = event.currentTarget
  if(V==''){
  e.styleName = 'customcontentbuttonOff'
  e.alpha = 1.0
  e.toolTip = Content Editor is not enabled for this 
  screen - click
  to complete the setup
  }
  else if(V!=(preset)){
  e.styleName = 'customcontentbuttonOn'
  e.alpha = 1.0
  e.toolTip = Content Editor is enabled for this 
  screen - click to
  change the setup
  }
  else if(V==(preset)){
  e.alpha = 0.0
  }
  }
  ]]
  
  /mx:Script
  mx:Text id=layoutLabel text = {data.label}
  fontSize=8
  color=#ff
  textAlign=center
  letterSpacing=0
   horizontalCenter=0 verticalCenter=-38/
  mx:Image   source = assets/images/{data.imageID} 
  toolTip={data.description}
  scaleContent=false alpha=1 
   visible=false/
  mx:Button label={data.displaySeq-0+1} width=25 height=20
  cornerRadius=12 styleName=adminbutton fontWeight=bold
  fontSize=9 verticalCenter=20 horizontalCenter=0/
  mx:Button id=contentButton
  initialize={setContentButton(event,data.contentLocation)} 
  label=C width=18 height=18 
  cornerRadius=12 
  styleName=customcontentbuttonOff 
  fontWeight=bold fontSize=10 
  verticalCenter=-1 horizontalCenter=0 
  alpha=1.0/
  
/mx:Canvas
  
  
 
 -- 
 Ben Marchbanks
 
 ::: alQemy ::: transforming information into intelligence
 http://www.alQemy.com
 
 ::: magazooms ::: digital magazines
 http://www.magazooms.com
 
 Greenville, SC
 864.284.9918





[flexcoders] Re: YouTube style video (Video vs VideoDisplay)

2007-06-01 Thread Rohan Pinto
Are you looking at displaying a thumbnail in the VideoPlayer itself ?

look at Jeron Wijering's flvplayer
(http://www.jeroenwijering.com/?item=Flash_video_Player)
you could use that... probably... it does display a preview thumbnail...

Rohan

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

 Hi, I need to create a YouTube style video control. What is the best
 starting point - Video or VideoDisplay? I've seen this code which
 automatically downloads a preview of the video, but is it the best
 solution? http://www.flashcomguru.com/tutorials/progressive_preview.cfm
 
  
 
 Essentially I want to show a thumbnail of the movie, then allow the user
 to click the thumbnail to continue watching the whole movie.
 
  
 
 Cheers,
 
  
 
 Mark





[flexcoders] AddChild problem

2007-06-01 Thread Clint Tredway
I am not sure this as much a problem as I am probably doing something
wrong. I am adding child components at runtime to a vbox. These new
components can be dragged to a new position. This all works. The
'problem' is that when anytime a new child is added, all the child
components move the top left corner of the container they are added
to.

Code Below:
public function creatObj(what:String):void{
 var obj:UIComponent;

switch(what){
case rssFirstName:

obj = new textComponent;
//container_vb.addChild(obj);   

break;

case rssLastName:
obj = new textComponent;
//container_vb.addChild(obj);
break;

case rssEmail:
break;

case text:
obj = new textComponent;
//container_vb.addChild(obj);
break;

case textArea:
obj = new textAreaComponent;
//container_vb.addChild(obj);
break;

case checkBox:
obj = new checkboxComponent;
//container_vb.addChild(obj);
break;

default:
break;  
}


container_vb.addChild(obj);
}

I really need to figure out why this is happening, so any guidance is
appreciated.

Thanks
-- 
I am not a diabetic, I have diabetes
my blog - http://grumpee.instantspot.com/blog


Re: [flexcoders] Re: Is there any way to call super.super.method in AS3?

2007-06-01 Thread Troy Gilbert

Whoa... I didn't realize $ was a valid identifier character... that's
interesting.

On 6/1/07, Gordon Smith [EMAIL PROTECTED] wrote:


   Alex meant to say If a method is overridden, you can NOT skip around
the override like you can in some other languages. And you can't directly,
with super.super. But you can, indirectly.

The way the framework codes around the lack of super.super is to use the
following pattern:

class A
{
function f()
{
doSomething();
}
}

class B extends A
{
// This will hide A's f()
override function f()
{
doSomethingElse();
}

// But this makes A's f() available as B's $f
final function $f()

{
super.f();
}
}

class C extends B
{
override function f()
{
$f(); // call A's f() -- which is effectively super.super.f()
}
}

Using $ in the name is just a convention which indicates that you're
getting the original, un-overridden function. We also make it final to
guarantee that it remains un-overridden.

- Gordon

 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Alex Harui
*Sent:* Wednesday, May 30, 2007 2:10 PM
*To:* flexcoders@yahoogroups.com
*Subject:* RE: [flexcoders] Re: Is there any way to call
super.super.method in AS3?

  Sorry, but I think you're wrong or misunderstood.  If a method is
overridden, you can skip around the override like you can in some other
languages

 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *justinbuser
*Sent:* Wednesday, May 30, 2007 10:50 AM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Re: Is there any way to call super.super.method in
AS3?

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

 I want to override a method of a super class. and I can use
 super.method to invoke the corresponding method of the super class.

 But how i can call a method of the super super class.
 for example.
 Class A{
 protected function myMethod(){}
 }
 Class B extends A{
 override protected function myMethod(){}
 }

 Class C extends B{
 override protected function myMethod(){}
 }

 Is it possible to call A.myMethod in the function C.MyMethod?

 Thanks

Yes, exactly how you wrote it.  However in order to have the top level
function actually run before adding methods etc... with level 2 you need to
call super.myMethod(); from B or not override it at all in B to be able to
access it's functionality! from C.  In other words, if you override a
function and then try to override it again in a class extending the one with
the original override and don't call the super version in the intermediate
class then you end up with an empty function at the end.

JjB

-#As always I could be completely wrong, but it's not likely#-

 


[flexcoders] Data binding will not be able to detect changes when using--I know I know

2007-06-01 Thread James
I'm sick of seeing

Data binding will not be able to detect changes when using square
bracket operator.  For Array, please use ArrayCollection.getItemAt()

when using an arrayObj[arrayPropertyOrIndex] inside of an MXML property. 

I know that it won't be propagated down if the array changes, but in a
lot of cases, I don't need it to propagate down, and I don't want to
take the performance hit of using a more expensive object
(ArrayCollection) and in
addition to that, having extra event subscriptions to something that
will never change.

So why does the compiler have warnings for it?
It makes me feel like I'm doing something wrong when I see a bunch of
warnings. :(

I wish I could have a [Not-bindable] tag or something just to shut
that particular warning up.

(rant over)

Suggestions?

Thanks guys, love the group.

James Wilson
Atlanta-area Flex Programmer
[EMAIL PROTECTED]



[flexcoders] WebService and ArrayCollections - only 1 is being sent ..!

2007-06-01 Thread paulwelling
Hello List,

I am sending up a complex object in a WebService.  

The complex object has an attribute that is an ArrayCollection, with
the ac having multiple items that have been .addItem(object);

The WSDL has the objects's attribute in question defined as a Set of
these objects.

No matter how I create the ArrayCollection and add items to it, when
sent, only the first is being passed (I'm using Charles to sniff and
the collections only have 1 element, the first one.)

In affect, I have a containing object that has:
Collection of Objects, that can have:
Collections of objects.

Each collection will only get the first element passed on out from Flex.

This is a show stopper, so any help is mucho appreciated.

Thanks,
Paul




[flexcoders] Re: PopUpManager.createPopUp

2007-06-01 Thread Rohan Pinto
Hi Mike,

i did follow all threrads and tried every possible combination... I
could not get it to work..

here's my index.mxml

mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
autoLayout=true layout=vertical 
creationComplete=openWin()
horizontalScrollPolicy=off verticalScrollPolicy=auto
height=100% width=100%
paddingTop=0 paddingBottom=0 x=0 y=0
xmlns:com=com.*
applicationComplete=initApp()

mx:Script
![CDATA[
import mx.containers.TitleWindow;
import mx.effects.Move;
import mx.controls.Menu;
import mx.events.MenuEvent; 
import mx.managers.PopUpManager;
import flash.net.URLRequest;  
import flash.events.MouseEvent; 

[Bindable]
public var vkey:String;
  
[Bindable]
public var chid:String;

public function initApp():void{
vkey=Application.application.parameters.vkey;
chid=Application.application.parameters.chid;
}


public var isOpen : Boolean = false;

private function openWin():void{
if(!isOpen){
PopUpManager.createPopUp(this,main,false);  
isOpen = true;
}


PopUpManager.createPopUp(this,Desktop_Control,false);   

}


]]
/mx:Script
mx:ApplicationControlBar dock=true paddingTop=0 paddingLeft=0
paddingRight=0 paddingBottom=0 x=0 y=0 width=100%
height=40 verticalAlign=middle 
com:LinkImage source=images/logo.png maintainAspectRatio=true
buttonMode=true imageURL=/ click=openWin() /
/mx:ApplicationControlBar
/mx:Application

and here's my main.mxml
mx:TitleWindow width=800 height=500 autoLayout=true
layout=absolute title=Web Desktop showCloseButton=true 
xmlns:mx=http://www.adobe.com/2006/mxml;
backgroundColor=#ff
verticalGap=0 horizontalCenter=0 verticalCenter=0
x=10 y=55
dropShadowEnabled=true
creationComplete=init()
close=closeWindow()
xmlns:ns1=*
   mx:Script
![CDATA[
import mx.core.Application;
import mx.managers.PopUpManager;

public var isOpen : Boolean = true;
//called by the close event raised byclicking the close 
button
public function closeWindow():void
{
PopUpManager.removePopUp(this);
isOpen = false;
}//closeWindow 

  
]]
/mx:Script
mx:VBox x=0 y=0 borderStyle=none paddingTop=20
paddingBottom=10 paddingLeft=10 paddingRight=10 width=100%
height=99%
ns1:FrontPageRecentlyViewedVideos/
/mx:VBox
/mx:TitleWindow

i just cant figure out what i'm doing wrong 

Rohan
--- In flexcoders@yahoogroups.com, Michael Schmalle
[EMAIL PROTECTED] wrote:

 Hi,
 
 I gave an answer to this a couple threads back. See all the threads
to this
 post and you will see the answer.
 
 Peace, Mike
 
 On 5/31/07, Rohan Pinto [EMAIL PROTECTED] wrote:
 
exactly..
 
  see my demo app: http://demo.rohanpinto.com
 
  if you click on the logo, the TileWindow opens over and over again...
  i want to restrict that to just one instance.. any advise.. please.. ?
 
  Rohan
  http://konkan.tv
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Michael
  Schmalle
  teoti.graphix@ wrote:
  
   Hi,
  
   There is no problem with what you have but... his question was,
  
how to i prevent a popup if the popup TileWindow is already Open..
  
   That means, he is asking how does he only create ONE TitleWindow
after a
   user has clicked the button to create it the first time.
  
   There are two ways, using a boolean flag in the application that
  holds the
   button or doing what I showed by checking if the instance is not
  null in the
   application.
  
   What you said the first time would work IF the boolean flag is in
  the actual
   application. It wouldn't work if the flag was in the title window
  because
   the popup manager would have already created another popup on
top of the
   first popup.
  
   Peace, Mike
  
   On 5/31/07, Flexing... eaiesb@ wrote:
   
Hi Mike,
   
 The manager will have already created the instance and the
  TitleWindow
would have to use removePopUp() which is not optimum.
I didn't understand what is the issue in using removePopup inside
Titlewindow ?
   
Let say if I write the following to handle window closure , is
  there any
issue in this ?
   
   
mx:TitleWindow showCloseButton=true 

[flexcoders] Really complex buttons (aka what WPF got right)

2007-06-01 Thread borekbe
Hi, I'm still learning Flex and during the last few hours, I've been
struggling with some button-related problems.

I am trying to create a button which contains not only label and icon
but any arbitrary contents. If Flex was WPF, you could do something like 

mx:Button
  mx:VBox
mx:Label ... /
mx:Image ... /
custom:Component ... /
  /mx:VBox
/mx:Button

This approach really saves a lot of time and hassle but unfortunately
is not implemented in Flex (this would be great for future versions).
What I did in Flex was that I created a custom component based on
Canvas (say MyButton) and designed it however I wanted. I've set the
buttonMode property to true so I now have the nice hand cursor. Click
event is automatically there...

So far so good. But the ultimate goal is to have something like
TabNavigator, except that the tabs are pretty complicated MyButtons.
No again, because the TabBar is based on buttons, you can only set
label and icon. I don't think I can help myself creating a new class
based on TabBar because the Button limitation would be still there.

As far as I can see it, to have a custom button is fairly common
scenario and I can't believe that Flex makes it so hard for me as a
developer. There must be some way that I have simply missed.

Could anyone more experienced please advise me, or generally comment
on Flex composability of more advanced controls?

Thanks,
Borek



[flexcoders] Client.Message.Encoding driving me nuts...!

2007-06-01 Thread johnnythebubble
I am running an application with a veriety of Remote  obkect 
requests to coldfusion.

requests invoked without arguments and simply returning query data 
back to flex are working fine.

Today though some of my calls that have been working fine have 
suddenly stopped with errors of type 'Unknown AMF type '-124' (the 
error number dows change on subsequent requests) that i am having 
trouble getting to the bottom of.

I feel that i am having a data type mismatch between flex and 
coldfusion but may need help from someone more experienced.


here is my code:

// Set up RO
getOffersRO.destination = ColdFusion;
getOffersRO.source = com.getOffers;
getOffersRO.getOffers.addEventListener(result,offersHandler);
getOffersRO.getOffers.addEventListener(fault,ro_fault_handler);


// Request function
public static function getOffers():void {

var bookingVO = Application.application.bookingVO;
var itineryAC = Application.application.itineryAC;

var params:Object = new Object();
params.bookingVO = bookingVO;
params.itineryAC = itineryAC;

getOffersRO.getOffers.send(params) ;
}

// fault errors
event = FaultEvent (@4c3f319)
bubbles = false
cancelable = true
currentTarget = Operation (@48f9101)
argumentNames = Array (@4884401)
arguments = Object (@48e98e1)
lastResult = null
makeObjectsBindable = true
name = getOffers
service = RemoteObject (@48b56c1)
eventPhase = 2 [0x2]
fault = Fault (@a5daca1)
errorID = 0 [0x0]
faultCode = Client.Message.Encoding
faultDetail = null
faultString = Unknown AMF type '-124'.
message = faultCode:Client.Message.Encoding 
faultString:'Unknown AMF type '-124'.' faultDetail:'null'
name = Error
rootCause = null
message = ErrorMessage (@4c47831)
messageId = 26755C7A-F00C-49F5-F88E-EF0C6E504EC6
target = Operation (@48f9101)
argumentNames = Array (@4884401)
length = 0 [0x0]
arguments = Object (@48e98e1)
lastResult = getter
makeObjectsBindable = getter
name = getter
service = getter
token = null
type = fault


Thanks in advance to any advise that may get me back on track...





[flexcoders] Re: PopUpManager.createPopUp

2007-06-01 Thread Rohan Pinto

I got it to work using the following approach: (please let me know if
i've done something stupid)

index.mxml i have this function
   public var isOpen : Boolean = false;

public function openWin():void{
if(!isOpen){
PopUpManager.createPopUp(this,main,false);  
isOpen = true;
}

in main.mxml i have this function

public function closeWindow():void
{
PopUpManager.removePopUp(this);
Application.application.isOpen = false;
}//closeWindow 


Rohan

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

 Hi Mike,
 
 i did follow all threrads and tried every possible combination... I
 could not get it to work..
 
 here's my index.mxml
 
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 autoLayout=true layout=vertical 
   creationComplete=openWin()
   horizontalScrollPolicy=off verticalScrollPolicy=auto
   height=100% width=100%
   paddingTop=0 paddingBottom=0 x=0 y=0
   xmlns:com=com.*
   applicationComplete=initApp()
   
 mx:Script
   ![CDATA[
   import mx.containers.TitleWindow;
   import mx.effects.Move;
   import mx.controls.Menu;
   import mx.events.MenuEvent; 
   import mx.managers.PopUpManager;
 import flash.net.URLRequest;  
 import flash.events.MouseEvent; 
 
   [Bindable]
 public var vkey:String;
   
 [Bindable]
 public var chid:String;
 
 public function initApp():void{
   vkey=Application.application.parameters.vkey;
 chid=Application.application.parameters.chid;
 }
 
 
   public var isOpen : Boolean = false;
   
   private function openWin():void{
   if(!isOpen){
   PopUpManager.createPopUp(this,main,false);  
   isOpen = true;
   }
   
   
   PopUpManager.createPopUp(this,Desktop_Control,false);   
 
   }
 
   
   ]]
 /mx:Script
 mx:ApplicationControlBar dock=true paddingTop=0 paddingLeft=0
 paddingRight=0 paddingBottom=0 x=0 y=0 width=100%
 height=40 verticalAlign=middle 
 com:LinkImage source=images/logo.png maintainAspectRatio=true
 buttonMode=true imageURL=/ click=openWin() /
 /mx:ApplicationControlBar
 /mx:Application
 
 and here's my main.mxml
 mx:TitleWindow width=800 height=500 autoLayout=true
 layout=absolute title=Web Desktop showCloseButton=true 
   xmlns:mx=http://www.adobe.com/2006/mxml;
   backgroundColor=#ff
   verticalGap=0 horizontalCenter=0 verticalCenter=0
   x=10 y=55
   dropShadowEnabled=true
   creationComplete=init()
   close=closeWindow()
   xmlns:ns1=*
mx:Script
 ![CDATA[
   import mx.core.Application;
   import mx.managers.PopUpManager;
   
   public var isOpen : Boolean = true;
   //called by the close event raised byclicking the close 
 button
   public function closeWindow():void
   {
   PopUpManager.removePopUp(this);
   isOpen = false;
   }//closeWindow 
   
   
 ]]
 /mx:Script
 mx:VBox x=0 y=0 borderStyle=none paddingTop=20
 paddingBottom=10 paddingLeft=10 paddingRight=10 width=100%
 height=99%
 ns1:FrontPageRecentlyViewedVideos/
 /mx:VBox
 /mx:TitleWindow
 
 i just cant figure out what i'm doing wrong 
 
 Rohan
 --- In flexcoders@yahoogroups.com, Michael Schmalle
 teoti.graphix@ wrote:
 
  Hi,
  
  I gave an answer to this a couple threads back. See all the threads
 to this
  post and you will see the answer.
  
  Peace, Mike
  
  On 5/31/07, Rohan Pinto rohan@ wrote:
  
 exactly..
  
   see my demo app: http://demo.rohanpinto.com
  
   if you click on the logo, the TileWindow opens over and over
again...
   i want to restrict that to just one instance.. any advise..
please.. ?
  
   Rohan
   http://konkan.tv
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Michael
   Schmalle
   teoti.graphix@ wrote:
   
Hi,
   
There is no problem with what you have but... his question was,
   
 how to i prevent a popup if the popup TileWindow is already
Open..
   
That means, he is asking how does he only create ONE TitleWindow
 after a
user has clicked the button to create it the first time.
   
There are two ways, using a boolean flag in the application that
   holds 

[flexcoders] Using others language to connect Flex to database

2007-06-01 Thread phattarin_s
Hello, everyone. I'm a Flex newbie developer from Thailand. I am
feeling  that I am understanding the concept of Flex in front-end, but
in back-end, concerning.

I have read many article and posted, but I found most of us use cold
fusion instead of Java or asp.net. I want to implements Flex
application to manipulate database with middle-tier but I can't find
any guideline to implements on both above language. Could you help me?

One reason, that I wanna work with Java and asp.net is I want to use
flex with them, easy to understand and I feel familiar with them.



RE: [flexcoders] Re: [SOLVED] itemRenderer null object error

2007-06-01 Thread Alex Harui
I'd be careful about using render it can get called often.  Always
assume that data could be null.

 

-Alex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Aaron Wright
Sent: Friday, June 01, 2007 8:41 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: [SOLVED] itemRenderer null object error

 

Maybe I've a little naive but I like making nearly everything in
actionscript 3, especially itemRenderers. Then, you can handle all the
positioning and styles in the updateDisplayList function if you want.
This generally follows the Adobe approach to it as well. I say start
with looking over Adobe code for itemRenderers, and see where you need
to add your code to make it do what you want.

In the end you avoid listening for events, and not knowing what event
is going to fire in what occasion.

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

 After experimenting I found the solution was to change the event
trigger from 
 initialize to render.
 
 Happy to have resolved the problem but still puzzled why
initialize worked for 
 one itemRenderer and not the other since from all appearances the 
 implementations are identical ???
 
 
 
 pdflibpilot wrote:
  I am so happy I was able to create an itemRenderer with an
initialize
  event that dynamically set the style for each item based on the
source
  data. This worked flawlessly for one HorizontalList ( List A) so I
  tried to implement the same on a TileList (List B) on the same
layout.
  They have virtually the same dataProvider - List B items are
  originally drag/dropped to List A.
  
  These list are nearly identical in every way yet when the event
fires
  for the itemRenderer in List B it fails with null object error. It
  seems that the data is not available when the event dispatches. I am
  at a loss as to why it works for one list and not the other. The
data
  used by the event is not null when it renders since all the items
  (data) are accounted for.
  
  here my itemRenderer code that works - 
  
  ?xml version=1.0 encoding=utf-8?
  !-- itemRenderers\navScreenRender.mxml --
  
  mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  
  width=200 
  height=200
  horizontalScrollPolicy=off
  verticalScrollPolicy=off
  borderStyle=solid backgroundImage=assets/images/{data.imageID}
  alpha=1.0 backgroundAlpha=1.0 borderColor=#33
  
  mx:Script
  ![CDATA[
  
  private function setContentButton(event:Event,V):void{
  var e = event.currentTarget
  if(V==''){
  e.styleName = 'customcontentbuttonOff'
  e.alpha = 1.0
  e.toolTip = Content Editor is not enabled for this screen - click
  to complete the setup
  }
  else if(V!=(preset)){
  e.styleName = 'customcontentbuttonOn'
  e.alpha = 1.0
  e.toolTip = Content Editor is enabled for this screen - click to
  change the setup
  }
  else if(V==(preset)){
  e.alpha = 0.0
  }
  }
  ]]
  
  /mx:Script
  mx:Text id=layoutLabel text = {data.label}
  fontSize=8
  color=#ff
  textAlign=center
  letterSpacing=0
  horizontalCenter=0 verticalCenter=-38/
  mx:Image source = assets/images/{data.imageID} 
  toolTip={data.description}
  scaleContent=false alpha=1 
  visible=false/
  mx:Button label={data.displaySeq-0+1} width=25 height=20
  cornerRadius=12 styleName=adminbutton fontWeight=bold
  fontSize=9 verticalCenter=20 horizontalCenter=0/
  mx:Button id=contentButton
  initialize={setContentButton(event,data.contentLocation)} 
  label=C width=18 height=18 
  cornerRadius=12 
  styleName=customcontentbuttonOff 
  fontWeight=bold fontSize=10 
  verticalCenter=-1 horizontalCenter=0 
  alpha=1.0/
  
  /mx:Canvas
  
  
 
 -- 
 Ben Marchbanks
 
 ::: alQemy ::: transforming information into intelligence
 http://www.alQemy.com http://www.alQemy.com 
 
 ::: magazooms ::: digital magazines
 http://www.magazooms.com http://www.magazooms.com 
 
 Greenville, SC
 864.284.9918


 



[flexcoders] Re: Custom Attributes

2007-06-01 Thread gary_mangum
Still haven't figured this one out...is this a bug in flex?

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

 I am unsuccessfully trying to pass an integer constant to a custom
 integer attribute of a custom component.  Confused yet?  Here's an
 example of what I am trying to do:
 
 Application:
 ?xml version=1.0?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=700
 height=250 borderStyle=solid  xmlns:ns1=*
   ns1:myComponent supportsMultiselect=true
 supportTypeMask={myComponent.TYPE_MASK_TEXT}/
 /mx:Application
 
 MyComponent:
 ?xml version=1.0 encoding=utf-8?
 mx:Button xmlns:mx=http://www.adobe.com/2006/mxml;
   mx:Script
   ![CDATA[
   public static const TYPE_MASK_ALL:int = -1;
   public static const TYPE_MASK_NONE:int = 0;
   public static const TYPE_MASK_IMAGE:int = 1;
   public static const TYPE_MASK_TEXT:int = 2;
   public static const TYPE_MASK_SPRITE:int = 4;
   
   public var supportsMultiselect:Boolean;
   public var supportTypeMask:int;
   ]]
   /mx:Script
 /mx:Button
 
 
 The public var supportTypeMask is never getting set for some reason if
 I try to pass it one of the constants.  If I pass 2 instead of
 {myComponent.TYPE_MASK_TEXT} it works great.
 
 Any ideas about what I am doing wrong here?
 
 Thanks for your help!





RE: [flexcoders] AddChild problem

2007-06-01 Thread Alex Harui
Adding children runs layout which for VBox will wrestle everything into
a vertical stack.  Canvas is better for random' positioning.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Clint Tredway
Sent: Friday, June 01, 2007 8:31 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AddChild problem

 

I am not sure this as much a problem as I am probably doing something
wrong. I am adding child components at runtime to a vbox. These new
components can be dragged to a new position. This all works. The
'problem' is that when anytime a new child is added, all the child
components move the top left corner of the container they are added
to.

Code Below:
public function creatObj(what:String):void{
var obj:UIComponent;

switch(what){
case rssFirstName: 
obj = new textComponent;
//container_vb.addChild(obj); 
break;

case rssLastName:
obj = new textComponent;
//container_vb.addChild(obj);
break;

case rssEmail:
break;

case text:
obj = new textComponent;
//container_vb.addChild(obj);
break;

case textArea:
obj = new textAreaComponent;
//container_vb.addChild(obj);
break;

case checkBox:
obj = new checkboxComponent;
//container_vb.addChild(obj);
break;

default:
break; 
}


container_vb.addChild(obj);
}

I really need to figure out why this is happening, so any guidance is
appreciated.

Thanks
-- 
I am not a diabetic, I have diabetes
my blog - http://grumpee.instantspot.com/blog
http://grumpee.instantspot.com/blog 

 



RE: [flexcoders] Really complex buttons (aka what WPF got right)

2007-06-01 Thread Ely Greenfield
 

 

Hi Borek.  I can give you the short answer, which is that composition is
an important goal of the flex framework.  But we have two design goals
which WPF doesn't have - specifically

-  keeping the framework something that will perform well on the
98% of the machines on the internet that currently have flash deployed
(WPF has much heavier client requirements).

-  keeping MXML something that a developer and/or designer can
look at, easily read and comprehend, and code by hand as appropriate
(most XAML files that I see tend to be fairly hard to read to the
typical developer).

 

Both of these have forced us to walk a delicate line between power and
simplicity in our component framework, and composability is one of those
areas where we have been forced to make hard tradeoffs (and continue to
debate them on a daily basis).

 

Having said that, the move to Flash Player 9, AS3, and the new AVM+ has
given us additional power (usable on the broad majority of the
internet...over 85% penetration at this point, I believe) that we've
only just begun to take advantage of in the framework. Expect to see us
weaving composition deeper and deeper into the framework as it evolves.

 

I should also mention that there's technically nothing stopping you from
making composable controls like flexible buttons today. Personally, I
believe it's worth every flex developers time to learn a little bit of
component development; while there may be an initial up front learning
investment, Once you have the knowledge, banging out a couple of custom
built or reusable components doesn't take a lot of work.  But building
that kind of flexibility into every push button in every flex
application, without paying a non-trivial cost in performance and
complexity, is something that takes time and consideration.  

 

Ely.

 

 

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of borekbe
Sent: Friday, June 01, 2007 9:31 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Really complex buttons (aka what WPF got right)

 

Hi, I'm still learning Flex and during the last few hours, I've been
struggling with some button-related problems.

I am trying to create a button which contains not only label and icon
but any arbitrary contents. If Flex was WPF, you could do something like


mx:Button
mx:VBox
mx:Label ... /
mx:Image ... /
custom:Component ... /
/mx:VBox
/mx:Button

This approach really saves a lot of time and hassle but unfortunately
is not implemented in Flex (this would be great for future versions).
What I did in Flex was that I created a custom component based on
Canvas (say MyButton) and designed it however I wanted. I've set the
buttonMode property to true so I now have the nice hand cursor. Click
event is automatically there...

So far so good. But the ultimate goal is to have something like
TabNavigator, except that the tabs are pretty complicated MyButtons.
No again, because the TabBar is based on buttons, you can only set
label and icon. I don't think I can help myself creating a new class
based on TabBar because the Button limitation would be still there.

As far as I can see it, to have a custom button is fairly common
scenario and I can't believe that Flex makes it so hard for me as a
developer. There must be some way that I have simply missed.

Could anyone more experienced please advise me, or generally comment
on Flex composability of more advanced controls?

Thanks,
Borek

 



RE: [flexcoders] Data Grid Column Headings

2007-06-01 Thread Alex Harui
Assign your own columns

 

mx:DataGrid

mx:columns

mx:DataGridColumn headerText=Question ID
dataField=questioned

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of one786786
Sent: Friday, June 01, 2007 7:22 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Data Grid Column Headings

 

I am binding an ArrayCollections of objects to a data grid. The
objects are of a custom type. The data grid column headings show the
variable names of the custom object. 
For example, let us assume that object has the following variables
declared: questionId, questionType, questionText. Then, I see
the datagrid showing headings as: questionId, questionType,
questionText.

How could I change the column headings in the datagrid?

Thanks.

 



Re: [flexcoders] AddChild problem

2007-06-01 Thread Clint Tredway

Good to know. I did find a work around by adding the children to the main
app container and that now works. I will change my vbox to a canvas and see
what happens.

On 6/1/07, Alex Harui [EMAIL PROTECTED] wrote:


   Adding children runs layout which for VBox will wrestle everything into
a vertical stack.  Canvas is better for random' positioning.


 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Clint Tredway
*Sent:* Friday, June 01, 2007 8:31 AM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] AddChild problem



I am not sure this as much a problem as I am probably doing something
wrong. I am adding child components at runtime to a vbox. These new
components can be dragged to a new position. This all works. The
'problem' is that when anytime a new child is added, all the child
components move the top left corner of the container they are added
to.

Code Below:
public function creatObj(what:String):void{
var obj:UIComponent;

switch(what){
case rssFirstName:
obj = new textComponent;
//container_vb.addChild(obj);
break;

case rssLastName:
obj = new textComponent;
//container_vb.addChild(obj);
break;

case rssEmail:
break;

case text:
obj = new textComponent;
//container_vb.addChild(obj);
break;

case textArea:
obj = new textAreaComponent;
//container_vb.addChild(obj);
break;

case checkBox:
obj = new checkboxComponent;
//container_vb.addChild(obj);
break;

default:
break;
}


container_vb.addChild(obj);
}

I really need to figure out why this is happening, so any guidance is
appreciated.

Thanks
--
I am not a diabetic, I have diabetes
my blog - http://grumpee.instantspot.com/blog

 





--
I am not a diabetic, I have diabetes
my blog - http://grumpee.instantspot.com/blog


[flexcoders] Re: An odd problem with the 'width' and 'height' of Sprite

2007-06-01 Thread esaltelli
Troy,

One thing to note in my trial and error, changing the height and width
then resetting the scales properly displays the content...until you
want to do a scaling operation.  The very next scaling (i.e. via
scaleX = blah) operation uses the height and width computed from
'resetting' the scale.  In my case all I wanted to do is perform
scaling operations.  Attempting to restore the original image (via
scaleX = scaleY = 1.0 ) just didn't work after several scaling operations.

The only consistent mechanism I've discovered to date is to explicitly
create a new Matrix object and set it on the transform.  Unfortunately
this seems to by-pass all of the properties; so you don't get an
updated height  width.

Ed

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

 Hi Cho,
 
 I assume in your example code below that TCellView was supposed to be
 CustomSprite (i.e. the constructor).
 
 This was mentioned recently so you could probably find some details
in the
 archives, though I'm not sure what to suggest you search for, so
I'll repeat
 what I learned as best as possible:
 
 When you set the width and height of a sprite, Flash attempts to
scale the
 sprite to that width and height. So, it'll set the new width and
height but
 it will also adjust the scaleX and scaleY properties such that *if* your
 sprite had content it would be scaled up to the new size (kinda what you
 would expect if you resized a movie clip).
 
 Of course, the big problem is that the documentation for
width/height (or
 DisplayObject) makes absolutely no mention of this, and it appears
that the
 behavior has simply been deduced through trial and error (Gordon or
other
 Adobe folks, I'd love to see some official confirmation on what's
happening
 -- and an update to the LiveDocs!).
 
 What is happening in your case is the width and height of your new
Sprite is
 0 because it doesn't contain any vector art, etc. So, you set the
width and
 height manually and the Sprite attempts to adjust scaleX and scaleY to
 compensate. Since the width and height are at zero, the scales
become NaN
 (division by zero), and thus are set to zero. Now, future drawing/sizing
 gets squished by the fact that scale is set to zero.
 
 To fix it, you can set your width and height *then* reset scaleX and
scaleY
 back to 1.0. That should do it.
 
 Adobe? Undocumented!
 
 Troy.
 
 
 On 20 Mar 2007 05:43:55 -0700, celdi30 [EMAIL PROTECTED] wrote:
 
 
  Hi all. (This is my first post in this group, so I'd like to give
all of
  you a greeting .)
 
  As the title, I've met an odd problem with using Sprite class.
  Because I'm a novice of Flex, my problem may be so trivial.
  But Your helps would make me happy.
 
  The simple version of my code is below.
 
  public class CustomSprite extends Sprite
  {
  public function TCellView(w:Number, h:Number) {
  this.width = w;
  this.height = h;
 
  draw();
  }
 
  private function draw():void {
  this.graphics.clear();
 
  this.graphics.lineStyle(2, 0x00, 0.7);
  this.graphics.drawRect(0, 0, this.width, this.height);
  }
  }
 
  The problem is that the assignments to width and height in the
  constructor of mine have no effect.
  So in draw(), the rectangle to be drawn has size of zero. The
width and
  height are public properties of Sprite and are not read-only.
  Then why does the code like 'this.width = w' have no effect? (In debug
  mode of Flex Builder, the Variables view told me the values of
  width/height of the Sprite object have not changed by the codes.)
 
  After some investigation, I knew that the drawing on the graphics of
  Sprite causes update of width/height.
  That behavior is reasonable, I think. However, I wonder why a
  direct-assignment to width or height is banned, and how.
 
  Is there any mistake in my code? Or Do I misunderstand something?
  Please, tell me what's going on behind the scene about Sprite.
  Any replies of you would be grateful.
 
  Thank you.
  - Cho
 
   
 





Re: [flexcoders] Data binding will not be able to detect changes when using--I know I know

2007-06-01 Thread Troy Gilbert

I would expect you to only get that warning if you're using binding with the
MXML property... if you're not using binding, then it shouldn't care (it'll
just initialize the value at the time of instantiation). Does your MXML look
like this:

mx:Label text={arrayObj[0]} /

I'm guessing you're doing that because you want arrayObj[0] to be
evaluated, as opposed to this:

mx:Label text=arrayObj[0] /

Where you'd actually get just the literal text.

The problem is that the curly braces *mean* use data-binding. What you're
doing (if you're doing something similar to the above) is taking advantage
of the fact that data-binding *also* means evaluate the expression to set
the value (as a step in the data-binding process).

I guess the correct way to get the results you're looking for is to
initialize the values in an event handler (like creationComplete).

Of course, you shouldn't be afraid of ArrayCollection... I've not tested it
to be sure, but I can't imagine you'd have enough UI elements bound to
enough ArrayCollection elements to make any kind of performance difference
that would out-pace the performance cost of the UI elements by themselves.
Event dispatch is all done natively in the Player... it seems to be
reasonably chipper.

Troy.


On 6/1/07, James [EMAIL PROTECTED] wrote:


  I'm sick of seeing

Data binding will not be able to detect changes when using square
bracket operator. For Array, please use ArrayCollection.getItemAt()

when using an arrayObj[arrayPropertyOrIndex] inside of an MXML property.

I know that it won't be propagated down if the array changes, but in a
lot of cases, I don't need it to propagate down, and I don't want to
take the performance hit of using a more expensive object
(ArrayCollection) and in
addition to that, having extra event subscriptions to something that
will never change.

So why does the compiler have warnings for it?
It makes me feel like I'm doing something wrong when I see a bunch of
warnings. :(

I wish I could have a [Not-bindable] tag or something just to shut
that particular warning up.

(rant over)

Suggestions?

Thanks guys, love the group.

James Wilson
Atlanta-area Flex Programmer
[EMAIL PROTECTED] James%40Flexpert.net

 



[flexcoders] Re: Data binding will not be able to detect changes when using--I know I know

2007-06-01 Thread James
Thanks for the help. You guessed correctly.

Here is how I am using it:

mx:ComboBox dataProvider={Application.application.StateListArray}
prompt= id=LICST/

So now with your advice it would be:

mx:ComboBox
creationComplete=event.currentTarget.dataProvider=Application.application.StateListArray
prompt= id=LICST/

Correct?

The former incorrect method seems more intuitive to me.

I am not afraid of ArrayCollections nor the events. I just don't see a
reason to use more memory than necessary, and in this case (and
similar cases) I really can just use a simple array for my needs
without the overhead of an ArrayCollection or extra events.

Granted it may not be much overhead saved, but it does add up I would
think.

Thanks again,
James Wilson



RE: [flexcoders] Re: Custom Attributes

2007-06-01 Thread Alex Harui
Aren't you getting compiler warnings about binding to statics?

 

What is myComponent?  MyComponent is the class, but myComponent
must be something else?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of gary_mangum
Sent: Friday, June 01, 2007 10:53 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Custom Attributes

 

Still haven't figured this one out...is this a bug in flex?

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

 I am unsuccessfully trying to pass an integer constant to a custom
 integer attribute of a custom component. Confused yet? Here's an
 example of what I am trying to do:
 
 Application:
 ?xml version=1.0?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  width=700
 height=250 borderStyle=solid xmlns:ns1=*
 ns1:myComponent supportsMultiselect=true
 supportTypeMask={myComponent.TYPE_MASK_TEXT}/
 /mx:Application
 
 MyComponent:
 ?xml version=1.0 encoding=utf-8?
 mx:Button xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
 mx:Script
 ![CDATA[
 public static const TYPE_MASK_ALL:int = -1;
 public static const TYPE_MASK_NONE:int = 0;
 public static const TYPE_MASK_IMAGE:int = 1;
 public static const TYPE_MASK_TEXT:int = 2;
 public static const TYPE_MASK_SPRITE:int = 4;
 
 public var supportsMultiselect:Boolean;
 public var supportTypeMask:int;
 ]]
 /mx:Script
 /mx:Button
 
 
 The public var supportTypeMask is never getting set for some reason if
 I try to pass it one of the constants. If I pass 2 instead of
 {myComponent.TYPE_MASK_TEXT} it works great.
 
 Any ideas about what I am doing wrong here?
 
 Thanks for your help!


 



RE: [flexcoders] Re: Data binding will not be able to detect changes when using--I know I know

2007-06-01 Thread Alex Harui
Actually, whether you create an ArrayCollection or not, we will so it is
the same memory either way.  List classes and ComboBox only actually
work with collections.  If you hand us a bare array, we wrap it, if you
hand us an ArrayCollection, we take it as is.

 

IMHO, I recommend:

mx:ComboBox
initialize=LICST.dataProvider=Application.application.StateListArray
prompt= id=LICST/



CreationComplete is late and can cause an extra rendering pass.
initialize is earlier.  Also you avoid the overhead of the binding
setup for something that may never change.

 

Assigning values of other objects as the value of MXML attributes is a
long-standing annoyance of XML in general.  Wish there was a better way,
but if you want to optimize startup, don't use binding unless you plan
to change it later.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of James
Sent: Friday, June 01, 2007 11:35 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Data binding will not be able to detect
changes when using--I know I know

 

Thanks for the help. You guessed correctly.

Here is how I am using it:

mx:ComboBox dataProvider={Application.application.StateListArray}
prompt= id=LICST/

So now with your advice it would be:

mx:ComboBox
creationComplete=event.currentTarget.dataProvider=Application.applicati
on.StateListArray
prompt= id=LICST/

Correct?

The former incorrect method seems more intuitive to me.

I am not afraid of ArrayCollections nor the events. I just don't see a
reason to use more memory than necessary, and in this case (and
similar cases) I really can just use a simple array for my needs
without the overhead of an ArrayCollection or extra events.

Granted it may not be much overhead saved, but it does add up I would
think.

Thanks again,
James Wilson

 



[flexcoders] Re: form post to url

2007-06-01 Thread boybles
Figured it out. I used URLRequest,URLRequestMethod.POST and 
navigateToURL [i.e.navigateToURL(request,_self);]
Boybles

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

 How do you implement a form post in Flex to a url which will then go 
to 
 that URL in the browser (where the target is _self?  
 Thanks
 Boybles





[flexcoders] Re: Data binding will not be able to detect changes when using--I know I know

2007-06-01 Thread James
Great Advice, I appreciate it Alex.



[flexcoders] RemoteObject.setCredentials() and Hotfix 2

2007-06-01 Thread Sam Shrefler
Has there been a change to setCredentials on RemoteObject from HotFix 2?

I'm using Service capture to view the requests and after HotFix 2 and
these are the following differences of the CommandMessage being sent
to my gateway...

DSId (String): nil - this is added to the headers object

messageRefType (String): flex.messaging.messages.AuthenticationMessage
- this is no longer in the commandMessage being sent after HotFix 2

Any ideas?

Thanks

Sam


Re: [flexcoders] Re: An odd problem with the 'width' and 'height' of Sprite

2007-06-01 Thread Troy Gilbert

Yeah, I agree, the magic in the scaleX/Y and width/height properties is
frustrating... it would be nice if someone (Adobe, hint, hint, nudge, nudge)
would provide a detailed explanation of what's happening under the hood and
what the expected functionality should be.

The only guaranteed thing I can find is that width/height are *always*
correct (in the parent's coordinate space) if I treat them as read-only and
using drawing to the sprite as a way to adjust its size. In other words, a
sprite doesn't appear to work as a general purpose container that I can size
to anything.

Personally, I think width and height should be like x and y, independent of
scale. My impression is that they wanted people to be able to load something
into a sprite and make it twice as big by saying mySprite.width *= 2. That
seems to conflict (or at least make non-trivial) the relationship between
scale and size, particularly in the edge case of an empty sprite (where size
is 0).

In the end, I think the API is *broken* design wise and is full of hacks to
make it work in the way people used it... but I may be wrong, hence my
desire for a definitive explanation from Adobe.

Troy.


On 6/1/07, esaltelli [EMAIL PROTECTED] wrote:


  Troy,

One thing to note in my trial and error, changing the height and width
then resetting the scales properly displays the content...until you
want to do a scaling operation. The very next scaling (i.e. via
scaleX = blah) operation uses the height and width computed from
'resetting' the scale. In my case all I wanted to do is perform
scaling operations. Attempting to restore the original image (via
scaleX = scaleY = 1.0 ) just didn't work after several scaling operations.

The only consistent mechanism I've discovered to date is to explicitly
create a new Matrix object and set it on the transform. Unfortunately
this seems to by-pass all of the properties; so you don't get an
updated height  width.

Ed

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

 Hi Cho,

 I assume in your example code below that TCellView was supposed to be
 CustomSprite (i.e. the constructor).

 This was mentioned recently so you could probably find some details
in the
 archives, though I'm not sure what to suggest you search for, so
I'll repeat
 what I learned as best as possible:

 When you set the width and height of a sprite, Flash attempts to
scale the
 sprite to that width and height. So, it'll set the new width and
height but
 it will also adjust the scaleX and scaleY properties such that *if* your
 sprite had content it would be scaled up to the new size (kinda what you
 would expect if you resized a movie clip).

 Of course, the big problem is that the documentation for
width/height (or
 DisplayObject) makes absolutely no mention of this, and it appears
that the
 behavior has simply been deduced through trial and error (Gordon or
other
 Adobe folks, I'd love to see some official confirmation on what's
happening
 -- and an update to the LiveDocs!).

 What is happening in your case is the width and height of your new
Sprite is
 0 because it doesn't contain any vector art, etc. So, you set the
width and
 height manually and the Sprite attempts to adjust scaleX and scaleY to
 compensate. Since the width and height are at zero, the scales
become NaN
 (division by zero), and thus are set to zero. Now, future drawing/sizing
 gets squished by the fact that scale is set to zero.

 To fix it, you can set your width and height *then* reset scaleX and
scaleY
 back to 1.0. That should do it.

 Adobe? Undocumented!

 Troy.


 On 20 Mar 2007 05:43:55 -0700, celdi30 [EMAIL PROTECTED] wrote:
 
 
  Hi all. (This is my first post in this group, so I'd like to give
all of
  you a greeting .)
 
  As the title, I've met an odd problem with using Sprite class.
  Because I'm a novice of Flex, my problem may be so trivial.
  But Your helps would make me happy.
 
  The simple version of my code is below.
 
  public class CustomSprite extends Sprite
  {
  public function TCellView(w:Number, h:Number) {
  this.width = w;
  this.height = h;
 
  draw();
  }
 
  private function draw():void {
  this.graphics.clear();
 
  this.graphics.lineStyle(2, 0x00, 0.7);
  this.graphics.drawRect(0, 0, this.width, this.height);
  }
  }
 
  The problem is that the assignments to width and height in the
  constructor of mine have no effect.
  So in draw(), the rectangle to be drawn has size of zero. The
width and
  height are public properties of Sprite and are not read-only.
  Then why does the code like 'this.width = w' have no effect? (In debug
  mode of Flex Builder, the Variables view told me the values of
  width/height of the Sprite object have not changed by the codes.)
 
  After some investigation, I knew that the drawing on the graphics of
  Sprite causes update of width/height.
  That behavior is reasonable, I think. However, I wonder why a
  direct-assignment to width or height is banned, and 

Re: [flexcoders] Really complex buttons (aka what WPF got right)

2007-06-01 Thread Doug McCune

How about this:
http://dougmccune.com/blog/2007/06/01/new-component-canvasbutton-added-to-flexlib/

Doug

On 6/1/07, Ely Greenfield [EMAIL PROTECTED] wrote:






Hi Borek.  I can give you the short answer, which is that composition is
an important goal of the flex framework.  But we have two design goals which
WPF doesn't have – specifically

-  keeping the framework something that will perform well on the
98% of the machines on the internet that currently have flash deployed (WPF
has much heavier client requirements).

-  keeping MXML something that a developer and/or designer can
look at, easily read and comprehend, and code by hand as appropriate (most
XAML files that I see tend to be fairly hard to read to the typical
developer).



Both of these have forced us to walk a delicate line between power and
simplicity in our component framework, and composability is one of those
areas where we have been forced to make hard tradeoffs (and continue to
debate them on a daily basis).



Having said that, the move to Flash Player 9, AS3, and the new AVM+ has
given us additional power (usable on the broad majority of the internet…over
85% penetration at this point, I believe) that we've only just begun to take
advantage of in the framework. Expect to see us weaving composition deeper
and deeper into the framework as it evolves.



I should also mention that there's technically nothing stopping you from
making composable controls like flexible buttons today. Personally, I
believe it's worth every flex developers time to learn a little bit of
component development; while there may be an initial up front learning
investment, Once you have the knowledge, banging out a couple of custom
built or reusable components doesn't take a lot of work.  But building that
kind of flexibility into every push button in every flex application,
without paying a non-trivial cost in performance and complexity, is
something that takes time and consideration.



Ely.









*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *borekbe
*Sent:* Friday, June 01, 2007 9:31 AM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Really complex buttons (aka what WPF got right)



Hi, I'm still learning Flex and during the last few hours, I've been
struggling with some button-related problems.

I am trying to create a button which contains not only label and icon
but any arbitrary contents. If Flex was WPF, you could do something like

mx:Button
mx:VBox
mx:Label ... /
mx:Image ... /
custom:Component ... /
/mx:VBox
/mx:Button

This approach really saves a lot of time and hassle but unfortunately
is not implemented in Flex (this would be great for future versions).
What I did in Flex was that I created a custom component based on
Canvas (say MyButton) and designed it however I wanted. I've set the
buttonMode property to true so I now have the nice hand cursor. Click
event is automatically there...

So far so good. But the ultimate goal is to have something like
TabNavigator, except that the tabs are pretty complicated MyButtons.
No again, because the TabBar is based on buttons, you can only set
label and icon. I don't think I can help myself creating a new class
based on TabBar because the Button limitation would be still there.

As far as I can see it, to have a custom button is fairly common
scenario and I can't believe that Flex makes it so hard for me as a
developer. There must be some way that I have simply missed.

Could anyone more experienced please advise me, or generally comment
on Flex composability of more advanced controls?

Thanks,
Borek

  



[flexcoders] Bug when resizing IE7 vertically (only), movie doesn't resize to fit

2007-06-01 Thread thegators_2002
I have a Flex 2.01 Application that has a Panel (and then a bunch of
sub-components).  It is set to height and width of 100% in the
container aspx file.  When I run it in IE7, if I only resize the
browser vertically, the SWF does not resize to fit.  If I make the
window taller, there will be blank white space at the bottom as the
panel stays its same size.  If I make the window shorter, then a
vertical scroll bar appears.  However, if I resize horizontally, then
the movie stretches or shrinks moviong all of its components as I
expect, always staying the right size to fill the browser window.  If
I have resized the window vertically, creating a blank space or a
scroll bar, as soon as I resize a pixel either way horizontally, the
movie immediately resizes itself to fit in all directions.

Is this some sort of display bug in IE?  I have tried changing the
layout of the Application, the height and width, and the alignment of
the SWF object in the hosting page javascript.  I copied the
javascript holding the SWF directly from the auto-generated HTML file
- except the host page is an ASPX file.  Does anyone know if there is
something related to it being an ASPX page that doesn't throw an event
when changing its size vertically?

Thanks,
Pete



[flexcoders] Re: Data binding will not be able to detect changes when using--I know I know

2007-06-01 Thread simonjpalmer
Quite agree, it's a bloody nuisance that one.  If you find out, post
an answer.

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

 I'm sick of seeing
 
 Data binding will not be able to detect changes when using square
 bracket operator.  For Array, please use ArrayCollection.getItemAt()
 
 when using an arrayObj[arrayPropertyOrIndex] inside of an MXML
property. 
 
 I know that it won't be propagated down if the array changes, but in a
 lot of cases, I don't need it to propagate down, and I don't want to
 take the performance hit of using a more expensive object
 (ArrayCollection) and in
 addition to that, having extra event subscriptions to something that
 will never change.
 
 So why does the compiler have warnings for it?
 It makes me feel like I'm doing something wrong when I see a bunch of
 warnings. :(
 
 I wish I could have a [Not-bindable] tag or something just to shut
 that particular warning up.
 
 (rant over)
 
 Suggestions?
 
 Thanks guys, love the group.
 
 James Wilson
 Atlanta-area Flex Programmer
 [EMAIL PROTECTED]





[flexcoders] Coldfusion/Flex Application WIzard settings problem...

2007-06-01 Thread David
Hi all,
Really in a bind here and can't figure this out for the life of me. 
Do you know if there is a way to use the settings (.cffaws file) of
one project for another? I accidentally clicked clean and it erased my
swf and html files in my bin folder and I've tried creating a new
project based upon my old cffaws file but it won't generate the swf or
html files in bin but does everything else. Any suggestions would be
greatly appreciated!
Thanks,
David



Re: [flexcoders] Re: [SOLVED] itemRenderer null object error

2007-06-01 Thread Ben Marchbanks
So what would be an alternative ??

Is it best practice to create IRs using AS3 ?  I am all for whatever works 
consistently.

If I am pushing the envelop trying to use an MXML component as an Item Renderer 
and adding events to produce dynamic styles and object then by all means 
somebody save me !

Alex Harui wrote:
 I'd be careful about using render it can get called often.  Always
 assume that data could be null.
 
  
 
 -Alex
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Aaron Wright
 Sent: Friday, June 01, 2007 8:41 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: [SOLVED] itemRenderer null object error
 
  
 
 Maybe I've a little naive but I like making nearly everything in
 actionscript 3, especially itemRenderers. Then, you can handle all the
 positioning and styles in the updateDisplayList function if you want.
 This generally follows the Adobe approach to it as well. I say start
 with looking over Adobe code for itemRenderers, and see where you need
 to add your code to make it do what you want.
 
 In the end you avoid listening for events, and not knowing what event
 is going to fire in what occasion.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Ben Marchbanks [EMAIL PROTECTED] wrote:
 After experimenting I found the solution was to change the event
 trigger from 
 initialize to render.

 Happy to have resolved the problem but still puzzled why
 initialize worked for 
 one itemRenderer and not the other since from all appearances the 
 implementations are identical ???



 pdflibpilot wrote:
 I am so happy I was able to create an itemRenderer with an
 initialize
 event that dynamically set the style for each item based on the
 source
 data. This worked flawlessly for one HorizontalList ( List A) so I
 tried to implement the same on a TileList (List B) on the same
 layout.
 They have virtually the same dataProvider - List B items are
 originally drag/dropped to List A.

 These list are nearly identical in every way yet when the event
 fires
 for the itemRenderer in List B it fails with null object error. It
 seems that the data is not available when the event dispatches. I am
 at a loss as to why it works for one list and not the other. The
 data
 used by the event is not null when it renders since all the items
 (data) are accounted for.

 here my itemRenderer code that works - 

 ?xml version=1.0 encoding=utf-8?
 !-- itemRenderers\navScreenRender.mxml --

 mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml  
 width=200 
 height=200
 horizontalScrollPolicy=off
 verticalScrollPolicy=off
 borderStyle=solid backgroundImage=assets/images/{data.imageID}
 alpha=1.0 backgroundAlpha=1.0 borderColor=#33

 mx:Script
 ![CDATA[

 private function setContentButton(event:Event,V):void{
 var e = event.currentTarget
 if(V==''){
 e.styleName = 'customcontentbuttonOff'
 e.alpha = 1.0
 e.toolTip = Content Editor is not enabled for this screen - click
 to complete the setup
 }
 else if(V!=(preset)){
 e.styleName = 'customcontentbuttonOn'
 e.alpha = 1.0
 e.toolTip = Content Editor is enabled for this screen - click to
 change the setup
 }
 else if(V==(preset)){
 e.alpha = 0.0
 }
 }
 ]]

 /mx:Script
 mx:Text id=layoutLabel text = {data.label}
 fontSize=8
 color=#ff
 textAlign=center
 letterSpacing=0
 horizontalCenter=0 verticalCenter=-38/
 mx:Image source = assets/images/{data.imageID} 
 toolTip={data.description}
 scaleContent=false alpha=1 
 visible=false/
 mx:Button label={data.displaySeq-0+1} width=25 height=20
 cornerRadius=12 styleName=adminbutton fontWeight=bold
 fontSize=9 verticalCenter=20 horizontalCenter=0/
 mx:Button id=contentButton
 initialize={setContentButton(event,data.contentLocation)} 
 label=C width=18 height=18 
 cornerRadius=12 
 styleName=customcontentbuttonOff 
 fontWeight=bold fontSize=10 
 verticalCenter=-1 horizontalCenter=0 
 alpha=1.0/

 /mx:Canvas


 -- 
 Ben Marchbanks

 ::: alQemy ::: transforming information into intelligence
 http://www.alQemy.com http://www.alQemy.com 

 ::: magazooms ::: digital magazines
 http://www.magazooms.com http://www.magazooms.com 

 Greenville, SC
 864.284.9918

 
  
 
 

-- 
Ben Marchbanks

::: alQemy ::: transforming information into intelligence
http://www.alQemy.com

::: magazooms ::: digital magazines
http://www.magazooms.com

Greenville, SC
864.284.9918


[flexcoders] TextField autosize a bunch of ****

2007-06-01 Thread thirtyfivemph
Okay, maybe my brain took the weekend off early, but I just can't get
TextFields to cooperate...

(BTW, this is an AS3 Project, so no Label or Text or other UIComponent
suggestions, please!)

I create a TextField:

var text:TextField = new TextField();

That I want formatted like so:

text.defaultTextFormat = new TextFormat(Courier, 18);

And I want the TextField to automatically size itself to its text:

text.autoSize = TextFieldAutoSize.CENTER;

And then, at various points in my program, I change the text:

text.text = Some text;

What I expect is that the autoSize will adjust the size of my
component so that it *completely* fits my text I set to it without me
having to do anything (at least that's my understanding of auto).

So, I assume I could throw my TextField to a certain point on the screen:

// centered near the top edge of this DisplayObjectContainer
text.x = this.width / 2;
text.y = 10;

And whenever I updated the text it would remained center along the top
edge of the screen. I assumed it would do this internally by having
the text go to the left of the TextField's position (using text.x and
text.y as a registration point, so to speak). What I discovered,
frustratingly, is that it appears that what it actually does is simply
*change* the x/y values I loving calculated (when autoSize == CENTER)
and modify the width/height (as necessary).

Okay, well I grappled with that by doing this in my update code:

text.text = ;
text.x = this.width / 2;
text.y = 10;
text.text = newTextValue;

This seemed to work... or so it seemed... now, the autoSize seems to
only happen the first time I update the text! So, it sizes just right
to the first value I stick in there, but the second value (which is
longer) gets truncated!

Do I have to reset autoSize each time? What gives? Is there something
I could be doing in my code (save clearing autoSize) that would result
in a TextField truncating its contents? I would assume that if
autoSize is set to anything other than NONE I would *never* have
truncated text, but obviously I'm wrong!

Any ideas?

Troy.




[flexcoders] Re: textAlign not working for TabBar

2007-06-01 Thread phall121
Yes, Thank You!  I was trying to set the textAlign property
on the TabBar directly.  You've reminded me that the TabBar
is a collection of tabs.  The CSS approach apparently is 
needed to set the style of the children tabs through the 
tabStyleName setting.

Thanks, this was a great help!! 

Below I've included another version that also works.

Paul Hall


mx:Style

.leftTextTab {
textAlign:left;
}

/mx:Style


mx:TabBar x=272 y=110 tabStyleName=leftTextTab
mx:dataProvider
mx:Array
mx:Object label=Item 1/
mx:Object label=Item 2/
mx:Object label=Item 3/
mx:Object label=Item 4/
mx:Object label=Item 5/
/mx:Array
/mx:dataProvider
/mx:TabBar
mx:Label x=446 y=140 text=Left Align Specified via CSS
color=#ff/



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

 Interesting. It worked fine on my end. Here's a more thorough 
example:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute
 
   mx:Style
   
   .leftTextTabBar {
   firstButtonStyleName:leftTextTab;
   buttonStyleName:leftTextTab;
   lastButtonStyleName:leftTextTab;
   
   firstTabStyleName:leftTextTab;
   tabStyleName:leftTextTab;
   lastTabStyleName:leftTextTab;
   }
   
   .leftTextTab {
   textAlign:left;
   }
   
   
   /mx:Style
   
   mx:TabBar x=272 y=31
   mx:dataProvider
   mx:Array
   mx:Object label=Item 1/
   mx:Object label=Item 2/
   mx:Object label=Item 3/
   mx:Object label=Item 4/
   mx:Object label=Item 5/
   /mx:Array
   /mx:dataProvider
   /mx:TabBar
   
   mx:TabBar styleName=leftTextTabBar x=272 y=110
   mx:dataProvider
   mx:Array
   mx:Object label=Item 1/
   mx:Object label=Item 2/
   mx:Object label=Item 3/
   mx:Object label=Item 4/
   mx:Object label=Item 5/
   /mx:Array
   /mx:dataProvider
   /mx:TabBar
   mx:Label x=459 y=61 text=Alignment Not Specified 
color=#ff/
   mx:Label x=446 y=140 text=Left Align Specified via CSS
 color=#ff/
 
 /mx:Application
 
 Hope that helps.
 
 Juan
 scalenine.com
 
 --- In flexcoders@yahoogroups.com, phall121 phall@ wrote:
 
  Great suggestion.  I had not thought of this.
  Unfortunately, though, this didn't work.  I applied
  in a couple of different ways and still no luck.
  But, again, thanks for the suggestion!  It was 
  worth a try.
  
  PHall
  
  
  --- In flexcoders@yahoogroups.com, scalenine juan@ wrote:
  
   I know you can set that via styling:
   
   mx:Style
   Tab {
 textAlign:left;
 }
 
 /mx:Style
   
   --- In flexcoders@yahoogroups.com, phall121 phall@ wrote:
   
I'm not to get textAlign=left working on the TabBar
control.  I've searched the archives and find no 
references to this issue.

Is my code flawed in some way that I'm just not catching?

   mx:TabBar direction=vertical 
dataProvider={vacCAppList} 
labelField=app width=300 textAlign=left  
itemClick=fSelectApp(event)/

Has anyone else had this problem?  If so, have you found
a work-around.
   
  
 





[flexcoders] databing to model object with arraycollection

2007-06-01 Thread akurland
Hi,

I have a custom object (defined in .as) with this property:

[Bindable]
public class ExperimentModel implements IXmlSerializable
{
...

//element type is subclass of Therapy
public var therapies:ArrayCollection = new ArrayCollection();
public function addTherapy(element:Therapy):void {

therapies.addItem(element);
therapies.dispatchEvent(new CollectionEvent(
CollectionEvent.COLLECTION_CHANGE ) );  
}

I then have another class which sometimes works with databinding,
sometimes not.  


mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; 
  xmlns:com=therapyComponents.*
  layout=vertical width=400 height=300
mx:Script
![CDATA[
import mx.events.CollectionEvent;
import com.entelos.realab.model.Therapy;
import com.entelos.realab.vo.PatientVO;
import mx.collections.ArrayCollection;
import com.entelos.realab.model.ExperimentModel;
[Bindable]
public var model:ExperimentModel;

private function getlen(a:ArrayCollection):Number {
return a.length;
}

private function negate( value:Number ):Number
{
return -value;
}
]]
/mx:Script

mx:Text width=100% id=t1  text={model.therapies.length}/ !--
this works --
mx:Text width=100% id=t2  text={getlen(model.therapies)}/
!-- this does not --
mx:Text width=100% id=t3 
text={negate(model.therapies.length)}/ !-- this works --
com:boundText val={model.therapies}/ !-- this does not --
mx:DataGrid  dataProvider={model.therapies}/ !-- this works --

/mx:Panel

Obviously I can use the .length property for my bound therapies
ArrayCollection but not my therapies as-is.  Why is this?

Thanks




  1   2   >