RE: [flexcoders] Why never create an item renderer?

2009-09-03 Thread Alex Harui
It is good enough if you shipped it and got paid :)

If you want to post the code for a renderer, we can offer opinions on the pros 
and cons of your implementation.  It might be good education for many.  I don't 
have time to judge dozens of renderers so we can just start with one of yours 
and discuss it.  There is usually a trade-off of ease of programming vs 
performance and memory optimization.  The smaller and faster you want it to be, 
the more work you have to do.  If you're only gonna have 7 renderers on screen, 
it doesn't matter as much as if you are creating DataGrid renderers for a 20x20 
grid.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Wesley Acheson
Sent: Thursday, September 03, 2009 3:29 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Why never create an item renderer?



I've created a few. I've recreated a few working ones because I want to 
understand the framework better. I guess my problem is how do I know if the 
item renderers i've created are "Correct".  I've far too often seen programming 
as a religion. I've just as often seen people just make things work.

I can't stand by either of these sometimes you need things to just work, 
however if you don't worry about practices you've got unmaintainable code.

So how do I know if what I've written is good enough.

Regards,

Wesley Acheson
On Thu, Sep 3, 2009 at 9:38 PM, Tracy Spratt 
mailto:tr...@nts3rd.com>> wrote:


It is not always given as advice.  I give that when I see that a developer does 
not have his head around the issues.  It is usually quite obvious when that is 
the case.



I think it is better advice than RTFM.  An example will get a newbie further 
faster.



When that advice does not apply to you, you will know it.



Tracy Spratt,

Lariat Services, development services available



From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] On 
Behalf Of Wesley Acheson
Sent: Thursday, September 03, 2009 2:36 PM
To: flexcoders
Subject: [flexcoders] Why never create an item renderer?





I've seen this adivse a lot reciently on the list. Don't create an item 
renderer modify an existing example.  I don't really understand why. I mean 
their not that difficult to get your head arround so long as you reset all 
internal variables that need to be reset.

Why is this always given as advise?

Regards,

Wesley Acheson





Re: [flexcoders] Why never create an item renderer?

2009-09-03 Thread Fotis Chatzinikos
If it works, works fast, and its not memory hungry then it is correct :-)

On Fri, Sep 4, 2009 at 1:29 AM, Wesley Acheson wrote:

>
>
> I've created a few. I've recreated a few working ones because I want to
> understand the framework better. I guess my problem is how do I know if the
> item renderers i've created are "Correct".  I've far too often seen
> programming as a religion. I've just as often seen people just make things
> work.
>
> I can't stand by either of these sometimes you need things to just work,
> however if you don't worry about practices you've got unmaintainable code.
>
> So how do I know if what I've written is good enough.
>
> Regards,
>
> Wesley Acheson
>
>
> On Thu, Sep 3, 2009 at 9:38 PM, Tracy Spratt  wrote:
>
>>
>>
>>  It is not *always* given as advice.  I give that when I see that a
>> developer does *not* have his head around the issues.  It is usually
>> quite obvious when that is the case.
>>
>>
>>
>> I think it is better advice than RTFM.  An example will get a newbie
>> further faster.
>>
>>
>>
>> When that advice does not apply to you, you will know it.
>>
>>
>>
>> Tracy Spratt,
>>
>> Lariat Services, development services available
>>   --
>>
>> *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
>> Behalf Of *Wesley Acheson
>> *Sent:* Thursday, September 03, 2009 2:36 PM
>> *To:* flexcoders
>> *Subject:* [flexcoders] Why never create an item renderer?
>>
>>
>>
>>
>>
>> I've seen this adivse a lot reciently on the list. Don't create an item
>> renderer modify an existing example.  I don't really understand why. I mean
>> their not that difficult to get your head arround so long as you reset all
>> internal variables that need to be reset.
>>
>> Why is this always given as advise?
>>
>> Regards,
>>
>> Wesley Acheson
>>
>>
>>
>  
>



-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
fotis.chatzini...@gmail.com,


Re: [flexcoders] Set child properties from event.target

2009-09-03 Thread Fotis Chatzinikos
You can either set the buttons visible property to a bindable property and
set this to true in the event handler or:

(event target as Panel).getChildAt(xxx).visible = true //xxx is the index of
the button

if you do not know the index of the button you can loop in the Panel
children searching for a known property
for example name='myButton'


On Fri, Sep 4, 2009 at 6:26 AM, jmfillman  wrote:

>
>
> I have a rollOver = myFunction(event) that fires when the mouse rolls over
> the panel. From the event.target that is passed to myFunction, I need the
> syntax to for the child in the Panel, and set the properties of the child.
>
> For example, I have a button in the panel named myButton and I want to set
> it to visible when the rollOver event fires.
>
>  
>



-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
fotis.chatzini...@gmail.com,


[flexcoders] How to create a datagrid table dynamically in flex application

2009-09-03 Thread Adarsh Agrawal


Hello All,
 
Actualy i'hv to display some attributes of an xml file in a table. i've to 
craete datagrid table dynamically and display the attribute ...can any one help 
me in this regard.


  Love Cricket? Check out live scores, photos, video highlights and more. 
Click here http://cricket.yahoo.com

[flexcoders] Set child properties from event.target

2009-09-03 Thread jmfillman
I have a rollOver = myFunction(event) that fires when the mouse rolls over the 
panel. From the event.target that is passed to myFunction, I need the syntax to 
for the child in the Panel, and set the properties of the child.

For example, I have a button in the panel named myButton and I want to set it 
to visible when the rollOver event fires.



