Re: [flexcoders] Module Interfaces Inheritance question

2008-10-17 Thread Ralf Bokelberg
Hi Purush

I think iAppModule needs to go into a library project, which is
referenced by the modules but marked as external, while it is embedded
completely in the main application.

Ralf.


On Fri, Oct 17, 2008 at 2:51 AM, purush_y [EMAIL PROTECTED] wrote:
 Hi,
 I did a basic search on this topic and read a few posts, but I
 think my case seems to be a little different here. I have a fairly
 large application that I am designing to be broken into one main
 application that loads multiple modules as required.

 My main application implements an IMyApp interface with one method
 right now:
 getModule(modName:String):*

 All my modules implement a generic IAppModule interface which includes
 2 methods:
 -initModule() Called after loading and creation of module
 -handleEvent(evt:Event): Called whenever an event such as MenuEvent
 etc need to be passed to the module.

 Each of the modules implement a specific interface, for eg. Module1
 implements IModule1 which extends IAppModule, and Module2 implements
 IModule2 which also extends IAppModule to expose specific
 functionality within each of the module.

 So I have the following package structure and classes with their
 interfaces:
 1) class a.MyApp implements a.mod.common.IMyApp (My main app)
 2) interface a.mod.common.IModule1 extends interface
 a.mod.common.IAppModule
 3) interface a.mod.common.IModule2 extends interface
 a.mod.common.IAppModule
 4) class a.mod.mod1.Module1 implements
 a.mod.common.IModule1 (Module 1 compiles to Module1.swf)
 5) class a.mod.mod2.Module 2 implements
 a.mod.common.IModule2 (Module 2 compiles to Module2.swf)

 My main application handles the logic of loading all the modules at
 starting and as required as runtime and any module requiring access to
 another module asks the main application (through the IMyApp
 interface) for a handle to the other module.

 Here is my problem. I am trying to access IModule2 from within
 Module1. I use IMyApp.getModule(Module2) to get a handle to the
 second module, but when I try to downcast it to IModule2, it throws me
 an error saying it encountered error with the type coercion. In the
 error detail it says that it cannot convert
 a.mod.mod2.Module2 to a.mod.common.IModule2 which
 stumps me as the class implements that specific interface.

 If I include all methods from IModule1 and IModule2 into the base
 interface IAppModule, remove IModule2 entirely and try to cast the
 IMyApp.getModule(Module2) to IAppModule, it works fine, but this is
 not what I was looking for. I will end up with one monolithic
 IAppModule with every method from every module interface. I am not
 sure what I am missing here. Is there a problem with interface
 inheritance and modules? When I run a link report for the modules, I
 am not sure if I am reading the report right, but I do not see
 IModule2 interface as part of the definitions within script Module2.

 Can someone please point me in the right direction for this problem?

 Thank you for your help,
 Purush


[flexcoders] web compiler

2008-10-17 Thread jitendra jain
Hi coders,

My application compiles well and run if i use the generated main.swf or 
main.html.
But when i run the application with main.mxml in the browser, it throws
Type was not found or a comile-time error... 

Thanks,

with Regards,
Jitendra Jain

Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download 
Now! http://messenger.yahoo.com/download.php

Re: [flexcoders] Custom event - Create, dispatch, and listen to.

2008-10-17 Thread claudiu ursica
You also may want to avveride the clone method in the custom event class:
/**
 *  @private
 */
override public function clone():Event
{
return new RemoteClick(type, bubbles, cancelable);
}

   - just omit the arguments if you are not using any

Cheers,
Claudiu