[flexcoders] AIR native window Move/Resize effect

2009-09-03 Thread hworke

  Hi I am trying to apply the following resize/mode parallel effect on the air
  native window 
   




  But I am getting the following error message:

  
TypeError: Error #1034: Type Coercion failed: cannot convert 
flash.display::nativewin...@28de3a1 to mx.core.IUIComponent.
at 
mx.effects.effectClasses::MoveInstance/play()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\effects\effectClasses\MoveInstance.as:233]
at 
mx.effects::EffectInstance/startEffect()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\effects\EffectInstance.as:569]
at 
mx.effects.effectClasses::ParallelInstance/play()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\effects\effectClasses\ParallelInstance.as:199]
at 
mx.effects::EffectInstance/startEffect()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\effects\EffectInstance.as:569]
at 
mx.effects::Effect/play()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\effects\Effect.as:930]
at 
com.si.Silicon.view.panels::LoginPanel/validateResult()[C:\Users\k\Documents\Flex
 Builder 3\siliconOne\src\com\si\Silicon\view\panels\LoginPanel.mxml:33]
at 
com.si.Silicon.view.panels::LoginPanel/__validate_result()[C:\Users\k\Documents\Flex
 Builder 3\siliconOne\src\com\si\Silicon\view\panels\LoginPanel.mxml:84]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at 
mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\http\mxml\HTTPService.as:290]
at 
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:193]
at 
mx.rpc::Responder/result()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:43]
at 
mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74]
at 
DirectHTTPMessageResponder/completeHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:403]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

  What is wrong with it and how do I solve this problem?

Regards



Re: [flexcoders] Why never create an item renderer?

2009-09-03 Thread Wesley Acheson
I've created a few. I've recreated a few working ones because I want to
understand the framework better. I guess my problem is how do I know if the
item renderers i've created are "Correct".  I've far too often seen
programming as a religion. I've just as often seen people just make things
work.

I can't stand by either of these sometimes you need things to just work,
however if you don't worry about practices you've got unmaintainable code.

So how do I know if what I've written is good enough.

Regards,

Wesley Acheson

On Thu, Sep 3, 2009 at 9:38 PM, Tracy Spratt  wrote:

>
>
>  It is not *always* given as advice.  I give that when I see that a
> developer does *not* have his head around the issues.  It is usually quite
> obvious when that is the case.
>
>
>
> I think it is better advice than RTFM.  An example will get a newbie
> further faster.
>
>
>
> When that advice does not apply to you, you will know it.
>
>
>
> Tracy Spratt,
>
> Lariat Services, development services available
>   --
>
> *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
> Behalf Of *Wesley Acheson
> *Sent:* Thursday, September 03, 2009 2:36 PM
> *To:* flexcoders
> *Subject:* [flexcoders] Why never create an item renderer?
>
>
>
>
>
> I've seen this adivse a lot reciently on the list. Don't create an item
> renderer modify an existing example.  I don't really understand why. I mean
> their not that difficult to get your head arround so long as you reset all
> internal variables that need to be reset.
>
> Why is this always given as advise?
>
> Regards,
>
> Wesley Acheson
>
>
> 
>


[flexcoders] charting and/or grid replacements

2009-09-03 Thread Pan Troglodytes
Are there any 3rd-party charting and/or grid replacements in progress that
anyone wants to talk about?  I'm looking to move away from the
AdvancedDataGrid and possibly also Flex charting and am wondering what might
be on the horizon.  Right now Adobe pretty much has the only game in town
for these Flex components as far as I know.

I really wish DevExpress could be brought around to developing for Flex.
Their grid components can have a incredibly steep learning curve due to the
staggering amount of features, but I've found them to be quite a perfect fit
with a professional quality application.  I can only imagine what they'd
build from scratch for Flex.

This is not to dump on Adobe, necessarily.  They're trying to organize their
budget where they thing it's most effective, even if I disagree with it.
But without a rich 3rd-party component ecosystem, I'm afraid that this great
technology (I'm totally in love with the general process of programming for
Flex) might wither on the vine.

-- 
Jason


[flexcoders] DateField - minYear and maxYear - don't work if they contain calculated value?

2009-09-03 Thread flexcoder2008
I have a DateField and if I set the minYear or the maxYear property to a value 
directly, everything works great.

eg.  



But if I want to use a calculated value in there, it doesn't work.  I can 
navigate past this value. 

eg.

[Bindable]
var year:int = new Date().getFullYear();






Why is this? Does anybody have a workaround for this?






[flexcoders] Re: An internal build error has occurred. Right-click for more information.

2009-09-03 Thread deneme2010
I try to do everything that I know including cleanin project, changing 
workspace and also unistalling flex builder and reintaling.

I dicover that this problem is coused by subclipse pluggin.
can you recomend me some system for colloboration like team foundation sistem 
or so for eclipse?

Thanks.

 --- In flexcoders@yahoogroups.com, Ganesh Suyampirakasam 
 wrote:
>
> try to clean the project.
> 
> or try with creating new workspace
> 
> Ganesh
> 
> 
> 
> 
> 
> From: deneme2010 
> To: flexcoders@yahoogroups.com
> Sent: Tuesday, 25 August, 2009 12:21:27 PM
> Subject: [flexcoders] An internal build error has occurred. Right-click for 
> more information.
> 
>   
> Hi,
> I try to build some project with flex, web-orb and subclise plug in.
> everiting goes ok but since yesterday I'm getting error 
> 
> Description : An internal build error has occurred. Right-click for more 
> information.
> 
> Location : line -1
> 
> This error happens simultaneously without any reason. some time it is enough 
> to restart eclipse to resolve problem sometimes not. Also sometimes it cast 
> me error that cant load flex.swc file.
> 
> Does any one have an idea about solution?
> 
> Thanks Deniz
> 
> 
>
> 
> 
>   Love Cricket? Check out live scores, photos, video highlights and more. 
> Click here http://cricket.yahoo.com
>




RE: [flexcoders] Why no event dispatched?

2009-09-03 Thread Tracy Spratt
Oh, I see, you are only testing the failed event.

 

Are you intentionally failing the login when you test it?  Are you sure the
dispatch event code is being run?

 

Also, are you sure the login manager is in the document hierarchy?  Your
component structure is not clear.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Wally Kolcz
Sent: Thursday, September 03, 2009 7:48 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Why no event dispatched?

 

  

this listener is in the view. The Event extends Event and has the bubbling
set to true by default

View:
public function attemptLogin(username:String, password:String):void {
this.addEventListener(LoginEvent.FAILED, loginFailed);
var login:LoginEvent = new LoginEvent(LoginEvent.LOGIN);
login.username = username;
login.password = password;
dispatchEvent(login);
}

Event:
package com.isavepets.rm.events
{
import flash.events.Event;

public class LoginEvent extends Event
{

public static const LOGIN:String = "loginEvent";
public static const LOGOUT:String = "logoutEvent";
public static const FAILED:String = "loginAttemptFailedEvent";

public var username:String;
public var password:String;

public function LoginEvent(type:String, bubbles:Boolean=true,
cancelable:Boolean=false)
{
super(type, bubbles, cancelable);
}

}
}

  _  

From: "Tracy Spratt" 
Sent: Wednesday, September 02, 2009 9:54 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Why no event dispatched?

 

And I don't see where you are declaring the listener.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From:flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Fotis Chatzinikos
Sent: Tuesday, September 01, 2009 4:11 AM
To:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Why no event dispatched?

 

  

Do what Tracy mentions:

either add bubbles=true in the constructor here:
this.dispatchEvent(new LoginEvent(LoginEvent.FAILED))





On Mon, Aug 31, 2009 at 9:40 PM, Wally Kolcz mailto:wko...@isavepets.com> com> wrote:

  

My Events:

package com.isavepets.rm.events
{
import flash.events.Event;

public class LoginEvent extends Event
{

public static const LOGIN:String = "loginEvent";
public static const LOGOUT:String = "logoutEvent";
public static const FAILED:String = "loginAttemptFailedEvent";

public var username:String;
public var password:String;

public function LoginEvent(type:String, bubbles:Boolean=true,
cancelable:Boolean=false)
{
super(type, bubbles, cancelable);
}

}
}

My Listener on the LoginPanel component View:

public function attemptLogin(username:String, password:String):void {
this.addEventListener(LoginEvent.FAILED, loginFailed);
var login:LoginEvent = new LoginEvent(LoginEvent.LOGIN);
login.username = username;
login.password = password;
dispatchEvent(login);
}




  _  

From: "Tracy Spratt" mailto:tr...@nts3rd.com> com>
Sent: Monday, August 31, 2009 10:37 AM
To: flexcod...@yahoogro  ups.com
Subject: RE: [flexcoders] Why no event dispatched?



 

Your event is not set to bubble, so you listener must be:
myLoginManagerInstance.addEventListener();  Is it?

 

Tracy Spratt,

Lariat Services, development services available

  _  

From:flexcod...@yahoogro  ups.com
[mailto:flexcod...@yahoogro  ups.com] On
Behalf Of Wally Kolcz
Sent: Monday, August 31, 2009 12:09 PM
To:flexcod...@yahoogro  ups.com
Subject: [flexcoders] Why no event dispatched?

 

  

Can anyone tell me what I am missing from this Class that not dispatch the
LoginEvent.FAILED?