- Original Message 
From: shaun [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, October 17, 2008 6:23:59 AM
Subject: Re: [flexcoders] Custom event - Create, dispatch, and listen to.


Hi,

Class names should begin with an Uppercase letter. RemoteClick not 
remoteClick.
The type String can be lowercase if you want..

Something like the following..

package modulecode
{
import flash.events. Event;

public static const remoteClick: String=remoteCl ick;

public class RemoteClick extends Event
{
public function RemoteClick( type:String= remoteClick ,
bubbles:Boolean= false,

cancelable:Boolean= false)
{
super(type, bubbles, cancelable);
} 
}
}

//Some component that dispatches and handles RemoteClick events
MyCanvas

script
public function handleButtonClick( ):void{
var eventObj:RemoteClic k = new RemoteClick( ); //no bubble
dispatchEvent( eventObj) ;
}

public function handleRemoteClickEv ent(e:RemoteClic k):void{
trace(handleRemote Click: +e);
}

public function init():void{
addEventListener( remoteClick , handleRemoteClickEv ent);
}
/script

mx:FormItem label= textAlign=right 
mx:Button label=Run click=handleButton Click()   id=run/
/mx:FormItem

/MyCanvas

Or

//Some component that dispatches RemoteClick events. NOTE : the name of 
the event and the type.
MyCanvas2

mx:Metadata
[Event(name= remoteClick , type=modulecode. RemoteClick )]
/mx:Metadata

script
public function handleButtonClick( ):void{
var eventObj:RemoteClic k = new RemoteClick( ); //no bubble
dispatchEvent( eventObj) ;
}
/script

mx:FormItem label= textAlign=right 
mx:Button label=Run click=handleButton Click()   id=run/
/mx:FormItem

/MyCanvas2

Use MyCanvas2 in another component..

ACanvas
script
function handleRemoteClick( e:RemoteClick) :void{ ... }
/script

MyCanvas2 remoteClick= handleRemoteCli ck(event)  ... /
/ACanvas

HTH.
- shaun


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: [flexcoders] web compiler

2008-10-17 Thread Paul Andrews
Jitendra, what version of Flex is this? Flex 2  or 3 doesn't compile .mxml 
files 'on the fly' from a browser.

If you are using Flex 2 or 3, why are ou trying to 'run' .mxml files in a 
browser?

Paul
  - Original Message - 
  From: jitendra jain 
  To: flex group flex 
  Sent: Friday, October 17, 2008 8:23 AM
  Subject: [flexcoders] web compiler


  Hi coders,

  My application compiles well and run if i use the generated main.swf or 
main.html.
  But when i run the application with main.mxml in the browser, it throws
  Type was not found or a comile-time error... 

  Thanks,

  with Regards,
  Jitendra Jain





  Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download 
Now! http://messenger.yahoo.com/download.php  

Re: [flexcoders] Socket to Gmail

2008-10-17 Thread Shahid Faiz
gmail allows SMTP to send emails. I remember someone written SMTP code to
send email in actionscript but don't have link. You can search on SMTP
Mailer IIRC.

- shahid


On Fri, Oct 17, 2008 at 4:55 AM, Rich Tretola [EMAIL PROTECTED] wrote:

   Anyone know if someone has written a socket connection to send mail
 through a gmail account?

 Rich
  



[flexcoders] Change Radio Button COLOR of Menu Control

2008-10-17 Thread itdanny2002
Anyone has idea ? 

Many Thanks.

P.S. I have try to modify
mx.skins.halo.RadioButton.as. 
However, when it uses getstyle, 
it can't get the borderColor or 
any others. The return is null.




[flexcoders] genie effect, i need help

2008-10-17 Thread Carlo Gulliani
 hi all, does somebody knows how to make 'genie effect'
 like on macosx? i've found example for flex, but i can't understand how it work((( and i've found bug, it work only if my workspace is  preview panel.

maybe somebody could tell me how to think and how to make it.

thanks in advance   __Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around http://mail.yahoo.com 

Re: [flexcoders] web compiler

2008-10-17 Thread jitendra jain
Paul, its Flex 3.

 Thanks,

with Regards,
Jitendra Jain




- Original Message 
From: Paul Andrews [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, 17 October, 2008 1:21:03 PM
Subject: Re: [flexcoders] web compiler


 
Jitendra, what version 
of Flex is this? Flex 2  or 3 doesn't compile .mxml files 'on the fly' from 
a browser.
 
If you are using Flex 
2 or 3, why are ou trying to 'run' .mxml files in a browser?
 
Paul
- Original Message - 
From: jitendra jain 
To: flex group flex 
Sent: Friday, October 17, 2008 8:23  AM
Subject: [flexcoders] web compiler

Hi  coders,

My application compiles well and run if i use the generated  main.swf or 
main.html.
But when i run the application with main.mxml in the  browser, it throws
Type was not found or a comile-time error... 

Thanks,

with  Regards,
Jitendra  Jain

 

Send free SMS to your Friends on Mobile from your  Yahoo! Messenger. Download 
Now! http://messenger. yahoo.com/ download. php  

Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download 
Now! http://messenger.yahoo.com/download.php

Re: [flexcoders] web compiler

2008-10-17 Thread Paul Andrews
So the question remains - why are you trying to open .mxml files in a browser?

Paul
  - Original Message - 
  From: jitendra jain 
  To: flexcoders@yahoogroups.com 
  Sent: Friday, October 17, 2008 9:42 AM
  Subject: Re: [flexcoders] web compiler


  Paul, its Flex 3.


  Thanks,

  with Regards,
  Jitendra Jain




  - Original Message 
  From: Paul Andrews [EMAIL PROTECTED]
  To: flexcoders@yahoogroups.com
  Sent: Friday, 17 October, 2008 1:21:03 PM
  Subject: Re: [flexcoders] web compiler


   

  Jitendra, what version of Flex is this? Flex 2  or 3 doesn't compile .mxml 
files 'on the fly' from a browser.

  If you are using Flex 2 or 3, why are ou trying to 'run' .mxml files in a 
browser?

  Paul
- Original Message - 
From: jitendra jain 
To: flex group flex 
Sent: Friday, October 17, 2008 8:23 AM
Subject: [flexcoders] web compiler


Hi coders,

My application compiles well and run if i use the generated main.swf or 
main.html.
But when i run the application with main.mxml in the browser, it throws
Type was not found or a comile-time error 

Thanks,

with Regards,
Jitendra Jain





Send free SMS to your Friends on Mobile from your Yahoo! Messenger. 
Download Now! http://messenger. yahoo.com/ download. php 

  Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download 
Now! http://messenger.yahoo.com/download.php  

Re: [flexcoders] web compiler

2008-10-17 Thread jitendra jain
I want to do some load testing and that's why iam using .mxml files. Its Flex 
3.1

 Thanks,

with Regards,
Jitendra Jain





- Original Message 
From: Paul Andrews [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, 17 October, 2008 1:21:03 PM
Subject: Re: [flexcoders] web compiler


 
Jitendra, what version 
of Flex is this? Flex 2  or 3 doesn't compile .mxml files 'on the fly' from 
a browser.
 
If you are using Flex 
2 or 3, why are ou trying to 'run' .mxml files in a browser?
 
Paul
- Original Message - 
From: jitendra jain 
To: flex group flex 
Sent: Friday, October 17, 2008 8:23  AM
Subject: [flexcoders] web compiler

Hi  coders,

My application compiles well and run if i use the generated  main.swf or 
main.html.
But when i run the application with main.mxml in the  browser, it throws
Type was not found or a comile-time error... 

Thanks,

with  Regards,
Jitendra  Jain

 

Send free SMS to your Friends on Mobile from your  Yahoo! Messenger. Download 
Now! http://messenger. yahoo.com/ download. php  


  Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/

[flexcoders] Re: Reusing HTTPService

2008-10-17 Thread lagos_tout
Yeah, that's a great idea.  Kind of like the Command pattern with 
handlers, right?

LT

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

 No worries.
 
 BTW, there is another way of doing it - each request is represented 
by 
 some object which creates HTTPService and subscribes for the 
response. 
 Because each instance sends single request, there is no problem to 
 decode the response.
 
 Cheers,
 Dmitri.
 
 
 --- In flexcoders@yahoogroups.com, lagos_tout lagos.tout@ 
 wrote:
 
  Thanks, Dmitri.
  
  This is a great idea.  Unfortunately though, in this project, I 
 don't 
  have control over what's returned by the server, so I can't add 
the 
  requestId.
  But with your suggestion, you still end up needing to match 
 requestIds 
  with handlers on the client right?  So do you use a massive switch 
 for 
  that?
  Thanks again.
  
  LT
  
  --- In flexcoders@yahoogroups.com, Dmitri Girski mitek17@ 
  wrote:
  
   If I were you, I would simply add the requestId into the 
server's
   response, so client always knows which request-response pair it
   handles. This idea lies behind most of the transmissions 
 protocols.
   
   Cheers,
   Dmitri.
   
   
   
   --- In flexcoders@yahoogroups.com, lagos_tout lagos.tout@ 
 wrote:
   
Hi,

I'm re-using an instance of HTTPService, changing the request 
arguments to get different responses from the server.  But I 
 found 
that if, for instance, I made 3 calls this way with the 
  HTTPService, 
each of the 3 result handlers registered for each call is 
 executed 
every time a result returned.  

I solved this by storing a reference to the unique AsyncToken 
  returned 
by each service call and matching it to the AsyncToken 
contained 
  in 
each ResultEvent's token property in order to determine 
which 
  result 
handler to execute. 

I'm not terribly happy with this setup.  It seems messy.  I'd 
appreciate any suggestions on how I can reuse an HTTPService 
  instance 
without ending up with long switch statements with countless 
if 
thisAsyncToken then do thisHandler, else if thatAsyncToken 
then 
 do 
thatHandler... and so on.

Thanks much.

LT
   
  
 






[flexcoders] Stepping through Flex SDK code while in Flex Builder debugger

2008-10-17 Thread lagos_tout
Hi, all.

Is it possible to step through Flex SDK code using Flex Builder 3 
debugger?  

I was able to set break points in only a couple of SDK 
classes (eg AdvancedDataGrid).  I did this by adding
 
C:\Program Files\Adobe\Flex Builder 3 Plug-
in\sdks\3.1.0\fbpro\projects\datavisualization\src

to the source lookup file list in the debug configuration panel in 
Flex Builder.

But adding 

C:\Program Files\Adobe\Flex Builder 3 Plug-
in\sdks\3.1.0\frameworks\projects\framework\src

doesn't have the same effect of letting me step through framework 
code.

Anyone seen this sort of behavior before?

Thanks much.

LT



Re: [flexcoders] web compiler

2008-10-17 Thread Paul Andrews
- Original Message - 
  From: jitendra jain 
  To: flexcoders@yahoogroups.com 
  Sent: Friday, October 17, 2008 10:28 AM
  Subject: Re: [flexcoders] web compiler


  I want to do some load testing and that's why iam using .mxml files. Its Flex 
3.1

Flex compiles .mxml files into classes and ultimately a .swf file. Out of the 
box Flex 3 doesn't support dynamic compilation from a web browser, so how is 
that set up?

I don't really understand what trying to run mxml files through a browser has 
to do with load testing.

Paul
  Thanks,

  with Regards,
  Jitendra Jain






  - Original Message 
  From: Paul Andrews [EMAIL PROTECTED]
  To: flexcoders@yahoogroups.com
  Sent: Friday, 17 October, 2008 1:21:03 PM
  Subject: Re: [flexcoders] web compiler


   

  Jitendra, what version of Flex is this? Flex 2  or 3 doesn't compile .mxml 
files 'on the fly' from a browser.

  If you are using Flex 2 or 3, why are ou trying to 'run' .mxml files in a 
browser?

  Paul
- Original Message - 
From: jitendra jain 
To: flex group flex 
Sent: Friday, October 17, 2008 8:23 AM
Subject: [flexcoders] web compiler


Hi coders,

My application compiles well and run if i use the generated main.swf or 
main.html.
But when i run the application with main.mxml in the browser, it throws
Type was not found or a comile-time error... 

Thanks,

with Regards,
Jitendra Jain





Send free SMS to your Friends on Mobile from your Yahoo! Messenger. 
Download Now! http://messenger. yahoo.com/ download. php 


--
  Explore your hobbies and interests. Click here to begin.  

[flexcoders] How to display message in empty Tree component

2008-10-17 Thread Mark Carter

I'm using a Tree component with a dataProvider set using an XML object. Also
showRoot=false.

If I set using a childless XML object then one item is shown in the tree.
That's a bit weird but it sort of allows me a way to display my message
(using labelFunc) to No items. But then I have to be careful with all my
event handlers because this item is not really a real item for my purposes.

However, if I use an XML with, say, one child, then that child is displayed.
If I then remove that child, then nothing is displayed (and so I see no way
to display the message).

What is the best way to display a message (like No items) in the Tree
component should the dataprovider be empty?
-- 
View this message in context: 
http://www.nabble.com/How-to-display-message-in-empty-Tree-component-tp20030878p20030878.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] web compiler

2008-10-17 Thread Tom Chiverton
On Friday 17 Oct 2008, jitendra jain wrote:
 I want to do some load testing and that's why iam using .mxml files. 

But you'll only do the compile once for each release, not once for each 
request... it can't be as important as the calls that application actually 
makes.

-- 
Tom Chiverton
Helping to paradigmatically morph B2C fourth-generation methodologies





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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] Adding Quantity to Cart

2008-10-17 Thread Fu Di
hi, you had already bind cartItem to the DataGrid, why not handle cartItem to 
achieve.



- Original Message 
From: Sal H. [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, October 16, 2008 10:45:18 PM
Subject: [flexcoders] Adding Quantity to Cart



 I want to be able to increase the quantity if the same item gets
added to the cart. 
 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: [flexcoders] Socket to Gmail

2008-10-17 Thread Rich Tretola
Yep, I tried that and was able to send mail through an internal account
through smtp over socket, but gmail requires authentication and I can't seem
to get it to work.

On Fri, Oct 17, 2008 at 3:57 AM, Shahid Faiz [EMAIL PROTECTED] wrote:

   gmail allows SMTP to send emails. I remember someone written SMTP code
 to send email in actionscript but don't have link. You can search on SMTP
 Mailer IIRC.

 - shahid


 On Fri, Oct 17, 2008 at 4:55 AM, Rich Tretola [EMAIL PROTECTED] wrote:

   Anyone know if someone has written a socket connection to send mail
 through a gmail account?

 Rich


  



Re: [flexcoders] Stepping through Flex SDK code while in Flex Builder debugger

2008-10-17 Thread Tom Chiverton
On Friday 17 Oct 2008, lagos_tout wrote:
 Is it possible to step through Flex SDK code using Flex Builder 3
 debugger?

Yes.

 doesn't have the same effect of letting me step through framework
 code.

It should have done. Are there actual .as files in that dir ? Have you tried 
adding that dir as a new project (without copying the files to the 
workspace) ?

-- 
Tom Chiverton
Helping to professionally utilize customized solutions





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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: AMFPHP tutorial

2008-10-17 Thread Jonnie Spratley
Here are some tutorials that I created, see if they are what you were
looking for.

-Jonnie Spratley

Links:

http://jonniespratley.com/2008/10/15/adobe-flex-amfphp-video-tutorial-pa\
rt-1/
http://jonniespratley.com/2008/10/15/adobe-flex-amfphp-video-tutorial-p\
art-1/
http://jonniespratley.com/mini-cookbook/
http://jonniespratley.com/mini-cookbook/
http://jonniespratley.com/2008/09/21/adobe-flexair-creating-a-servicepro\
xy-for-amfphp/
http://jonniespratley.com/2008/09/21/adobe-flexair-creating-a-servicepr\
oxy-for-amfphp/

If you want to see how to use amfphp with a pretty big project, look at
this

http://flexpress.jonniespratley.com/fp-admin/Flexpress.html
http://flexpress.jonniespratley.com/fp-admin/Flexpress.html

Right click for source.



[flexcoders] LCDS 2.6 and Hibernate - Does it work?

2008-10-17 Thread headjoog
Hi -

I tried upgrading from LCDS 2.5 to LCDS 2.6.  I have a project using
Hibernate 3.1 and it was working fine in LCDS 2.5.  But after
upgrading LCDS 2.6 things have broken and I'm having a bear of a time
figuring out what has gone wrong.  I roll it back to 2.5 and it works.

Has anyone else tried this?  Or is there anything from Adobe on
Hibernate compatibility with LCDS 2.6?

Thanks,
Joe









[flexcoders] Is it possible to use OLAPResult as DataProvider for AdvancedDataGrid

2008-10-17 Thread thakkar_mithun2000
Hello,

Is it possible to use OLAPResult as DataProvider for AdvancedDataGrid?

Regards,
Mithun



[flexcoders] FZip loads cached zip before downloading online

2008-10-17 Thread diigiibot
I'm using FZip in an AIR application, the application loads the zip
from a location on our server, unpacks the zip and move the files to
their local folder. Everything runs smooth until I cut off my internet
connection while the zip is downloading.
When I restart the application it looks like FZip is first checking
the temp folder for the cached zip and if found, it uses that one to
unzip, even if the zip was not completed the last time.

Does anyone know of a way to prevent that?

I use the default load method of the FZip library, this is a part of
the code I use.

var moduleLink:String = [EMAIL PROTECTED];

var zip:FZip = new FZip();

zip.addEventListener(Event.COMPLETE, onComplete);

zip.load(new URLRequest(moduleLink));

private function onComplete(evt:Event):void 
{
var moduleDir:File =
File.applicationStorageDirectory.resolvePath(modules);

var outStream:FileStream;

for(var i:int; ievt.target.getFileCount();i++)
{
var zipFile:FZipFile = evt.target.getFileAt(i);

if(zipFile.sizeUncompressed == 0 
zipFile.filename.toString().substr(-1) == /)
{
var rootDir:File =
File.applicationStorageDirectory.resolvePath(modules/+zipFile.filename.toString());
}
else
{
var tempFile:File = 
moduleDir.resolvePath(zipFile.filename);

outStream = new FileStream();

outStream.open(tempFile, FileMode.WRITE);

outStream.writeBytes(zipFile.content, 0, 
zipFile.sizeUncompressed);

outStream.close();
}
}
evt.target.close();
}

Thanks in advance



Re: [flexcoders] Module Interfaces Inheritance question

2008-10-17 Thread Purushottam Yeluripati
Thank you for your response, Ralf. I am going to try that option as well. But I 
am still not clear on why the current setup does not work. I have ensured 
(through explicit package import and variable declaration in MyApp) that 
IAppModule, IModule1 and IModule2 are all referenced within the main 
application.

I have been trying a host of other things such as trying to load all the 
modules into the same domain as the application, but no luck there either :(



- Original Message 
From: Ralf Bokelberg [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, October 17, 2008 2:36:19 AM
Subject: Re: [flexcoders] Module Interfaces Inheritance question


Hi Purush

I think iAppModule needs to go into a library project, which is
referenced by the modules but marked as external, while it is embedded
completely in the main application.

Ralf.

On Fri, Oct 17, 2008 at 2:51 AM, purush_y [EMAIL PROTECTED] com wrote:
 Hi,
 I did a basic search on this topic and read a few posts, but I
 think my case seems to be a little different here. I have a fairly
 large application that I am designing to be broken into one main
 application that loads multiple modules as required.

 My main application implements an IMyApp interface with one method
 right now:
 getModule(modName: String):*

 All my modules implement a generic IAppModule interface which includes
 2 methods:
 -initModule( ) Called after loading and creation of module
 -handleEvent( evt:Event) : Called whenever an event such as MenuEvent
 etc need to be passed to the module.

 Each of the modules implement a specific interface, for eg. Module1
 implements IModule1 which extends IAppModule, and Module2 implements
 IModule2 which also extends IAppModule to expose specific
 functionality within each of the module.

 So I have the following package structure and classes with their
 interfaces:
 1) class a.MyApp implements a.mod.common. IMyApp (My main app)
 2) interface a.mod.common. IModule1 extends interface
 a.mod.common. IAppModule
 3) interface a.mod.common. IModule2 extends interface
 a.mod.common. IAppModule
 4) class a.mod.mod1.Module1 implements
 a.mod.common. IModule1 (Module 1 compiles to Module1.swf)
 5) class a.mod.mod2.Module 2 implements
 a.mod.common. IModule2 (Module 2 compiles to Module2.swf)

 My main application handles the logic of loading all the modules at
 starting and as required as runtime and any module requiring access to
 another module asks the main application (through the IMyApp
 interface) for a handle to the other module.

 Here is my problem. I am trying to access IModule2 from within
 Module1. I use IMyApp.getModule( Module2 ) to get a handle to the
 second module, but when I try to downcast it to IModule2, it throws me
 an error saying it encountered error with the type coercion. In the
 error detail it says that it cannot convert
 a.mod.mod2.Module2 to a.mod.common. IModule2 which
 stumps me as the class implements that specific interface.

 If I include all methods from IModule1 and IModule2 into the base
 interface IAppModule, remove IModule2 entirely and try to cast the
 IMyApp.getModule( Module2 ) to IAppModule, it works fine, but this is
 not what I was looking for. I will end up with one monolithic
 IAppModule with every method from every module interface. I am not
 sure what I am missing here. Is there a problem with interface
 inheritance and modules? When I run a link report for the modules, I
 am not sure if I am reading the report right, but I do not see
 IModule2 interface as part of the definitions within script Module2.

 Can someone please point me in the right direction for this problem?

 Thank you for your help,
 Purush


RE: [flexcoders] Is it possible to use OLAPResult as DataProvider for AdvancedDataGrid

2008-10-17 Thread Christophe Jolif
You should better use OLAPDataGrid?
 
Christophe



From: flexcoders@yahoogroups.com on behalf of thakkar_mithun2000
Sent: Fri 17/10/2008 10:39
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Is it possible to use OLAPResult as DataProvider for 
AdvancedDataGrid



Hello,

Is it possible to use OLAPResult as DataProvider for AdvancedDataGrid?

Regards,
Mithun




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links







[flexcoders] Assignment to lists with more than one item is not supported

2008-10-17 Thread markgoldin_2000
What exactly that message means?

Thanks



Re: [flexcoders] genie effect, i need help

2008-10-17 Thread Tom Chiverton
On Friday 17 Oct 2008, Carlo Gulliani wrote:
 hi all, does somebody knows how to make 'genie effect' like on macosx? i've
 found example for flex, but i can't understand how it work((( and i've
 found bug, it work only if my workspace is  preview panel. maybe somebody
 could tell me how to think and how to make it. thanks in advance

Well, for starters:
Who's code are you using ? Show us your working code example, and also your 
non working code example ?

-- 
Tom Chiverton
Helping to conveniently cluster viral end-to-end visionary data





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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] sailorsea21 - How can I add the progress loading box when I load a module?

2008-10-17 Thread Tom Chiverton
On Thursday 16 Oct 2008, sailorsea21 wrote:
 Hi everyone, how can I add the progress loading box when I load a
 module? Is it an automated thing with flex or must I code it?

You'll have to wire the loader to a ProgressBar yourself.

-- 
Tom Chiverton
Helping to assertively bully guinine extensible network customers





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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



[flexcoders] Re: Stepping through Flex SDK code while in Flex Builder debugger

2008-10-17 Thread hu22hugo
--- In flexcoders@yahoogroups.com, lagos_tout [EMAIL PROTECTED] wrote:

 Hi, all.
 
 Is it possible to step through Flex SDK code using Flex Builder 3 
 debugger?  
 
 I was able to set break points in only a couple of SDK 
 classes (eg AdvancedDataGrid).  I did this by adding
  
 C:\Program Files\Adobe\Flex Builder 3 Plug-
 in\sdks\3.1.0\fbpro\projects\datavisualization\src
 
 to the source lookup file list in the debug configuration panel in 
 Flex Builder.
 
 But adding 
 
 C:\Program Files\Adobe\Flex Builder 3 Plug-
 in\sdks\3.1.0\frameworks\projects\framework\src
 
 doesn't have the same effect of letting me step through framework 
 code.

I had a similar issue with two particular projects using Flex
3.1.0.2???. All other projects were fine. It turned out that linking
the framework as runtime shared library was the culprit. Turning back
to merging the framework classes into the project.swf made me a happy man.
Marc, http://faindu.wordpress.com/



[flexcoders] Rippling through state changes

2008-10-17 Thread Paul Andrews
I have some custom components (nothing special) that are displaying product 
information. essentially I can use the same component for seprate purposes:

Product info (each product can be added to the shopping cart), shopping cart 
(each product can be removed from the cart). Within the main component, I 
have TileLists or datagrdids with item renderers. When the custom component 
flips between states, I need the individual items contained therein to 
switch state too.

I'm trying to think of the most elegant way to do this. Any thoughs 9apart 
from the fact I'll go Doh! real soon now).

I've tended to avoid states, but seem to be embracing them big time now..

Paul 



[flexcoders] Re: My Flex Form

2008-10-17 Thread valdhor
Nope.

You still don't have ID's set for the textInput and textField. An item
needs an id if you want to reference it somewhere else.

Also, you should keep all the functionality for a component inside the
component. The function that you call from the button in the
FormComp.mxml file should be inside the FormComp.mxml file.

Here are the files as they should look:

ContactForm.mxml:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical
 xmlns:forms=forms.* backgroundGradientAlphas=[1.0, 1.0]
 backgroundGradientColors=[#06B8EC, #C1E6F1]
 forms:FormComp/
/mx:Application



FormComp.mxml:
?xml version=1.0 encoding=utf-8?
mx:Form xmlns:mx=http://www.adobe.com/2006/mxml; width=400
height=300
 mx:Script
 ![CDATA[
 private function sendMyData():void
 {
 var obj:Object = new Object();
 obj.Name = Name.text;
 obj.Email = thisIsTheEmailAddressIWant.text;
 obj.Message = Message.text;
 myContactService.send(obj);
 }
 ]]
 /mx:Script
 mx:HTTPService id=myContactService
  url=FormToEmail.php
  method=POST/
 mx:FormItem label=Name:
 mx:TextInput id=Name/
 /mx:FormItem
 mx:FormItem label=Email:
 mx:TextInput id=thisIsTheEmailAddressIWant/
 /mx:FormItem
 mx:FormItem label=Message:
 mx:TextArea id=Message/
 /mx:FormItem
 mx:FormItem
 mx:Button label=Contact Us fontSize=16
click=sendMyData()/
 /mx:FormItem
/mx:Form

Note that each input field has an id set so that they can be referenced
inside the function (I have changed the Email id to show this more
obviously). Also note that the FormComp.mxml is totally self contained.
It does not rely on anything else.

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

 We are close, hopefully.  I still get an error on the lines inside the
 sendMyData function.  It is giving me an error that says,
 Error: Access to undefined property Name,
 Error: Access to undefined property Email,
 Error: Access to undefined property Message,

 It should be noted that I have the component, named FormComponent in a
 subfolder form the source root, in a file called FormComponent.mxml,
 of course. That file just has the Form and the FormItem tags, with
 InputText fields with id of Name, Email, Message.
 I instantiate the Form component into the application called
ContactForm.

 So, I uploaded the project to the web on the server I use.  It seems
 like this would be the best way to see what I am missing or doing
 wrong.  So, please check it out here:
 http://fwweb.biz/ContactForm.zip
 thanks,
 Bruce



 --- In flexcoders@yahoogroups.com, valdhor stevedepp@ wrote:
 
  There are a few things wrong with your form...
 
  You have the id=Email on the FormItem - it should be on the
TextInput.
 
  The name of your form component is ContactForms.mxml but you try to
  instantiate it with forms:ContactForm id=myContactForm/ (Note
  ContactForms and ContactForm is different).
 
  You cannot set properties of a variable inside a CDATA block. You
must
  do it in a function (Which is inside the CDATA block). eg.
 
  private function sendMyData():void
  {
  var obj:Object = new Object();
  obj.Name = Name.text;
  obj.Email = Email.text;
  obj.Message = Message.text;
  myContactService.send(obj);
  }
 
  and change the button mxml to
 
  mx:Button label=Contact Us fontSize=16 click=sendMyData()/
 




[flexcoders] Re: Flex uploader / accessing local files?

2008-10-17 Thread valdhor
It looks like you'll have to wait for Flash Player 10. See this thread:

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


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

 Hi -
 
 I've made a flex uploading application that gets a file from the
 client's file system using FileReference() and uploads it to a server. 
 
 I'd like to be able to resize the image before it is sent to the
 server, but apparently flex doesn't have access to the actual bits
 that make up the image file, only a reference to the file.
 
 Surely there must be a way to manipulate that image data from the
 client's file before it gets to the server? 
 
 Has anyone done anything like this? I've looked all around but haven't
 had much luck.
 
 Thanks in advance,
 Rob





Re: [flexcoders] Rippling through state changes

2008-10-17 Thread claudiu ursica
How about write a custom item renderer and expose a public property state 
name it however you want. Bind that property 
to the current state of your custom component. When the parent state changes, 
the item renderer wil update also.

HTH,
Claudiu




- Original Message 
From: Paul Andrews [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, October 17, 2008 4:33:45 PM
Subject: [flexcoders] Rippling through state changes


I have some custom components (nothing special) that are displaying product 
information. essentially I can use the same component for seprate purposes:

Product info (each product can be added to the shopping cart), shopping cart 
(each product can be removed from the cart). Within the main component, I 
have TileLists or datagrdids with item renderers. When the custom component 
flips between states, I need the individual items contained therein to 
switch state too.

I'm trying to think of the most elegant way to do this. Any thoughs 9apart 
from the fact I'll go Doh! real soon now).

I've tended to avoid states, but seem to be embracing them big time now..

Paul 



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: [flexcoders] Rippling through state changes

2008-10-17 Thread Paul Andrews
- Original Message - 
  From: claudiu ursica 
  To: flexcoders@yahoogroups.com 
  Sent: Friday, October 17, 2008 2:41 PM
  Subject: Re: [flexcoders] Rippling through state changes


  How about write a custom item renderer and expose a public property state 
name it however you want. Bind that property 
  to the current state of your custom component. When the parent state changes, 
the item renderer wil update also.

Very neat idea. Thanks for that.

Sometimes you just know there's a dead simple solution out there..

Paul

  HTH,
  Claudiu




  - Original Message 
  From: Paul Andrews [EMAIL PROTECTED]
  To: flexcoders@yahoogroups.com
  Sent: Friday, October 17, 2008 4:33:45 PM
  Subject: [flexcoders] Rippling through state changes


  I have some custom components (nothing special) that are displaying product 
  information. essentially I can use the same component for seprate purposes:

  Product info (each product can be added to the shopping cart), shopping cart 
  (each product can be removed from the cart). Within the main component, I 
  have TileLists or datagrdids with item renderers. When the custom component 
  flips between states, I need the individual items contained therein to 
  switch state too.

  I'm trying to think of the most elegant way to do this. Any thoughs 9apart 
  from the fact I'll go Doh! real soon now).

  I've tended to avoid states, but seem to be embracing them big time now..

  Paul 




  __
  Do You Yahoo!?
  Tired of spam? Yahoo! Mail has the best spam protection around 
  http://mail.yahoo.com  

Re: [flexcoders] Rippling through state changes

2008-10-17 Thread Johannes Nel
this is also a nice way to test around the presentation model pattern, your
pres model exposes the state the view should be in and dependent on what the
data state of your pres model is in

On Fri, Oct 17, 2008 at 3:41 PM, claudiu ursica [EMAIL PROTECTED]wrote:

   How about write a custom item renderer and expose a public property
 state name it however you want. Bind that property
 to the current state of your custom component. When the parent state
 changes, the item renderer wil update also.

 HTH,
 Claudiu


 - Original Message 
 From: Paul Andrews [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Friday, October 17, 2008 4:33:45 PM
 Subject: [flexcoders] Rippling through state changes

  I have some custom components (nothing special) that are displaying
 product
 information. essentially I can use the same component for seprate purposes:

 Product info (each product can be added to the shopping cart), shopping
 cart
 (each product can be removed from the cart). Within the main component, I
 have TileLists or datagrdids with item renderers. When the custom component

 flips between states, I need the individual items contained therein to
 switch state too.

 I'm trying to think of the most elegant way to do this. Any thoughs 9apart
 from the fact I'll go Doh! real soon now).

 I've tended to avoid states, but seem to be embracing them big time now..

 Paul


 __
 Do You Yahoo!?
 Tired of spam? Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com

  




-- 
j:pn
\\no comment


[flexcoders] Re: adding the user input to an arraycollection

2008-10-17 Thread valdhor
This is how I would do it (Others may do it differently)...

Assuming the text fields have id's of bookType and sales:

private function addToArray():void
{
 var newBook:Object = new Object();
 newBook.bookType = bookType.text;
 newBook.sales= bookType.sales;
 bookSales.addItem(newBook);
}

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

 i would like to get the input from the user using textinput boxes and
add them to the arraycollection defined in the code below.

 i had defined a method addToArray for serving the purpose.what should
be the type of the arguments passed to that function.
 th code follows:
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute
 mx:Script
 ![CDATA[
 import mx.collections.ArrayCollection;
 [Bindable]
 private var bookSales:ArrayCollection =
 new ArrayCollection(
 [{bookType: Fiction, Sales: 143},
 {bookType: Nonfiction, Sales: 189},
 {bookType: Technology, Sales: 178},
 {bookType: Self-help, Sales: 224}]);
 private function chartLabel(dataItem:Object, field:String,
 index:int, dataPercent:Number):String
 {
 return dataItem.bookType +  represents \n + dataPercent +
 % \n of our sales;
 }
 private function addToArray():void{

 }
 ]]
 /mx:Script
 mx:Panel title=Pie Chart
 mx:PieChart width=100% height=100% dataProvider={bookSales}
showDataTips=true
 mx:series
 mx:PieSeries field=Sales labelPosition=callout
 labelFunction=chartLabel
 mx:fills
 mx:RadialGradient
 mx:entries
 mx:GradientEntry color=#E9C836/
 mx:GradientEntry color=#AA9127/
 /mx:entries
 /mx:RadialGradient
 mx:RadialGradient
 mx:entries
 mx:GradientEntry color=#A1AECF/
 mx:GradientEntry color=#47447A/
 /mx:entries
 /mx:RadialGradient
 mx:RadialGradient
 mx:entries
 mx:GradientEntry color=#339932/
 mx:GradientEntry color=#339998/
 /mx:entries
 /mx:RadialGradient
 mx:RadialGradient
 mx:GradientEntry color=#6FB35F/
 mx:GradientEntry color=#497B54/
 /mx:RadialGradient
 /mx:fills
 /mx:PieSeries
 /mx:series
 /mx:PieChart
 /mx:Panel
 /mx:Application


   Connect with friends all over the world. Get Yahoo! India
Messenger at http://in.messenger.yahoo.com/?wm=n/




Re: [flexcoders] Re: Reusing HTTPService

2008-10-17 Thread shaun

How about something like this:

(note: I've not tried it, just slapped it straight into the email)

public class MyClassThatInvokesHTTPServices {

//inner helper class.
class MyIResponder implements IResponder{
   public var f:Function;
   public var r:Function;

   public MyIResponder(r:Function, f:Function){
 this.r = r;
 this.f = f;
   }

   public function fault(info:Object):void {
   f.call(info);
   }

   public function result(result:Object):void {
   r.call(result);
   }
}

//Your handlers for service calls.
protected function resultA(result:Object){ ... }
protected function faultA(info:Object){...}
protected function resultB(result:Object){ ... }
protected function faultB(info:Object){...}

var service:HTTPService ...//assume exists, reused for various calls.

  //send for service A.
  funciton sendA(args:Object){
service.url = ../A.html;
service.send(args).addResponder(new MyIResponder(resultA, faultA));
  }

  //send for service B.
  function sendB(){
service.url = ../B.html;
service.send().addResponder(new MyIResponder(resultB, faultB));
  }


}

[snip]

 --- In flexcoders@yahoogroups.com, lagos_tout lagos.tout@ 
 wrote:
 Hi,

 I'm re-using an instance of HTTPService, changing the request 
 arguments to get different responses from the server.  But I 
 found 
 that if, for instance, I made 3 calls this way with the 
 HTTPService, 
 each of the 3 result handlers registered for each call is 
 executed 
 every time a result returned.  

 I solved this by storing a reference to the unique AsyncToken 
 returned 
 by each service call and matching it to the AsyncToken 
 contained 
 in 
 each ResultEvent's token property in order to determine 
 which 
 result 
 handler to execute. 

 I'm not terribly happy with this setup.  It seems messy.  I'd 
 appreciate any suggestions on how I can reuse an HTTPService 
 instance 
 without ending up with long switch statements with countless 
 if 
 thisAsyncToken then do thisHandler, else if thatAsyncToken 
 then 
 do 
 thatHandler... and so on.

 Thanks much.

 LT

 
 
 
 



Re: [flexcoders] genie effect, i need help

2008-10-17 Thread Carlo Gulliani
really i don't remember who's wrote this code, i have downloaded it earlier. I 
have uploaded mini-project 
https://download.yousendit.com/TTdIS3hkQ1I3N0N4dnc9PQ if 
mx:ApplicationControlBar it's below, then it work, if above then it doesn't 
work


- Original Message 
From: Tom Chiverton [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, October 17, 2008 5:18:13 PM
Subject: Re: [flexcoders] genie effect, i need help

On Friday 17 Oct 2008, Carlo Gulliani wrote:
 hi all, does somebody knows how to make 'genie effect' like on macosx? i've
 found example for flex, but i can't understand how it work((( and i've
 found bug, it work only if my workspace is  preview panel. maybe somebody
 could tell me how to think and how to make it. thanks in advance

Well, for starters:
Who's code are you using ? Show us your working code example, and also your 
non working code example ?

-- 
Tom Chiverton
Helping to conveniently cluster viral end-to-end visionary data





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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[flexcoders] custom event not working in popup

2008-10-17 Thread Mark Hosny

Hey guys,

I now know that my custom event is not working properly in my popup  
window when listening for the event in the main app. When I do this,  
it works:


POPUP WINDOW
mx:Metadata
[Event(name=formUpdate,type=flash.events.Event)]
/mx:Metadata

dispatchEvent(new Event('formUpdate',true));

MAIN APP
application 
.systemManager.addEventListener(formUpdate,handleUpdateFormSubmitted);


private function handleUpdateFormSubmitted(event:Event):void {
Alert.show('SUCCESS');  
}

When I use a custom event it doesn't work:
mx:Metadata
[Event(name=formUpdate,type=com.event.CustomEvent)]
/mx:Metadata

var evt:CustomEvent = new CustomEvent(CustomEvent.ON_TEST_CASE,
{
memberID:memberID_txt.text
}
);
this.dispatchEvent(evt);

MAIN APP
application 
.systemManager.addEventListener(formUpdate,handleUpdateFormSubmitted);


private function handleUpdateFormSubmitted(event:CustomEvent):void {
Alert.show('SUCCESS');  
}

CUSTOM EVENT
package com.event

{
import flash.events.*

public class CustomEvent extends Event
{

//- PUBLIC  INTERNAL VARIABLES  
---


// event constants
public static const ON_TEST_CASE:String = formSubmitted;

public var params:Object;

public function CustomEvent($type:String, $params:Object,  
$bubbles:Boolean = true, $cancelable:Boolean = true)

{
super($type, true, $cancelable);

this.params = $params;
}



public override function clone():Event
{
return new CustomEvent(type, this.params, bubbles,  
cancelable);

}

public override function toString():String
{
return formatToString(CustomEvent, params, type,  
bubbles, cancelable);

}

//- END CLASS  
-

}

}

Thanks,

Hoz






[flexcoders] how to add internal padding in canvas?

2008-10-17 Thread markflex2007
I want to add right padding and left padding inside canvas so the
controls in side do not touch the side of canvas, but canvas do not
have padding attribute, how to do this.

Thanks

MK



Re: [flexcoders] custom event not working in popup

2008-10-17 Thread claudiu ursica
Are you sure you are listening for the same event type in main? From what I can 
see your custom event is of type
formSubmitted while the main listens for formUpdate ...

Claudiu



- Original Message 
From: Mark Hosny [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, October 17, 2008 4:59:55 PM
Subject: [flexcoders] custom event not working in popup


Hey guys,

I now know that my custom event is not working properly in my popup window when 
listening for the event in the main app. When I do this, it works:

POPUP WINDOW
mx:Metadata
[Event(name= formUpdate ,type=flash. events.Event )]
/mx:Metadata

dispatchEvent(new Event('formUpdate',true));

MAIN APP
application. systemManager. addEventListener (formUpdate,handleUpdateFormSu 
bmitted);

private function handleUpdateFormSub mitted(event: Event):void {
Alert.show('SUCCESS');
}

When I use a custom event it doesn't work:
mx:Metadata
[Event(name= formUpdate ,type=com. event.CustomEven t)]
/mx:Metadata

var evt:CustomEvent = new CustomEvent( CustomEvent. ON_TEST_CASE,
{
memberID:memberID_ txt.text
}
);
 this.dispatchEvent( evt);

MAIN APP
application. systemManager. addEventListener (formUpdate,handleUpdateFormSu 
bmitted);

private function handleUpdateFormSub mitted(event: CustomEvent) :void {
Alert.show('SUCCESS');
}

CUSTOM EVENT
package com.event

{
import flash.events. *
   

public class CustomEvent extends Event
{


//- PUBLIC  INTERNAL VARIABLES  - - - 
- - - -
   

// event constants
public static const ON_TEST_CASE: String = formSubmitted;
   

public var params:Object;

public function CustomEvent( $type:String, $params:Object, 
$bubbles:Boolean = true, $cancelable: Boolean = true)
{
super($type, true, $cancelable) ;
   

this.params = $params;
}
   


   

public override function clone():Event
{
return new CustomEvent( type, this.params, bubbles, cancelable);
}
   

public override function toString():String
{
returnformatToString(CustomEvent, params, type, bubbles, 
cancelable);
}
   

//- END CLASS  - - - - - 
- - - -
}

}

Thanks,

Hoz





__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[flexcoders] Re: mogulus.com = looking for flex/flash talent in NYC

2008-10-17 Thread valdhor
For further reference, Flex job postings should go to the flexjobs
group here on Yahoo...

http://tech.groups.yahoo.com/group/flexjobs/


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

 Hi All.
 
 I hope job postings are allowed in this mailing list. If not, apologies.
 
 We are looking for a talented Flex/Flash Designer/Developer to join
the team immediately.
 Rather than post here though, anyone interested should check out:
 http://www.mogulus.com/info/jobdesc?id=7
 
 Thanks
 Phil Worthington
 Chief Product Officer
 Mogulus





Re: [flexcoders] custom event not working in popup

2008-10-17 Thread shaun
Mark Hosny wrote:
 Hey guys,
 
 I now know that my custom event is not working properly in my popup 
 window when listening for the event in the main app. When I do this, it 
 works:

[snip]

 
 public static const ON_TEST_CASE:String = formSubmitted;
 public function CustomEvent($type:String, $params:Object, 
 $bubbles:Boolean = true, $cancelable:Boolean = true)
 {
 super($type, true, $cancelable);
 
 this.params = $params;
 }

[snip]


You are dispatching an even with a type String value of
formSubmitted and listening/registering for formUpdate.
Change the event constant to formUpdate and it will work again..

mx:Metadata
[Event(name=formUpdate,type=com.event.CustomEvent)]
/mx:Metadata

MAIN APP
application.systemManager.addEventListener(formUpdate,handleUpdateFormSubmitted);


// event constants
public static const ON_TEST_CASE:String = formSubmitted;

new CustomEvent(CustomEvent.ON_TEST_CASE,
 {
 memberID:memberID_txt.text
 }
 );
  this.dispatchEvent(evt);


By the way, whats with the $ signs in the arg names?

HTH.

cheers,
  - shaun


Re: [flexcoders] how to add internal padding in canvas?

2008-10-17 Thread claudiu ursica
The panel component supports padding, wil that suit you?

HTH,
Claudiu



- Original Message 
From: markflex2007 [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, October 17, 2008 5:07:27 PM
Subject: [flexcoders] how to add internal padding in canvas?


I want to add right padding and left padding inside canvas so the
controls in side do not touch the side of canvas, but canvas do not
have padding attribute, how to do this.

Thanks

MK



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

RE: [flexcoders] FZip loads cached zip before downloading online

2008-10-17 Thread Kevin Benz
Not sure exactly what is happening but  I suggest an improvement to your
approach.

 

You should detect the change in network connection status and use that
event to flush any objects that are waiting on an event to fire. AIR
fires a NETWORK_CHANGED event and I would make sure you clean up your
objects at that point.  You cannot depend on the quality of the bits you
just downloaded regardless and need to re-enter the  process.

 

KFB 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of diigiibot
Sent: Friday, October 17, 2008 3:31 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] FZip loads cached zip before downloading online

 

I'm using FZip in an AIR application, the application loads the zip
from a location on our server, unpacks the zip and move the files to
their local folder. Everything runs smooth until I cut off my internet
connection while the zip is downloading.
When I restart the application it looks like FZip is first checking
the temp folder for the cached zip and if found, it uses that one to
unzip, even if the zip was not completed the last time.

Does anyone know of a way to prevent that?

I use the default load method of the FZip library, this is a part of
the code I use.

var moduleLink:String = [EMAIL PROTECTED];

var zip:FZip = new FZip();

zip.addEventListener(Event.COMPLETE, onComplete);

zip.load(new URLRequest(moduleLink));

private function onComplete(evt:Event):void 
{
var moduleDir:File =
File.applicationStorageDirectory.resolvePath(modules);

var outStream:FileStream;

for(var i:int; ievt.target.getFileCount();i++)
{
var zipFile:FZipFile = evt.target.getFileAt(i);

if(zipFile.sizeUncompressed == 0 
zipFile.filename.toString().substr(-1) == /)
{
var rootDir:File =
File.applicationStorageDirectory.resolvePath(modules/+zipFile.filename
.toString());
}
else
{
var tempFile:File = moduleDir.resolvePath(zipFile.filename);

outStream = new FileStream();

outStream.open(tempFile, FileMode.WRITE);

outStream.writeBytes(zipFile.content, 0, zipFile.sizeUncompressed);

outStream.close();
}
}
evt.target.close();
}

Thanks in advance

 



[flexcoders] Re: Extending UIComponent memory issues.

2008-10-17 Thread flexaustin
Michael, I have tried using Flexsprite but throws errors about needing
to implementing IUIcomponent. Did I miss something and give up to early?



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

 Doug, Jason,
 Since I am a self-centered person that doesn't like to be misunderstood,
 ;-), I could have brought up the 4000 object issue. In previous
threads with
 Jason, he said this was a requirement from the higher order. So I
left it
 where it was, 4000 objects.
 
 As far as the IUIComponent issue, it is Container that requires them not
 'Flex' itself.
 
 This is where as flex projects, Web 2.0 and performance are reaching
a point
 where it's not just making a Flash IDE animation anymore.
 
 When the requirements of these projects come to this level there is more
 engineering involved and Flex out of the box is not going to handle
 situations like this.
 
 The absolute way to do this is creating a UIComponent subclass that
is the
 container, creating your layout algorithm in this component. Subclass
 FlexSprite, make that your content loader component.
 
 Then instantiate the content components in the UIComponent
container. This
 is the lean version of your design I envision. You could even
recycle the
 content renderers in your container component Lot's of things
you could
 do ;-)
 
 Mike
 
 
 On Wed, Oct 15, 2008 at 10:47 PM, flexaustin [EMAIL PROTECTED] wrote:
 
Doug, what would you go with? Sprite?
 
  I thought sprite, but you need to implement all the IUIComponent stuff
  or use composition correct? Wouldn't composition reduce the benefits
  gained by using Sprite?
 
  Doug, if you message me and I can tell you where to see the component.
 
  jason (underscore) newport {at) hot mail
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Doug
  McCune doug@ wrote:
  
   You've got 4,000 things all moving around at once? Are all 4,000 of
  those
   actually visible? 4,000 UI components seems like a lot for any
layout
   manager to have to deal with. I'd try to focus on figuring out how
  to reduce
   the number of UIComponents before I worried about how much memory
  each one
   is taking up. I may be totally off base, but I can't imagine a
scenario
   where you want 4,000 images all on the screen at the same time.
  
   And if you do really need to load 4,000 swfs all at the same time
  then you
   probably want something that's lighter than custom UIComponent
classes,
   which would keep those 4,000 objects out of the normal
   invalidation/validation cycles of the display list.
  
   Doug
  
   On Wed, Oct 15, 2008 at 1:34 PM, Michael Schmalle
   teoti.graphix@wrote:
  
A side note,
You are doing some very expensive leg work in the 'content'
setter.
   
You need to break that out into commitProperties() and
  updateDisplayList().
   
You would get a huge performance increase for sure.
   
As far as the memory, doesn't look to weird, event listeners
  without weak
references can make thing hang around as well.
   
Mike
   
   
On Wed, Oct 15, 2008 at 3:08 PM, flexaustin flexaustin@ wrote:
   
So I have this base component, that when running profiler,
says its
eating up tons of memory. I have about 4000 of these at one
time in
my Flex app (see component code below). This base component is
extended by two other components, which are then extended by
two more
components each so 3 or 4 levels above this base component.
   
1. My first question is does the profiler just point to the base
  class
or are there actually 4000 of these being created outside of
their
extended children?
   
2. My 2nd question is is their anything wrong with the code
  below? Why
is it eatin memory? The parameter content when pulled in is
a swf
file (icon) that is 5kb each so 5kb * 4000... you get the math.
   
When I run this progam the CarouselImage's are using up 30%
to 35% of
my apps memory usage. And my app is eating up 725,000kb of
mem usage,
thus crashing my pretty decent computer.
   
// --- BEGIN CODE --
package com.mysite.views.components
{
   
import flash.display.DisplayObject;
import flash.system.ApplicationDomain;
   
import mx.core.UIComponent;
import mx.events.ResizeEvent;
   
public class CarouselImage extends UIComponent
{
// Content
private var _content:DisplayObject;
private var _contentWidth:Number;
private var _contentHeight:Number;
   
public function CarouselImage(content:*=null)
{
super();
   
// Set content
this.content = content;
}
   
// Properties
[Inspectable]
public function get content():DisplayObject
{
return _content;
}
   
public function set content(value:*):void
{
if (_content != null)
{
removeChild(_content)
removeEventListener(ResizeEvent.RESIZE, handleResize);
}
   
if (value is 

Re: [flexcoders] custom event not working in popup

2008-10-17 Thread hoz

Hey Shaun,

Thanks for the reply, and YES, it finally worked. It's always those little
typos that gotcha's!! The $'s were just taken from code relating to PHP
format; obviously, not needed.

I did find it interesting that I could also do this and skip the metadata
tag in the popup:

application.systemManager.addEventListener(CustomEvent.ON_TEST_CASE,handleUpdateFormSubmitted);

not sure if that's bad practice, but we have finally solved the popup window
to main scenario!!


shaun etherton wrote:
 
 Mark Hosny wrote:
 Hey guys,
 
 I now know that my custom event is not working properly in my popup 
 window when listening for the event in the main app. When I do this, it 
 works:
 
 [snip]
 
 
 public static const ON_TEST_CASE:String = formSubmitted;
 public function CustomEvent($type:String, $params:Object, 
 $bubbles:Boolean = true, $cancelable:Boolean = true)
 {
 super($type, true, $cancelable);
 
 this.params = $params;
 }
 
 [snip]
 
 
 You are dispatching an even with a type String value of
 formSubmitted and listening/registering for formUpdate.
 Change the event constant to formUpdate and it will work again..
 
 mx:Metadata
 [Event(name=formUpdate,type=com.event.CustomEvent)]
 /mx:Metadata
 
 MAIN APP
 application.systemManager.addEventListener(formUpdate,handleUpdateFormSubmitted);
 
 
 // event constants
 public static const ON_TEST_CASE:String = formSubmitted;
 
 new CustomEvent(CustomEvent.ON_TEST_CASE,
  {
  memberID:memberID_txt.text
  }
  );
   this.dispatchEvent(evt);
 
 
 By the way, whats with the $ signs in the arg names?
 
 HTH.
 
 cheers,
   - shaun
 
 

-- 
View this message in context: 
http://www.nabble.com/custom-event-not-working-in-popup-tp20033915p20034275.html
Sent from the FlexCoders mailing list archive at Nabble.com.



Re: [flexcoders] Module Interfaces Inheritance question

2008-10-17 Thread Ralf Bokelberg
It has to do with the ApplicationDomain. Unless otherwise specified, a
module lives in its own ApplicationDomain. This way it can have its
own copies of every class. If you load the modules into the same
ApplicationDomain as the main application, the warning should be gone
as well. Its just, in this case the classes are still included in all
of the modules.

Ralf.

On Fri, Oct 17, 2008 at 2:23 PM, Purushottam Yeluripati
[EMAIL PROTECTED] wrote:
 Thank you for your response, Ralf. I am going to try that option as well.
 But I am still not clear on why the current setup does not work. I have
 ensured (through explicit package import and variable declaration in MyApp)
 that IAppModule, IModule1 and IModule2 are all referenced within the main
 application.

 I have been trying a host of other things such as trying to load all the
 modules into the same domain as the application, but no luck there either :(

 - Original Message 
 From: Ralf Bokelberg [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Friday, October 17, 2008 2:36:19 AM
 Subject: Re: [flexcoders] Module Interfaces Inheritance question

 Hi Purush

 I think iAppModule needs to go into a library project, which is
 referenced by the modules but marked as external, while it is embedded
 completely in the main application.

 Ralf.

 On Fri, Oct 17, 2008 at 2:51 AM, purush_y [EMAIL PROTECTED] com wrote:
 Hi,
 I did a basic search on this topic and read a few posts, but I
 think my case seems to be a little different here. I have a fairly
 large application that I am designing to be broken into one main
 application that loads multiple modules as required.

 My main application implements an IMyApp interface with one method
 right now:
 getModule(modName: String):*

 All my modules implement a generic IAppModule interface which includes
 2 methods:
 -initModule( ) Called after loading and creation of module
 -handleEvent( evt:Event) : Called whenever an event such as MenuEvent
 etc need to be passed to the module.

 Each of the modules implement a specific interface, for eg. Module1
 implements IModule1 which extends IAppModule, and Module2 implements
 IModule2 which also extends IAppModule to expose specific
 functionality within each of the module.

 So I have the following package structure and classes with their
 interfaces:
 1) class a.MyApp implements a.mod.common. IMyApp (My main app)
 2) interface a.mod.common. IModule1 extends interface
 a.mod.common. IAppModule
 3) interface a.mod.common. IModule2 extends interface
 a.mod.common. IAppModule
 4) class a.mod.mod1.Module1 implements
 a.mod.common. IModule1 (Module 1 compiles to Module1.swf)
 5) class a.mod.mod2.Module 2 implements
 a.mod.common. IModule2 (Module 2 compiles to Module2.swf)

 My main application handles the logic of loading all the modules at
 starting and as required as runtime and any module requiring access to
 another module asks the main application (through the IMyApp
 interface) for a handle to the other module.

 Here is my problem. I am trying to access IModule2 from within
 Module1. I use IMyApp.getModule( Module2 ) to get a handle to the
 second module, but when I try to downcast it to IModule2, it throws me
 an error saying it encountered error with the type coercion. In the
 error detail it says that it cannot convert
 a.mod.mod2.Module2 to a.mod.common. IModule2 which
 stumps me as the class implements that specific interface.

 If I include all methods from IModule1 and IModule2 into the base
 interface IAppModule, remove IModule2 entirely and try to cast the
 IMyApp.getModule( Module2 ) to IAppModule, it works fine, but this is
 not what I was looking for. I will end up with one monolithic
 IAppModule with every method from every module interface. I am not
 sure what I am missing here. Is there a problem with interface
 inheritance and modules? When I run a link report for the modules, I
 am not sure if I am reading the report right, but I do not see
 IModule2 interface as part of the definitions within script Module2.

 Can someone please point me in the right direction for this problem?

 Thank you for your help,
 Purush

 


[flexcoders] Re: [LCDS] Using where in in the SQL assembler

2008-10-17 Thread kwbillchan
Hi Benjamin, 

I tried the in clause statement without any problem. Here are what I 
did
fill
namegetSomeEmployees/name
sql
select id as id, firstname as firstname, 
lastname as lastname, phonenumber as phonenumber 
from employee 
where id in (#ids#)
and
phonenumber like concat(#areacode#,'%')
/sql
/fill
fill
namegetSomeEmployeesWithSameLastName/name
sql
select id as id, firstname as firstname, 
lastname as lastname, phonenumber as phonenumber
from employee
where lastname in (#lastNames#)
/sql
/fill

fill using number array:
var ids: Array = [1,3,5,7,9];
var token: AsyncToken = ds.fill
(people, getSomeEmployees, {ids:ids,areacode:617});
fill using String array:
var lastnames: Array = [Cattel];
var token: AsyncToken = ds.fill
(people, getSomeEmployeesWithSameLastName, {lastNames:lastnames});




William

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

 I am unsuccesfully trying using a
 SELECT index_id, vpn_id  FROM circuit WHERE index_id in 
('123', '234')
 sql statement with LCDS' SQL assembler.
 
 In my data-management-config.xml, I configured the sql as
 SELECT index_id, vpn_id  FROM circuit WHERE index_id in (#list#).
 And in Flex, I tried sending 'list' as an Array, a String (with and
 without quotes) but without success. It always return an empty set 
but
 does not return a fault.
 
 Does anybody know how I should code this?
 
 Thanks,
 Benjamin.





[flexcoders] Re: Rippling through state changes

2008-10-17 Thread Amy
--- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote:

 I have some custom components (nothing special) that are displaying 
product 
 information. essentially I can use the same component for seprate 
purposes:
 
 Product info (each product can be added to the shopping cart), 
shopping cart 
 (each product can be removed from the cart). Within the main 
component, I 
 have TileLists or datagrdids with item renderers. When the custom 
component 
 flips between states, I need the individual items contained therein 
to 
 switch state too.
 
 I'm trying to think of the most elegant way to do this. Any thoughs 
9apart 
 from the fact I'll go Doh! real soon now).
 
 I've tended to avoid states, but seem to be embracing them big time 
now..

I'd look at the Button code and see how it uses stateful skins.  And 
I've found that using styles for this kind of thing works pretty 
well.  You can either extend TileList to pass through the appropriate 
style into the component or you can look at my TileList_withStyle 
component, available at http://flexdiary.blogspot.com.  Or you can 
just change the style declaration for your custom component on the 
fly to change the applicable style/state at runtime.

HTH;

Amy



Re: [flexcoders] custom event not working in popup

2008-10-17 Thread shaun
Hey,

hoz wrote:
 Hey Shaun,
 
 Thanks for the reply, and YES, it finally worked. It's always those little
 typos that gotcha's!! The $'s were just taken from code relating to PHP
 format; obviously, not needed.
 

Right, i see.  :)

 I did find it interesting that I could also do this and skip the metadata
 tag in the popup:

Yep. You use that metadata tag when you want to expose the event to a 
container component via mxml
(Eg.)
mx:Button click=handleClick(event) /
If you look at the source of mx:Button you'll see the metadata for the 
click event.

I wasn't sure if you knew that so i didn't comment on it.

So you would use the metadata tag if you wanted to do the following.

Canvas

script
  private function handleFormSubmitted(e:CustomEvent):void {...}
/script

MyComponent
   id=mc
   formSubmitted=handleFormSubmitted(event)
/

/Canvas

MyComponent would have the metadata tag declaring the name and the type 
of the event it dispatches and then it appears in FlexBuilder as a hint.

This is pretty much the same as writing the following:
mc.addEventListener(formSubmitted, handleForSubmitted);

HTH.

cheers,
  - shaun


Re: [flexcoders] Re: AMFPHP tutorial

2008-10-17 Thread Vivian Richard
Wow Jonnie, simply outstanding!

I can see that you have now a Flex version of WP.
Really cool!! You rock

Your tutorials are also very helpful.

Regards,

Viv.




On Fri, Oct 17, 2008 at 3:10 AM, Jonnie Spratley [EMAIL PROTECTED] wrote:
 Here are some tutorials that I created, see if they are what you were
 looking for.

 -Jonnie Spratley

 Links:

 http://jonniespratley.com/2008/10/15/adobe-flex-amfphp-video-tutorial-part-1/
 http://jonniespratley.com/mini-cookbook/
 http://jonniespratley.com/2008/09/21/adobe-flexair-creating-a-serviceproxy-for-amfphp/

 If you want to see how to use amfphp with a pretty big project, look at this

 http://flexpress.jonniespratley.com/fp-admin/Flexpress.html

 Right click for source.

 


Re: [flexcoders] Re: Extending UIComponent memory issues.

2008-10-17 Thread Michael Schmalle
Jason,
What I suggested is probably a bit to complex for what you need. It's kind
of a reimplementation of what you are doing.

1. Subclass UIComponent to make your container.
2. Create the layout algorithm in that component.
3. Create a subclass of FlexSprite that is your loader component.
4. Add the FlexSprite subclass instances (your content) to your UIComponent
container class with custom layout.
5. Add the UIComponent class to a Container.

The above is not really a solution for you right now I'm sure, I was just
saying this is what I would do to get maximum performance and memory
management.

The reason I say this is I have no idea how you are laying out those
instances with reflection etc. How are you laying them out (with what layout
algorithm) ?

Mike


On Fri, Oct 17, 2008 at 10:21 AM, flexaustin [EMAIL PROTECTED] wrote:

   Michael, I have tried using Flexsprite but throws errors about needing
 to implementing IUIcomponent. Did I miss something and give up to early?

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Michael
 Schmalle

 [EMAIL PROTECTED] wrote:
 
  Doug, Jason,
  Since I am a self-centered person that doesn't like to be misunderstood,
  ;-), I could have brought up the 4000 object issue. In previous
 threads with
  Jason, he said this was a requirement from the higher order. So I
 left it
  where it was, 4000 objects.
 
  As far as the IUIComponent issue, it is Container that requires them not
  'Flex' itself.
 
  This is where as flex projects, Web 2.0 and performance are reaching
 a point
  where it's not just making a Flash IDE animation anymore.
 
  When the requirements of these projects come to this level there is more
  engineering involved and Flex out of the box is not going to handle
  situations like this.
 
  The absolute way to do this is creating a UIComponent subclass that
 is the
  container, creating your layout algorithm in this component. Subclass
  FlexSprite, make that your content loader component.
 
  Then instantiate the content components in the UIComponent
 container. This
  is the lean version of your design I envision. You could even
 recycle the
  content renderers in your container component Lot's of things
 you could
  do ;-)
 
  Mike
 
 
  On Wed, Oct 15, 2008 at 10:47 PM, flexaustin [EMAIL PROTECTED] wrote:
 
   Doug, what would you go with? Sprite?
  
   I thought sprite, but you need to implement all the IUIComponent stuff
   or use composition correct? Wouldn't composition reduce the benefits
   gained by using Sprite?
  
   Doug, if you message me and I can tell you where to see the component.
  
   jason (underscore) newport {at) hot mail
  
   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,

 Doug
   McCune doug@ wrote:
   
You've got 4,000 things all moving around at once? Are all 4,000 of
   those
actually visible? 4,000 UI components seems like a lot for any
 layout
manager to have to deal with. I'd try to focus on figuring out how
   to reduce
the number of UIComponents before I worried about how much memory
   each one
is taking up. I may be totally off base, but I can't imagine a
 scenario
where you want 4,000 images all on the screen at the same time.
   
And if you do really need to load 4,000 swfs all at the same time
   then you
probably want something that's lighter than custom UIComponent
 classes,
which would keep those 4,000 objects out of the normal
invalidation/validation cycles of the display list.
   
Doug
   
On Wed, Oct 15, 2008 at 1:34 PM, Michael Schmalle
teoti.graphix@wrote:
   
 A side note,
 You are doing some very expensive leg work in the 'content'
 setter.

 You need to break that out into commitProperties() and
   updateDisplayList().

 You would get a huge performance increase for sure.

 As far as the memory, doesn't look to weird, event listeners
   without weak
 references can make thing hang around as well.

 Mike


 On Wed, Oct 15, 2008 at 3:08 PM, flexaustin flexaustin@ wrote:

 So I have this base component, that when running profiler,
 says its
 eating up tons of memory. I have about 4000 of these at one
 time in
 my Flex app (see component code below). This base component is
 extended by two other components, which are then extended by
 two more
 components each so 3 or 4 levels above this base component.

 1. My first question is does the profiler just point to the base
   class
 or are there actually 4000 of these being created outside of
 their
 extended children?

 2. My 2nd question is is their anything wrong with the code
   below? Why
 is it eatin memory? The parameter content when pulled in is
 a swf
 file (icon) that is 5kb each so 5kb * 4000... you get the math.

 When I run this progam the CarouselImage's are using up 30%
 to 35% of
 my apps memory 

Re: [flexcoders] how to add internal padding in canvas?

2008-10-17 Thread Michael Schmalle
A hack that can be done if you really want Canvas is;
Create a subclass of Canvas and override the usePadding property.

override mx_internal get usePadding():Boolean
{
return true;
}

This will turn the padding back on when the
layout calculates viewMetricsAndPadding.

Mike

On Fri, Oct 17, 2008 at 10:17 AM, claudiu ursica [EMAIL PROTECTED]wrote:

   The panel component supports padding, wil that suit you?

 HTH,
 Claudiu

 - Original Message 
 From: markflex2007 [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Friday, October 17, 2008 5:07:27 PM
 Subject: [flexcoders] how to add internal padding in canvas?

  I want to add right padding and left padding inside canvas so the
 controls in side do not touch the side of canvas, but canvas do not
 have padding attribute, how to do this.

 Thanks

 MK


 __
 Do You Yahoo!?
 Tired of spam? Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com

  




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

Teoti Graphix Blog
http://www.blog.teotigraphix.com

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


Re: [flexcoders] FZip loads cached zip before downloading online

2008-10-17 Thread Jon Bradley


On Oct 17, 2008, at 10:17 AM, Kevin Benz wrote:


When I restart the application it looks like FZip is first checking
the temp folder for the cached zip and if found, it uses that one to
unzip, even if the zip was not completed the last time.

Does anyone know of a way to prevent that?


Compare file sizes.

cheers,

jon



Re: [flexcoders] FZip loads cached zip before downloading online

2008-10-17 Thread Jon Bradley


On Oct 17, 2008, at 10:17 AM, Kevin Benz wrote:


When I restart the application it looks like FZip is first checking
the temp folder for the cached zip and if found, it uses that one to
unzip, even if the zip was not completed the last time.

Does anyone know of a way to prevent that?


Scratch my last comment btw... duh... when you're not connected you  
have no idea if it's been completed.


What you can do is see if FZip will open up the ZIP archive that  
didn't download completely. You should have an error thrown that it's  
not valid because, well, the ZIP archive wouldn't be valid if it's  
not fully downloaded.


just a thought,

jb

[flexcoders] Listen to transition complete?

2008-10-17 Thread Christoph Leva
Hi all,

is it possible to add an eventListener, that listens for the end of a
transition between two states? Couldn't find anything.

Don't want to listen to a stateChange Event and don't want to use a timer,
that sends an TimerEvent.TIMER_COMPLETE after the duration of the
transition.

Thanks, Chris



Re: [flexcoders] Re: Rippling through state changes

2008-10-17 Thread Paul Andrews
- Original Message - 
From: Amy [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, October 17, 2008 3:38 PM
Subject: [flexcoders] Re: Rippling through state changes


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

 I have some custom components (nothing special) that are displaying
 product
 information. essentially I can use the same component for seprate
 purposes:

 Product info (each product can be added to the shopping cart),
 shopping cart
 (each product can be removed from the cart). Within the main
 component, I
 have TileLists or datagrdids with item renderers. When the custom
 component
 flips between states, I need the individual items contained therein
 to
 switch state too.

 I'm trying to think of the most elegant way to do this. Any thoughs
 9apart
 from the fact I'll go Doh! real soon now).

 I've tended to avoid states, but seem to be embracing them big time
 now..

 I'd look at the Button code and see how it uses stateful skins.  And
 I've found that using styles for this kind of thing works pretty
 well.  You can either extend TileList to pass through the appropriate
 style into the component or you can look at my TileList_withStyle
 component, available at http://flexdiary.blogspot.com.  Or you can
 just change the style declaration for your custom component on the
 fly to change the applicable style/state at runtime.

Thanks Amy.

 HTH;

 Amy


 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups 
 Links



 



[flexcoders] Re: [LCDS] Using where in in the SQL assembler

2008-10-17 Thread kwbillchan
Hi Benjamin,

I also tried 
select * from 
employee where lastname in (123)
directly on database console. I got an empty result instead of sql 
error

William

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

 Hi Benjamin, 
 
 I tried the in clause statement without any problem. Here are what 
I 
 did
 fill
 namegetSomeEmployees/name
 sql
   select id as id, firstname as firstname, 
 lastname as lastname, phonenumber as phonenumber 
   from employee 
   where id in (#ids#)
   and
   phonenumber like concat(#areacode#,'%')
   /sql
 /fill
 fill
 namegetSomeEmployeesWithSameLastName/name
 sql
   select id as id, firstname as firstname, 
 lastname as lastname, phonenumber as phonenumber
   from employee
   where lastname in (#lastNames#)
   /sql
 /fill
 
 fill using number array:
 var ids: Array = [1,3,5,7,9];
 var token: AsyncToken = ds.fill
 (people, getSomeEmployees, {ids:ids,areacode:617});
 fill using String array:
 var lastnames: Array = [Cattel];
 var token: AsyncToken = ds.fill
 (people, getSomeEmployeesWithSameLastName, 
{lastNames:lastnames});
 
 
 
 
 William
 
 --- In flexcoders@yahoogroups.com, benjidudu benjamin.durin@ 
 wrote:
 
  I am unsuccesfully trying using a
  SELECT index_id, vpn_id  FROM circuit WHERE index_id in 
 ('123', '234')
  sql statement with LCDS' SQL assembler.
  
  In my data-management-config.xml, I configured the sql as
  SELECT index_id, vpn_id  FROM circuit WHERE index_id in 
(#list#).
  And in Flex, I tried sending 'list' as an Array, a String (with 
and
  without quotes) but without success. It always return an empty 
set 
 but
  does not return a fault.
  
  Does anybody know how I should code this?
  
  Thanks,
  Benjamin.
 





RE: [flexcoders] Re: Flex uploader / accessing local files?

2008-10-17 Thread Kevin Benz
This actually isn't very tough at all. You need to get the File object,
load its  BitmapData and use the Matrix object to size it and then
either PNGEncode or JPGEncode back out.

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of valdhor
Sent: Friday, October 17, 2008 6:41 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Flex uploader / accessing local files?

 

It looks like you'll have to wait for Flash Player 10. See this thread:

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

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

 Hi -
 
 I've made a flex uploading application that gets a file from the
 client's file system using FileReference() and uploads it to a server.

 
 I'd like to be able to resize the image before it is sent to the
 server, but apparently flex doesn't have access to the actual bits
 that make up the image file, only a reference to the file.
 
 Surely there must be a way to manipulate that image data from the
 client's file before it gets to the server? 
 
 Has anyone done anything like this? I've looked all around but haven't
 had much luck.
 
 Thanks in advance,
 Rob


 

image001.jpgimage002.jpg

Re: [flexcoders] Module Interfaces Inheritance question

2008-10-17 Thread Purushottam Yeluripati
Ralf,
   I tried to include all the common classes into a library which is linked 
into the main application, but that did not resolve it. I tried the option of 
loading all the modules into the main application's ApplicationDomain. No luck 
still. But now the module is not able to get a handle to the parentApplication 
instance. It throws a null reference or property access error in the getter for 
the parent Application.


Purush




- Original Message 
From: Ralf Bokelberg [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, October 17, 2008 10:30:35 AM
Subject: Re: [flexcoders] Module Interfaces Inheritance question


It has to do with the ApplicationDomain. Unless otherwise specified, a
module lives in its own ApplicationDomain. This way it can have its
own copies of every class. If you load the modules into the same
ApplicationDomain as the main application, the warning should be gone
as well. Its just, in this case the classes are still included in all
of the modules.

Ralf.

On Fri, Oct 17, 2008 at 2:23 PM, Purushottam Yeluripati
[EMAIL PROTECTED] com wrote:
 Thank you for your response, Ralf. I am going to try that option as well.
 But I am still not clear on why the current setup does not work. I have
 ensured (through explicit package import and variable declaration in MyApp)
 that IAppModule, IModule1 and IModule2 are all referenced within the main
 application.

 I have been trying a host of other things such as trying to load all the
 modules into the same domain as the application, but no luck there either :(

 - Original Message 
 From: Ralf Bokelberg ralf.bokelberg@ gmail.com
 To: [EMAIL PROTECTED] ups.com
 Sent: Friday, October 17, 2008 2:36:19 AM
 Subject: Re: [flexcoders] Module Interfaces Inheritance question

 Hi Purush

 I think iAppModule needs to go into a library project, which is
 referenced by the modules but marked as external, while it is embedded
 completely in the main application.

 Ralf.

 On Fri, Oct 17, 2008 at 2:51 AM, purush_y [EMAIL PROTECTED] com wrote:
 Hi,
 I did a basic search on this topic and read a few posts, but I
 think my case seems to be a little different here. I have a fairly
 large application that I am designing to be broken into one main
 application that loads multiple modules as required.

 My main application implements an IMyApp interface with one method
 right now:
 getModule(modName: String):*

 All my modules implement a generic IAppModule interface which includes
 2 methods:
 -initModule( ) Called after loading and creation of module
 -handleEvent( evt:Event) : Called whenever an event such as MenuEvent
 etc need to be passed to the module.

 Each of the modules implement a specific interface, for eg. Module1
 implements IModule1 which extends IAppModule, and Module2 implements
 IModule2 which also extends IAppModule to expose specific
 functionality within each of the module.

 So I have the following package structure and classes with their
 interfaces:
 1) class a.MyApp implements a.mod.common. IMyApp (My main app)
 2) interface a.mod.common. IModule1 extends interface
 a.mod.common. IAppModule
 3) interface a.mod.common. IModule2 extends interface
 a.mod.common. IAppModule
 4) class a.mod.mod1.Module1 implements
 a.mod.common. IModule1 (Module 1 compiles to Module1.swf)
 5) class a.mod.mod2.Module 2 implements
 a.mod.common. IModule2 (Module 2 compiles to Module2.swf)

 My main application handles the logic of loading all the modules at
 starting and as required as runtime and any module requiring access to
 another module asks the main application (through the IMyApp
 interface) for a handle to the other module.

 Here is my problem. I am trying to access IModule2 from within
 Module1. I use IMyApp.getModule( Module2 ) to get a handle to the
 second module, but when I try to downcast it to IModule2, it throws me
 an error saying it encountered error with the type coercion. In the
 error detail it says that it cannot convert
 a.mod.mod2.Module2 to a.mod.common. IModule2 which
 stumps me as the class implements that specific interface.

 If I include all methods from IModule1 and IModule2 into the base
 interface IAppModule, remove IModule2 entirely and try to cast the
 IMyApp.getModule( Module2 ) to IAppModule, it works fine, but this is
 not what I was looking for. I will end up with one monolithic
 IAppModule with every method from every module interface. I am not
 sure what I am missing here. Is there a problem with interface
 inheritance and modules? When I run a link report for the modules, I
 am not sure if I am reading the report right, but I do not see
 IModule2 interface as part of the definitions within script Module2.

 Can someone please point me in the right direction for this problem?

 Thank you for your help,
 Purush

 


[flexcoders] How to setup LCDS woth Jboss Application server?

2008-10-17 Thread markflex2007
Hi,

Please give me a detail about this or useful links.

I search with google and I have not get a useful result yet.

Thanks a lot


Mark



[flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread markflex2007
Hi,Mike

Please let me know this in detail.

I can extends Canvas and create a new class (like samrtcavas).

I confuse how to use the class in mxml and how to set left/right paddings

Thanks for your help

Mark



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

 A hack that can be done if you really want Canvas is;
 Create a subclass of Canvas and override the usePadding property.
 
 override mx_internal get usePadding():Boolean
 {
 return true;
 }
 
 This will turn the padding back on when the
 layout calculates viewMetricsAndPadding.
 
 Mike
 
 



[flexcoders] Re: sailorsea21 - RemoveChild question.

2008-10-17 Thread sailorsea21
Hi Tracy, 

I don't think I'm successfully storing the reference of the children 
into the array. 

This is what I had tried:

private var moduleloader:ModuleLoader;
private var button:Button;
private var _aChildren:Array;

private function click(evt:MouseEvent):void {
tiletest.removeChild(_aChildren[one]);
tiletest.removeChild(button);
}   

public function AddModule():void {
moduleloader = new ModuleLoader();
moduleloader.url = test.swf;
button = new Button();
button.label = unload;
button.addEventListener(MouseEvent.CLICK, click);
tiletest.addChild(button);
_aChildren = new Array();
_aChildren[one] = tiletest.addChild(moduleloader);
}   

But I keep getting the ArgumentError: Error #2025: The supplied 
DisplayObject must be a child of the caller. error.

Thanks again.

-David

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

 Well, you did not do what I suggested.
 
  
 
 What do you think is in moduleloader when you click the remove 
button?
 The last thing you put in it.
 
  
 
 Re-read my response.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of sailorsea21
 Sent: Thursday, October 16, 2008 4:38 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: sailorsea21 - RemoveChild question.
 
  
 
 Hi Tracy, thank you for your quick response.
 I'm a little stuck on this one... I can't get it to work...
 
 I'm now able to load a module and unload it. But if I load several 
 modules, I'm only able to unload the latest one. 
 
 When I try unloading the other loaded modules I receive the follow 
 error:
 
 ArgumentError: Error #2025: The supplied DisplayObject must be a 
 child of the caller.
 at flash.display::DisplayObjectContainer/removeChild()
 at 
 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$remo
 http://www.adobe.com/2006/flex/mx/internal::$remo 
 veChild()[E:\dev\3.1.0
 \frameworks\projects\framework\src\mx\core\UIComponent.as:5074]
 at mx.core::Container/removeChild()[E:\dev\3.1.0
 \frameworks\projects\framework\src\mx\core\Container.as:2267]
 at content_module_template_blank/click()
 [C:\Inetpub\wwwroot\LWY\UI\UI Score\UI Score 004
 \src\content_module_template_blank.mxml:29]
 
 This is my code: 
 
 import mx.states.RemoveChild;
 import mx.modules.ModuleLoader;
 import mx.controls.Button; 
 
 private var moduleloader:ModuleLoader;
 private var button:Button;
 
 public function loadmodule():void {
 moduleloader = new ModuleLoader();
 tiletest.addChild(moduleloader);
 moduleloader.url = test.swf;
 button = new Button();
 button.label = unload;
 button.addEventListener(MouseEvent.CLICK, click);
 tiletest.addChild(button);
 } 
 
 private function click(evt:MouseEvent):void {
 tiletest.removeChild(moduleloader);
 tiletest.removeChild(button);
 } 
 
 mx:Tile width=100% height=100% id=tiletest/ 
 mx:LinkButton label=Load click=loadmodule() buttonMode=true/
 
 Thank you very much.
 
 -David.





[flexcoders] Alex Blog: Datagrid Column Header and ComboBox

2008-10-17 Thread ilikeflex
Hi Alex

I looked through your blog. I implemented below functionality
http://blogs.adobe.com/aharui/ComboBoxHeader/dg.swf.

Now if i want to show that as soon as the datagrid loads, combobox
shows Below 40 and data is also sorted. I want to change the item in
combo box. How to do that?

Any pointer is highly appreciated.

Thanks
ilikeflex



[flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Tim Hoff

Another alternative, if you have to use a Canvas and don't want to
subclass, is to use constraints (top, bottom, left, right) on the
children.

-TH

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

 Hi,Mike

 Please let me know this in detail.

 I can extends Canvas and create a new class (like samrtcavas).

 I confuse how to use the class in mxml and how to set left/right
paddings

 Thanks for your help

 Mark



 --- In flexcoders@yahoogroups.com, Michael Schmalle
 teoti.graphix@ wrote:
 
  A hack that can be done if you really want Canvas is;
  Create a subclass of Canvas and override the usePadding property.
 
  override mx_internal get usePadding():Boolean
  {
  return true;
  }
 
  This will turn the padding back on when the
  layout calculates viewMetricsAndPadding.
 
  Mike
 






[flexcoders] Re: Need help for mx:MenuBar?

2008-10-17 Thread valdhor
I don't understand what you want. Do you want the menu to drop down
when you mouseover it or when you click it?

Have you checked out the example at:

http://livedocs.adobe.com/flex/3/html/help.html?content=menucontrols_6.html


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

 I see a demo at
 
 http://www.customware.net/repository/display/FLEX/Flex+Menu+Example 
 
 The mouse over works after first click a menu.
 
 How this works?





[flexcoders] Re: FZip loads cached zip before downloading online

2008-10-17 Thread diigiibot
Yes, that could be a solution. I'll try it out. 
Only I'm not sure the partially downloaded zip will be removed from
the temp folder when I remove the FZip object.

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

 Not sure exactly what is happening but  I suggest an improvement to your
 approach.
 
  
 
 You should detect the change in network connection status and use that
 event to flush any objects that are waiting on an event to fire. AIR
 fires a NETWORK_CHANGED event and I would make sure you clean up your
 objects at that point.  You cannot depend on the quality of the bits you
 just downloaded regardless and need to re-enter the  process.
 
  
 
 KFB 
 
  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of diigiibot
 Sent: Friday, October 17, 2008 3:31 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] FZip loads cached zip before downloading online
 
  
 
 I'm using FZip in an AIR application, the application loads the zip
 from a location on our server, unpacks the zip and move the files to
 their local folder. Everything runs smooth until I cut off my internet
 connection while the zip is downloading.
 When I restart the application it looks like FZip is first checking
 the temp folder for the cached zip and if found, it uses that one to
 unzip, even if the zip was not completed the last time.
 
 Does anyone know of a way to prevent that?
 
 I use the default load method of the FZip library, this is a part of
 the code I use.
 
 var moduleLink:String = [EMAIL PROTECTED];
 
 var zip:FZip = new FZip();
 
 zip.addEventListener(Event.COMPLETE, onComplete);
 
 zip.load(new URLRequest(moduleLink));
 
 private function onComplete(evt:Event):void 
 {
 var moduleDir:File =
 File.applicationStorageDirectory.resolvePath(modules);
 
 var outStream:FileStream;
 
 for(var i:int; ievt.target.getFileCount();i++)
 {
 var zipFile:FZipFile = evt.target.getFileAt(i);
 
 if(zipFile.sizeUncompressed == 0 
 zipFile.filename.toString().substr(-1) == /)
 {
 var rootDir:File =
 File.applicationStorageDirectory.resolvePath(modules/+zipFile.filename
 .toString());
 }
 else
 {
 var tempFile:File = moduleDir.resolvePath(zipFile.filename);
 
 outStream = new FileStream();
 
 outStream.open(tempFile, FileMode.WRITE);
 
 outStream.writeBytes(zipFile.content, 0, zipFile.sizeUncompressed);
 
 outStream.close();
 }
 }
 evt.target.close();
 }
 
 Thanks in advance





[flexcoders] Re: Listen to transition complete?

2008-10-17 Thread Tim Hoff

Hi Chris,

For the component that has a transition or effect, listen for the
effectEnd event:

myComponent effectEnd=onEffectEnd()/

-TH

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

 Hi all,

 is it possible to add an eventListener, that listens for the end of a
 transition between two states? Couldn't find anything.

 Don't want to listen to a stateChange Event and don't want to use a
timer,
 that sends an TimerEvent.TIMER_COMPLETE after the duration of the
 transition.

 Thanks, Chris





RE: [flexcoders] LCDS 2.6 and Hibernate - Does it work?

2008-10-17 Thread Jeff Vroom
We did change from hibernate 3.1 to 3.2 in LCDS2.6 but otherwise I don't know 
of any compatibility problems introduced.   We did that primarily so we could 
support the hibernate JPA annotations and there might have been a tweak or two 
to the hibernate assembler to get it to work in that environment.

A good first step to diagnosing your problems would be to turn on the debug 
logging (in services-config.xml, set level=Debug and makes sure Service.*, 
Configuration and Message.* are in the patterns below).From those logs we 
can probably get a clue as to what is going on.  If they are large, feel free 
to send them to me offlist: [EMAIL PROTECTED]mailto:[EMAIL PROTECTED].

Jeff

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of headjoog
Sent: Friday, October 17, 2008 5:51 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] LCDS 2.6 and Hibernate - Does it work?


Hi -

I tried upgrading from LCDS 2.5 to LCDS 2.6. I have a project using
Hibernate 3.1 and it was working fine in LCDS 2.5. But after
upgrading LCDS 2.6 things have broken and I'm having a bear of a time
figuring out what has gone wrong. I roll it back to 2.5 and it works.

Has anyone else tried this? Or is there anything from Adobe on
Hibernate compatibility with LCDS 2.6?

Thanks,
Joe

inline: image001.jpginline: image002.jpg

[flexcoders] Re: FZip loads cached zip before downloading online

2008-10-17 Thread diigiibot
Well, it looks like it is valid. 
When it starts to unzip the zip in the temp folder I get the 2 first
folders in it. So that doesn't give me an IOError. 
I also tried to compare the number of files in the local zip with the
one online(just with a hardcoded var) but that puts me in a loop where
he keeps extracting the zip over and over.


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

 
 On Oct 17, 2008, at 10:17 AM, Kevin Benz wrote:
 
  When I restart the application it looks like FZip is first checking
  the temp folder for the cached zip and if found, it uses that one to
  unzip, even if the zip was not completed the last time.
 
  Does anyone know of a way to prevent that?
 
 Scratch my last comment btw... duh... when you're not connected you  
 have no idea if it's been completed.
 
 What you can do is see if FZip will open up the ZIP archive that  
 didn't download completely. You should have an error thrown that it's  
 not valid because, well, the ZIP archive wouldn't be valid if it's  
 not fully downloaded.
 
 just a thought,
 
 jb





RE: [flexcoders] Re: FZip loads cached zip before downloading online

2008-10-17 Thread Kevin Benz
When you destroy the FZip object, don't necessarily know and if you
don't know, you have to clean up after yourself. Remember, when you use
HTTP, you are subject to timeouts that may or may not expire as you
expect them let alone the myriad of other errors along the way
(permissions, server error, etc). If you only wait for a Complete event,
then the HTTP object is left hanging and the file is certainly in a
dirty state as well. 

 

K

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of diigiibot
Sent: Friday, October 17, 2008 9:09 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: FZip loads cached zip before downloading
online

 

Yes, that could be a solution. I'll try it out. 
Only I'm not sure the partially downloaded zip will be removed from
the temp folder when I remove the FZip object.

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

 Not sure exactly what is happening but I suggest an improvement to
your
 approach.
 
 
 
 You should detect the change in network connection status and use that
 event to flush any objects that are waiting on an event to fire. AIR
 fires a NETWORK_CHANGED event and I would make sure you clean up your
 objects at that point. You cannot depend on the quality of the bits
you
 just downloaded regardless and need to re-enter the process.
 
 
 
 KFB 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of diigiibot
 Sent: Friday, October 17, 2008 3:31 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] FZip loads cached zip before downloading online
 
 
 
 I'm using FZip in an AIR application, the application loads the zip
 from a location on our server, unpacks the zip and move the files to
 their local folder. Everything runs smooth until I cut off my internet
 connection while the zip is downloading.
 When I restart the application it looks like FZip is first checking
 the temp folder for the cached zip and if found, it uses that one to
 unzip, even if the zip was not completed the last time.
 
 Does anyone know of a way to prevent that?
 
 I use the default load method of the FZip library, this is a part of
 the code I use.
 
 var moduleLink:String = [EMAIL PROTECTED];
 
 var zip:FZip = new FZip();
 
 zip.addEventListener(Event.COMPLETE, onComplete);
 
 zip.load(new URLRequest(moduleLink));
 
 private function onComplete(evt:Event):void 
 {
 var moduleDir:File =
 File.applicationStorageDirectory.resolvePath(modules);
 
 var outStream:FileStream;
 
 for(var i:int; ievt.target.getFileCount();i++)
 {
 var zipFile:FZipFile = evt.target.getFileAt(i);
 
 if(zipFile.sizeUncompressed == 0 
 zipFile.filename.toString().substr(-1) == /)
 {
 var rootDir:File =

File.applicationStorageDirectory.resolvePath(modules/+zipFile.filename
 .toString());
 }
 else
 {
 var tempFile:File = moduleDir.resolvePath(zipFile.filename);
 
 outStream = new FileStream();
 
 outStream.open(tempFile, FileMode.WRITE);
 
 outStream.writeBytes(zipFile.content, 0, zipFile.sizeUncompressed);
 
 outStream.close();
 }
 }
 evt.target.close();
 }
 
 Thanks in advance


 

image001.jpgimage002.jpg

Re: [flexcoders] web compiler

2008-10-17 Thread Matt Chotin
We have a web compiler available for Apache, IIS, and J2EE.  They're only meant 
for dev-time, not production, but I'd imagine that's what's being used.  You 
need to make sure that they're set up with the same config as Flex Builder.

Matt


On 10/17/08 4:07 AM, Tom Chiverton [EMAIL PROTECTED] wrote:

On Friday 17 Oct 2008, jitendra jain wrote:
 I want to do some load testing and that's why iam using .mxml files.

But you'll only do the compile once for each release, not once for each
request... it can't be as important as the calls that application actually
makes.

--
Tom Chiverton
Helping to paradigmatically morph B2C fourth-generation methodologies





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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links






Re: [flexcoders] AS equivalent for perl's chop/chomp?

2008-10-17 Thread john fisher
thanks Guy
and of course you're right  if they irritate my sense of code style, I
can just wrap them up.
Just thought I'd ask in case I missed something.
John

Guy Morton wrote:
 I don't think so...I've never seen one, but what's hard about using
 String.replace? Aren't the following functionally equivalent?

 //perl's chomp
 String.replace(/[\r\n]*$/);

 //perl's chop
 String.replace(/.$/);

 I guess if you really care, you could extend the String class to add
 them?

 Guy




[flexcoders] Refreshing graphics in a tree

2008-10-17 Thread ben gomez farrell
Hey, I have a tree with a itemRenderer to have a clickable checkbox in 
it.  I need to set the checkbox state sometimes through code.  
Everything works great, except the graphics of the checkbox don't update 
when it's set through code (mousing over the node will refresh the graphics)
Is there a way to refresh the graphics of all the nodes through some 
method of the tree?  I CAN open and close the nodes to refresh the 
graphics, but it seems really silly, and I have to track whats open and 
closed and make sure it gets back to the same state again.

Thanks!
ben


Re: [flexcoders] web compiler

2008-10-17 Thread Michael Schmalle
Matt,
 They're only meant for dev-time, not production,

What do you mean by that? I thought you could use them to compile are you
saying they are buggy or not completely implemented?

Mike

On Fri, Oct 17, 2008 at 12:26 PM, Matt Chotin [EMAIL PROTECTED] wrote:

   We have a web compiler available for Apache, IIS, and J2EE. They're only
 meant for dev-time, not production, but I'd imagine that's what's being
 used. You need to make sure that they're set up with the same config as Flex
 Builder.

 Matt


 On 10/17/08 4:07 AM, Tom Chiverton [EMAIL 
 PROTECTED]tom.chiverton%40halliwells.com
 wrote:

 On Friday 17 Oct 2008, jitendra jain wrote:
  I want to do some load testing and that's why iam using .mxml files.

 But you'll only do the compile once for each release, not once for each
 request... it can't be as important as the calls that application actually
 makes.

 --
 Tom Chiverton
 Helping to paradigmatically morph B2C fourth-generation methodologies

 

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

 Halliwells LLP is a limited liability partnership registered in England and
 Wales under registered number OC307980 whose registered office address is at
 Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list
 of members is available for inspection at the registered office. Any
 reference to a partner in relation to Halliwells LLP means a member of
 Halliwells LLP. Regulated by The Solicitors Regulation Authority.

 CONFIDENTIALITY

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

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

 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location:
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links

  




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

Teoti Graphix Blog
http://www.blog.teotigraphix.com

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


RE: [flexcoders] Re: sailorsea21 - RemoveChild question.

2008-10-17 Thread Tracy Spratt
That is correct, you are not storing references correctly.  First I will
explain what is wrong with your code, but then, after seeing what you
are trying to do, will suggest a slightly different approach.

 

First, you are mixing Array, which is accessed by index and associative
array, which is an Object and accessed by property name:

private var _oChildren:Object = new Object();

 

Second, you are creating a new instance of that each time you click
addModule.  This overwrites what was in there before.  Don't do that.

 

Third, you need a unique name for each reference you add to the
associative array.  Don't use one every time, that just puts a new
reference in the one property.  You can use anything you want for this
property name.  Pick something that is meaningful.  How will you
identify which child you want to remove?  Is it purely numerical? If so
you can use 1, 2, etc.  Usually there is some string that is logical
for this, like an id, or an image's base file name.  whatever, remember
it must uniquely identify the instance you want to later remove.

 

Now, after looking at your code a bit more, and seeing that you do not
have a clear string or id you can use for identifying the references, I
am gong to suggest a different approach.

private var _aChildren:Array= [];   //declare an initialize
an Array

 

...

public function addModule():void {
  var iNewIndex:int = _aChildren.length;  //this will be the next
available index in the array

  button = new Button();

  button.id = String(iNewIndex);   //NOTE: you can NOT use this id as a
reference, but you CAN access its value
  button.label = unload;
  button.addEventListener(MouseEvent.CLICK, onClickUnload);
  tiletest.addChild(button);  

  moduleloader = new ModuleLoader();
  moduleloader.url = test.swf;
  _aChildren[iNewIndex] = tiletest.addChild(moduleloader);  //NOTE: the
associated button id property value matches the index of the array ref
}// addModule

 

private function onClickUnload (event:Event):void {
  var iIndexClicked:int = parseInt(event.target.id);  

  tiletest.removeChild(_aChildren[iIndexClicked]);
  tiletest.removeChild(event.target);
}// onClickUnload

 

Try this.  it is untested.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of sailorsea21
Sent: Friday, October 17, 2008 11:45 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: sailorsea21 - RemoveChild question.

 

Hi Tracy, 

I don't think I'm successfully storing the reference of the children 
into the array. 

This is what I had tried:

private var moduleloader:ModuleLoader;
private var button:Button;
private var _aChildren:Array;

private function click(evt:MouseEvent):void {
tiletest.removeChild(_aChildren[one]);
tiletest.removeChild(button);
} 

public function AddModule():void {
moduleloader = new ModuleLoader();
moduleloader.url = test.swf;
button = new Button();
button.label = unload;
button.addEventListener(MouseEvent.CLICK, click);
tiletest.addChild(button);
_aChildren = new Array();
_aChildren[one] = tiletest.addChild(moduleloader);
} 

But I keep getting the ArgumentError: Error #2025: The supplied 
DisplayObject must be a child of the caller. error.

Thanks again.

-David

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

 Well, you did not do what I suggested.
 
 
 
 What do you think is in moduleloader when you click the remove 
button?
 The last thing you put in it.
 
 
 
 Re-read my response.
 
 
 
 Tracy
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of sailorsea21
 Sent: Thursday, October 16, 2008 4:38 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: sailorsea21 - RemoveChild question.
 
 
 
 Hi Tracy, thank you for your quick response.
 I'm a little stuck on this one... I can't get it to work...
 
 I'm now able to load a module and unload it. But if I load several 
 modules, I'm only able to unload the latest one. 
 
 When I try unloading the other loaded modules I receive the follow 
 error:
 
 ArgumentError: Error #2025: The supplied DisplayObject must be a 
 child of the caller.
 at flash.display::DisplayObjectContainer/removeChild()
 at 
 
mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$remo
http://www.adobe.com/2006/flex/mx/internal::$remo 
 http://www.adobe.com/2006/flex/mx/internal::$remo
http://www.adobe.com/2006/flex/mx/internal::$remo  
 veChild()[E:\dev\3.1.0
 \frameworks\projects\framework\src\mx\core\UIComponent.as:5074]
 at mx.core::Container/removeChild()[E:\dev\3.1.0
 \frameworks\projects\framework\src\mx\core\Container.as:2267]
 at content_module_template_blank/click()
 [C:\Inetpub\wwwroot\LWY\UI\UI Score\UI Score 004
 \src\content_module_template_blank.mxml:29]
 
 

[flexcoders] Re: Stepping through Flex SDK code while in Flex Builder debugger

2008-10-17 Thread lagos_tout
Holy crap! I can't believe it! It actually works now.
:) Awesomeness!
I'd been wrestling with this for over a week now!  Thanks so much.  
That was exactly the problem.

LT

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

 --- In flexcoders@yahoogroups.com, lagos_tout lagos.tout@ wrote:
 
  Hi, all.
  
  Is it possible to step through Flex SDK code using Flex Builder 3 
  debugger?  
  
  I was able to set break points in only a couple of SDK 
  classes (eg AdvancedDataGrid).  I did this by adding
   
  C:\Program Files\Adobe\Flex Builder 3 Plug-
  in\sdks\3.1.0\fbpro\projects\datavisualization\src
  
  to the source lookup file list in the debug configuration panel in 
  Flex Builder.
  
  But adding 
  
  C:\Program Files\Adobe\Flex Builder 3 Plug-
  in\sdks\3.1.0\frameworks\projects\framework\src
  
  doesn't have the same effect of letting me step through framework 
  code.
 
 I had a similar issue with two particular projects using Flex
 3.1.0.2???. All other projects were fine. It turned out that linking
 the framework as runtime shared library was the culprit. Turning 
back
 to merging the framework classes into the project.swf made me a 
happy man.
 Marc, http://faindu.wordpress.com/






[flexcoders] Re: WebORB 3.5 - Error: Call to a member function getServiceURI() on a non-objec

2008-10-17 Thread valdhor
Unknown.

I just downloaded WebORB 3.5, unzipped it, uploaded it to my server
and pointed my browser to weborb.php. The response was:

WebORB v3.5.0

I would make sure you are pointing to the correct directory where
weborb.php is located.

Also, you may want to post to the WebORB forum at
http://tech.groups.yahoo.com/group/flashorb/

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

 I just downloaded WebORB 3.5 and got done setting it up.   Now, my
 project is setup on my system (xampp / php 5.2.5). And when I point my
 browser to weborb.php, I get the following fatal error:  Fatal error:
 Call to a member function getServiceURI() on a non-object in
 C:\xampp\htdocs\projects\gulfspecials\weborb\Message\Request.php on line
 75
 Anyone know how to fix this problem?





RE: [flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Tracy Spratt
Hold on a minute.  Canvas uses absolute positioning.  So padding would
only affect percentage resizing?  And 0,0 would still be top left
corner, regardless of the padding?

 

This seems kind of confusing.  I'm with Tim, and think this would be
better solved with constraints.  I suppose you could declare Spacers of
height=100% and whatever width you wanted, and position them with
constraints.

 

Tracy 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tim Hoff
Sent: Friday, October 17, 2008 12:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: how to add internal padding in canvas?

 


Another alternative, if you have to use a Canvas and don't want to
subclass, is to use constraints (top, bottom, left, right) on the
children.

-TH

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

 Hi,Mike

 Please let me know this in detail.

 I can extends Canvas and create a new class (like samrtcavas).

 I confuse how to use the class in mxml and how to set left/right
paddings

 Thanks for your help

 Mark



 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Michael Schmalle
 teoti.graphix@ wrote:
 
  A hack that can be done if you really want Canvas is;
  Create a subclass of Canvas and override the usePadding property.
 
  override mx_internal get usePadding():Boolean
  {
  return true;
  }
 
  This will turn the padding back on when the
  layout calculates viewMetricsAndPadding.
 
  Mike
 


 



RE: [flexcoders] Refreshing graphics in a tree

2008-10-17 Thread Tracy Spratt
How are you updateing the dataProvider?  If you use the correct API, the
changes should reflect automatically.  If you are using lower level
assignments, then you might need to call itemUpdated for collections.

 

What is your dataprovider?

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ben gomez farrell
Sent: Friday, October 17, 2008 12:40 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Refreshing graphics in a tree

 

Hey, I have a tree with a itemRenderer to have a clickable checkbox in 
it. I need to set the checkbox state sometimes through code. 
Everything works great, except the graphics of the checkbox don't update

when it's set through code (mousing over the node will refresh the
graphics)
Is there a way to refresh the graphics of all the nodes through some 
method of the tree? I CAN open and close the nodes to refresh the 
graphics, but it seems really silly, and I have to track whats open and 
closed and make sure it gets back to the same state again.

Thanks!
ben

 



RE: [flexcoders] How to display message in empty Tree component

2008-10-17 Thread Tracy Spratt
I'd use a ViewStack.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Carter
Sent: Friday, October 17, 2008 6:38 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to display message in empty Tree component

 


I'm using a Tree component with a dataProvider set using an XML object.
Also
showRoot=false.

If I set using a childless XML object then one item is shown in the
tree.
That's a bit weird but it sort of allows me a way to display my message
(using labelFunc) to No items. But then I have to be careful with all
my
event handlers because this item is not really a real item for my
purposes.

However, if I use an XML with, say, one child, then that child is
displayed.
If I then remove that child, then nothing is displayed (and so I see no
way
to display the message).

What is the best way to display a message (like No items) in the Tree
component should the dataprovider be empty?
-- 
View this message in context:
http://www.nabble.com/How-to-display-message-in-empty-Tree-component-tp2
0030878p20030878.html
http://www.nabble.com/How-to-display-message-in-empty-Tree-component-tp
20030878p20030878.html 
Sent from the FlexCoders mailing list archive at Nabble.com.

 



[flexcoders] Re: Reusing HTTPService

2008-10-17 Thread lagos_tout
I like!  This line says it all:

 service.send().addResponder(new MyIResponder(resultB, faultB));

Thanks much.  I think this is the solution.  

It meets my requirements: no long conditionals; one-to-one matching of 
service calls to fault/result handlers; reuse of the same service 
object; and, if i create a separate class (implemementing IResponder 
and containing it's own fault and result handlers, rather than passing 
it in as you've done) for each type of service call, i think i get to 
live another day by the OO mantra closed to modification, open to 
extension.

Weird though how Flex requires one to add the responder after the call 
is already made, don't you think?  One would think the responder 
should be in place before the call to service.send().

Thanks again!

LT


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

 
 How about something like this:
 
 (note: I've not tried it, just slapped it straight into the email)
 
 public class MyClassThatInvokesHTTPServices {
 
 //inner helper class.
 class MyIResponder implements IResponder{
public var f:Function;
public var r:Function;
 
public MyIResponder(r:Function, f:Function){
  this.r = r;
  this.f = f;
}
 
public function fault(info:Object):void {
f.call(info);
}
 
public function result(result:Object):void {
r.call(result);
}
 }
 
 //Your handlers for service calls.
 protected function resultA(result:Object){ ... }
 protected function faultA(info:Object){...}
 protected function resultB(result:Object){ ... }
 protected function faultB(info:Object){...}
 
 var service:HTTPService ...//assume exists, reused for various 
calls.
 
   //send for service A.
   funciton sendA(args:Object){
 service.url = ../A.html;
 service.send(args).addResponder(new MyIResponder(resultA, 
faultA));
   }
 
   //send for service B.
   function sendB(){
 service.url = ../B.html;
 service.send().addResponder(new MyIResponder(resultB, faultB));
   }
 
 
 }
 
 [snip]
 
  --- In flexcoders@yahoogroups.com, lagos_tout lagos.tout@ 
  wrote:
  Hi,
 
  I'm re-using an instance of HTTPService, changing the request 
  arguments to get different responses from the server.  But I 
  found 
  that if, for instance, I made 3 calls this way with the 
  HTTPService, 
  each of the 3 result handlers registered for each call is 
  executed 
  every time a result returned.  
 
  I solved this by storing a reference to the unique AsyncToken 
  returned 
  by each service call and matching it to the AsyncToken 
  contained 
  in 
  each ResultEvent's token property in order to determine 
  which 
  result 
  handler to execute. 
 
  I'm not terribly happy with this setup.  It seems messy.  I'd 
  appreciate any suggestions on how I can reuse an HTTPService 
  instance 
  without ending up with long switch statements with countless 
  if 
  thisAsyncToken then do thisHandler, else if thatAsyncToken 
  then 
  do 
  thatHandler... and so on.
 
  Thanks much.
 
  LT
 
  
  
  
 




Re: [flexcoders] Refreshing graphics in a tree

2008-10-17 Thread ben gomez farrell
My data is an ArrayCollection is set via mytree.dataProvider =  
myArrayCollection;
I have a list as well, and when I do mylist.dataProvider.refresh(), the 
checkboxes on those update just fine.
Unfortunately doing mytree.dataProvider.refresh() doesn't work - and 
only mousing over will update the graphics of the item.
I'll look into itemUpdated though, and see how I can use it, thanks!
ben

Tracy Spratt wrote:

 How are you updateing the dataProvider?  If you use the correct API, 
 the changes should reflect automatically.  If you are using lower 
 level assignments, then you might need to call itemUpdated for 
 collections.

  

 What is your dataprovider?

  

 Tracy

  

 

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
 *On Behalf Of *ben gomez farrell
 *Sent:* Friday, October 17, 2008 12:40 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Refreshing graphics in a tree

  

 Hey, I have a tree with a itemRenderer to have a clickable checkbox in
 it. I need to set the checkbox state sometimes through code.
 Everything works great, except the graphics of the checkbox don't update
 when it's set through code (mousing over the node will refresh the 
 graphics)
 Is there a way to refresh the graphics of all the nodes through some
 method of the tree? I CAN open and close the nodes to refresh the
 graphics, but it seems really silly, and I have to track whats open and
 closed and make sure it gets back to the same state again.

 Thanks!
 ben

  


Re: [flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Paul Andrews
You can always nest the canvas inside another container to get the margin..
  - Original Message - 
  From: Tracy Spratt 
  To: flexcoders@yahoogroups.com 
  Sent: Friday, October 17, 2008 6:36 PM
  Subject: RE: [flexcoders] Re: how to add internal padding in canvas?


  Hold on a minute.  Canvas uses absolute positioning.  So padding would only 
affect percentage resizing?  And 0,0 would still be top left corner, regardless 
of the padding?

   

  This seems kind of confusing.  I'm with Tim, and think this would be better 
solved with constraints.  I suppose you could declare Spacers of height=100% 
and whatever width you wanted, and position them with constraints.

   

  Tracy 

   


--

  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tim 
Hoff
  Sent: Friday, October 17, 2008 12:01 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: how to add internal padding in canvas?

   


  Another alternative, if you have to use a Canvas and don't want to
  subclass, is to use constraints (top, bottom, left, right) on the
  children.

  -TH

  --- In flexcoders@yahoogroups.com, markflex2007 [EMAIL PROTECTED]
  wrote:
  
   Hi,Mike
  
   Please let me know this in detail.
  
   I can extends Canvas and create a new class (like samrtcavas).
  
   I confuse how to use the class in mxml and how to set left/right
  paddings
  
   Thanks for your help
  
   Mark
  
  
  
   --- In flexcoders@yahoogroups.com, Michael Schmalle
   teoti.graphix@ wrote:
   
A hack that can be done if you really want Canvas is;
Create a subclass of Canvas and override the usePadding property.
   
override mx_internal get usePadding():Boolean
{
return true;
}
   
This will turn the padding back on when the
layout calculates viewMetricsAndPadding.
   
Mike
   
  

   

Re: [flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Michael Schmalle
Tracy,
Container::getScrollableRect():Rectangle

uses usePadding,

Dumb answer on my part. I had to subclass canvas where I actually wanted the
padding to count in the scrollRect.

Sorry for the noise, I'm thinking to much these days. I agree, from a design
perspective there is no need to do what I said.

But for the sake of an explanation, usePadding has to do with the
contentPane and how it gets shifted when there is scrollable content, so
overriding that would give you padding even though your component is at 0,0
in the contentPane.

Mike

On Fri, Oct 17, 2008 at 1:36 PM, Tracy Spratt [EMAIL PROTECTED] wrote:

Hold on a minute.  Canvas uses absolute positioning.  So padding
 would only affect percentage resizing?  And 0,0 would still be top left
 corner, regardless of the padding?



 This seems kind of confusing.  I'm with Tim, and think this would be better
 solved with constraints.  I suppose you could declare Spacers of
 height=100% and whatever width you wanted, and position them with
 constraints.



 Tracy


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Tim Hoff
 *Sent:* Friday, October 17, 2008 12:01 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Re: how to add internal padding in canvas?




 Another alternative, if you have to use a Canvas and don't want to
 subclass, is to use constraints (top, bottom, left, right) on the
 children.

 -TH

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 markflex2007 [EMAIL PROTECTED]
 wrote:
 
  Hi,Mike
 
  Please let me know this in detail.
 
  I can extends Canvas and create a new class (like samrtcavas).
 
  I confuse how to use the class in mxml and how to set left/right
 paddings
 
  Thanks for your help
 
  Mark
 
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Michael Schmalle
  teoti.graphix@ wrote:
  
   A hack that can be done if you really want Canvas is;
   Create a subclass of Canvas and override the usePadding property.
  
   override mx_internal get usePadding():Boolean
   {
   return true;
   }
  
   This will turn the padding back on when the
   layout calculates viewMetricsAndPadding.
  
   Mike
  
 

  




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

Teoti Graphix Blog
http://www.blog.teotigraphix.com

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


Re: [flexcoders] web compiler

2008-10-17 Thread Paul Andrews
If there isn't a mechanism for caching the compilation result (user requests 
mxml, but actually gets html/swf), performance in a production environment 
would be appaling. That wouldn't matter for development.
  - Original Message - 
  From: Michael Schmalle 
  To: flexcoders@yahoogroups.com 
  Sent: Friday, October 17, 2008 5:57 PM
  Subject: Re: [flexcoders] web compiler


  Matt,


   They're only meant for dev-time, not production, 


  What do you mean by that? I thought you could use them to compile are you 
saying they are buggy or not completely implemented?


  Mike


  On Fri, Oct 17, 2008 at 12:26 PM, Matt Chotin [EMAIL PROTECTED] wrote:

We have a web compiler available for Apache, IIS, and J2EE. They're only 
meant for dev-time, not production, but I'd imagine that's what's being used. 
You need to make sure that they're set up with the same config as Flex Builder.

Matt



On 10/17/08 4:07 AM, Tom Chiverton [EMAIL PROTECTED] wrote:

On Friday 17 Oct 2008, jitendra jain wrote:
 I want to do some load testing and that's why iam using .mxml files.

But you'll only do the compile once for each release, not once for each
request... it can't be as important as the calls that application actually
makes.

--
Tom Chiverton
Helping to paradigmatically morph B2C fourth-generation methodologies



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of 
members is available for inspection at the registered office. Any reference to 
a partner in relation to Halliwells LLP means a member of Halliwells LLP. 
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

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

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



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links






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

  Teoti Graphix Blog
  http://www.blog.teotigraphix.com

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

   

RE: [flexcoders] Refreshing graphics in a tree

2008-10-17 Thread Tracy Spratt
So how are you updating the dataProvider items with the checkbox state? 

 

Are you using the ArrayCollection API?  If so, then the UI will update
automatically.

 

Note: refresh() applies a sort.  It does not generically refesh the
UI.  Also, if you use the API, it should not be necessary to do anything
else for the list either.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ben gomez farrell
Sent: Friday, October 17, 2008 1:36 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Refreshing graphics in a tree

 

My data is an ArrayCollection is set via mytree.dataProvider = 
myArrayCollection;
I have a list as well, and when I do mylist.dataProvider.refresh(), the 
checkboxes on those update just fine.
Unfortunately doing mytree.dataProvider.refresh() doesn't work - and 
only mousing over will update the graphics of the item.
I'll look into itemUpdated though, and see how I can use it, thanks!
ben

Tracy Spratt wrote:

 How are you updateing the dataProvider? If you use the correct API, 
 the changes should reflect automatically. If you are using lower 
 level assignments, then you might need to call itemUpdated for 
 collections.

 

 What is your dataprovider?

 

 Tracy

 

 --

 *From:* flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] 
 *On Behalf Of *ben gomez farrell
 *Sent:* Friday, October 17, 2008 12:40 PM
 *To:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

 *Subject:* [flexcoders] Refreshing graphics in a tree

 

 Hey, I have a tree with a itemRenderer to have a clickable checkbox in
 it. I need to set the checkbox state sometimes through code.
 Everything works great, except the graphics of the checkbox don't
update
 when it's set through code (mousing over the node will refresh the 
 graphics)
 Is there a way to refresh the graphics of all the nodes through some
 method of the tree? I CAN open and close the nodes to refresh the
 graphics, but it seems really silly, and I have to track whats open
and
 closed and make sure it gets back to the same state again.

 Thanks!
 ben

 

 



RE: [flexcoders] Custom event - Create, dispatch, and listen to.

2008-10-17 Thread Gordon Smith
 You also may want to avveride the clone method in the custom event class

You should always override the clone() method in a custom event class that adds 
new properties. Otherwise, re-dispatching such an event (calling 
dispatchEvent(event) inside a handler for that event) won't work properly.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of claudiu 
ursica
Sent: Friday, October 17, 2008 12:45 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Custom event - Create, dispatch, and listen to.

You also may want to avveride the clone method in the custom event class:
/**
 *  @private
 */
override public function clone():Event
{
return new RemoteClick(type, bubbles, cancelable);
}
   - just omit the arguments if you are not using any

Cheers,
Claudiu
- Original Message 
From: shaun [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, October 17, 2008 6:23:59 AM
Subject: Re: [flexcoders] Custom event - Create, dispatch, and listen to.

Hi,

Class names should begin with an Uppercase letter. RemoteClick not
remoteClick.
The type String can be lowercase if you want..

Something like the following..

package modulecode
{
import flash.events. Event;

public static const remoteClick: String=remoteCl ick;

public class RemoteClick extends Event
{
public function RemoteClick( type:String= remoteClick ,
bubbles:Boolean= false,

cancelable:Boolean= false)
{
super(type, bubbles, cancelable);
}
}
}

//Some component that dispatches and handles RemoteClick events
MyCanvas

script
public function handleButtonClick( ):void{
var eventObj:RemoteClic k = new RemoteClick( ); //no bubble
dispatchEvent( eventObj) ;
}

public function handleRemoteClickEv ent(e:RemoteClic k):void{
trace(handleRemote Click: +e);
}

public function init():void{
addEventListener( remoteClick , handleRemoteClickEv ent);
}
/script

mx:FormItem label= textAlign=right 
mx:Button label=Run click=handleButton Click() id=run/
/mx:FormItem

/MyCanvas

Or

//Some component that dispatches RemoteClick events. NOTE : the name of
the event and the type.
MyCanvas2

mx:Metadata
[Event(name= remoteClick , type=modulecode. RemoteClick )]
/mx:Metadata

script
public function handleButtonClick( ):void{
var eventObj:RemoteClic k = new RemoteClick( ); //no bubble
dispatchEvent( eventObj) ;
}
/script

mx:FormItem label= textAlign=right 
mx:Button label=Run click=handleButton Click() id=run/
/mx:FormItem

/MyCanvas2

Use MyCanvas2 in another component..

ACanvas
script
function handleRemoteClick( e:RemoteClick) :void{ ... }
/script

MyCanvas2 remoteClick= handleRemoteCli ck(event)  ... /
/ACanvas

HTH.
- shaun

__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



[flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread markflex2007
Please give me a simple demo,how to do  nest the canvas inside
another container to get the margin?

Thanks for help

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

 You can always nest the canvas inside another container to get the
margin..
 



Re: [flexcoders] web compiler

2008-10-17 Thread Michael Schmalle
Ok,
I had this in my plans to investigate in a couple months for my server.

So is there something that caches swf on the first run, then only recompiles
when the mxml has changed?

Where did I hear that? This is in my head from a year or two ago.

Mike

On Fri, Oct 17, 2008 at 1:46 PM, Paul Andrews [EMAIL PROTECTED] wrote:

If there isn't a mechanism for caching the compilation result (user
 requests mxml, but actually gets html/swf), performance in a production
 environment would be appaling. That wouldn't matter for development.

 - Original Message -
 *From:* Michael Schmalle [EMAIL PROTECTED]
 *To:* flexcoders@yahoogroups.com
 *Sent:* Friday, October 17, 2008 5:57 PM
 *Subject:* Re: [flexcoders] web compiler

 Matt,
  They're only meant for dev-time, not production,

 What do you mean by that? I thought you could use them to compile are you
 saying they are buggy or not completely implemented?

 Mike

 On Fri, Oct 17, 2008 at 12:26 PM, Matt Chotin [EMAIL PROTECTED] wrote:

   We have a web compiler available for Apache, IIS, and J2EE. They're
 only meant for dev-time, not production, but I'd imagine that's what's being
 used. You need to make sure that they're set up with the same config as Flex
 Builder.

 Matt


 On 10/17/08 4:07 AM, Tom Chiverton [EMAIL 
 PROTECTED]tom.chiverton%40halliwells.com
 wrote:

 On Friday 17 Oct 2008, jitendra jain wrote:
  I want to do some load testing and that's why iam using .mxml files.

 But you'll only do the compile once for each release, not once for each
 request... it can't be as important as the calls that application actually
 makes.

 --
 Tom Chiverton
 Helping to paradigmatically morph B2C fourth-generation methodologies

 

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

 Halliwells LLP is a limited liability partnership registered in England
 and Wales under registered number OC307980 whose registered office address
 is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.
 A list of members is available for inspection at the registered office. Any
 reference to a partner in relation to Halliwells LLP means a member of
 Halliwells LLP. Regulated by The Solicitors Regulation Authority.

 CONFIDENTIALITY

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

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

 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location:
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links




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

 Teoti Graphix Blog
 http://www.blog.teotigraphix.com

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

  




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

Teoti Graphix Blog
http://www.blog.teotigraphix.com

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


Re: [flexcoders] Refreshing graphics in a tree

2008-10-17 Thread ben gomez farrell
I have an arraycollection called groupsdata
groupsdata.getItemAt(f).state = true/false

And then in my itemRenderer, I override like this:

override public function set data(value:Object):void {
super.data = value;
if ( !value ) { return; }
// remove check box from child nodes if present
if ( !value.toplevel  this.getChildByName(checkbox) ) { 
this.removeChild( this.getChildByName(checkbox) ); }
}

override protected function updateDisplayList(unscaledWidth:Number, 
unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
if(super.data)
{
if (super.icon != null)
{
checkBox.x = super.icon.x;
checkBox.y = 12;
super.icon.x = checkBox.x + checkBox.width + 17;
super.label.x = super.icon.x + super.icon.width + 3;
checkBox.selected = super.data.state;
}
else
{
checkBox.x = super.label.x;
checkBox.y = 12;
super.label.x = checkBox.x + checkBox.width + 17;
checkBox.selected = super.data.state;
}
}
}

So it looks like the data object is getting set correctly, but 
updateDisplayList isn't getting called when the data is refreshed - but 
it does get called on mouse over.
thanks again for the help!
ben

Tracy Spratt wrote:

 So how are you updating the dataProvider items with the checkbox state?

 Are you using the ArrayCollection API? If so, then the UI will update 
 automatically.

 Note: refresh() applies a sort. It does not generically “refesh” the 
 UI. Also, if you use the API, it should not be necessary to do 
 anything else for the list either.

 Tracy

 

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
 *On Behalf Of *ben gomez farrell
 *Sent:* Friday, October 17, 2008 1:36 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Refreshing graphics in a tree

 My data is an ArrayCollection is set via mytree.dataProvider =
 myArrayCollection;
 I have a list as well, and when I do mylist.dataProvider.refresh(), the
 checkboxes on those update just fine.
 Unfortunately doing mytree.dataProvider.refresh() doesn't work - and
 only mousing over will update the graphics of the item.
 I'll look into itemUpdated though, and see how I can use it, thanks!
 ben

 Tracy Spratt wrote:
 
  How are you updateing the dataProvider? If you use the correct API,
  the changes should reflect automatically. If you are using lower
  level assignments, then you might need to call itemUpdated for
  collections.
 
 
 
  What is your dataprovider?
 
 
 
  Tracy
 
 
 
  --
 
  *From:* flexcoders@yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com]
  *On Behalf Of *ben gomez farrell
  *Sent:* Friday, October 17, 2008 12:40 PM
  *To:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  *Subject:* [flexcoders] Refreshing graphics in a tree
 
 
 
  Hey, I have a tree with a itemRenderer to have a clickable checkbox in
  it. I need to set the checkbox state sometimes through code.
  Everything works great, except the graphics of the checkbox don't update
  when it's set through code (mousing over the node will refresh the
  graphics)
  Is there a way to refresh the graphics of all the nodes through some
  method of the tree? I CAN open and close the nodes to refresh the
  graphics, but it seems really silly, and I have to track whats open and
  closed and make sure it gets back to the same state again.
 
  Thanks!
  ben
 
 

  



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

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

* Your email settings:
Individual Email | Traditional

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

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

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

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



Re: [flexcoders] web compiler

2008-10-17 Thread Matt Chotin
The J2EE web compiler does this, the Apache/IIS ones don't.

In general we don't think that the web compilers get enough use to warrant our 
full-blown investment.  We're going to make sure that the source is available 
(should be in a few weeks for Apache/IIS and J2EE is already in Subversion), 
and we will do some amount of upgrading of the J2EE one.  But we probably won't 
expand the feature-set, and we will never consider them fully tested or 
performant enough to recommend for a production system.

Matt


On 10/17/08 11:00 AM, Michael Schmalle [EMAIL PROTECTED] wrote:




Ok,

I had this in my plans to investigate in a couple months for my server.

So is there something that caches swf on the first run, then only recompiles 
when the mxml has changed?

Where did I hear that? This is in my head from a year or two ago.

Mike

On Fri, Oct 17, 2008 at 1:46 PM, Paul Andrews [EMAIL PROTECTED] wrote:



If there isn't a mechanism for caching the compilation result (user requests 
mxml, but actually gets html/swf), performance in a production environment 
would be appaling. That wouldn't matter for development.

- Original Message -

From:  Michael  Schmalle mailto:[EMAIL PROTECTED]

To: flexcoders@yahoogroups.com

Sent: Friday, October 17, 2008 5:57  PM

Subject: Re: [flexcoders] web  compiler



Matt,


 They're only meant for dev-time, not  production,



What do  you mean by that? I thought you could use them to compile are you 
saying they  are buggy or not completely implemented?



Mike


On Fri, Oct 17, 2008 at 12:26 PM, Matt Chotin [EMAIL PROTECTED] wrote:







We have a web compiler available for Apache, IIS, and J2EE. They're only  meant 
for dev-time, not production, but I'd imagine that's what's being  used. You 
need to make sure that they're set up with the same config as Flex  Builder.

Matt



On 10/17/08 4:07 AM, Tom Chiverton [EMAIL PROTECTED] 
mailto:tom.chiverton%40halliwells.com  wrote:

On Friday  17 Oct 2008, jitendra jain wrote:
 I want to do some load testing and  that's why iam using .mxml files.

But you'll only do the compile once  for each release, not once for each
request... it can't be as important  as the calls that application actually
makes.

--
Tom  Chiverton
Helping to paradigmatically morph B2C fourth-generation  methodologies



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

Halliwells LLP is  a limited liability partnership registered in England and 
Wales under  registered number OC307980 whose registered office address is at 
Halliwells  LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list 
of members  is available for inspection at the registered office. Any reference 
to a  partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation  Authority.

CONFIDENTIALITY

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

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



--
Flexcoders  Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative  FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search  Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!  Groups Links






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

Teoti  Graphix Blog
http://www.blog.teotigraphix.com

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







Re: [flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Paul Andrews
- Original Message - 
From: markflex2007 [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, October 17, 2008 6:51 PM
Subject: [flexcoders] Re: how to add internal padding in canvas?


 Please give me a simple demo,how to do  nest the canvas inside
 another container to get the margin?

Something like this perhaps..

I'm assuming that the reason for the margin is to leave a gap around the 
edges. Lets say you want a 5 pixel gap.

mx:Canvas id=outerCanvas
mx:Canvas id=innerCanvas width={outerCanvas-10} 
height={outerCanvas-10} x=5 y=5 

add other stuff here

/mx:Canvas
/mx:Canvas

Any good?

Maybe I've got the wrong idea about why you want the margin.

Paul



 Thanks for help

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

 You can always nest the canvas inside another container to get the
 margin..



 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups 
 Links



 



Re: [flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Paul Andrews
- Original Message - 
From: Paul Andrews [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, October 17, 2008 7:22 PM
Subject: Re: [flexcoders] Re: how to add internal padding in canvas?


 - Original Message - 
 From: markflex2007 [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Friday, October 17, 2008 6:51 PM
 Subject: [flexcoders] Re: how to add internal padding in canvas?


 Please give me a simple demo,how to do  nest the canvas inside
 another container to get the margin?

 Something like this perhaps..

 I'm assuming that the reason for the margin is to leave a gap around the
 edges. Lets say you want a 5 pixel gap.

 mx:Canvas id=outerCanvas
 mx:Canvas id=innerCanvas width={outerCanvas-10}

Oops..  mx:Canvas id=innerCanvas width={outerCanvas.width-10}

 height={outerCanvas-10} x=5 y=5 

height={outerCanvas.height-10} x=5 y=5 


 add other stuff here

 /mx:Canvas
 /mx:Canvas

 Any good?

 Maybe I've got the wrong idea about why you want the margin.

 Paul



 Thanks for help

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

 You can always nest the canvas inside another container to get the
 margin..



 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location:
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links






 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups 
 Links



 



[flexcoders] Force compile of Modules

2008-10-17 Thread Greg Hess
Hi Folks,

I am having problems building my project that is divided into separate
modules. Compilation errors are not always reported. My main
application is just a module loader and I think that the compiler does
not 'always' detect changes in files/classes referenced in modules.
What happens is that my compile completes without errors but some(ones
with errors) of my modules are not compiled to a swf. I only detect
this when I run the application and see some of my modules are blank
or even worse the test runs with an old module and I am not even
executing latest code usualy discovered when a break point is never
reached... I then have to add an empty space in each of my module main
files to get them to recompile and get the error. I am using
FlexBuilder-Eclipse to build my projects.

This is obvously bothersome especially that last night I broke the
nightly build and had to buy donuts today ;-(. Last night I built,
deployed, tested and committed. If I had of done a clean build I would
have caught it...

Is there anyway to have fix with with compilier/module setting?

Any help much appreciated.

Greg


RE: [flexcoders] Refreshing graphics in a tree

2008-10-17 Thread Tracy Spratt
Yes, this:
groupsdata.getItemAt(f).state = true/false
is a low-level assignment directly to the dataprovider item and does not
dispatch the events necessary for the update of the UI.

You can change it to use setItemAt() or you can call itemUpdated(item)
after the assignment.

I am sure both of these use the invalidation mechanism and optimize the
rendering.

I am not sure about refresh(), and that is not the correct usage anyway.

Tracy

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ben gomez farrell
Sent: Friday, October 17, 2008 2:01 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Refreshing graphics in a tree

I have an arraycollection called groupsdata
groupsdata.getItemAt(f).state = true/false

And then in my itemRenderer, I override like this:

override public function set data(value:Object):void {
super.data = value;
if ( !value ) { return; }
// remove check box from child nodes if present
if ( !value.toplevel  this.getChildByName(checkbox) ) { 
this.removeChild( this.getChildByName(checkbox) ); }
}

override protected function updateDisplayList(unscaledWidth:Number, 
unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
if(super.data)
{
if (super.icon != null)
{
checkBox.x = super.icon.x;
checkBox.y = 12;
super.icon.x = checkBox.x + checkBox.width + 17;
super.label.x = super.icon.x + super.icon.width + 3;
checkBox.selected = super.data.state;
}
else
{
checkBox.x = super.label.x;
checkBox.y = 12;
super.label.x = checkBox.x + checkBox.width + 17;
checkBox.selected = super.data.state;
}
}
}

So it looks like the data object is getting set correctly, but 
updateDisplayList isn't getting called when the data is refreshed - but 
it does get called on mouse over.
thanks again for the help!
ben

Tracy Spratt wrote:

 So how are you updating the dataProvider items with the checkbox
state?

 Are you using the ArrayCollection API? If so, then the UI will update 
 automatically.

 Note: refresh() applies a sort. It does not generically refesh the 
 UI. Also, if you use the API, it should not be necessary to do 
 anything else for the list either.

 Tracy




 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]

 *On Behalf Of *ben gomez farrell
 *Sent:* Friday, October 17, 2008 1:36 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Refreshing graphics in a tree

 My data is an ArrayCollection is set via mytree.dataProvider =
 myArrayCollection;
 I have a list as well, and when I do mylist.dataProvider.refresh(),
the
 checkboxes on those update just fine.
 Unfortunately doing mytree.dataProvider.refresh() doesn't work - and
 only mousing over will update the graphics of the item.
 I'll look into itemUpdated though, and see how I can use it, thanks!
 ben

 Tracy Spratt wrote:
 
  How are you updateing the dataProvider? If you use the correct API,
  the changes should reflect automatically. If you are using lower
  level assignments, then you might need to call itemUpdated for
  collections.
 
 
 
  What is your dataprovider?
 
 
 
  Tracy
 
 
 
  --
 
  *From:* flexcoders@yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com]
  *On Behalf Of *ben gomez farrell
  *Sent:* Friday, October 17, 2008 12:40 PM
  *To:* flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
  *Subject:* [flexcoders] Refreshing graphics in a tree
 
 
 
  Hey, I have a tree with a itemRenderer to have a clickable checkbox
in
  it. I need to set the checkbox state sometimes through code.
  Everything works great, except the graphics of the checkbox don't
update
  when it's set through code (mousing over the node will refresh the
  graphics)
  Is there a way to refresh the graphics of all the nodes through some
  method of the tree? I CAN open and close the nodes to refresh the
  graphics, but it seems really silly, and I have to track whats open
and
  closed and make sure it gets back to the same state again.
 
  Thanks!
  ben
 
 

  



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location:
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-
1e62079f6847
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
Links







Re: [flexcoders] Refreshing graphics in a tree

2008-10-17 Thread ben gomez farrell
Thanks!  You rock.  I'd never used setItemAt on an ArrayCollection 
because its more verbose to pull the copy the item out and set the 
property you need, then pass it back in - so it never occured to me that 
you had to do that.
Again, thanks, and i'll put the same fix on my list component.
ben

Tracy Spratt wrote:

 Yes, this:
 groupsdata.getItemAt(f).state = true/false
 is a low-level assignment directly to the dataprovider item and does not
 dispatch the events necessary for the update of the UI.

 You can change it to use setItemAt() or you can call itemUpdated(item)
 after the assignment.

 I am sure both of these use the invalidation mechanism and optimize the
 rendering.

 I am not sure about refresh(), and that is not the correct usage anyway.

 Tracy

 -Original Message-
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com] On
 Behalf Of ben gomez farrell
 Sent: Friday, October 17, 2008 2:01 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 Subject: Re: [flexcoders] Refreshing graphics in a tree

 I have an arraycollection called groupsdata
 groupsdata.getItemAt(f).state = true/false

 And then in my itemRenderer, I override like this:

 override public function set data(value:Object):void {
 super.data = value;
 if ( !value ) { return; }
 // remove check box from child nodes if present
 if ( !value.toplevel  this.getChildByName(checkbox) ) {
 this.removeChild( this.getChildByName(checkbox) ); }
 }

 override protected function updateDisplayList(unscaledWidth:Number,
 unscaledHeight:Number):void
 {
 super.updateDisplayList(unscaledWidth, unscaledHeight);
 if(super.data)
 {
 if (super.icon != null)
 {
 checkBox.x = super.icon.x;
 checkBox.y = 12;
 super.icon.x = checkBox.x + checkBox.width + 17;
 super.label.x = super.icon.x + super.icon.width + 3;
 checkBox.selected = super.data.state;
 }
 else
 {
 checkBox.x = super.label.x;
 checkBox.y = 12;
 super.label.x = checkBox.x + checkBox.width + 17;
 checkBox.selected = super.data.state;
 }
 }
 }

 So it looks like the data object is getting set correctly, but
 updateDisplayList isn't getting called when the data is refreshed - but
 it does get called on mouse over.
 thanks again for the help!
 ben

 Tracy Spratt wrote:
 
  So how are you updating the dataProvider items with the checkbox
 state?
 
  Are you using the ArrayCollection API? If so, then the UI will update
  automatically.
 
  Note: refresh() applies a sort. It does not generically refesh the
  UI. Also, if you use the API, it should not be necessary to do
  anything else for the list either.
 
  Tracy
 
 
 --
 
  *From:* flexcoders@yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com]

  *On Behalf Of *ben gomez farrell
  *Sent:* Friday, October 17, 2008 1:36 PM
  *To:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  *Subject:* Re: [flexcoders] Refreshing graphics in a tree
 
  My data is an ArrayCollection is set via mytree.dataProvider =
  myArrayCollection;
  I have a list as well, and when I do mylist.dataProvider.refresh(),
 the
  checkboxes on those update just fine.
  Unfortunately doing mytree.dataProvider.refresh() doesn't work - and
  only mousing over will update the graphics of the item.
  I'll look into itemUpdated though, and see how I can use it, thanks!
  ben
 
  Tracy Spratt wrote:
  
   How are you updateing the dataProvider? If you use the correct API,
   the changes should reflect automatically. If you are using lower
   level assignments, then you might need to call itemUpdated for
   collections.
  
  
  
   What is your dataprovider?
  
  
  
   Tracy
  
  
  
   --
  
   *From:* flexcoders@yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com]
   *On Behalf Of *ben gomez farrell
   *Sent:* Friday, October 17, 2008 12:40 PM
   *To:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
   *Subject:* [flexcoders] Refreshing graphics in a tree
  
  
  
   Hey, I have a tree with a itemRenderer to have a clickable checkbox
 in
   it. I need to set the checkbox state sometimes through code.
   Everything works great, except the graphics of the checkbox don't
 update
   when it's set through code (mousing over the node will refresh the
   graphics)
   Is there a way to refresh the graphics of all the nodes through some
   method of the tree? I CAN open and close the nodes to refresh the
   graphics, but it seems really silly, and I have to track whats open
 and
   closed and make sure it gets back to the same state again.
  
   Thanks!
   ben
  
  
 
 

 

RE: [flexcoders] Re: Reusing HTTPService

2008-10-17 Thread Jeff Vroom
I do like this approach - that's what I do when I code using AsyncTokens.

In the SDK's trunk depot, we have implemented a different way of using the 
AsyncTokens which makes it easier to add per-call event listeners and result 
objects particularly from MXML.   It is in the class mx.rpc.CallResponder.  
Here's a sample of how you'd use it:

mx:CallResponder id=myResponder result=optionalEventHandler(event) 
fault=optionalFaultHandler(event)/
mx:Button click=myResponder.token = myService.getAllEmployees()/
mx:DataGrid dataProvider={myResponder.lastResult}/

Each CallResponder monitors a single AsyncToken at a time and propagates its 
result and fault events to listeners on the call responder.  It also stores the 
lastResult property.  This allows you to cache the previous result while the 
next call is in progress.   Any feedback folks have on this approach will be 
appreciated.

I'll admit that modifying the token after the call was made is 
counter-intuitive.  It works because the AS VM cannot deliver any events on 
that token until after the current executing code path has completed.   We did 
consider passing in the token as an argument to the async calls but didn't 
think it really made things easier to understand and adds a risk that you'll 
use the same token for two simultaneous calls.

Jeff



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
lagos_tout
Sent: Friday, October 17, 2008 10:33 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Reusing HTTPService


I like! This line says it all:

 service.send().addResponder(new MyIResponder(resultB, faultB));

Thanks much. I think this is the solution.

It meets my requirements: no long conditionals; one-to-one matching of
service calls to fault/result handlers; reuse of the same service
object; and, if i create a separate class (implemementing IResponder
and containing it's own fault and result handlers, rather than passing
it in as you've done) for each type of service call, i think i get to
live another day by the OO mantra closed to modification, open to
extension.

Weird though how Flex requires one to add the responder after the call
is already made, don't you think? One would think the responder
should be in place before the call to service.send().

Thanks again!

LT

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


 How about something like this:

 (note: I've not tried it, just slapped it straight into the email)

 public class MyClassThatInvokesHTTPServices {

 //inner helper class.
 class MyIResponder implements IResponder{
 public var f:Function;
 public var r:Function;

 public MyIResponder(r:Function, f:Function){
 this.r = r;
 this.f = f;
 }

 public function fault(info:Object):void {
 f.call(info);
 }

 public function result(result:Object):void {
 r.call(result);
 }
 }

 //Your handlers for service calls.
 protected function resultA(result:Object){ ... }
 protected function faultA(info:Object){...}
 protected function resultB(result:Object){ ... }
 protected function faultB(info:Object){...}

 var service:HTTPService ...//assume exists, reused for various
calls.

 //send for service A.
 funciton sendA(args:Object){
 service.url = ../A.html;
 service.send(args).addResponder(new MyIResponder(resultA,
faultA));
 }

 //send for service B.
 function sendB(){
 service.url = ../B.html;
 service.send().addResponder(new MyIResponder(resultB, faultB));
 }


 }

 [snip]

  --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
  lagos_tout lagos.tout@
  wrote:
  Hi,
 
  I'm re-using an instance of HTTPService, changing the request
  arguments to get different responses from the server. But I
  found
  that if, for instance, I made 3 calls this way with the
  HTTPService,
  each of the 3 result handlers registered for each call is
  executed
  every time a result returned.
 
  I solved this by storing a reference to the unique AsyncToken
  returned
  by each service call and matching it to the AsyncToken
  contained
  in
  each ResultEvent's token property in order to determine
  which
  result
  handler to execute.
 
  I'm not terribly happy with this setup. It seems messy. I'd
  appreciate any suggestions on how I can reuse an HTTPService
  instance
  without ending up with long switch statements with countless
  if
  thisAsyncToken then do thisHandler, else if thatAsyncToken
  then
  do
  thatHandler... and so on.
 
  Thanks much.
 
  LT
 
 
 
 
 


inline: image001.jpginline: image002.jpg

[flexcoders] Re: LCDS 2.6 and Hibernate - Does it work?

2008-10-17 Thread headjoog
Thanks for the follow-up Jeff.


I couldn't even get the LCDS CRM sample to work.  I will try again
with the log settings you suggested.  If there's something suspicious
I'll post.


Joe



[flexcoders] Re: how to add internal padding in canvas?

2008-10-17 Thread Tim Hoff

Just preference, but I'd rather see:

mx:Canvas id=outer
 mx:Canvas id=inner top=10 bottom=10 left=10 right=10
  // my content
 /mx:Canvas
/mx:Canvas

-TH

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

 - Original Message -
 From: Paul Andrews [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Friday, October 17, 2008 7:22 PM
 Subject: Re: [flexcoders] Re: how to add internal padding in canvas?


  - Original Message -
  From: markflex2007 [EMAIL PROTECTED]
  To: flexcoders@yahoogroups.com
  Sent: Friday, October 17, 2008 6:51 PM
  Subject: [flexcoders] Re: how to add internal padding in canvas?
 
 
  Please give me a simple demo,how to do  nest the canvas inside
  another container to get the margin?
 
  Something like this perhaps..
 
  I'm assuming that the reason for the margin is to leave a gap around
the
  edges. Lets say you want a 5 pixel gap.
 
  mx:Canvas id=outerCanvas
  mx:Canvas id=innerCanvas width={outerCanvas-10}

 Oops.. mx:Canvas id=innerCanvas width={outerCanvas.width-10}

  height={outerCanvas-10} x=5 y=5 

 height={outerCanvas.height-10} x=5 y=5 

 
  add other stuff here
 
  /mx:Canvas
  /mx:Canvas
 
  Any good?
 
  Maybe I've got the wrong idea about why you want the margin.
 
  Paul
 
 
 
  Thanks for help
 
  Mark
  --- In flexcoders@yahoogroups.com, Paul Andrews paul@ wrote:
 
  You can always nest the canvas inside another container to get the
  margin..
 
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Alternative FAQ location:
 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-\
1e62079f6847
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!
Groups
  Links
 
 
 
 
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Alternative FAQ location:
 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-\
1e62079f6847
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!
Groups
  Links
 
 
 
 





  1   2   >