package com.isavepets.rm.business
{
import com.isavepets.rm.events.LoginEvent;
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
import mx.collections.ArrayCollection;

public class LoginManager extends EventDispatcher
{

public var username:String;
public var role:String;
public var rescueID:int;

public function LoginManager(target:IEventDispatcher=null)
{
super(target);
}

public function manageLogin(e:ArrayCollection):Boolean {
if (e.length !=0){
DataModel.getInstance().username = e.getItemAt(0).username;
DataModel.getInstance().role = e.getItemAt(0).role;
DataModel.getInstance()

[flexcoders] AIR ApplicationUpdaterUI Not Initializing

2009-09-03 Thread michaelisraelcaplan
Hi,

I'm using the Flex SDK 4.0.0.9916, and cannot get the ApplicationUpdaterUI to 
initialize.

Following creation complete, I initialize the ApplicationUpdaterUI object, and 
call the ApplicationUpdaterUI.initialize() -- code snippet below.  

The object appears to initialized properly according to the data popped out in 
the application log:

(air.update::ApplicationUpdaterUI)#0
  configurationFile = (flash.filesystem::File)#1
  currentVersion = "0.2"
  delay = 1
  isCheckForUpdateVisible = true
  isDownloadProgressVisible = true
  isDownloadUpdateVisible = true
  isFileUpdateVisible = true
  isFirstRun = false
  isInstallUpdateVisible = true
  isNewerVersionFunction = (function)
  isUnexpectedErrorVisible = true
  isUpdateInProgress = true
  localeChain = (Array)#40
  previousApplicationStorageDirectory = (null)
  previousVersion = ""
  updateDescriptor = (null)
  updateURL = "http://www.ddxint.com/service/default/desktop_update/updates.xml";
  wasPendingUpdate = false


However, none of my events are being triggered.  My Apache access log doesn't 
show any hits on the defined URL.  Also, calls to checkNow() do absolutely 
nothing.  The only things that I am seeing is that the user application  local 
store folder is being populated with an "#ApplicationUpdater" folder with a 
state.xml file:

http://ns.adobe.com/air/framework/update/state/1.0";>
  Thu Sep 3 16:27:37 GMT-0300 2009



This seems to show that the updater is doing something...  but what?

Any ideas?

Thanks,

Mike



protected function _initializeUpdateFramework():void
{
if (!Capabilities.isDebugger) {
this.updater = new ApplicationUpdaterUI();
this.updater.configurationFile = new File("app:/assets/update.xml");
this.updater.addEventListener(DownloadErrorEvent.DOWNLOAD_ERROR, 
_download);
this.updater.addEventListener(ErrorEvent.ERROR, _error);
this.updater.addEventListener(ProgressEvent.PROGRESS, _progress);

this.updater.addEventListener(StatusFileUpdateErrorEvent.FILE_UPDATE_ERROR, 
_statusFile);
this.updater.addEventListener(StatusFileUpdateEvent.FILE_UPDATE_STATUS, 
_statusFileUpdate);
this.updater.addEventListener(StatusUpdateErrorEvent.UPDATE_ERROR, 
_updateError);
this.updater.addEventListener(StatusUpdateEvent.UPDATE_STATUS, 
_updateStatus);
this.updater.addEventListener(UpdateEvent.BEFORE_INSTALL, 
_beforeInstall);
this.updater.addEventListener(UpdateEvent.CHECK_FOR_UPDATE, 
_checkForUpdate);
this.updater.addEventListener(UpdateEvent.DOWNLOAD_COMPLETE, 
_donwloadcomplete);
this.updater.addEventListener(UpdateEvent.DOWNLOAD_START, 
_donwloadStart);
this.updater.addEventListener(UpdateEvent.INITIALIZED, 
_updateInitialized);

try {
this.updater.initialize();
} catch (e:Error) {
this._logger.debug(ObjectUtil.toString(e));
}

this._logger.debug(ObjectUtil.toString(this.updater));
}
}

protected function _updateInitialized(event:UpdateEvent):void
{
this._logger.debug("UpdateEvent.INITIALIZED");
}

protected function _donwloadStart(event:UpdateEvent):void
{
this._logger.debug("UpdateEvent.DOWNLOAD_START");
}

protected function _donwloadcomplete(event:UpdateEvent):void
{
this._logger.debug("UpdateEvent.DOWNLOAD_COMPLETE");
}

protected function _checkForUpdate(event:UpdateEvent):void
{
this._logger.debug("UpdateEvent.CHECK_FOR_UPDATE");
}

protected function _beforeInstall(event:UpdateEvent):void
{
this._logger.debug("UpdateEvent.BEFORE_INSTALL");
}

protected function _updateStatus(event:StatusUpdateEvent):void
{
this._logger.debug("StatusUpdateEvent");
}

protected function _updateError(event:StatusUpdateErrorEvent):void
{
this._logger.debug("StatusUpdateErrorEvent");
}

protected function _statusFileUpdate(event:StatusFileUpdateEvent):void
{
this._logger.debug("StatusFileUpdateEvent");
}

protected function _statusFile(event:StatusFileUpdateErrorEvent):void
{
this._logger.debug("StatusFileUpdateErrorEvent");
}

protected function _progress(event:ProgressEvent):void
{
this._logger.debug("ProgressEvent");
}

protected function _error(event:ErrorEvent):void
{
this._logger.debug("ErrorEvent");
}

protected function _download(event:DownloadErrorEvent):void
{
this._logger.debug("DownloadErrorEvent");
}



Re: [flexcoders] custom components destroy Flex design mode ....

2009-09-03 Thread Pan Troglodytes
I've run into similar situations before with 3rd party components.  For some
reason, some of them just utterly break the MXML design mode.  I've also
done it myself when subclassing the charting components.  You just get a big
rectangle with a big red X over the whole area.

On Tue, Sep 1, 2009 at 5:46 PM, Fotis Chatzinikos <
fotis.chatzini...@gmail.com> wrote:

>
>
> Something wrong probably with your install...
>
> I do not know what, but here, I 75% of my app is custom and i never had
> this problem
> (Vista, AND XP)
>
> Hopefully somebody else can provide some real help thought, and not just
> 'it plays here :-)'
>
>
> On Tue, Sep 1, 2009 at 10:30 PM, chigwell23  wrote:
>
>>
>>
>> This one is starting to really drive me crazy ... placing any one of a
>> multitude of custom components on the mxml stops design mode from opening.
>> Just grabbed the SteelPotato footerdatagrid to see if it can be seen if it
>> is used. Nope - stops design mode. Wanted to try it because our
>> implementation of Alex's solution also stops design mode from opening. The
>> FlexLib buttons do the same thing - code them into source view and no more
>> design view.
>>
>> How do you deal with this? Our corporate dashboards are starting to get
>> very detailed and we need a WYSIWYG view to adjust things. Do we really have
>> to compile, run application, view in browser, check, and then go back to
>> source mode to increase the width of a button if needed? Any info really
>> appreciated. TIA,
>>
>> Mic.
>>
>>
>
>
> --
> Fotis Chatzinikos, Ph.D.
> Founder,
> Phinnovation
> fotis.chatzini...@gmail.com,
>  
>



-- 
Jason


RE: [flexcoders] Why never create an item renderer?

2009-09-03 Thread Tracy Spratt
It is not always given as advice.  I give that when I see that a developer
does not have his head around the issues.  It is usually quite obvious when
that is the case.

 

I think it is better advice than RTFM.  An example will get a newbie further
faster.

 

When that advice does not apply to you, you will know it.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Wesley Acheson
Sent: Thursday, September 03, 2009 2:36 PM
To: flexcoders
Subject: [flexcoders] Why never create an item renderer?

 

  

I've seen this adivse a lot reciently on the list. Don't create an item
renderer modify an existing example.  I don't really understand why. I mean
their not that difficult to get your head arround so long as you reset all
internal variables that need to be reset.

Why is this always given as advise?

Regards,

Wesley Acheson





[flexcoders] Why never create an item renderer?

2009-09-03 Thread Wesley Acheson
I've seen this adivse a lot reciently on the list. Don't create an item
renderer modify an existing example.  I don't really understand why. I mean
their not that difficult to get your head arround so long as you reset all
internal variables that need to be reset.

Why is this always given as advise?

Regards,

Wesley Acheson


Re: [flexcoders] Flex and REST

2009-09-03 Thread Richard Rodseth
The other issue is error responses. In the apps I work on we have specific
XML or JSON result formats for application errors, which means the Flex app
must handle those responses differently. If the service is using HTTP header
error responses instead I believe the Flex app can't see them, though I
forget the details.

I assume you've seen this thread:

http://stackoverflow.com/questions/153420/is-it-feasible-to-create-a-rest-client-with-flex


On Thu, Sep 3, 2009 at 3:52 AM, claudiu ursica wrote:

>
>
> If your Rest API is exposing XML you won't be needing any additional
> libs... the HTTPService class will do just fine ...
>
> C
>
> --
> *From:* Haykel BEN JEMIA 
> *To:* flexcoders@yahoogroups.com
> *Sent:* Thursday, September 3, 2009 1:45:11 PM
> *Subject:* Re: [flexcoders] Flex and REST
>
>
>
> Anyone tried one of these libs?
>
> http://code. google.com/ 
> p/as3httpclient/
> http://code. google.com/ p/as3httpclientl 
> ib/
>
> They seem to support all required http verbs.
>
> Haykel Ben Jemia
>
> Allmas
> Web & RIA Development
> http://www.allmas-tn.com
>
>
>
>
> On Wed, Sep 2, 2009 at 12:55 PM, DannyT  .com
> > wrote:
>
>>
>>
>> Can anyone give me the definitive answer to whether you can build REST
>> based apps with Flex? There seems to be an incredible amount of FUD about
>> the topic and whilst I appreciate it might not be supported in it's purest
>> form I need to know what is involved in supporting a full REST
>> implementation.
>>
>> I have no experience with REST but we're in the position that a client is
>> going to implement a RESTful service for us to build a Flex application
>> against. If it will 'just work' then great, if not I need to educate them as
>> to any considerations/ workarounds necesscary on the service side of things.
>>
>> Can anyone offer any advice?
>>
>> Cheers,
>> Dan
>>
>> --
>> http://danny-t.co.uk
>>
>
>
>  
>


re: [flexcoders] How to dynamically add series to an areaChart/cartesian chart

2009-09-03 Thread Wally Kolcz
With actionscript you can add them on the fly with addChild(), I don't think 
you can add them dynamically with mxml unless they are 'static' options that 
may or may not appear, then I think you can just have them set to visible=false 
and includeInLayout=false.


From: "djhatrick" 
Sent: Thursday, September 03, 2009 9:52 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to dynamically add series to  an areaChart/cartesian 
chart 

Hi, 

I am working with about 8 charts in my ui, they all share common functionality, 
how do I dynamically add series to my charts... is it as simple as setting 
series on my super.chart?

Are there any examples out there that show this?  Best practices too? Using 
mxml or actionscript?

Thanks,

Patrick





[flexcoders] How to dynamically add series to an areaChart/cartesian chart

2009-09-03 Thread djhatrick
Hi, 

I am working with about 8 charts in my ui, they all share common functionality, 
how do I dynamically add series to my charts... is it as simple as setting 
series on my super.chart?

Are there any examples out there that show this?  Best practices too? Using 
mxml or actionscript?

Thanks,
Patrick



Re: [flexcoders] What does [Bindable("dataChange")] do?

2009-09-03 Thread Johannes Nel
its not specific to any class, its part of the framework. its a very handy
way to optimise in truth, when a specific property updates you only fire
that one event, and only the property(ies) associated with that event via
binding will update.

you can also have multiple binding tags with one getter, for example
[Bindable("eventA")]
[Bindable("eventB")]
funciton get a():String
{
}

lastly its a way to make read only properties bindbale.

On Thu, Sep 3, 2009 at 6:02 PM, Johannes Nel  wrote:

> it means the binding will only update when the dataChange event fires on
> that object.
>
>
> On Thu, Sep 3, 2009 at 4:40 PM, Nick Middleweek wrote:
>
>>
>>
>> i'm still new to Flex... I'm going through someone's code and i'm
>> wondering what *[Bindable("dataChange")]* does.
>>
>> It's in an ItemRenderer MXML file for an Advanced DG. it's not inside any
>> function, it's near the top, underneath the import statements and variable
>> declarations and before the first function.
>>
>> Can anyone shed some light on it please?
>>
>>
>> Cheers,
>> Nick
>>
>>  
>>
>
>
>
> --
> j:pn
> \\no comment
>



-- 
j:pn
\\no comment


Re: [flexcoders] What does [Bindable("dataChange")] do?

2009-09-03 Thread Johannes Nel
it means the binding will only update when the dataChange event fires on
that object.

On Thu, Sep 3, 2009 at 4:40 PM, Nick Middleweek wrote:

>
>
> i'm still new to Flex... I'm going through someone's code and i'm wondering
> what *[Bindable("dataChange")]* does.
>
> It's in an ItemRenderer MXML file for an Advanced DG. it's not inside any
> function, it's near the top, underneath the import statements and variable
> declarations and before the first function.
>
> Can anyone shed some light on it please?
>
>
> Cheers,
> Nick
>
>  
>



-- 
j:pn
\\no comment


Re: [Spam] [flexcoders] Re: What does [Bindable("dataChange")] do?

2009-09-03 Thread Nick Middleweek
Hi, thanks for the reply...

I can see similarities in the example to the code I'm looking at but my
setter doesn't dispatch an event - does this mean the
[Bindable("dataChange")]  isn't needed?


Also, is [Bindable("dataChange")] specific to the data property or the
IDataRender Class?... I mean is it a coincidence that the property is called
"data" and the event is called "data"Change?

Or does the IDataRenderer dictate that there must be this
[Bindable("dataChange")] meta tag in order for the data getter and setter to
function correctly.

INterfaces are new to me as well :)


Cheers,
Nick





2009/9/3 valdhor 

>
>
> Check the documentation at
> http://livedocs.adobe.com/flex/3/langref/mx/core/IDataRenderer.html.
>
> --- In flexcoders@yahoogroups.com , Nick
> Middleweek  wrote:
> >
> > i'm still new to Flex... I'm going through someone's code and i'm
> wondering
> > what *[Bindable("dataChange")]* does.
> >
> > It's in an ItemRenderer MXML file for an Advanced DG. it's not inside any
> > function, it's near the top, underneath the import statements and
> variable
> > declarations and before the first function.
> >
> > Can anyone shed some light on it please?
> >
> >
> > Cheers,
> > Nick
> >
>
>  
>


[flexcoders] Re: What does [Bindable("dataChange")] do?

2009-09-03 Thread valdhor
Check the documentation at 
http://livedocs.adobe.com/flex/3/langref/mx/core/IDataRenderer.html. 


--- In flexcoders@yahoogroups.com, Nick Middleweek  wrote:
>
> i'm still new to Flex... I'm going through someone's code and i'm wondering
> what *[Bindable("dataChange")]* does.
> 
> It's in an ItemRenderer MXML file for an Advanced DG. it's not inside any
> function, it's near the top, underneath the import statements and variable
> declarations and before the first function.
> 
> Can anyone shed some light on it please?
> 
> 
> Cheers,
> Nick
>




[flexcoders] What does [Bindable("dataChange")] do?

2009-09-03 Thread Nick Middleweek
i'm still new to Flex... I'm going through someone's code and i'm wondering
what *[Bindable("dataChange")]* does.

It's in an ItemRenderer MXML file for an Advanced DG. it's not inside any
function, it's near the top, underneath the import statements and variable
declarations and before the first function.

Can anyone shed some light on it please?


Cheers,
Nick


[flexcoders] line series - resize issue

2009-09-03 Thread Gautam P
Hi,

I have a linechart within which there are a lot of line series. When I hide
a line series I want the line chart to resize/adjust to the visible line
series only.
This doesn't happen if I make the series I want to hide using visible=false
and includeInLayout=false. However the linechart does resize if I update the
dataprovider. Is there any way to resize the linechart with only visible
lineseries without updating the dataprovider?

Thanks,
Gautam.


Re: [flexcoders] Can we command an ole2 (COM) via AIR

2009-09-03 Thread b_productiv2000
This is 1% of our application, it's not its only function.
Our application is a customer relationship management dedicated 
to the insurances, and at one moment in the process (when the 
offer or the order is done) we've got to print a document based 
on a template that each client is supposed to create (i insist, 
we didn't know the template before).
The old application is based on the powerfull and well known 
merge function of word, so we are trying to achieve the same 
thing but in our new AIR application.

I hope to be clear enougth and that you understand my 
approximative english.

Alban

Tom Chiverton a écrit :
> 
> 
> On Wednesday 02 Sep 2009, b_productiv2000 wrote:
>  > we are having trouble in our developpement of an air application.
>  > We are supposed to merge document with word (data from one side and
>  > template from the other side) via our AIR application.
> 
> Why are you doing this in AIR ?
> 





Re: [flexcoders] Can we command an ole2 (COM) via AIR

2009-09-03 Thread Tom Chiverton
On Wednesday 02 Sep 2009, b_productiv2000 wrote:
> we are having trouble in our developpement of an air application.
> We are supposed to merge document with word (data from one side and
> template from the other side) via our AIR application.

Why are you doing this in AIR ?

-- 
Helping to interactively visualize extensible segments as part of the IT team 
of the year, '09 and '08



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners.  We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

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

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

[flexcoders] Re: how to show icon in ToggleButtonBar

2009-09-03 Thread grg_blls
Thank you Steve for the example. 
(I also had a look at the links you provided :)

Though all seem very straightforward, somehow it keeps on disregarding showing 
the icons, without any errors. 
Looks like the itemRenderer 'forgets' to place the icons, even if the iconField 
is set at the mx:Menu control and points correctly to "@icon" property of the 
dataProvider :)
The icons are properly embedded of course!

As other matters are more pressing now, I will drop this icon "looks" 
improvement and remain with the labels already there, while keeping on with the 
main project development. When I have time I will look again to this "problem" 
for the shake of it.

Thanks again for your help 
George
  

--- In flexcoders@yahoogroups.com, "valdhor"  wrote:
>
> Using examples from
> http://livedocs.adobe.com/flex/3/langref/mx/controls/MenuBar.html#includ\
> eExamplesSummary and
> http://blog.flexexamples.com/2007/08/18/displaying-icons-in-a-flex-combo\
> box-control/ I came up with the following example:
> 
> 
> 
> http://www.adobe.com/2006/mxml";
> creationComplete="initCollections();" >
>  
>  
>  
>   paddingTop="10" paddingLeft="10">
>  
>   itemClick="menuHandler(event);" dataProvider="{menuBarCollection}" />
>  
> 
> 
> 
> HTH
> 
> 
> 
> Steve
> 
> --- In flexcoders@yahoogroups.com, "grg_blls"  wrote:
> >
> > Excuse me guys for dropping in to ask, but as to the first post: The
> second part of the code is about a menuBar control showing icons -
> though the post is titled "how to show icon in ToggleButtonBar".
> > As I have a same problem with a menuBar here trying to show some icons
> along with the labels, I gave it a try and no icons appear also here.
> BTW it doesn't throw any error.
> > (My dataProvider is also a XMLList, with more subMenus, but same in
> concept to your example).
> > So what's going on?
> >
> > Thanks
> > George
> >
> > --- In flexcoders@yahoogroups.com, "nathanleewei" nathanleewei@ wrote:
> > >
> > > Are icons shown in ToggleButtonBar?
> > >
> > > What's your flex sdk version?
> > >
> > >
> > > --- In flexcoders@yahoogroups.com, "valdhor"  wrote:
> > > >
> > > > Works for me. Do you get any errors?
> > >
> >
>




RE: [flexcoders] Why no event dispatched?

2009-09-03 Thread Wally Kolcz
this listener is in the view. The Event extends Event and has the bubbling set 
to true by default

View:
public function attemptLogin(username:String, password:String):void {
this.addEventListener(LoginEvent.FAILED, loginFailed);
var login:LoginEvent = new LoginEvent(LoginEvent.LOGIN);
login.username = username;
login.password = password;
dispatchEvent(login);
}

Event:
package com.isavepets.rm.events
{
import flash.events.Event;

public class LoginEvent extends Event
{

public static const LOGIN:String = "loginEvent";
public static const LOGOUT:String = "logoutEvent";
public static const FAILED:String = "loginAttemptFailedEvent";

public var username:String;
public var password:String;

public function LoginEvent(type:String, bubbles:Boolean=true, 
cancelable:Boolean=false)
{
super(type, bubbles, cancelable);
}

}
}


From: "Tracy Spratt" 
Sent: Wednesday, September 02, 2009 9:54 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Why no event dispatched? 

And I don't see where you are
declaring the listener.   Tracy Spratt,  Lariat Services, development services
available 

 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Fotis Chatzinikos
Sent: Tuesday, September 01, 2009
4:11 AM
To:flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Why no
event dispatched?  

Do what Tracy
mentions:

either add bubbles=true in the constructor here:

this.dispatchEvent(new LoginEvent(LoginEvent.FAILED))

 On Mon, Aug 31, 2009 at 9:40 PM, Wally Kolcz  wrote:
My
Events: 

package com.isavepets.rm.events

{

import flash.events.Event;

public class LoginEvent extends Event

{

public static const LOGIN:String =
"loginEvent";

public static const LOGOUT:String =
"logoutEvent";

public static const FAILED:String =
"loginAttemptFailedEvent";

public var username:String;

public var password:String;

public function LoginEvent(type:String,
bubbles:Boolean=true, cancelable:Boolean=false)

{

super(type, bubbles,
cancelable);

}

}

}

My Listener on the LoginPanel component View:

public function attemptLogin(username:String,
password:String):void {

this.addEventListener(LoginEvent.FAILED, loginFailed);

var
login:LoginEvent = new LoginEvent(LoginEvent.LOGIN);

login.username = username;

login.password = password;

dispatchEvent(login);

}


 From :
"Tracy Spratt" 
Sent: Monday, August 31, 2009
10:37 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Why no
event dispatched? 

  Your event is not set to
bubble, so you listener must be: myLoginManagerInstance.addEventListener(); 
Is it?   Tracy Spratt, Lariat Services,
development services available 

 From: flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com]
On Behalf Of Wally Kolcz
Sent: Monday, August 31, 2009
12:09 PM
To:flexcoders@yahoogroups.com
Subject: [flexcoders] Why no event
dispatched?  Can anyone tell me what I
am missing from this Class that not dispatch the LoginEvent.FAILED?

package com.isavepets.rm.business

{

import com.isavepets.rm.events.LoginEvent;

import flash.events.EventDispatcher;

import flash.events.IEventDispatcher;

import mx.collections.ArrayCollection;

public class LoginManager extends EventDispatcher

{

public var username:String;

public var role:String;

public var rescueID:int;

public function LoginManager(target:IEventDispatcher=null)

{

super(target);

}

public function manageLogin(e:ArrayCollection):Boolean
{

if (e.length !=0){

DataModel.getInstance().username = e.getItemAt(0).username;

DataModel.getInstance().role = e.getItemAt(0).role;

DataModel.getInstance().rescueID = e.getItemAt(0).rescueID;

return true;

}else{

this.dispatchEvent(new LoginEvent(LoginEvent.FAILED));

/*
Alert.show("Incorrect Username and/or Password, Please Try Again",
"Login Failed"); */

return false;

}

}

}

}   

-- 

Fotis Chatzinikos, Ph.D.

Founder,

Phinnovation
fotis.chatzini...@gmail.com,





[flexcoders] change default rollover behavior of chart data point

2009-09-03 Thread Ivan Wang
Hi, all
Does anyone got some idea about how to change default rollover behavior of 
chart data point. Say if I use CircleItemRenderer:  For line series, I'd like 
to enlarge the inner circle and change the white fill color. For area series, 
I'd like to remove the default behavior, and to highlight the whole area fill 
background instead. 

The default rollover behavior exists no matter the chart's selection mode 
is "none". But I went through related source code, only find how to change it 
when the selection mode is not none. I'm pretty sure I missed some piece of 
code that control it. Does anyone ever researched this part?

Thanks
Ivan Wang

Re: [flexcoders] Flex and REST

2009-09-03 Thread claudiu ursica
If your Rest API is exposing XML you won't be needing any additional libs... 
the HTTPService class will do just fine ...

C





From: Haykel BEN JEMIA 
To: flexcoders@yahoogroups.com
Sent: Thursday, September 3, 2009 1:45:11 PM
Subject: Re: [flexcoders] Flex and REST

   
Anyone tried one of these libs?

http://code. google.com/ p/as3httpclient/
http://code. google.com/ p/as3httpclientl ib/

They seem to support all required http verbs.

Haykel Ben Jemia

Allmas
Web & RIA Development
http://www.allmas-tn.com





On Wed, Sep 2, 2009 at 12:55 PM, DannyT  wrote:

  >
>Can anyone give me the definitive answer to whether you can build REST based 
>apps with Flex? There seems to be an incredible amount of FUD about the topic 
>and whilst I appreciate it might not be supported in it's purest form I need 
>to know what is involved in supporting a full REST implementation.
>
>I have no experience with REST but we're in the position that a client is 
>going to implement a RESTful service for us to build a Flex application 
>against. If it will 'just work' then great, if not I need to educate them as 
>to any considerations/ workarounds necesscary on the service side of things.
>
>Can anyone offer any advice?
>
>Cheers,
>Dan
>
>-- 
>http://danny-t.co.uk
>

   


  

Re: [flexcoders] Flex and REST

2009-09-03 Thread Haykel BEN JEMIA
Anyone tried one of these libs?

http://code.google.com/p/as3httpclient/
http://code.google.com/p/as3httpclientlib/

They seem to support all required http verbs.

Haykel Ben Jemia

Allmas
Web & RIA Development
http://www.allmas-tn.com




On Wed, Sep 2, 2009 at 12:55 PM, DannyT  wrote:

>
>
> Can anyone give me the definitive answer to whether you can build REST
> based apps with Flex? There seems to be an incredible amount of FUD about
> the topic and whilst I appreciate it might not be supported in it's purest
> form I need to know what is involved in supporting a full REST
> implementation.
>
> I have no experience with REST but we're in the position that a client is
> going to implement a RESTful service for us to build a Flex application
> against. If it will 'just work' then great, if not I need to educate them as
> to any considerations/workarounds necesscary on the service side of things.
>
> Can anyone offer any advice?
>
> Cheers,
> Dan
>
> --
> http://danny-t.co.uk
>  
>


[flexcoders] Flex SQL connection

2009-09-03 Thread Suresh G
Hi Friend

I am now new to flex i am trying to connect to remote sql DB can you please
share the code and help me.

Since i saw in pune flex group you have mailed u are able to do the remote
call, but i am tryin it for last one week i could not do it

Please help me


Suresh


[flexcoders] Re: DatagridColumn dataField question

2009-09-03 Thread bhaq1972
thanks for the clarification ...very useful advice.

--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> Yes, as Beau says.  
> 
>  
> 
> One general clarification, the dataField property will only accept a string,
> never an expression (array1[0] is an expression).  Similarly, you cannot
> "dot.down" in a dataField, like "myVO.myProperty" that is also an
> expression.  To use the dataField, yu must be able to provide a reference to
> a first level property, including in an xml node, either an arttribute
> (@myAttribute) or first level child node.
> 
>  
> 
> And one caution, Array (and XMLList) does not support binding.  It will work
> once, on initialize, but if you programmatically change the Array, the bound
> control will not update.  Use XML or one of the collections if you need to
> update the dataProvider at run-time.
> 
>  
> 
> Tracy Spratt,
> 
> Lariat Services, development services available
> 
>   _  
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Beau Scott
> Sent: Friday, August 28, 2009 10:44 AM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] DatagridColumn dataField question
> 
>  
> 
>   
> 
> dataField is a property belonging to the objects within the datagrid's
> dataprovider. you don't access the array directly from your datagrid column,
> rather you just name the field to access. So in the case you gave of an
> array of strings, you'd only be able to display properties of the string
> objects themselves (such as length):
> 
>  
> 
> You could use label function to just return the value of the object as well:
> 
>  
>  
>  
> 
> 
> 
> 
> 
> Beau
> 
> On Fri, Aug 28, 2009 at 5:28 AM, bhaq1972   com> wrote:
> 
>   
> 
> Can the dataField reference an array position eg
> 
> var array1:Array = ["hello", "world", "etc"];
> 
> ...
> 
> 
> 
> at the moment the only way i can make this work is use a labelFunction
> eg
> 
> 
> Just wondered if there was any other way?
> 
> TIA
> Bod
> 
> 
> 
> 
> -- 
> Beau D. Scott
> Software Engineer
>