Re: [flexcoders] Re: Binding textinput width to datagrid column width?

2008-10-30 Thread Josh McDonald
Found a deferred bug. Fixed and submitted:

https://bugs.adobe.com/jira/browse/SDK-16885

-Josh

On Thu, Oct 30, 2008 at 3:14 PM, Josh McDonald [EMAIL PROTECTED] wrote:

 Hmm,  my bad... 12 minutes to create the failing mxml file, 4 or 5 minutes
 to fix DataGridColumn. If somebody wants to dig up / file a bug, I'll submit
 a patch.

 -Josh


 On Thu, Oct 30, 2008 at 2:46 PM, Josh McDonald [EMAIL PROTECTED] wrote:

 Hey, I need to build a failing mxml first.


 On Thu, Oct 30, 2008 at 2:34 PM, Alex Harui [EMAIL PROTECTED] wrote:

  I started my stopwatch.  Go for it.



 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Wednesday, October 29, 2008 8:07 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Re: Binding textinput width to datagrid
 column width?



 It sounds like a 20-minute fix to DG.

 On Thu, Oct 30, 2008 at 1:02 PM, Alex Harui [EMAIL PROTECTED] wrote:

 I think that's a known bug.  I would addEventListeners to the DG for
 updateComplete and columnResize and update the TI widths then.



 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Amy
 *Sent:* Wednesday, October 29, 2008 5:43 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Re: Binding textinput width to datagrid column
 width?



 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 biosmonkey [EMAIL PROTECTED]
 wrote:
 
  I must be doing something dumb, but I can't understand why this
 isn't
  working.
 
  I have a datagrid with say, 2 columns. Under the datagrid, I have
 two
  text input controls next to each other in an hbox.
 
  I want the text input controls to match the width of the datagrid
  columns directly above them. This means when the datagrid is drawn
 and
  the column widths determined, the textinput controls should resize
  themselves to match. This also should occur if the user resizes the
  columns manually.
 
  So, I assigned IDs to the datagridcolumn objects, and tried to bind
  the width of the text input controls to them.
 
  So first I tried
  mx:TextInput width={colName.width}

 Try something like mx:TextInput width=100%/




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

 Like the cut of my jib? Check out my Flex blog!

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
 :: http://flex.joshmcdonald.info/

  




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

 Like the cut of my jib? Check out my Flex blog!

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
 :: http://flex.joshmcdonald.info/




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

 Like the cut of my jib? Check out my Flex blog!

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
 :: http://flex.joshmcdonald.info/




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

Like the cut of my jib? Check out my Flex blog!

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]
:: http://flex.joshmcdonald.info/


Re: [flexcoders] Re: Binding textinput width to datagrid column width?

2008-10-30 Thread Maciek Sakrejda
Props for putting your money (err, time) where your mouth is, Josh.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

On Thu, 2008-10-30 at 15:14 +1000, Josh McDonald wrote:
 Hmm,  my bad... 12 minutes to create the failing mxml file, 4 or 5
 minutes to fix DataGridColumn. If somebody wants to dig up / file a
 bug, I'll submit a patch.
 
 -Josh
 
 
 
 On Thu, Oct 30, 2008 at 2:46 PM, Josh McDonald [EMAIL PROTECTED]
 wrote:
 Hey, I need to build a failing mxml first.
 
 
 
 On Thu, Oct 30, 2008 at 2:34 PM, Alex Harui [EMAIL PROTECTED]
 wrote:
 I started my stopwatch.  Go for it.
 
  
 
 From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On Behalf Of Josh
 McDonald
 Sent: Wednesday, October 29, 2008 8:07 PM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Re: Binding textinput width
 to datagrid column width?
 
 
  
 
 
 It sounds like a 20-minute fix to DG.
 
 On Thu, Oct 30, 2008 at 1:02 PM, Alex Harui
 [EMAIL PROTECTED] wrote:
 
 I think that's a known bug.  I would addEventListeners
 to the DG for updateComplete and columnResize and
 update the TI widths then.
 
  
 
 From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On Behalf Of Amy
 Sent: Wednesday, October 29, 2008 5:43 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Binding textinput width to
 datagrid column width?
 
 
  
 
 --- In flexcoders@yahoogroups.com, biosmonkey
 [EMAIL PROTECTED] 
 wrote:
 
  I must be doing something dumb, but I can't
 understand why this 
 isn't
  working.
  
  I have a datagrid with say, 2 columns. Under the
 datagrid, I have 
 two
  text input controls next to each other in an hbox.
  
  I want the text input controls to match the width of
 the datagrid
  columns directly above them. This means when the
 datagrid is drawn 
 and
  the column widths determined, the textinput controls
 should resize
  themselves to match. This also should occur if the
 user resizes the
  columns manually.
  
  So, I assigned IDs to the datagridcolumn objects,
 and tried to bind
  the width of the text input controls to them.
  
  So first I tried
  mx:TextInput width={colName.width}
 
 Try something like mx:TextInput width=100%/
 
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls.
 It tolls for thee.
 
 Like the cut of my jib? Check out my Flex blog!
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
 :: http://flex.joshmcdonald.info/
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls
 for thee.
 
 Like the cut of my jib? Check out my Flex blog!
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
 :: http://flex.joshmcdonald.info/
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
 Like the cut of my jib? Check out my Flex blog!
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
 :: http://flex.joshmcdonald.info/
 
 
 
  




[flexcoders] Re: States in UIMovieClip working properly?

2008-10-30 Thread florian.salihovic
What i can also add - forgot to post that one:

When i trace the text Property of the TextField instances, the content is not 
null, oder  - 
it is the text it should be. It's just not displayed.

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

 I have a strange problem: i have the following class:
 
 
 package fs.examples.components
 {
   import flash.events.Event;
   import flash.events.MouseEvent;
   import flash.text.TextField;
   
   import mx.events.StateChangeEvent;
   import mx.flash.UIMovieClip;
 
   public class StatefulBase extends UIMovieClip
   {
 
   private var _label:String;
   private var _labelTextField:TextField;
 
   [Bindable(labelChanged)]
   public function get label():String
   {
   return this._labelTextField.text;
   }
 
   public function set label(value:String):void
   {
   if (value == this._label)
   {
   return;
   }
   this._label = value;
   this._labelTextField.text = this._label;
   this.dispatchEvent(new Event(labelChanged));
   }
 
   public function StatefulBase()
   {
   super();
   this.initializeComponent();
   }
 
   private function eventListener(event:Event):void
   {
   switch(event.type)
   {
   case StateChangeEvent.CURRENT_STATE_CHANGE:
   this._labelTextField.text = this._label;
   break;
   case MouseEvent.MOUSE_OUT:
   this.currentState = out;
   break;
   case MouseEvent.MOUSE_OVER:
   this.currentState = over;
   break;
   }
   }
 
   protected function initializeComponent():void
   {
   if (this.hasOwnProperty(labelText))
   {
   if (this[labelText] is TextField)
   {
   this._labelTextField = 
 TextField(this[labelText]);
   }
   }
   
 this.addEventListener(StateChangeEvent.CURRENT_STATE_CHANGE, 
 eventListener);
   this.addEventListener(MouseEvent.MOUSE_OUT, 
 eventListener);
   this.addEventListener(MouseEvent.MOUSE_OVER, 
 eventListener);
   }
   }
 }
 
 
 This is the superclass of a symbol made in Flash. The symbol has 2 keyframes 
 and in 
each 
 is a textfield with the same instancename. When i initially set the text in 
 Flex, it is 
 displayed correctly. But after the first time the state changed, i am not 
 able to set the 
text 
 property of the TextField instances? Both instances exist... the cursor 
 changes... the 
states 
 change as well: visual feedback and correct traces (which i deleted before 
 posting the 
 code),
 
 - Why can't just set the text property, when the eventlistener was invoked 
 with a 
StateChangeEvent.CURRENT_STATE_CHANGE?
 
 Best regards and thanx in advance!






[flexcoders] Custom dataDescriptor and custom ICollectionView

2008-10-30 Thread franto
Hey all,

it's long time I've posted something here :) But I can't find answer for my
help, so I hope someone will help me here...

I'm creating custom component which extends Tree. Structure must support
different levels, but I cant use ArrayCollection or XMLListCollection.
I think best way is write own ICollectionView class, because each item of
this collection should be type of my class, let's call class Data();

So I've create class Data
and create property call children:ICollectionView(for dataDescriptor
getChildren)

Now I want create dataProvider for my customcomponent in MXML

model:MyModel id=myModel
model:dataProvider
data:Data name=Main Item importance=100 progress=0
level=0
data:Data name=Subitem 1 importance=33 progress=0
level=1/
data:Data name=Subitem 2 importance=33 progress=0
level=1/
data:Data name=Subitem 3 importance=34 progress=0
level=1/
/data:Goal
/model:dataProvider
/model:MyModel 

but this give me compile error: In initializer for 'children': multiple
initializer values for target type mx.collections.ICollectionView.

Does any know, how can I write this in MXML. Btw i have
[DefaultProperty(children)]  so when it was array, MXML works, but with
ICollectionView do not.


Or maybe if you have better idea how to implement such component based on
Tree let me know. I appreciate links to some tutorials or resources.

Thank you very much

-- 
-- 
Franto Kormanak ([EMAIL PROTECTED])
Owner  Senior RIA Developer
at Flexets (http://www.flexets.com)

blog: http://www.franto.com
profile: http://www.linkedin.com/in/franto
skype: franto.kormanak


[flexcoders] Re: $visible?? What is it?

2008-10-30 Thread mookie298347
Hmm... So what would it mean if $visible is false but visible is true?
The component isn't being displayed at all. Thanks for the help.

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

 UIComponent overrides DisplayObject's 'visible' property, but it
makes DisplayObject's concept of 'visible' available as $visible.
 
 Gordon Smith
 Adobe Flex SDK Team
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of mookie298347
 Sent: Wednesday, October 29, 2008 4:40 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] $visible?? What is it?
 
 
 Hi all,
 
 I am having a strange problem with some components. I noticed a
 particular panel won't display in the interface if it is added to
 parent panel after another panel.
 
 I ran the debugger and noticed that the $visible variable for the
 problem panel is 'false' however the visible variable is true.
 
 If I avoid the issue and display the problem panel first (the panel is
 displayed properly) both the $visible and visible variables are true.
 
 What is the difference between these variables? Thanks!





[flexcoders] Re: Custom dataDescriptor and custom ICollectionView

2008-10-30 Thread Cato Paus
Hi if You can use arrayCollection you can use this class

just change the MainChapterListVO, SubChapterListVO to your Data Class

waht I do here is I have a arraycollection called MainChapterListVO
this holds data and a arraycollection named SubChapterListVO, the
SubChapterListVO  also holds data and a arrayColection to, whit files,
these classes all have in commen a 'name' property so I can read it
form the tree as label see botom for tre code..

package no.umbrellaCorp.customer.customerView.bp
{
import mx.collections.ICollectionView;
import mx.controls.treeClasses.ITreeDataDescriptor;

import no.umbrellaCorp.bp.MainChapterListVO;
import no.umbrellaCorp.bp.SubChapterListVO;



public class FileSystemBPTreeDataDescriptor implements
ITreeDataDescriptor
{
public function getData(node:Object, model:Object=null):Object
{
return node;
}

public function hasChildren(node:Object, 
model:Object=null):Boolean
{
   if(node is MainChapterListVO || node is SubChapterListVO){
   return true;

   }else{
return false;
   }   
  
}

public function addChildAt(parent:Object, newChild:Object,
index:int, model:Object=null):Boolean
{
return false;
}

public function isBranch(node:Object, model:Object=null):Boolean
{

try {
if (node is Object) {
if (node.subColl.length  0)  {
return true;
}
}
}
catch (e:Error) {
trace([Descriptor] exception checking for isBranch);
}
return false;

//return !(node is FileNode)  hasChildren(node);
}

public function removeChildAt(parent:Object, child:Object,
index:int, model:Object=null):Boolean
{

//FileSystemBPTreeDataDescriptor(parent).Items.slice(index,index);

return false;
}

public function getChildren(node:Object,
model:Object=null):ICollectionView
{
if(node is MainChapterListVO){

return MainChapterListVO(node).subColl;
}else{
return SubChapterListVO(node).subColl;
}

}   
}
}


mx:Tree

mx:VBox label=Maler width=100% 
height=100%
mx:Tree id=bpTree
dataProvider={LicenseVOSingleton.instance.bpTreeColl}
click=onBpTreeSelected(event); labelField=name
dataDescriptor={new FileSystemBPTreeDataDescriptor()}
iconField=fileType width=100% height=100% /  
/mx:VBox

Cato 



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

 Hey all,
 
 it's long time I've posted something here :) But I can't find answer
for my
 help, so I hope someone will help me here...
 
 I'm creating custom component which extends Tree. Structure must support
 different levels, but I cant use ArrayCollection or XMLListCollection.
 I think best way is write own ICollectionView class, because each
item of
 this collection should be type of my class, let's call class Data();
 
 So I've create class Data
 and create property call children:ICollectionView(for dataDescriptor
 getChildren)
 
 Now I want create dataProvider for my customcomponent in MXML
 
 model:MyModel id=myModel
 model:dataProvider
 data:Data name=Main Item importance=100 progress=0
 level=0
 data:Data name=Subitem 1 importance=33 progress=0
 level=1/
 data:Data name=Subitem 2 importance=33 progress=0
 level=1/
 data:Data name=Subitem 3 importance=34 progress=0
 level=1/
 /data:Goal
 /model:dataProvider
 /model:MyModel 
 
 but this give me compile error: In initializer for 'children': multiple
 initializer values for target type mx.collections.ICollectionView.
 
 Does any know, how can I write this in MXML. Btw i have
 [DefaultProperty(children)]  so when it was array, MXML works, but
with
 ICollectionView do not.
 
 
 Or maybe if you have better idea how to implement such component
based on
 Tree let me know. I appreciate links to some tutorials or resources.
 
 Thank you very much
 
 -- 

[flexcoders] Re: Secure AMF - Error #2004: One of the parameters is invalid

2008-10-30 Thread taze170171
Hi Jeff!

Thank you very much for your reply!!

I tried to update to the newest Flex SDK Version to match LCDS 2.6. 
After doing that I get the following error:
ArgumentError: Error #2173: Unable to read object in stream.  The 
class DSQ does not implement flash.utils.IExternalizable but is 
aliased to an externalizable class.

But when I add the property
enable-small-messagesfalse/enable-small-messages
as you suggested it works!!!

Thanks,
Taze

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

 This error usually means that the player has received an 
Externalizable type via AMF but there's not an Externalizable object 
registered for that alias.  I am having trouble coming up with a way 
that would happen only on an HTTP based AMF channel since RTMP also 
encodes its data using AMF, it should see this error too.Probably 
sending the output from mx:TraceTarget (in flashlog.txt on the 
client) and enabling the level=Debug for the Endpoint.* target in 
services-config.xml would contain enough info to track this down.  
Feel free to send it to me offlist as that can be a big file 
([EMAIL PROTECTED]mailto:[EMAIL PROTECTED]).
 
 The other things I'd check are that your rpc.swc and fds.swc are of 
the right version and match your server version.  We added a small 
messages feature in LCDS2.6 which uses Externalizable for messages 
to make the wrapper smaller.   That should be turned off by default 
for 2.5.1 clients but maybe something is getting messed up there.  
You can turn this off via the enable-small-messages=false flag in 
the channel's serialization properties (see resources/config/services-
config.xml for an example).
 
 Jeff
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of taze170171
 Sent: Tuesday, October 28, 2008 3:39 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Secure AMF - Error #2004: One of the 
parameters is invalid
 
 
 Hello!
 
 We are using AIR together with LCDS. Until now we were using an 
RTMPS
 channel for communication. There everything works fine.
 
 For fallback handling we configured now an Secure AMF Channel. When
 using this channel the following error occurs when calling fill
 methods:
 
 ArgumentError: Error #2004: One of the parameters is invalid.
 
 Sync methods work fine!! The fill methods return type is
 Collection We also tried List... - same error.
 At the client we use mx.collections.ArrayCollection.
 
 The config files look like:
 
 Client config.xml:
 ...
 channel id=my-secure-amf
 typesecure-amf-polling/type
 
 endpointhttps://localhost:8443/messagebroker/amfsecure/endpoint
 interval8000/interval
 /channel
 ...
 
 services-config:
 ...
 channel-definition id=my-secure-amf
 class=mx.messaging.channels.SecureAMFChannel
 endpoint url=https://
 {server.name}:8443/messagebroker/amfsecure
 class=flex.messaging.endpoints.SecureAMFEndpoint/
 properties
 !--HTTPS requests on some browsers do not work when
 pragma no-cache are set --
 add-no-cache-headersfalse/add-no-cache-headers
 /properties
 /channel-definition
 ...
 
 Thanks in advance,
 Taze





Re: [flexcoders] Re: Do you use a Mac?

2008-10-30 Thread Tom Chiverton
On Wednesday 29 Oct 2008, Brendan Meutzner wrote:
 Hi I'm a Mac... and I'm a PC...

This must be some sort of reference to an advert or something.
I don't see adverts :-)

-- 
Tom Chiverton
Helping to preemptively mesh unique visionary communities





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] Re: UI component, a set function creationComplete

2008-10-30 Thread Michael Schmalle
Amy,
  These functions are in place for very good reasons, and if you try to
circumvent them you have a
really good chance of running into problems.
I will happily disagree with you on this and not say much else. I don't feel
like getting into a pissing match with documentation, as I am sure this is
what you are quoting. My information comes from 3 years of low level
component development experience.

 circumvent

Who ever said this? I don't think you quite understand what I am talking
about.

 you are probably going to fail miserably unless you put that logic in
 _before_ the super.commitProperties().
This is just plain wrong. I don't have time to write an essay on why you
don't understand what I said.

Mike

On Thu, Oct 30, 2008 at 1:53 AM, Eric Cooper [EMAIL PROTECTED] wrote:

   Thanks, Amy.

 I have decided that my own model is more convoluted than is healthy. So, I
 have reworked
 things on my side and stuck with createChildren(). I was tempted to try
 Mike's suggestion
 - and, had I felt really good about my implementation, I might have.

 At this point, with more checks for null values than ideally there should
 be, things are
 working in various scenarios.

 Thanks again,
 -Eric


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Amy
 [EMAIL PROTECTED] wrote:
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Michael Schmalle
  teoti.graphix@ wrote:
  
   Hi Eric,
So, my question is does your approach address this by creating
  children
   in
   commitProperties()
   Yes,
  
   This is basically what I do with all renderers in my commercial
  components.
   I rarely use createChildren(). The only time I use createChilren()
  is when
   the composite is 100% owned by it's parent containing the creation
  code.
  
   commitProperties() will solve all timing issues if implemented
  correctly.
  
   I'm not quite sure I get what you are asking in the second half
  but, all
   item renderers use this algorithm which their state is entirely
  dependent on
   the data being pushed into the component either through data or
  public
   accessors.
  
   This means that children will not be instantiated until the data is
  present
   for their instantiation.
  
   If this doesn't make sense, try to clarify a bit more.
 
  It's probably better practice to create children in createChildren,
  then use commitProperties to do whatever setting of properties needs
  to be done, and then use updateDisplayList() to do any layout, and
  measure() to resolve any sizing issues. These functions are in place
  for very good reasons, and if you try to circumvent them you have a
  really good chance of running into problems.
 
  For instance, if you put child creation logic in commitProperties(),
  you are probably going to fail miserably unless you put that logic in
  _before_ the super.commitProperties(). That's because any children
  should be created prior to commitProperties. And that's the reason
  there's a commitProperties() function that's separate from
  createChildren(). Oh, and if you do anything that edits layout,
  etc., in commitProperties, you better do it _after_ the super. Guess
  why?
 
  You should try and catch her state changes and defer them until the
  appropriate moment in the invalidation process.
 
  If what's going on is that her logic is affecting public properties
  or styles that you've exposed on your class, then you just need to
  make sure that they set a flag and call the right invalidation method
  so that you can execute at the correct place in the invalidation
  process.
 
  HTH;
 
  Amy
 

  




-- 
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] need your advice on flash or flex

2008-10-30 Thread vuthecuong



Tom Chiverton-2 wrote:
 
 - about insert flash file (.fla?) to DB, this web app is for intranet
 use
 only, and size of flash file is less then 300kb. So should I need to pay
 attention on performance etc?
Depends. Are there one insert a year or 3 million ?
 
 
these fla files are templates, so number of theme is limited, about 1000
files or less,
and because they are templates so they rarely be edited.
Is this OK to manage via DB? (Personally I think no problem. But I need your
advice for sure)

 On next month I will incharge of web-based app project that:
 - what tool I should use? flash? or flex? or both? or ajax with php? and
 why?
If you are in charge, leave the detailed design decisions to the
developers. 
OK. I understand. But how about opinion for each option? 
Ex: what is advantage or disavantage of each one bases on my web app?
many thanks

-- 
View this message in context: 
http://www.nabble.com/need-your-advice-on-flash-or-flex-tp20227710p20239265.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] coercion fail cannot convert com.event::[EMAIL PROTECTED] to com.event.AdEvent.

2008-10-30 Thread Nayan
Hi All,

apologies if this email is repeated

I have a Flex project which is loading in a swf file created using
AS3, this swf file is broadcasting the adEvent for which i have
listener in Flex.

When the listener function is being fired i get the following error,
cannot convert com.event::[EMAIL PROTECTED] to com.event.AdEvent.

This error started to happen once i had a image in my main project, I
can't understand why is this error cropping up after i added that
image. Also the same case with a singleton class, i was initializing
it in Flex and my Flash only code was properly accessing that
singleton but it stopped working after i have that image.

if in my listener function, i use private function
adClicked(event:*):void, it works fine and the event is of type
com.event.AdEvent. I am guessing this has something to do how the flex
compiler and the flash IDE compiler spit out  code differently

any help, clarifications would be greatly appreciated.

Thanks,
Nayan

--
Nayan Savla
http://nayansavla.com/blog/
Success Lies in Courage.



[flexcoders] New framework for Flex and AIR enterprise applications

2008-10-30 Thread dev.apostiglioni
I'd like to share with all of you who develop enterprise applications
this new framework:  Aconcagua Flex
http://code.google.com/p/aconcagua-flex/   
(http://code.google.com/p/aconcagua-flex/).

It's aim is to help in building enterprise Flex and AIR applications,
and it has beeing designed to be:

- Test friendly: Helps to build testeable applications.
- Not intrusive.
- IoC and dependency injection capabilities.
- Stackable: It is not only an MVC framework. It's a layered framework,
and you can use the layers that you want separately.
- Extensible.
- Flexible.
- Performant.
- Easy to understand: It does not re-invent the wheel. Nothing new if
you already know Spring and Cairngorm or PureMVC.
- Etc, etc.

For those who use maven, it is also available at this repository:
http://aconcagua-flex.googlecode.com/svn/repository/releases/

Of course, all feedback is wellcome :-)




Re: [flexcoders] Re: UI component, a set function creationComplete

2008-10-30 Thread Michael Schmalle
well big mouth has to say one more thing,

Imagine commitProperties() committing property states :) , all of your
properties have been committed. Children can be created at any time AFTER
super().

What you fail to see is commitProperties() is a glorified createChildren().
This only thing cool about createChildren() is Container calls
createComponentDescriptors() which is a heavy method.

Other than the above, commitProperties() ALWAYS runs before measure() and
updateDisplayList() so there is never a problem with creating children in
commitProperties().

But subclassing a UIComponent, give me a break. I was under the impression
from Eric's post that his issue was more than just create the children in
create children, why the hell would I tell him to circumvent a template
method!?

Sorry, your post felt a little personal.

Mike


On Thu, Oct 30, 2008 at 6:40 AM, Michael Schmalle
[EMAIL PROTECTED]wrote:

 Amy,
   These functions are in place for very good reasons, and if you try to
 circumvent them you have a
 really good chance of running into problems.
 I will happily disagree with you on this and not say much else. I don't
 feel like getting into a pissing match with documentation, as I am sure this
 is what you are quoting. My information comes from 3 years of low level
 component development experience.

  circumvent

 Who ever said this? I don't think you quite understand what I am talking
 about.

  you are probably going to fail miserably unless you put that logic in
  _before_ the super.commitProperties().
 This is just plain wrong. I don't have time to write an essay on why you
 don't understand what I said.

 Mike



 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Amy
 [EMAIL PROTECTED] wrote:
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Michael Schmalle
  teoti.graphix@ wrote:
  
   Hi Eric,
So, my question is does your approach address this by creating
  children
   in
   commitProperties()
   Yes,
  
   This is basically what I do with all renderers in my commercial
  components.
   I rarely use createChildren(). The only time I use createChilren()
  is when
   the composite is 100% owned by it's parent containing the creation
  code.
  
   commitProperties() will solve all timing issues if implemented
  correctly.
  
   I'm not quite sure I get what you are asking in the second half
  but, all
   item renderers use this algorithm which their state is entirely
  dependent on
   the data being pushed into the component either through data or
  public
   accessors.
  
   This means that children will not be instantiated until the data is
  present
   for their instantiation.
  
   If this doesn't make sense, try to clarify a bit more.
 
  It's probably better practice to create children in createChildren,
  then use commitProperties to do whatever setting of properties needs
  to be done, and then use updateDisplayList() to do any layout, and
  measure() to resolve any sizing issues. These functions are in place
  for very good reasons, and if you try to circumvent them you have a
  really good chance of running into problems.
 
  For instance, if you put child creation logic in commitProperties(),
  you are probably going to fail miserably unless you put that logic in
  _before_ the super.commitProperties(). That's because any children
  should be created prior to commitProperties. And that's the reason
  there's a commitProperties() function that's separate from
  createChildren(). Oh, and if you do anything that edits layout,
  etc., in commitProperties, you better do it _after_ the super. Guess
  why?
 
  You should try and catch her state changes and defer them until the
  appropriate moment in the invalidation process.
 
  If what's going on is that her logic is affecting public properties
  or styles that you've exposed on your class, then you just need to
  make sure that they set a flag and call the right invalidation method
  so that you can execute at the correct place in the invalidation
  process.
 
  HTH;
 
  Amy
 

  




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


[flexcoders] Re: Flex builder annoyance - library projects

2008-10-30 Thread schtoo2
This is my #1 annoyance with FB.  

I can't tell you how many times I've been editing a file and gotten 
confused because it didn't seem to be compiling (because it wasn't 
selected in the build path).  Or editing one file and confused why it 
wasn't able to import another (again because the other wasn't in the 
build path). 

UGH!

I've gotten used to, as soon as I get a new update from the src 
repository, going directly into the project properties and updating the 
build path with everything.  Bleh... 

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

 Does anyone else find it annoying that you must explicitly specify the
 classes that are included in your library project via the Flex Library
 Build Path?  This is especially annoying in a team environment when
 someone else adds a new class, and I have to explicitly add it in
 order to get a successful compilation.  (I won't even go into the
 issues I have with the compiler).
 
 If you look at how Eclipse handles this, you specify a source folder
 and then can optionally specify anything that should be excluded from
 compilation.  This way, you can just say my code is here and it
 picks up everything unless you tell it not to.  
 
 Even if the compiler needs to know exactly which files to use, I think
 a nice feature would be to automatically generate that
 flexLibProperties file for you.





[flexcoders] Extending Flex Builder

2008-10-30 Thread schtoo2
I'm extending Flex Builder with my own eclipse plugins.  My plugins 
just compile some of my projects using the OEM compiler.  I'm depending 
on the com.adobe.flexbuilder.flex plugin that exports the OEM compiler 
packages.  So far so good - very straightforward.  But now I'm 
encountering the following issue:
http://bugs.adobe.com/jira/browse/SDK-14801

I'm running in a fully licensed version of FlexBuilder.  I've searched 
the FlexBuilder plugins to find where they're storing the jars 
mentioned in SDK-14801.  I can't seem to find them (some are in the lib 
directory of the com.adobe.flexbuilder.flex plugin, some are not).  Yet 
the regular FlexBuilder plugins don't encounter this problem.  So I'm 
confused how they work and mine does not...?  


regards,
-Chris



Re: [flexcoders] Re: Do you use a Mac?

2008-10-30 Thread Tyler Kocheran
Ubuntu [?]

On Wed, Oct 29, 2008 at 10:46 AM, dnk [EMAIL PROTECTED] wrote:


 On 29-Oct-08, at 6:56 AM, Fotis Chatzinikos wrote:

 Are you sure that you cannot run Leopard (MacOSX) on a vm?


 The desktop, no (unless it is hacked?), however if you run OS X server, it
 is supported in VM's (IE I think VMWare).

 d



  




-- 
And do this, knowing the time, that now it is high time to awake out of
sleep;
for now our salvation is nearer than when we first believed.
BA2.png

[flexcoders] Re: textArea.setFocus();

2008-10-30 Thread jim.abbott45
For IE7 (at least), the following line of code works . . .

body scroll=no onLoad=window.document.${application}.focus();

Just to be clear, it needs to be put in the
html-template/index.template.html file of your project, and replacing
the body tag that is already there.

Good luck,
Jim



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

 There is some JS you can run in the wrapper HTML that will give focus to
 the SWF, but it doesn't work in FF2 or Chrome.
  
 Blake
 
  
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of valdhor
 Sent: Wednesday, October 29, 2008 11:35 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: textArea.setFocus();
 
 
 
 Unfortunately, you can't.
 
 The browser has focus until the user clicks on your app.
 
 BTW. Does anyone know if this is rectified with FP10? Or is it just
 something we have to live with from the browser vendors?
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , tchredeemed apthorp@ wrote:
 
  Thanks guys, now I guess my problem is how to give the application
  focus without clicking on it?
  
  parentApplication.systemManager.activate() ?
  
  Not sure exactly where to go :)
 





RE: [flexcoders] Re: textArea.setFocus();

2008-10-30 Thread Keith Reinfeld
 Should it not put the cursor into the textArea and have the 10th
 through 20th characters selected?

 

Even if you select a range of text with the mouse you will not see the
blinking insertion cursor in the textarea. 
 

What matters is that your app has focus so that it can receive keyboard
actions. 

So the trick is to come-up with some trivial task for the user to perform
that forces them to click. 

Regards, 

-Keith 
http://keithreinfeld.home.comcast.net
http://keithreinfeld.home.comcast.net/ 
 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Blake Barrett
Sent: Wednesday, October 29, 2008 1:47 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: textArea.setFocus();

 

There is some JS you can run in the wrapper HTML that will give focus to the
SWF, but it doesn't work in FF2 or Chrome.

 

Blake


 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of valdhor
Sent: Wednesday, October 29, 2008 11:35 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: textArea.setFocus();

Unfortunately, you can't.

The browser has focus until the user clicks on your app.

BTW. Does anyone know if this is rectified with FP10? Or is it just
something we have to live with from the browser vendors?

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

 Thanks guys, now I guess my problem is how to give the application
 focus without clicking on it?
 
 parentApplication.systemManager.activate() ?
 
 Not sure exactly where to go :)


 



Re: [flexcoders] Re: UI component, a set function creationComplete

2008-10-30 Thread Michael Schmalle
Clarification;
 Children can be created at any time AFTER super().

Since we all design software with a design, any property committal in a
super() call has nothing to do with an instance of a child you create in the
subclass (this is bad design). Thus, the above logic holds true.

Mike

On Thu, Oct 30, 2008 at 6:50 AM, Michael Schmalle
[EMAIL PROTECTED]wrote:

 well big mouth has to say one more thing,

 Imagine commitProperties() committing property states :) , all of your
 properties have been committed. Children can be created at any time AFTER
 super().

 What you fail to see is commitProperties() is a glorified createChildren().
 This only thing cool about createChildren() is Container calls
 createComponentDescriptors() which is a heavy method.

 Other than the above, commitProperties() ALWAYS runs before measure() and
 updateDisplayList() so there is never a problem with creating children in
 commitProperties().

 But subclassing a UIComponent, give me a break. I was under the impression
 from Eric's post that his issue was more than just create the children in
 create children, why the hell would I tell him to circumvent a template
 method!?

 Sorry, your post felt a little personal.

 Mike


 On Thu, Oct 30, 2008 at 6:40 AM, Michael Schmalle [EMAIL PROTECTED]
  wrote:

 Amy,
   These functions are in place for very good reasons, and if you try to
 circumvent them you have a
 really good chance of running into problems.
 I will happily disagree with you on this and not say much else. I don't
 feel like getting into a pissing match with documentation, as I am sure this
 is what you are quoting. My information comes from 3 years of low level
 component development experience.

  circumvent

 Who ever said this? I don't think you quite understand what I am talking
 about.

  you are probably going to fail miserably unless you put that logic in
  _before_ the super.commitProperties().
 This is just plain wrong. I don't have time to write an essay on why you
 don't understand what I said.

 Mike



 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Amy
 [EMAIL PROTECTED] wrote:
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Michael Schmalle
  teoti.graphix@ wrote:
  
   Hi Eric,
So, my question is does your approach address this by creating
  children
   in
   commitProperties()
   Yes,
  
   This is basically what I do with all renderers in my commercial
  components.
   I rarely use createChildren(). The only time I use createChilren()
  is when
   the composite is 100% owned by it's parent containing the creation
  code.
  
   commitProperties() will solve all timing issues if implemented
  correctly.
  
   I'm not quite sure I get what you are asking in the second half
  but, all
   item renderers use this algorithm which their state is entirely
  dependent on
   the data being pushed into the component either through data or
  public
   accessors.
  
   This means that children will not be instantiated until the data is
  present
   for their instantiation.
  
   If this doesn't make sense, try to clarify a bit more.
 
  It's probably better practice to create children in createChildren,
  then use commitProperties to do whatever setting of properties needs
  to be done, and then use updateDisplayList() to do any layout, and
  measure() to resolve any sizing issues. These functions are in place
  for very good reasons, and if you try to circumvent them you have a
  really good chance of running into problems.
 
  For instance, if you put child creation logic in commitProperties(),
  you are probably going to fail miserably unless you put that logic in
  _before_ the super.commitProperties(). That's because any children
  should be created prior to commitProperties. And that's the reason
  there's a commitProperties() function that's separate from
  createChildren(). Oh, and if you do anything that edits layout,
  etc., in commitProperties, you better do it _after_ the super. Guess
  why?
 
  You should try and catch her state changes and defer them until the
  appropriate moment in the invalidation process.
 
  If what's going on is that her logic is affecting public properties
  or styles that you've exposed on your class, then you just need to
  make sure that they set a flag and call the right invalidation method
  so that you can execute at the correct place in the invalidation
  process.
 
  HTH;
 
  Amy
 

  




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




-- 
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] Loading an image dynamically and making it a BitmapAsset

2008-10-30 Thread Jim Hayes
Can you not add a Bitmap to the sprite ?
 
So (entirely off the top of my head) :
 
function imgLoaded(e:Event):void{  
var eventImg:Bitmap = new Bitmap( imgLdr.content as BitmapData)
eventImg.smoothing = true;
eventImg.setActualSize(300, 200);
sheet.addChild(eventImg);
}


 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jayson
Sent: 30 October 2008 03:49
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Loading an image dynamically and making it a
BitmapAsset
 

I am using BitmapAssets to add to a sprite which is printed using
PrintJob.

[Embed(source=images/logo.png)]
[Bindable]
public var logo:Class;
...
var bitmapImg:BitmapAsset = new logo() as BitmapAsset;
bitmapImg.smoothing = true;
bitmapImg.setActualSize(500, 42);
sheet.addChild(bitmapImg);

This works fine when the image to be added is embedded. Some images I
need to add dynamically. How would I do this?

I've tried using a Loader and doing something like this:

var imgLdr:Loader = new Loader(imgURLReq);
imgLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded);

function imgLoaded(e:Event):void{ 
var eventImg:BitmapAsset = new BitmapAsset;
eventImg.bitmapData = imgLdr.content as BitmapData
eventImg.smoothing = true;
eventImg.setActualSize(300, 200);
sheet.addChild(eventImg);
}

I think I need to do something similar to the static method by loading
the image with a Loader and casting it as a Class, but this is not
working out for me.

Any ideas?

Thanks!

Jayson
 

__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__

RE: [flexcoders] coercion fail cannot convert com.event::[EMAIL PROTECTED] to com.event.AdEvent.

2008-10-30 Thread Gregor Kiddie
Sounds suspiciously like a shared code problem. Check Alex's blog for
further details.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
blocked::http://www.inps.co.uk/ 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact [EMAIL PROTECTED]



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Nayan
Sent: 30 October 2008 05:00
To: flexcoders@yahoogroups.com
Subject: [flexcoders] coercion fail cannot convert
com.event::[EMAIL PROTECTED] to com.event.AdEvent.

 

Hi All,

apologies if this email is repeated

I have a Flex project which is loading in a swf file created using
AS3, this swf file is broadcasting the adEvent for which i have
listener in Flex.

When the listener function is being fired i get the following error,
cannot convert com.event::[EMAIL PROTECTED] to com.event.AdEvent.

This error started to happen once i had a image in my main project, I
can't understand why is this error cropping up after i added that
image. Also the same case with a singleton class, i was initializing
it in Flex and my Flash only code was properly accessing that
singleton but it stopped working after i have that image.

if in my listener function, i use private function
adClicked(event:*):void, it works fine and the event is of type
com.event.AdEvent. I am guessing this has something to do how the flex
compiler and the flash IDE compiler spit out code differently

any help, clarifications would be greatly appreciated.

Thanks,
Nayan

--
Nayan Savla
http://nayansavla.com/blog/ http://nayansavla.com/blog/ 
Success Lies in Courage.

 



Re: [flexcoders] need your advice on flash or flex

2008-10-30 Thread Tom Chiverton
On Thursday 30 Oct 2008, vuthecuong wrote:
 and because they are templates so they rarely be edited.
 Is this OK to manage via DB? (Personally I think no problem. But I need
 your advice for sure)

I'd stick them in the filesystem, with the location in the database, myself.

 OK. I understand. But how about opinion for each option?

I prefer Flex, but I'm a coder. Arty types prefer Flash.

 Ex: what is advantage or disavantage of each one bases on my web app?
 many thanks

Apples and oranges.

-- 
Tom Chiverton
Helping to conveniently extend industry-wide markets





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: Invalid Embed directive

2008-10-30 Thread oneworld95
Thanks. This finally worked for me,

Application {
  backgroundImage: global/media/flowers.jpg;  
 }

I'm guessing Embed directives are checked at compile time and for
whatever reason, Flex compiler couldn't find the file. 

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

 and if you are compiling the CSS for runtime loads, the path will be
 different yet again
 
 
 Douglas Knudsen
 http://www.cubicleman.com
 this is my signature, like it?
 
 
 On Wed, Oct 29, 2008 at 4:59 PM, Ryan Graham [EMAIL PROTECTED]wrote:
 
 And the path is relative to where you are declaring the
mx:Style that
  loads the stylesheet file, of course. :)
 
  HTH,
  Ryan
 
   --
  *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
  Behalf Of *Ryan Graham
  *Sent:* Wednesday, October 29, 2008 1:55 PM
 
  *To:* flexcoders@yahoogroups.com
  *Subject:* RE: [flexcoders] Invalid Embed directive
 
The compiler expects that image path to be in one of your
project source
  folders during build. If that path exists in your bin folder only, the
  compiler will never see it for an embed operation.
 
  HTH,
  Ryan
 
   --
  *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
  Behalf Of *Jim Hayes
  *Sent:* Wednesday, October 29, 2008 1:20 PM
  *To:* flexcoders@yahoogroups.com
  *Subject:* RE: [flexcoders] Invalid Embed directive
 
 
  It can be confusing as to where the file thinks it is at compile
time - in
  fact I remain fairly confused about it :(
  You might try /global/media/flowers.jpg or
./global/media/flowers.jpg
  if you need to go up a directory then ../ works fine.
 
  -Original Message-
  From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com on
behalf
  of oneworld95
  Sent: Wed 29/10/2008 19:56
  To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
  Subject: [flexcoders] Invalid Embed directive
 
  Hi. I've got a Style tag with the following style in it,
 
  Application {
  background-image: Embed(source=global/media/flowers.jpg);
  }
 
  I keep getting the Invalid Embed directive in stylesheet - can't
  resolve source. I know the image exists and is at that path. Help!
 
  __
  This communication is from Primal Pictures Ltd., a company
registered in
  England and Wales with registration No. 02622298 and registered
office: 4th
  Floor, Tennyson House, 159-165 Great Portland Street, London, W1W
5PA, UK.
  VAT registration No. 648874577.
 
  This e-mail is confidential and may be privileged. It may be read,
copied
  and used only by the intended recipient. If you have received it
in error,
  please contact the sender immediately by return e-mail or by
telephoning
  +44(0)20 7637 1010. Please then delete the e-mail and do not
disclose its
  contents to any person.
  This email has been scanned for Primal Pictures by the MessageLabs
Email
  Security System.
  __
This message is private and confidential. If you have received it in
  error, please notify the sender and remove it from your system.
 
  This message is private and confidential. If you have received it
in error,
  please notify the sender and remove it from your system.
   
 





[flexcoders] comboBox selectedIndex

2008-10-30 Thread Gökhan
How can i change the selectedIndex of a comboBox ?
The selectedIndex is get 0 in any case.
isn't it writeable ?



  

Re: [flexcoders] need your advice on flash or flex

2008-10-30 Thread vuthecuong



Tom Chiverton-2 wrote:
 
 On Thursday 30 Oct 2008, vuthecuong wrote:
 and because they are templates so they rarely be edited.
 Is this OK to manage via DB? (Personally I think no problem. But I need
 your advice for sure)
 
 I'd stick them in the filesystem, with the location in the database,
 myself.
 
 OK. I understand. But how about opinion for each option?
 
 I prefer Flex, but I'm a coder. Arty types prefer Flash.
 
 Ex: what is advantage or disavantage of each one bases on my web app?
 many thanks
 
 Apples and oranges.
 
 -- 
 Tom Chiverton
 Helping to conveniently extend industry-wide markets
 
 
 
 
 
 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
 
 
 
 
 
Thanks for the reply, I'd go for Flex.
regards
-- 
View this message in context: 
http://www.nabble.com/need-your-advice-on-flash-or-flex-tp20227710p20245877.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: States in UIMovieClip working properly?

2008-10-30 Thread florian.salihovic
Just for the record:

All references are gone and simply can't access the TextFields anymore.

Wierd... not even with the []-dynamic accessor...


It's easy to build komplex UIs in minutes with Flex but twio TextFields are 
making a lot of 
trouble...


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

 I have a strange problem: i have the following class:
 
 
 package fs.examples.components
 {
   import flash.events.Event;
   import flash.events.MouseEvent;
   import flash.text.TextField;
   
   import mx.events.StateChangeEvent;
   import mx.flash.UIMovieClip;
 
   public class StatefulBase extends UIMovieClip
   {
 
   private var _label:String;
   private var _labelTextField:TextField;
 
   [Bindable(labelChanged)]
   public function get label():String
   {
   return this._labelTextField.text;
   }
 
   public function set label(value:String):void
   {
   if (value == this._label)
   {
   return;
   }
   this._label = value;
   this._labelTextField.text = this._label;
   this.dispatchEvent(new Event(labelChanged));
   }
 
   public function StatefulBase()
   {
   super();
   this.initializeComponent();
   }
 
   private function eventListener(event:Event):void
   {
   switch(event.type)
   {
   case StateChangeEvent.CURRENT_STATE_CHANGE:
   this._labelTextField.text = this._label;
   break;
   case MouseEvent.MOUSE_OUT:
   this.currentState = out;
   break;
   case MouseEvent.MOUSE_OVER:
   this.currentState = over;
   break;
   }
   }
 
   protected function initializeComponent():void
   {
   if (this.hasOwnProperty(labelText))
   {
   if (this[labelText] is TextField)
   {
   this._labelTextField = 
 TextField(this[labelText]);
   }
   }
   
 this.addEventListener(StateChangeEvent.CURRENT_STATE_CHANGE, 
 eventListener);
   this.addEventListener(MouseEvent.MOUSE_OUT, 
 eventListener);
   this.addEventListener(MouseEvent.MOUSE_OVER, 
 eventListener);
   }
   }
 }
 
 
 This is the superclass of a symbol made in Flash. The symbol has 2 keyframes 
 and in 
each 
 is a textfield with the same instancename. When i initially set the text in 
 Flex, it is 
 displayed correctly. But after the first time the state changed, i am not 
 able to set the 
text 
 property of the TextField instances? Both instances exist... the cursor 
 changes... the 
states 
 change as well: visual feedback and correct traces (which i deleted before 
 posting the 
 code),
 
 - Why can't just set the text property, when the eventlistener was invoked 
 with a 
StateChangeEvent.CURRENT_STATE_CHANGE?
 
 Best regards and thanx in advance!






[flexcoders] Re: Using addChild() in Flex to add a Flash component.

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

 Hi, all.
 
 Is it possible to use addChild() in Flex to add a Flash instance of 
 SimpleButton to a Flex app's displayList?
 I exported the SimpleButton in a .swc from Flash IDE and set up the 
 .swc as a library in Flex Builder.
 Within Flex, I can instantiate the SimpleButton class with no 
problem, 
 but I can't make it visible via addChild().
 Any ideas why this may be and how I can get around it?
 Thanks much.

If you use the Flash Component Kit, it will wrap it in UIMovieClip for 
you.

HTH;

Amy



[flexcoders] Ecard Designer in Flex ? How to build one in Flex

2008-10-30 Thread Cato Paus
Hi enyone have some code or links on the issue?



RE: [flexcoders] need your advice on flash or flex

2008-10-30 Thread Battershall, Jeff
After reading your spec, I would have some definite questions about
the architecture of your app.  It sounds a little odd and I'm doubting
that what you're thinking will fly in the real world.

1) Is there some server or client side tool to read a .psd and grab and
manipulate layers? I've never heard of one, and I'd be interested if
such exists.  What problem are you trying to solve?  Is there some
reason your banners must be stored in .psd file?

2) Why are you focused on editing the .fla file and storing it in the
DB?  I would think that images and text would be loaded into a single
.swf at runtime and any data about the image/text would be stored in the
DB, not the flash file itself. What's a stored .fla file going to get
you anyway?  You still have to compile it. 

I would think that any solution that's going to work would be based
around a data model and loading/manipulating data at runtime, not
manipulating .psd and .fla files. The editing results (such as a
snapshot of your edited image, and the text manipulation (font size,
text itself, position and so forth)) can be saved to the db and
re-loaded, edited, etc.

Jeff

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of vuthecuong
Sent: Wednesday, October 29, 2008 10:01 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] need your advice on flash or flex



On next month I will incharge of web-based app project that:
==
1) - Read layers of PSD file (photoshop) then create banner of each
layer.
- Display images in categories.
- Drage and drop image into banner (gif file) frame.
- rotate, resize text and image inside that banner.

2) - insert flash file (.fla?) to DB.
- load that flash files into web GUI
- edit text and image inside that flash file.
- save back to DB.
 ==
So my questions are:
- what tool I should use? flash? or flex? or both? or ajax with php? and
why?
- about insert flash file (.fla?) to DB, this web app is for intranet
use only, and size of flash file is less then 300kb. So should I need to
pay attention on performance etc?
- especially edit text and image inside flash file (fla?), flash or flex
is better to use? why? I'm very confused. Please help me. I need your
help. regards,
-- 
View this message in context:
http://www.nabble.com/need-your-advice-on-flash-or-flex-tp20227710p20227
710.html
Sent from the FlexCoders mailing list archive at Nabble.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] comboBox selectedIndex

2008-10-30 Thread Adrian Williams

If you know what index (n) you want to set it to,

comboBox.selectedIndex = n;

Adrian

Gökhan wrote:

How can i change the selectedIndex of a comboBox ?
The selectedIndex is get 0 in any case.
isn't it writeable ?

 


[flexcoders] Re: How do arguments to an AS3 class translate to MXML?

2008-10-30 Thread Amy
--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 Public properties or setter methods will be available in MXML. You can
 annotate them with various forms on [Inspectable] to get useful
 code-completion as well. If you implement IMXMLObject, initialize() 
will be
 called once all the fields declared in the mxml tag have been set.

Note that UIComponent contains a different initialize() method, so you 
can't use the IMXMLObject one for anything that inherits from 
UIComponent.

HTH;

Amy



[flexcoders] Flex with WebOrb Issues... no build

2008-10-30 Thread Eric Dunn
Hello all.. 

I've got Flex 3 Builder running on a XP machine with WebOrb for Java installed 
and the project is using SVN. I am in the process of trying to convert an 
existing Flex app over to try and run on WebOrb. I was successiful in 
converting the standalone app (not running on a server) over to run on 
WebOrb. I did this by manaully updating the .flexProperties to point tothe 
weborb installation, update the compiler line and added the WebOrb swc 
reference. 

All seemed to be working fine. I am having to go through line by line to update 
code. Some of the data structure being returned through WebOrb is different. I 
was able to make some changes with no problems until last night. I had the idea 
to comment out all of Web services call so to get the app up and running with 
no data being returned. If I tired to run it without the lines commented out, 
the application aborted. So after running through the whole app and removing 
the web service commits, I tired to debug.. It opens the browser and then tires 
to build the workspace.. sits at 0% and nothing ever gets built. If I close out 
the browser, Flex continues to build.. but never does anything... If I kill the 
Flex process and try to reponen the project, I get a Java error and Flex 
crashes... 

Any ideas? 

Eric W Dunn 
Adaption Technologies 
281-465-3326 
[EMAIL PROTECTED] 


Re: [flexcoders] Re: How do arguments to an AS3 class translate to MXML?

2008-10-30 Thread Michael Schmalle
Note ::
The IMXMLObject method signature is (d);

initializedhttp://127.0.0.1:49487/help/topic/com.adobe.flexbuilder.help/langref/mx/core/IMXMLObject.html#initialized()
(document:Objecthttp://127.0.0.1:49487/help/topic/com.adobe.flexbuilder.help/langref/Object.html,
id:Stringhttp://127.0.0.1:49487/help/topic/com.adobe.flexbuilder.help/langref/String.html
):voidhttp://127.0.0.1:49487/help/topic/com.adobe.flexbuilder.help/langref/specialTypes.html#void

the UIComponent's initializer is not initialized(), it's;

initialize():void

The UIComponent.initialized is a property not a method.

Mike

On Thu, Oct 30, 2008 at 10:33 AM, Amy [EMAIL PROTECTED] wrote:

   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  Public properties or setter methods will be available in MXML. You can
  annotate them with various forms on [Inspectable] to get useful
  code-completion as well. If you implement IMXMLObject, initialize()
 will be
  called once all the fields declared in the mxml tag have been set.

 Note that UIComponent contains a different initialize() method, so you
 can't use the IMXMLObject one for anything that inherits from
 UIComponent.

 HTH;

 Amy

  




-- 
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 do arguments to an AS3 class translate to MXML?

2008-10-30 Thread Michael Schmalle
Regarding

 The AS3 class takes an argument.

For future reference, IMXMLObject implemented as3 classes cannot have
arguments in their constructors.

As josh said, just shift your constructor logic to a setter and treat it as
if it were an argument.

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


[flexcoders] Re: UI component, a set function creationComplete

2008-10-30 Thread Amy
--- In flexcoders@yahoogroups.com, Michael Schmalle 
[EMAIL PROTECTED] wrote:

 Amy,
   These functions are in place for very good reasons, and if you 
try to
 circumvent them you have a
 really good chance of running into problems.
 I will happily disagree with you on this and not say much else. I 
don't feel
 like getting into a pissing match with documentation, as I am sure 
this is
 what you are quoting. My information comes from 3 years of low level
 component development experience.
 
  circumvent
 
 Who ever said this? I don't think you quite understand what I am 
talking
 about.
 
  you are probably going to fail miserably unless you put that 
logic in
  _before_ the super.commitProperties().
 This is just plain wrong. I don't have time to write an essay on 
why you
 don't understand what I said.

I'm not quoting anything.  What I said comes from working with 
UIMovieClip, where you have to roll your own.  It quickly becomes 
obvious why the Flex engineers built things the way they did.  

The fact that you essentially said no you're wrong without any 
backup seems to me like you did, indeed, intend a pissing match.

-Amy



RE: [flexcoders] Re: Read XML data in as ArrayCollection

2008-10-30 Thread Tracy Spratt
Yes, MyVO would be a custom object that uses strongly typed
properties.  This approach it the ideal from a performance standpoint,
since access of strongly typed property values is significantly faster
that either dynamic object properties, or XML.

 

The blog example you referenced in the other post produces an
ArrayCollection of XML nodes.  While this is ok, it kinda does not make
much sense.  If XML is ok for the items in the collection, just use
XMLListCollection.  A loop is not necessary.  But this does not provide
the advantages of a VO (ValueObject), which, in addition to the
performance benefits, allows you to have calculated fields, and special
methods like the fill method I alluded to earlier.

 

Note, I use XML almost always, unless I need special work in the item
object.  I have not had any performance issues with XML.  This is
usually reported when scrolling with hundreds of visible itemrenderers

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of oneworld95
Sent: Tuesday, October 28, 2008 3:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Read XML data in as ArrayCollection

 

What is the MyVO? Is that a custom object class? Thanks.

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

 Please, do, the default resultFormat is evil ;)
 
 
 
 Here is a quick, untested start.
 
 _acPremiums = new ArrayCollection()
 
 var xmlResult:XML = XML(event.result);
 
 var xlPremiums:XMLList = xmlResult.premium; //or xmlResult.children();
 
 var xmlPremium:XML
 
 var voNew:MyVO;
 
 for () var i:int=0;ixlPremiums.length();i++) {
 
 xmlPremium = xlPremiums[i];
 
 voNew = new MyVO;
 
 voNew.fill(xmlPremium); //assumes a fill method. You could also
 simply assign the vo properties here
 
 _acPremiums.addItem(voNew);
 
 }
 
 
 
 Tracy
 
 
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of oneworld95
 Sent: Tuesday, October 28, 2008 2:55 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Read XML data in as ArrayCollection
 
 
 
 Hi, Tracy. Hadn't thought about that. I'll work on implementing your
 suggestion. Thanks.
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  That only works because the default resultFormat causes Flex to
cnvert
  your xml into a nested structure of dynamic objects. One result of
is
  is that child groups are converted to Array.
  
  
  
  I advise you do not do this. You lose the benefits of e4x
expressions,
  and wind up with loosely typed objects everywhere. The conversion
  always happens, so you do not gain any performance. Also the
 conversion
  modifies your data, turning strings into numbers where it can, and
 stuff
  like that. 
  
  
  
  You will be better served in the long run if you simply loop over
the
  XMLList and assign the attribute or child values to an instance of a
  strongly typed value object. 
  
  
  
  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 oneworld95
  Sent: Tuesday, October 28, 2008 2:19 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: Read XML data in as ArrayCollection
  
  
  
  Never mind! Figured it out:
  
  arrCol = event.result.premiums.premium as ArrayCollection
  
  Also took off the resultFormat from the HTTPService call.
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , oneworld95 oneworld95@ wrote:
  
   Hi. I've got a Flex app that receives XML (resultFormat = e4x)
 data
   from a servlet in this format,
   
   premiums
   premium id=ABCDEF01 startcount=0 currentcount=0
   categoryCD/category
   descriptionThe CD Description/description
   image id=3095
   filenameABCDEF01__1225202763673.jpg/filename
   /image
   /premium
   premium id=DEFGH01 startcount=0 currentcount=0
   categoryDVD/category
   descriptionDVD Description/description
   image id=3078
   filenameDEFGH01__1225132169948.jpg/filename
   /image
   /premium
   /premiums
   
   I need to convert it to an ArrayCollection and then an array to
   manipulate the results (using the slice method). Any solutions?
  Thanks.
  
 


 



[flexcoders] Re: New framework for Flex and AIR enterprise applications

2008-10-30 Thread andrii_olefirenko
It seems like a trend :) I've just posted my own framework that do the
same stuff but consists of one public class only :) (dependecy
injection, Spring-style AOP , asynchronous command chaining etc)

Check it out http://code.google.com/p/ctx/

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

 I'd like to share with all of you who develop enterprise applications
 this new framework:  Aconcagua Flex
 http://code.google.com/p/aconcagua-flex/   
 (http://code.google.com/p/aconcagua-flex/).
 
 It's aim is to help in building enterprise Flex and AIR applications,
 and it has beeing designed to be:
 
 - Test friendly: Helps to build testeable applications.
 - Not intrusive.
 - IoC and dependency injection capabilities.
 - Stackable: It is not only an MVC framework. It's a layered framework,
 and you can use the layers that you want separately.
 - Extensible.
 - Flexible.
 - Performant.
 - Easy to understand: It does not re-invent the wheel. Nothing new if
 you already know Spring and Cairngorm or PureMVC.
 - Etc, etc.
 
 For those who use maven, it is also available at this repository:
 http://aconcagua-flex.googlecode.com/svn/repository/releases/
 
 Of course, all feedback is wellcome :-)





[flexcoders] Re: UI component, a set function creationComplete

2008-10-30 Thread Amy
--- In flexcoders@yahoogroups.com, Michael Schmalle 
[EMAIL PROTECTED] wrote:

 well big mouth has to say one more thing,
 
 Imagine commitProperties() committing property states :) , all of 
your
 properties have been committed. Children can be created at any time 
AFTER
 super().
 
 What you fail to see is commitProperties() is a glorified 
createChildren().
 This only thing cool about createChildren() is Container calls
 createComponentDescriptors() which is a heavy method.
 
 Other than the above, commitProperties() ALWAYS runs before measure
() and
 updateDisplayList() so there is never a problem with creating 
children in
 commitProperties().
 
 But subclassing a UIComponent, give me a break. I was under the 
impression
 from Eric's post that his issue was more than just create the 
children in
 create children, why the hell would I tell him to circumvent a 
template
 method!?

You're right that in UIComponent there's not anything that directly 
addresses children, except as some of the styling code 
addresses implicit children.  However, as soon as you start dealing 
with subclasses, you can't really be so sure.  And if he's creating 
children in his commitProperties(), and then he subclasses 
commitProperties, he (or any developer who comes after him) 
absolutely will need to know what specific thing he did in his 
commitProperties(), because any properties that will affect those 
children will either need to be set before the super(), if they're 
carried forward into the new children, or after the super(), if they 
are depending on the children's having already been created in 
setting properties on them.

If you're creating commercial components, I would think that this 
would already have occurred to you, because it directly impacts 
whether you can get away with providing your components without 
source code.

And...createChildren() runs _before_ commitProperties.  So I'm 
thinking that creating the children actually later isn't going to 
help with a problem caused by the children's not existing when the 
logic runs on the children.

The real problem is that something external to the component seems to 
be trying to reach in and touch something in a way that the component 
should be controlling.  He didn't specify what the exact architecture 
is, so neither one of us could give him specific suggestions on how 
to solve the problem.  I don't believe, though, that delaying 
creation of the child components will help his timing issues.

 Sorry, your post felt a little personal.

I wrote it myself :-)

-Amy



[flexcoders] Re: UI component, a set function creationComplete

2008-10-30 Thread Amy
--- In flexcoders@yahoogroups.com, Michael Schmalle 
[EMAIL PROTECTED] wrote:

 Clarification;
  Children can be created at any time AFTER super().
 
 Since we all design software with a design, any property committal 
in a
 super() call has nothing to do with an instance of a child you 
create in the
 subclass (this is bad design). Thus, the above logic holds true.

But someone subclassing your Class may not have the same 
understanding of your design that you do, and it is quite common for 
developers to try to set properties on child objects in 
commitProperties.  I've even been advised to do so in this forum by 
people I respect.  Maybe in retrospect it was a bad idea to take such 
advice, but new developers are going to continue getting such advice 
and taking it.

So it very much matters where you create children when _other people_ 
are going to be subclassing your work.

-Amy
-Amy



[flexcoders] Re: Read XML data in as ArrayCollection

2008-10-30 Thread oneworld95
Thanks, Tracy. I have a similar Premium class on the server side with
Java so it's a good idea to do the same on the client with Flex.

Now on to more coding and debugging :)

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

 Yes, MyVO would be a custom object that uses strongly typed
 properties.  This approach it the ideal from a performance standpoint,
 since access of strongly typed property values is significantly faster
 that either dynamic object properties, or XML.
 
  
 
 The blog example you referenced in the other post produces an
 ArrayCollection of XML nodes.  While this is ok, it kinda does not make
 much sense.  If XML is ok for the items in the collection, just use
 XMLListCollection.  A loop is not necessary.  But this does not provide
 the advantages of a VO (ValueObject), which, in addition to the
 performance benefits, allows you to have calculated fields, and special
 methods like the fill method I alluded to earlier.
 
  
 
 Note, I use XML almost always, unless I need special work in the item
 object.  I have not had any performance issues with XML.  This is
 usually reported when scrolling with hundreds of visible itemrenderers
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of oneworld95
 Sent: Tuesday, October 28, 2008 3:50 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Read XML data in as ArrayCollection
 
  
 
 What is the MyVO? Is that a custom object class? Thanks.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  Please, do, the default resultFormat is evil ;)
  
  
  
  Here is a quick, untested start.
  
  _acPremiums = new ArrayCollection()
  
  var xmlResult:XML = XML(event.result);
  
  var xlPremiums:XMLList = xmlResult.premium; //or xmlResult.children();
  
  var xmlPremium:XML
  
  var voNew:MyVO;
  
  for () var i:int=0;ixlPremiums.length();i++) {
  
  xmlPremium = xlPremiums[i];
  
  voNew = new MyVO;
  
  voNew.fill(xmlPremium); //assumes a fill method. You could also
  simply assign the vo properties here
  
  _acPremiums.addItem(voNew);
  
  }
  
  
  
  Tracy
  
  
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of oneworld95
  Sent: Tuesday, October 28, 2008 2:55 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: Read XML data in as ArrayCollection
  
  
  
  Hi, Tracy. Hadn't thought about that. I'll work on implementing your
  suggestion. Thanks.
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Tracy Spratt tspratt@ wrote:
  
   That only works because the default resultFormat causes Flex to
 cnvert
   your xml into a nested structure of dynamic objects. One result of
 is
   is that child groups are converted to Array.
   
   
   
   I advise you do not do this. You lose the benefits of e4x
 expressions,
   and wind up with loosely typed objects everywhere. The conversion
   always happens, so you do not gain any performance. Also the
  conversion
   modifies your data, turning strings into numbers where it can, and
  stuff
   like that. 
   
   
   
   You will be better served in the long run if you simply loop over
 the
   XMLList and assign the attribute or child values to an instance of a
   strongly typed value object. 
   
   
   
   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 oneworld95
   Sent: Tuesday, October 28, 2008 2:19 PM
   To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
   Subject: [flexcoders] Re: Read XML data in as ArrayCollection
   
   
   
   Never mind! Figured it out:
   
   arrCol = event.result.premiums.premium as ArrayCollection
   
   Also took off the resultFormat from the HTTPService call.
   
   --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
   , oneworld95 oneworld95@ wrote:
   
Hi. I've got a Flex app that receives XML (resultFormat = e4x)
  data
from a servlet in this format,

premiums
premium id=ABCDEF01 startcount=0 currentcount=0
categoryCD/category
descriptionThe CD Description/description
image id=3095
filenameABCDEF01__1225202763673.jpg/filename
/image
/premium
premium id=DEFGH01 startcount=0 currentcount=0
categoryDVD/category
descriptionDVD Description/description
image id=3078

[flexcoders] Trace/debug in Flex Builder 3

2008-10-30 Thread oneworld95
Hi. I've been trying to get the debugging working in FB 3 with no
luck. I've downloaded and installed the debug version of FP 10. When I
run the app, I can right click on it in the browser and see Debugger
as an option.

However, every time I start up the app in debug by clicking the little
bug icon, it displays the status at the bottom, saying Launching
MyApp... (some%) and then when it hits about 91%, it gives this error,

Launch Failed
Failed to connect; session timed out.
Ensure that:
1. You compiled your Flash application with debugging on.
2. You are running the debugger version of Flash Player.

However, it does start the app in the browser but doesn't hit any
breakpoints. What am I doing wrong? Thanks.



RE: [flexcoders] Re: Read XML data in as ArrayCollection

2008-10-30 Thread Tracy Spratt
If you are using Java on the server, consider RemoteObject for the RPC
protocol.  You can pass objects directly into the client, without any
manual loop or conversion by registering the class in Flex.  I do not do
any of this so I can't be more specific.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of oneworld95
Sent: Thursday, October 30, 2008 11:49 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Read XML data in as ArrayCollection

 

Thanks, Tracy. I have a similar Premium class on the server side with
Java so it's a good idea to do the same on the client with Flex.

Now on to more coding and debugging :)

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

 Yes, MyVO would be a custom object that uses strongly typed
 properties. This approach it the ideal from a performance standpoint,
 since access of strongly typed property values is significantly faster
 that either dynamic object properties, or XML.
 
 
 
 The blog example you referenced in the other post produces an
 ArrayCollection of XML nodes. While this is ok, it kinda does not make
 much sense. If XML is ok for the items in the collection, just use
 XMLListCollection. A loop is not necessary. But this does not provide
 the advantages of a VO (ValueObject), which, in addition to the
 performance benefits, allows you to have calculated fields, and
special
 methods like the fill method I alluded to earlier.
 
 
 
 Note, I use XML almost always, unless I need special work in the item
 object. I have not had any performance issues with XML. This is
 usually reported when scrolling with hundreds of visible itemrenderers
 
 
 
 Tracy
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of oneworld95
 Sent: Tuesday, October 28, 2008 3:50 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Read XML data in as ArrayCollection
 
 
 
 What is the MyVO? Is that a custom object class? Thanks.
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  Please, do, the default resultFormat is evil ;)
  
  
  
  Here is a quick, untested start.
  
  _acPremiums = new ArrayCollection()
  
  var xmlResult:XML = XML(event.result);
  
  var xlPremiums:XMLList = xmlResult.premium; //or
xmlResult.children();
  
  var xmlPremium:XML
  
  var voNew:MyVO;
  
  for () var i:int=0;ixlPremiums.length();i++) {
  
  xmlPremium = xlPremiums[i];
  
  voNew = new MyVO;
  
  voNew.fill(xmlPremium); //assumes a fill method. You could also
  simply assign the vo properties here
  
  _acPremiums.addItem(voNew);
  
  }
  
  
  
  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 oneworld95
  Sent: Tuesday, October 28, 2008 2:55 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: Read XML data in as ArrayCollection
  
  
  
  Hi, Tracy. Hadn't thought about that. I'll work on implementing your
  suggestion. Thanks.
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Tracy Spratt tspratt@ wrote:
  
   That only works because the default resultFormat causes Flex to
 cnvert
   your xml into a nested structure of dynamic objects. One result of
 is
   is that child groups are converted to Array.
   
   
   
   I advise you do not do this. You lose the benefits of e4x
 expressions,
   and wind up with loosely typed objects everywhere. The conversion
   always happens, so you do not gain any performance. Also the
  conversion
   modifies your data, turning strings into numbers where it can, and
  stuff
   like that. 
   
   
   
   You will be better served in the long run if you simply loop over
 the
   XMLList and assign the attribute or child values to an instance of
a
   strongly typed value object. 
   
   
   
   Tracy
   
   
   
   
   
   
   
   
   
   From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  ] On
   Behalf Of oneworld95
   Sent: Tuesday, October 28, 2008 2:19 PM
   To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com

RE: [flexcoders] Trace/debug in Flex Builder 3

2008-10-30 Thread Tracy Spratt
Make sure of your installed version by hitting this site:

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_15507

 

Make sure FB is configured to use the browser that has the debug player.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of oneworld95
Sent: Thursday, October 30, 2008 11:59 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Trace/debug in Flex Builder 3

 

Hi. I've been trying to get the debugging working in FB 3 with no
luck. I've downloaded and installed the debug version of FP 10. When I
run the app, I can right click on it in the browser and see Debugger
as an option.

However, every time I start up the app in debug by clicking the little
bug icon, it displays the status at the bottom, saying Launching
MyApp... (some%) and then when it hits about 91%, it gives this error,

Launch Failed
Failed to connect; session timed out.
Ensure that:
1. You compiled your Flash application with debugging on.
2. You are running the debugger version of Flash Player.

However, it does start the app in the browser but doesn't hit any
breakpoints. What am I doing wrong? Thanks.

 



[flexcoders] Re: textArea.setFocus();

2008-10-30 Thread valdhor
I found this bug in Jira:

https://bugs.adobe.com/jira/browse/FB-429

It's been around since March of 06. Should we just vote on this one or
create a new bug entry?

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

 I believe the Java browser plug-ins don't have this problem so it
might be worth filing a bug and collection votes.




Re: [flexcoders] Re: UI component, a set function creationComplete

2008-10-30 Thread Michael Schmalle
Amy,
I have read all that you have written. 2 years of sales, no complaints on
the algorithm I use.

 So it very much matters where you create children when _other people_ are
going to be subclassing your work.

I have created a sub template in commitProperties(); That can
be overridden from any subclass since it separates operations into hooks.

1.

public function set titleBarRenderer(value:IFactory):void
{
if (_titleBarRenderer != value)
{
_titleBarRenderer = value;
titleBarRendererChanged = true;
invalidateProperties();
dispatchEvent(new Event(titleBarRendererChanged));
}
}

2.

override public function commitProperties():void
{
super.commitProperties();

if (titleBarRendererChanged)
{
commitTitleBarRenderer();
titleBarRendererChanged = false;
}
}

3.

protected function commitTitleBarRenderer():void
{
 createTitleBar();
}

4.

protected function createTitleBar():void
{
_titleBar  = PartFactory.createComponentPart(
TITLE_BAR_NAME, this, rawChildren,
DisplayObject(_titleBar));
}

5.

tk_internal function partAdded(name:String, instance:Object):void
{
if (instance == _titleBar )
{
    configuration
}
}

As far as not releasing code, this next iteration of products will have
source code, but the template is still the same.

I hear you on the I listen to respected developers on this list but, this
way works even better than how the framework is set up (for subclassing).
Adds more method calls but, it's impact is irrelevant since these calls are
not 100 every minute. I also use this template for other properties that are
not processor intensive or called to frequently.

Mike



On Thu, Oct 30, 2008 at 11:44 AM, Amy [EMAIL PROTECTED] wrote:

   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Michael Schmalle
 [EMAIL PROTECTED] wrote:
 
  Clarification;
   Children can be created at any time AFTER super().
 
  Since we all design software with a design, any property committal
 in a
  super() call has nothing to do with an instance of a child you
 create in the
  subclass (this is bad design). Thus, the above logic holds true.

 But someone subclassing your Class may not have the same
 understanding of your design that you do, and it is quite common for
 developers to try to set properties on child objects in
 commitProperties. I've even been advised to do so in this forum by
 people I respect. Maybe in retrospect it was a bad idea to take such
 advice, but new developers are going to continue getting such advice
 and taking it.

 So it very much matters where you create children when _other people_
 are going to be subclassing your work.

 -Amy
 -Amy

  




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


[flexcoders] Re: UI component, a set function creationComplete

2008-10-30 Thread Tim Hoff

Anyone taking bets?

-TH

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

 --- In flexcoders@yahoogroups.com, Michael Schmalle
 teoti.graphix@ wrote:
 
  Amy,
   These functions are in place for very good reasons, and if you
 try to
  circumvent them you have a
  really good chance of running into problems.
  I will happily disagree with you on this and not say much else. I
 don't feel
  like getting into a pissing match with documentation, as I am sure
 this is
  what you are quoting. My information comes from 3 years of low level
  component development experience.
 
   circumvent
 
  Who ever said this? I don't think you quite understand what I am
 talking
  about.
 
   you are probably going to fail miserably unless you put that
 logic in
   _before_ the super.commitProperties().
  This is just plain wrong. I don't have time to write an essay on
 why you
  don't understand what I said.

 I'm not quoting anything. What I said comes from working with
 UIMovieClip, where you have to roll your own. It quickly becomes
 obvious why the Flex engineers built things the way they did.

 The fact that you essentially said no you're wrong without any
 backup seems to me like you did, indeed, intend a pissing match.

 -Amy






[flexcoders] Re: need your advice on flash or flex

2008-10-30 Thread valdhor
If it were me...

1.  Use ImageMagick (http://www.imagemagick.org) on the server to
extract the photoshop layers then modify and convert them.

2.  Have the Flash files reference external images and text. Modify
these external files rather than the flash files. Leave the flash
files on disk and use the database to reference where each one is.

You can use whatever tools you are comfortable with. Me, I would use
PHP on the backend using the ImageMagick API; For the frontend I would
use Flex. But that is just me.


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

 
 On next month I will incharge of web-based app project that:
 ==
 1) - Read layers of PSD file (photoshop) then create banner of each
layer.
 - Display images in categories.
 - Drage and drop image into banner (gif file) frame.
 - rotate, resize text and image inside that banner.
 
 2) - insert flash file (.fla?) to DB.
 - load that flash files into web GUI
 - edit text and image inside that flash file.
 - save back to DB.
  ==
 So my questions are:
 - what tool I should use? flash? or flex? or both? or ajax with php? and
 why?
 - about insert flash file (.fla?) to DB, this web app is for
intranet use
 only, and size of flash file is less then 300kb. So should I need to pay
 attention on performance etc?
 - especially edit text and image inside flash file (fla?), flash or
flex is
 better to use? why?
 I'm very confused. Please help me. I need your help.
 regards,
 -- 
 View this message in context:
http://www.nabble.com/need-your-advice-on-flash-or-flex-tp20227710p20227710.html
 Sent from the FlexCoders mailing list archive at Nabble.com.





[flexcoders] Re: Read XML data in as ArrayCollection

2008-10-30 Thread oneworld95
Thanks, Tracy. With the current version of Java we have on the
production server (1.4.2_12-b03), I don't know if that's supported. We
plan to upgrade to 1.5 next year.

Where can I read more about the RemoteObject/RPC for Java? Thanks.

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

 If you are using Java on the server, consider RemoteObject for the RPC
 protocol.  You can pass objects directly into the client, without any
 manual loop or conversion by registering the class in Flex.  I do not do
 any of this so I can't be more specific.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of oneworld95
 Sent: Thursday, October 30, 2008 11:49 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Read XML data in as ArrayCollection
 
  
 
 Thanks, Tracy. I have a similar Premium class on the server side with
 Java so it's a good idea to do the same on the client with Flex.
 
 Now on to more coding and debugging :)
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  Yes, MyVO would be a custom object that uses strongly typed
  properties. This approach it the ideal from a performance standpoint,
  since access of strongly typed property values is significantly faster
  that either dynamic object properties, or XML.
  
  
  
  The blog example you referenced in the other post produces an
  ArrayCollection of XML nodes. While this is ok, it kinda does not make
  much sense. If XML is ok for the items in the collection, just use
  XMLListCollection. A loop is not necessary. But this does not provide
  the advantages of a VO (ValueObject), which, in addition to the
  performance benefits, allows you to have calculated fields, and
 special
  methods like the fill method I alluded to earlier.
  
  
  
  Note, I use XML almost always, unless I need special work in the item
  object. I have not had any performance issues with XML. This is
  usually reported when scrolling with hundreds of visible itemrenderers
  
  
  
  Tracy
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of oneworld95
  Sent: Tuesday, October 28, 2008 3:50 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: Read XML data in as ArrayCollection
  
  
  
  What is the MyVO? Is that a custom object class? Thanks.
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Tracy Spratt tspratt@ wrote:
  
   Please, do, the default resultFormat is evil ;)
   
   
   
   Here is a quick, untested start.
   
   _acPremiums = new ArrayCollection()
   
   var xmlResult:XML = XML(event.result);
   
   var xlPremiums:XMLList = xmlResult.premium; //or
 xmlResult.children();
   
   var xmlPremium:XML
   
   var voNew:MyVO;
   
   for () var i:int=0;ixlPremiums.length();i++) {
   
   xmlPremium = xlPremiums[i];
   
   voNew = new MyVO;
   
   voNew.fill(xmlPremium); //assumes a fill method. You could also
   simply assign the vo properties here
   
   _acPremiums.addItem(voNew);
   
   }
   
   
   
   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 oneworld95
   Sent: Tuesday, October 28, 2008 2:55 PM
   To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
   Subject: [flexcoders] Re: Read XML data in as ArrayCollection
   
   
   
   Hi, Tracy. Hadn't thought about that. I'll work on implementing your
   suggestion. Thanks.
   
   --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
   , Tracy Spratt tspratt@ wrote:
   
That only works because the default resultFormat causes Flex to
  cnvert
your xml into a nested structure of dynamic objects. One result of
  is
is that child groups are converted to Array.



I advise you do not do this. You lose the benefits of e4x
  expressions,
and wind up with loosely typed objects everywhere. The conversion
always happens, so you do not gain any performance. Also the
   conversion
modifies your data, turning strings into numbers where it can, and
   stuff
like that. 



You will be better served in the long run if you simply loop over
  the
XMLList and assign the attribute or child values to an instance of
 a
strongly typed value object. 



Tracy








 

[flexcoders] Re: How to Embed an Application that Supports Deep-Linking?

2008-10-30 Thread andrii_olefirenko
does your page (that one you're trying embed into) have any other
flash movies?

Regards,
Andrii

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

 Hi,
 
 for Training i developed an application that uses the Flex 3 
 Deeplinking-Mechanism. I used the Flex Builder and everything Works 
 perfect when i open the html-file, the flex builder creates.
 
 Now i tried to embed the application into an existing page (for example 
 www.mydomain.de/myapp.html . I placed the application at 
 www.myotherdomain.de/testapp/ and started trying.
 Since i don't know much about JavaScript i tried the 
 copy-paste-Approach. Copy the content of the generated html-file, fix 
 all links, check all links, hope it works.
 
 Well, all links work, i hoped and it didn't.
 No action inside my app changes the url inside the browser.
 No parameters attached to the url in the prowser affect the application.
 
 My current Testembed is added as an attachment. Everything beside 
 testapp_embed.txt was generated by the flex builder.
 
 
 How can (or should) i use a flex application from another domain and 
 make deeplinking still work?
 
 I hope somebody out there can help me.




Re: [flexcoders] Flash CS4 - Flex Harmony

2008-10-30 Thread Tom Chiverton
On Wednesday 29 Oct 2008, djhatrick wrote:
 Also how do I configure Flex to use the stand alone Flash 10 debug
 player for actionscript projects?

Change the run/debug settings for the project, or pick the appropriate option 
during the new project wizard.

-- 
Tom Chiverton
Helping to dynamically deploy magnetic essential e-tailers





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: Flex with WebOrb Issues... no build

2008-10-30 Thread valdhor
Eric

I don't use WebORB for Java but I have a lot of experience with WebORB
for PHP.

It seems strange to me that WebORB would return a different data
structure.

If you could post some code, I may be able to figure out the problem
(No guarantees though).

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

 Hello all.. 
 
 I've got Flex 3 Builder running on a XP machine with WebOrb for Java
installed and the project is using SVN. I am in the process of trying
to convert an existing Flex app over to try and run on WebOrb. I was
successiful in converting the standalone app (not running on a
server) over to run on WebOrb. I did this by manaully updating the
.flexProperties to point tothe weborb installation, update the
compiler line and added the WebOrb swc reference. 
 
 All seemed to be working fine. I am having to go through line by
line to update code. Some of the data structure being returned through
WebOrb is different. I was able to make some changes with no problems
until last night. I had the idea to comment out all of Web services
call so to get the app up and running with no data being returned. If
I tired to run it without the lines commented out, the application
aborted. So after running through the whole app and removing the web
service commits, I tired to debug.. It opens the browser and then
tires to build the workspace.. sits at 0% and nothing ever gets built.
If I close out the browser, Flex continues to build.. but never does
anything... If I kill the Flex process and try to reponen the project,
I get a Java error and Flex crashes... 
 
 Any ideas? 
 
 Eric W Dunn 
 Adaption Technologies 
 281-465-3326 
 [EMAIL PROTECTED]





[flexcoders] Re: New framework for Flex and AIR enterprise applications

2008-10-30 Thread dev.apostiglioni
Hi Andrii,

I'll have a look.

Cheers,
Andres

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

 It seems like a trend :) I've just posted my own framework that do the
 same stuff but consists of one public class only :) (dependecy
 injection, Spring-style AOP , asynchronous command chaining etc)
 
 Check it out http://code.google.com/p/ctx/
 
 --- In flexcoders@yahoogroups.com, dev.apostiglioni
 dev.apostiglioni@ wrote:
 
  I'd like to share with all of you who develop enterprise applications
  this new framework:  Aconcagua Flex
  http://code.google.com/p/aconcagua-flex/   
  (http://code.google.com/p/aconcagua-flex/).
  
  It's aim is to help in building enterprise Flex and AIR applications,
  and it has beeing designed to be:
  
  - Test friendly: Helps to build testeable applications.
  - Not intrusive.
  - IoC and dependency injection capabilities.
  - Stackable: It is not only an MVC framework. It's a layered
framework,
  and you can use the layers that you want separately.
  - Extensible.
  - Flexible.
  - Performant.
  - Easy to understand: It does not re-invent the wheel. Nothing new if
  you already know Spring and Cairngorm or PureMVC.
  - Etc, etc.
  
  For those who use maven, it is also available at this repository:
  http://aconcagua-flex.googlecode.com/svn/repository/releases/
  
  Of course, all feedback is wellcome :-)
 





[flexcoders] Re: File name issue (php created file)

2008-10-30 Thread gabriela.perry
Oh My, Ryan, Im sorry.
I really was a php problem... A well known issue, for us who use
special carateres.
But I was so tired and stressed that I couldn figure it out...

1. Save the file's name using utf8_decode
2. Retrieve it using utf8_encode

It has nothing to do with Flex.

Thank you so much for your time, and sorry for asking php stuff here :0(




[flexcoders] Dynamicaly loading of images

2008-10-30 Thread Alexander Baetz
Hi,

for a special tool i want to display buttons with icons that where 
loaded at runtime (based on an xml document loaded at runtime)
in adobe livedocs i read that i cant load icons at runtime.

To workaround that i switched to Images in buttonmode. But everytime the 
displayed image changes because i changed the source attribute (for 
example when my button is disabled) there is a timegap and the image 
is empty.
This happens even i used the same source-url before.
My guess would be that my application forgetts the imagedata if no 
object uses it anymore and therefore loads the url again.

So im looking either for a way to store the imagedata and supply it to 
my Button when necessary.

Greetings,
Alexander





--
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: Invalid Embed directive

2008-10-30 Thread arieljake
You can also use a source path like this from any source file:

/../ EX: source=/../assets/images/logo.gif

to get to the base of the src folder and then back out of it.

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

 Thanks. This finally worked for me,
 
 Application {
   backgroundImage: global/media/flowers.jpg;
  }
 
 I'm guessing Embed directives are checked at compile time and for
 whatever reason, Flex compiler couldn't find the file. 
 
 --- In flexcoders@yahoogroups.com, Douglas Knudsen
 douglasknudsen@ wrote:
 
  and if you are compiling the CSS for runtime loads, the path will be
  different yet again
  
  
  Douglas Knudsen
  http://www.cubicleman.com
  this is my signature, like it?
  
  
  On Wed, Oct 29, 2008 at 4:59 PM, Ryan Graham Ryan.Graham@wrote:
  
  And the path is relative to where you are declaring the
 mx:Style that
   loads the stylesheet file, of course. :)
  
   HTH,
   Ryan
  
--
   *From:* flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] *On
   Behalf Of *Ryan Graham
   *Sent:* Wednesday, October 29, 2008 1:55 PM
  
   *To:* flexcoders@yahoogroups.com
   *Subject:* RE: [flexcoders] Invalid Embed directive
  
 The compiler expects that image path to be in one of your
 project source
   folders during build. If that path exists in your bin folder
only, the
   compiler will never see it for an embed operation.
  
   HTH,
   Ryan
  
--
   *From:* flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] *On
   Behalf Of *Jim Hayes
   *Sent:* Wednesday, October 29, 2008 1:20 PM
   *To:* flexcoders@yahoogroups.com
   *Subject:* RE: [flexcoders] Invalid Embed directive
  
  
   It can be confusing as to where the file thinks it is at compile
 time - in
   fact I remain fairly confused about it :(
   You might try /global/media/flowers.jpg or
 ./global/media/flowers.jpg
   if you need to go up a directory then ../ works fine.
  
   -Original Message-
   From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com on
 behalf
   of oneworld95
   Sent: Wed 29/10/2008 19:56
   To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com
   Subject: [flexcoders] Invalid Embed directive
  
   Hi. I've got a Style tag with the following style in it,
  
   Application {
   background-image: Embed(source=global/media/flowers.jpg);
   }
  
   I keep getting the Invalid Embed directive in stylesheet - can't
   resolve source. I know the image exists and is at that path. Help!
  
   __
   This communication is from Primal Pictures Ltd., a company
 registered in
   England and Wales with registration No. 02622298 and registered
 office: 4th
   Floor, Tennyson House, 159-165 Great Portland Street, London, W1W
 5PA, UK.
   VAT registration No. 648874577.
  
   This e-mail is confidential and may be privileged. It may be read,
 copied
   and used only by the intended recipient. If you have received it
 in error,
   please contact the sender immediately by return e-mail or by
 telephoning
   +44(0)20 7637 1010. Please then delete the e-mail and do not
 disclose its
   contents to any person.
   This email has been scanned for Primal Pictures by the MessageLabs
 Email
   Security System.
   __
 This message is private and confidential. If you have received
it in
   error, please notify the sender and remove it from your system.
  
   This message is private and confidential. If you have received it
 in error,
   please notify the sender and remove it from your system.

  
 





Re: [flexcoders] Dynamicaly loading of images

2008-10-30 Thread Adrian Williams

Hi Alexander,

   Not sure if this helps or not, but for images that I need in my app, 
I embed them from the get go, bind them and assign them to a var that I 
can reference on the fly laterand can change by simply changing the 
source for the image id:


   [Bindable]
   [Embed(source='assets/img/logo-inline.png')]
   private var Logo:Class;

   mx:Image id='logoImage source={Logo} /

   Then to change the image...

   logoImage.source = {newLogo};

HTH,
Adrian

Alexander Baetz wrote:

Hi,

for a special tool i want to display buttons with icons that where 
loaded at runtime (based on an xml document loaded at runtime)

in adobe livedocs i read that i cant load icons at runtime.

To workaround that i switched to Images in buttonmode. But everytime the 
displayed image changes because i changed the source attribute (for 
example when my button is disabled) there is a timegap and the image 
is empty.

This happens even i used the same source-url before.
My guess would be that my application forgetts the imagedata if no 
object uses it anymore and therefore loads the url again.


So im looking either for a way to store the imagedata and supply it to 
my Button when necessary.


Greetings,
Alexander





--
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] Dynamicaly loading of images

2008-10-30 Thread Jim Hayes
I seem to remember the image component does that.
You might try Ely Greenfields (?) superImage component instead, as I
remember it keeps it's own cache.
Or find a way to load them with a Loader and store their BitmapData
somewhere. The trick is to do something like this when the Loader
completes

var yourImageData:BitmapData = loader.content as BitmapData;

Hope that helps,

Jim.

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alexander Baetz
Sent: 30 October 2008 16:59
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dynamicaly loading of images

Hi,

for a special tool i want to display buttons with icons that where 
loaded at runtime (based on an xml document loaded at runtime)
in adobe livedocs i read that i cant load icons at runtime.

To workaround that i switched to Images in buttonmode. But everytime the

displayed image changes because i changed the source attribute (for 
example when my button is disabled) there is a timegap and the image 
is empty.
This happens even i used the same source-url before.
My guess would be that my application forgetts the imagedata if no 
object uses it anymore and therefore loads the url again.

So im looking either for a way to store the imagedata and supply it to 
my Button when necessary.

Greetings,
Alexander





--

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




__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__


[flexcoders] Advanced Data Grid - LockedRowCount property

2008-10-30 Thread grg_blls
Hi all, 
I am developing with Flex Plug-In build 3.0.194161 in Eclipse 3.3.2 
build M20080221-1800. 
The application includes a Advanced Data Grid control, that I need to 
have the first row locked for vertical scrolling. 
Setting property lockedRowCount=1, though accepted - doesn't produce 
any RTE, does nothing also. I.e. has no effect and the adg scrolls as 
normally. 
Further, after setting the property value equal to 1 (as required in 
my case), this property value is reported back as 0 (doesn't seem to 
get set ever). 

Any ideas? 
Thanks all 
George 





[flexcoders] Advanced Data Grid with Grouped Columns

2008-10-30 Thread grg_blls
Hi all, 

using a ADG control and having set for groupedColumns. I also use 
ItemEditors set as Renderers. The mxml code snippet is attached. 

This works finw as long as I don't use the vertical scroll bar (if 
there are enough data rows in the adg to need scrolling). If I try 
vertical scroll, it always throws a RTE. 
This is not so, if I don't use groupedColumns. Then the adg and the 
application work perfectly stable. 

Any ideas? 
Thanks all 
George 

Attach Code 

mx:groupedColumns 
!-- column 0 -- 
mx:AdvancedDataGridColumn dataField=JobPlan headerText=Column 0 
id=adgC0 textAlign=center width=80 minWidth=80 
editable=false sortable=false / 
!-- column 1 -- 
mx:AdvancedDataGridColumn dataField=Doc width=61 minWidth=61 
id=adgC1 headerText=Column 1 editable=false textAlign=center 
sortable=false/ 
mx:AdvancedDataGridColumnGroup headerText=Grouped Columns  
!-- column 2 -- 
mx:AdvancedDataGridColumn  dataField=SPA width=61 minWidth=61 
id=adgC2 editable=true headerText=Start textAlign=left 
sortable=false itemEditor=NSStartP_  editorDataField=value / 
!-- column 3 -- 
mx:AdvancedDataGridColumn  dataField=EPA width=61 minWidth=61  
id=adgC3 editable=true headerText=End textAlign=left 
sortable=false itemEditor=NSEndP_ editorDataField=value  / 
/mx:AdvancedDataGridColumnGroup 
/mx:groupedColumns 




RE: [flexcoders] Re: textArea.setFocus();

2008-10-30 Thread Alex Harui
I think you can open bugs against the Flash Player now, so I would do that, and 
reference this bug

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of valdhor
Sent: Thursday, October 30, 2008 9:06 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: textArea.setFocus();


I found this bug in Jira:

https://bugs.adobe.com/jira/browse/FB-429

It's been around since March of 06. Should we just vote on this one or
create a new bug entry?

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

 I believe the Java browser plug-ins don't have this problem so it
might be worth filing a bug and collection votes.



[flexcoders] Re: How do arguments to an AS3 class translate to MXML?

2008-10-30 Thread Amy
--- In flexcoders@yahoogroups.com, Michael Schmalle 
[EMAIL PROTECTED] wrote:

 Note ::
 The IMXMLObject method signature is (d);
 
 
initializedhttp://127.0.0.1:49487/help/topic/com.adobe.flexbuilder.he
lp/langref/mx/core/IMXMLObject.html#initialized()
 
(document:Objecthttp://127.0.0.1:49487/help/topic/com.adobe.flexbuild
er.help/langref/Object.html,
 
id:Stringhttp://127.0.0.1:49487/help/topic/com.adobe.flexbuilder.help
/langref/String.html
 ):voidhttp://127.0.0.1:49487/help/topic/com.adobe.flexbuilder.help/
langref/specialTypes.html#void
 
 the UIComponent's initializer is not initialized(), it's;
 
 initialize():void
 
 The UIComponent.initialized is a property not a method.

It's a setter, which is a method.  IOW, you can't implement this 
interface with anything that inherits from UIComponent.  Not sure why 
you take everything I say as a personal challenge, but feel free to 
try it if you don't believe me.



[flexcoders] Re: UI component, a set function creationComplete

2008-10-30 Thread Amy
--- In flexcoders@yahoogroups.com, Michael Schmalle 
[EMAIL PROTECTED] wrote:

 Amy,
 I have read all that you have written. 2 years of sales, no 
complaints on
 the algorithm I use.
 
  So it very much matters where you create children when _other 
people_ are
 going to be subclassing your work.
 
 I have created a sub template in commitProperties(); That can
 be overridden from any subclass since it separates operations into 
hooks.
 
 1.
 
 public function set titleBarRenderer(value:IFactory):void
 {
 if (_titleBarRenderer != value)
 {
 _titleBarRenderer = value;
 titleBarRendererChanged = true;
 invalidateProperties();
 dispatchEvent(new Event(titleBarRendererChanged));
 }
 }

This is working with a child that may change over time.  So right 
there, this is something that needs _more_ than createChildren().  
However, I think in most places where this kind of behavior is needed 
in the Framework code, a default version of the child is created in 
createChildren() so it is available for subclasses to work with in 
commitProperties().  There's an implicit assumption on the part of 
most developers that all components have been created before 
commitProperties() is called, and by not having a child available the 
_first_ time commitProperties runs, you may have a developer doing 
what he thinks is right and stumbling over your logic.

 2.
 
 override public function commitProperties():void
 {
 super.commitProperties();
 
 if (titleBarRendererChanged)
 {
 commitTitleBarRenderer();
 titleBarRendererChanged = false;
 }
 }

And all you need to break this is some developer overriding your code 
like this:

override public function commitProperties():void
{
if (_styleChanged) {
   _titleBar.setStyle('color', 0xFF);
}
super.commitProperties();
}


 3.
 
 protected function commitTitleBarRenderer():void
 {
  createTitleBar();
 }
 
 4.
 
 protected function createTitleBar():void
 {
 _titleBar  = PartFactory.createComponentPart(
 TITLE_BAR_NAME, this, rawChildren,
 DisplayObject(_titleBar));
 }
 
 5.
 
 tk_internal function partAdded(name:String, instance:Object):void
 {
 if (instance == _titleBar )
 {
 configuration
 }
 }
 
 As far as not releasing code, this next iteration of products will 
have
 source code, but the template is still the same.
 
 I hear you on the I listen to respected developers on this list 
but, this
 way works even better than how the framework is set up (for 
subclassing).

...yeah. ;-)

 Adds more method calls but, it's impact is irrelevant since these 
calls are
 not 100 every minute. I also use this template for other properties 
that are
 not processor intensive or called to frequently.

So far, you've been lucky.  Either the developers who use your 
components are familiar enough with the right way that they haven't 
broken anything, or they're too new to be messing where they 
shouldn't.  All you need is one intermediate developer charging 
through the middle of your code, and you'll have a problem.

And, to get back to the OP, it's clear he was looking for guidance in 
best practices.  You and I may disagree on when it's ok to bend or 
break the rules, but when someone _doesn't_ know the rules, it's 
probably better not to jump him to the bending/breaking stage.

-Amy



Re: [flexcoders] Re: How do arguments to an AS3 class translate to MXML?

2008-10-30 Thread Michael Schmalle
This wasn't a personal challenge. I didn't say you were wrong, I noted that
the mxml interface method had a d on the end. I then said UIComponent has
an initialized property like the method in the mxml interface.
Writing emails to a forum is kind of relaxing compared to the rest of the
day. Maybe you should ask me to clarify better before adding paragraphs
unrelated to what I was trying to convey.

If I interpreted the question wrong and you can see it (leading a developer
down the wrong road), try to clarify the misinterpretation with a question.

Mike

On Thu, Oct 30, 2008 at 2:22 PM, Amy [EMAIL PROTECTED] wrote:

   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Michael Schmalle
 [EMAIL PROTECTED] wrote:
 
  Note ::
  The IMXMLObject method signature is (d);
 
 
 initializedhttp://127.0.0.1:49487/help/topic/com.adobe.flexbuilder.he
 lp/langref/mx/core/IMXMLObject.html#initialized()
 
 (document:Objecthttp://127.0.0.1:49487/help/topic/com.adobe.flexbuild
 er.help/langref/Object.html,
 
 id:Stringhttp://127.0.0.1:49487/help/topic/com.adobe.flexbuilder.help
 /langref/String.html
  ):voidhttp://127.0.0.1:49487/help/topic/com.adobe.flexbuilder.help/
 langref/specialTypes.html#void
 
  the UIComponent's initializer is not initialized(), it's;
 
  initialize():void
 
  The UIComponent.initialized is a property not a method.

 It's a setter, which is a method. IOW, you can't implement this
 interface with anything that inherits from UIComponent. Not sure why
 you take everything I say as a personal challenge, but feel free to
 try it if you don't believe me.

  



[flexcoders] rollOut event

2008-10-30 Thread Richard Rodseth
I have a window-like MXML component with a title bar (currently done with
VBoxes and HBoxes) and a content area (a Canvas). Rolling over an info icon
in the tile bar causes another component to be overlaid (made visible) in
the content area.

I used rollOver on the info button to make the overlay visible, and I added
a rollOut on the root (window-like) component and on the overlay itself to
hide the overlay. The puzzling thing is that the root-level rollOut fires
when I move the cursor out of the info icon to the right (remaining within
the title bar), but not when I move down towards the content area and
overlay (even with a gap between the title bar and overlay top). This is
actually not a terrible thing, user-experience-wise, but it's not what I
expected. Any ideas what's going on?

Thanks.


[flexcoders] Re: Dynamicaly loading of images

2008-10-30 Thread Amy
--- In flexcoders@yahoogroups.com, Alexander Baetz 
[EMAIL PROTECTED] wrote:

 Hi,
 
 for a special tool i want to display buttons with icons that where 
 loaded at runtime (based on an xml document loaded at runtime)
 in adobe livedocs i read that i cant load icons at runtime.
 
 To workaround that i switched to Images in buttonmode. But 
everytime the 
 displayed image changes because i changed the source attribute (for 
 example when my button is disabled) there is a timegap and the 
image 
 is empty.
 This happens even i used the same source-url before.
 My guess would be that my application forgetts the imagedata if 
no 
 object uses it anymore and therefore loads the url again.
 
 So im looking either for a way to store the imagedata and supply it 
to 
 my Button when necessary.

http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf
Q11

Also be aware that you can use literally any class as an icon.  For 
example, you could subclass UIComponent and put an image control in 
that.   If (say) you weren't averse to enquiring of 
Application.application, you could theoretically access a function or 
variable there from your icon.  Or...you could subclass Button or 
whatever to pass a style into the icon, for instance, and that style 
could, theoretically, contain a path to an image.

HTH;

Amy



RE: [flexcoders] Re: UI component, a set function creationComplete

2008-10-30 Thread Alex Harui
I know I shouldn't step in here, but I'd like to ask for a cease-fire.

Faithful Flex developers may know that Amy was the guinea pig for Gordon and my 
first article in Flex Authority magazine where we discussed the component 
lifecycle at length.  It makes me happy to see that Amy has absorbed the ins 
and outs of the lifecycle and is now one of our top evangelists for how to use 
it.  Michael has been providing expert advice on this forum for quite a while 
now, and I have seldom seen technical errors in his postings.

The lifecycle is a set of rules and there are exceptions to every rule.  I 
would bet that Michael has figured out where he can bend the rules successfully 
and isn't just being lucky, but others of you may want to just follow the 
rules.  The original poster and others are encouraged to get their hands on a 
copy of Flex Authority and familiarize themselves with the lifecycle.

Personally, I use createChildren to create any children I know I'm going to 
need.  Everything else is created later depending on when I know enough about 
which ones and how many to make.  ItemRenderers are created as late as 
updateDisplayList because that's when we know how many we need.

-Alex

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Amy
Sent: Thursday, October 30, 2008 11:38 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: UI component, a set function  creationComplete


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

 Amy,
 I have read all that you have written. 2 years of sales, no
complaints on
 the algorithm I use.

  So it very much matters where you create children when _other
people_ are
 going to be subclassing your work.

 I have created a sub template in commitProperties(); That can
 be overridden from any subclass since it separates operations into
hooks.

 1.

 public function set titleBarRenderer(value:IFactory):void
 {
 if (_titleBarRenderer != value)
 {
 _titleBarRenderer = value;
 titleBarRendererChanged = true;
 invalidateProperties();
 dispatchEvent(new Event(titleBarRendererChanged));
 }
 }

This is working with a child that may change over time. So right
there, this is something that needs _more_ than createChildren().
However, I think in most places where this kind of behavior is needed
in the Framework code, a default version of the child is created in
createChildren() so it is available for subclasses to work with in
commitProperties(). There's an implicit assumption on the part of
most developers that all components have been created before
commitProperties() is called, and by not having a child available the
_first_ time commitProperties runs, you may have a developer doing
what he thinks is right and stumbling over your logic.

 2.

 override public function commitProperties():void
 {
 super.commitProperties();

 if (titleBarRendererChanged)
 {
 commitTitleBarRenderer();
 titleBarRendererChanged = false;
 }
 }

And all you need to break this is some developer overriding your code
like this:

override public function commitProperties():void
{
if (_styleChanged) {
_titleBar.setStyle('color', 0xFF);
}
super.commitProperties();
}

 3.

 protected function commitTitleBarRenderer():void
 {
 createTitleBar();
 }

 4.

 protected function createTitleBar():void
 {
 _titleBar = PartFactory.createComponentPart(
 TITLE_BAR_NAME, this, rawChildren,
 DisplayObject(_titleBar));
 }

 5.

 tk_internal function partAdded(name:String, instance:Object):void
 {
 if (instance == _titleBar )
 {
  configuration
 }
 }

 As far as not releasing code, this next iteration of products will
have
 source code, but the template is still the same.

 I hear you on the I listen to respected developers on this list
but, this
 way works even better than how the framework is set up (for
subclassing).

...yeah. ;-)

 Adds more method calls but, it's impact is irrelevant since these
calls are
 not 100 every minute. I also use this template for other properties
that are
 not processor intensive or called to frequently.

So far, you've been lucky. Either the developers who use your
components are familiar enough with the right way that they haven't
broken anything, or they're too new to be messing where they
shouldn't. All you need is one intermediate developer charging
through the middle of your code, and you'll have a problem.

And, to get back to the OP, it's clear he was looking for guidance in
best practices. You and I may disagree on when it's ok to bend or
break the rules, but when someone _doesn't_ know the rules, it's
probably better not to jump him to the bending/breaking stage.

-Amy



[flexcoders] code going into a black whole

2008-10-30 Thread Aaron Miller
Hello, I have some strange behavior I'm trying to figure out. It seems like
my code just stops working in mid-loop without giving any errors.

==
public function set pageModel( value:PageModel ): void {
trace('PageCanvas.pageModel = '+value);
if( _pageModel != value ) {
_pageModel = value;
 this.width = _pageModel.width;
this.height = _pageModel.height;
 this.removeAllChildren();
 for each( var elementModel:IPageElementModel in _pageModel.elements ) {
trace('This happens!');
var newElement:IElementControl =
_docManager.getNewElementInstance(elementModel);

trace('But this does not!');
 this.addChild( DisplayObject(newElement) );
}
 trace('End of the line.');
}
}
==

trace output:
==
PageCanvas.pageModel = [object PageModel]
This happens!
DocManager.getNewElementInstance
==

So it seams that everything stops after the call to getNewElementInstance.

Is it because I'm doing all this stuff in a setter? If this is the case,
what would be the appropriate way to recreate all the children when the
underlying data model changes?


Thanks for any input!
~Aaron


RE: [flexcoders] code going into a black whole

2008-10-30 Thread Gordon Smith
My guess is that getNewElementInstance() threw an error and you're not running 
in a debugger.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Aaron 
Miller
Sent: Thursday, October 30, 2008 2:27 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] code going into a black whole


Hello, I have some strange behavior I'm trying to figure out. It seems like my 
code just stops working in mid-loop without giving any errors.


==
public function set pageModel( value:PageModel ): void {
trace('PageCanvas.pageModel = '+value);
if( _pageModel != value ) {
_pageModel = value;

this.width = _pageModel.width;
this.height = _pageModel.height;

this.removeAllChildren();

for each( var elementModel:IPageElementModel in 
_pageModel.elements ) {
trace('This happens!');
var newElement:IElementControl = 
_docManager.getNewElementInstance(elementModel);

trace('But this does not!');

this.addChild( DisplayObject(newElement) );
}

trace('End of the line.');
}

}
==

trace output:
==
PageCanvas.pageModel = [object PageModel]
This happens!
DocManager.getNewElementInstance
==

So it seams that everything stops after the call to getNewElementInstance.

Is it because I'm doing all this stuff in a setter? If this is the case, what 
would be the appropriate way to recreate all the children when the underlying 
data model changes?


Thanks for any input!
~Aaron



Re: [flexcoders] code going into a black whole

2008-10-30 Thread Aaron Miller
Nope, I'm running the debugger. Application continues just fine, there's
just a gap in the code that disappears for a bit.

On Thu, Oct 30, 2008 at 3:03 PM, Gordon Smith [EMAIL PROTECTED] wrote:

My guess is that getNewElementInstance() threw an error and you're not
 running in a debugger.



 Gordon Smith

 Adobe Flex SDK Team



 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Aaron Miller
 *Sent:* Thursday, October 30, 2008 2:27 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] code going into a black whole



 Hello, I have some strange behavior I'm trying to figure out. It seems like
 my code just stops working in mid-loop without giving any errors.





 ==

 public function set pageModel( value:PageModel ): void {

 trace('PageCanvas.pageModel = '+value);

 if( _pageModel != value ) {

 _pageModel = value;



 this.width = _pageModel.width;

 this.height = _pageModel.height;



 this.removeAllChildren();



 for each( var elementModel:IPageElementModel in
 _pageModel.elements ) {

 trace('This happens!');

 var newElement:IElementControl =
 _docManager.getNewElementInstance(elementModel);



 trace('But this does not!');



 this.addChild(
 DisplayObject(newElement) );

 }



 trace('End of the line.');

 }



 }

 ==



 trace output:

 ==

 PageCanvas.pageModel = [object PageModel]

 This happens!

 DocManager.getNewElementInstance

 ==



 So it seams that everything stops after the call to getNewElementInstance.



 Is it because I'm doing all this stuff in a setter? If this is the case,
 what would be the appropriate way to recreate all the children when the
 underlying data model changes?





 Thanks for any input!

 ~Aaron

   



Re: [flexcoders] code going into a black whole

2008-10-30 Thread Josh McDonald
If your method gets invoked by a binding, the binding code will swallow most
errors so you never see them. It's rather annoying when you're losing an
error, but without it binding would be pretty much useless. Some sort of
BindingUtils.logThrownErrors = true feature would be nice :)

-Josh

On Fri, Oct 31, 2008 at 8:12 AM, Aaron Miller 
[EMAIL PROTECTED] wrote:

  Nope, I'm running the debugger. Application continues just fine, there's
 just a gap in the code that disappears for a bit.


 On Thu, Oct 30, 2008 at 3:03 PM, Gordon Smith [EMAIL PROTECTED] wrote:

My guess is that getNewElementInstance() threw an error and you're not
 running in a debugger.



 Gordon Smith

 Adobe Flex SDK Team



 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Aaron Miller
 *Sent:* Thursday, October 30, 2008 2:27 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] code going into a black whole



 Hello, I have some strange behavior I'm trying to figure out. It seems
 like my code just stops working in mid-loop without giving any errors.





 ==

 public function set pageModel( value:PageModel ): void {

 trace('PageCanvas.pageModel = '+value);

 if( _pageModel != value ) {

 _pageModel = value;



 this.width = _pageModel.width;

 this.height = _pageModel.height;



 this.removeAllChildren();



 for each( var elementModel:IPageElementModel in
 _pageModel.elements ) {

 trace('This happens!');

 var newElement:IElementControl =
 _docManager.getNewElementInstance(elementModel);



 trace('But this does not!');



 this.addChild(
 DisplayObject(newElement) );

 }



 trace('End of the line.');

 }



 }

 ==



 trace output:

 ==

 PageCanvas.pageModel = [object PageModel]

 This happens!

 DocManager.getNewElementInstance

 ==



 So it seams that everything stops after the call to getNewElementInstance.



 Is it because I'm doing all this stuff in a setter? If this is the case,
 what would be the appropriate way to recreate all the children when the
 underlying data model changes?





 Thanks for any input!

 ~Aaron


 




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

Like the cut of my jib? Check out my Flex blog!

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]
:: http://flex.joshmcdonald.info/


RE: [flexcoders] code going into a black whole

2008-10-30 Thread Gordon Smith
Try putting try/catch around the call.

- Gordon

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh 
McDonald
Sent: Thursday, October 30, 2008 3:25 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] code going into a black whole


If your method gets invoked by a binding, the binding code will swallow most 
errors so you never see them. It's rather annoying when you're losing an error, 
but without it binding would be pretty much useless. Some sort of 
BindingUtils.logThrownErrors = true feature would be nice :)

-Josh
On Fri, Oct 31, 2008 at 8:12 AM, Aaron Miller [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:
Nope, I'm running the debugger. Application continues just fine, there's just a 
gap in the code that disappears for a bit.

On Thu, Oct 30, 2008 at 3:03 PM, Gordon Smith [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:

My guess is that getNewElementInstance() threw an error and you're not running 
in a debugger.



Gordon Smith

Adobe Flex SDK Team



From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On 
Behalf Of Aaron Miller
Sent: Thursday, October 30, 2008 2:27 PM
To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com
Subject: [flexcoders] code going into a black whole



Hello, I have some strange behavior I'm trying to figure out. It seems like my 
code just stops working in mid-loop without giving any errors.





==

public function set pageModel( value:PageModel ): void {

trace('PageCanvas.pageModel = '+value);

if( _pageModel != value ) {

_pageModel = value;



this.width = _pageModel.width;

this.height = _pageModel.height;



this.removeAllChildren();



for each( var elementModel:IPageElementModel in 
_pageModel.elements ) {

trace('This happens!');

var newElement:IElementControl = 
_docManager.getNewElementInstance(elementModel);



trace('But this does not!');



this.addChild( DisplayObject(newElement) );

}



trace('End of the line.');

}



}

==



trace output:

==

PageCanvas.pageModel = [object PageModel]

This happens!

DocManager.getNewElementInstance

==



So it seams that everything stops after the call to getNewElementInstance.



Is it because I'm doing all this stuff in a setter? If this is the case, what 
would be the appropriate way to recreate all the children when the underlying 
data model changes?





Thanks for any input!

~Aaron





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

Like the cut of my jib? Check out my Flex blog!

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]
:: http://flex.joshmcdonald.info/



Re: [flexcoders] code going into a black whole

2008-10-30 Thread Aaron Miller
Yup, looks like the binding was swallowing up the error so there didn't
appear to be any problem. I ended up just scrapping all the code in the
setter and dispatched an event instead. When that code was executed in the
listener, I was getting a runtime error. All fixed now.
Thanks for the insight on binding. I will know to be more careful with my
setters now.

Best Regards,
~Aaron

On Thu, Oct 30, 2008 at 3:28 PM, Gordon Smith [EMAIL PROTECTED] wrote:

Try putting try/catch around the call.



 - Gordon



 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Thursday, October 30, 2008 3:25 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] code going into a black whole



 If your method gets invoked by a binding, the binding code will swallow
 most errors so you never see them. It's rather annoying when you're losing
 an error, but without it binding would be pretty much useless. Some sort of
 BindingUtils.logThrownErrors = true feature would be nice :)

 -Josh

 On Fri, Oct 31, 2008 at 8:12 AM, Aaron Miller 
 [EMAIL PROTECTED] wrote:

 Nope, I'm running the debugger. Application continues just fine, there's
 just a gap in the code that disappears for a bit.



 On Thu, Oct 30, 2008 at 3:03 PM, Gordon Smith [EMAIL PROTECTED] wrote:

 My guess is that getNewElementInstance() threw an error and you're not
 running in a debugger.



 Gordon Smith

 Adobe Flex SDK Team



 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Aaron Miller
 *Sent:* Thursday, October 30, 2008 2:27 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] code going into a black whole



 Hello, I have some strange behavior I'm trying to figure out. It seems like
 my code just stops working in mid-loop without giving any errors.





 ==

 public function set pageModel( value:PageModel ): void {

 trace('PageCanvas.pageModel = '+value);

 if( _pageModel != value ) {

 _pageModel = value;



 this.width = _pageModel.width;

 this.height = _pageModel.height;



 this.removeAllChildren();



 for each( var elementModel:IPageElementModel in
 _pageModel.elements ) {

 trace('This happens!');

 var newElement:IElementControl =
 _docManager.getNewElementInstance(elementModel);



 trace('But this does not!');



 this.addChild(
 DisplayObject(newElement) );

 }



 trace('End of the line.');

 }



 }

 ==



 trace output:

 ==

 PageCanvas.pageModel = [object PageModel]

 This happens!

 DocManager.getNewElementInstance

 ==



 So it seams that everything stops after the call to getNewElementInstance.



 Is it because I'm doing all this stuff in a setter? If this is the case,
 what would be the appropriate way to recreate all the children when the
 underlying data model changes?





 Thanks for any input!

 ~Aaron






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

 Like the cut of my jib? Check out my Flex blog!

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]
 :: http://flex.joshmcdonald.info/

   



Re: [flexcoders] need your advice on flash or flex

2008-10-30 Thread vuthecuong



valdhor-2 wrote:
 
 If it were me...
 
 1.  Use ImageMagick (http://www.imagemagick.org) on the server to
 extract the photoshop layers then modify and convert them.
 
 2.  Have the Flash files reference external images and text. Modify
 these external files rather than the flash files. Leave the flash
 files on disk and use the database to reference where each one is.
 
 You can use whatever tools you are comfortable with. Me, I would use
 PHP on the backend using the ImageMagick API; For the frontend I would
 use Flex. But that is just me.
 
 
 --- In flexcoders@yahoogroups.com, vuthecuong [EMAIL PROTECTED] wrote:

 
 On next month I will incharge of web-based app project that:
 ==
 1) - Read layers of PSD file (photoshop) then create banner of each
 layer.
 - Display images in categories.
 - Drage and drop image into banner (gif file) frame.
 - rotate, resize text and image inside that banner.
 
 2) - insert flash file (.fla?) to DB.
 - load that flash files into web GUI
 - edit text and image inside that flash file.
 - save back to DB.
  ==
 So my questions are:
 - what tool I should use? flash? or flex? or both? or ajax with php? and
 why?
 - about insert flash file (.fla?) to DB, this web app is for
 intranet use
 only, and size of flash file is less then 300kb. So should I need to pay
 attention on performance etc?
 - especially edit text and image inside flash file (fla?), flash or
 flex is
 better to use? why?
 I'm very confused. Please help me. I need your help.
 regards,
 -- 
 View this message in context:
 http://www.nabble.com/need-your-advice-on-flash-or-flex-tp20227710p20227710.html
 Sent from the FlexCoders mailing list archive at Nabble.com.

 
Hi,
Thanks for your opinion. In fact I already decided nearly as same as you
atleast at main point:
imagemagick, php and Flex in combination.

Just one point I would like to clarify more:
You said that  Have the Flash files reference external images and text.
Modify
these external files rather than the flash files.. Okay. It's one of the
option. But tenically can I
load fla file into web UI (using php+SQL) then modify text and image embed
into that fla file (using imagemagick + flex)?
thanks and regards,


-- 
View this message in context: 
http://www.nabble.com/need-your-advice-on-flash-or-flex-tp20227710p20258499.html
Sent from the FlexCoders mailing list archive at Nabble.com.



RE: [flexcoders] rollOut event

2008-10-30 Thread Alex Harui
Examine the event's target and relatedObject properties to see where it thinks 
it is going

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Richard 
Rodseth
Sent: Thursday, October 30, 2008 12:12 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] rollOut event


I have a window-like MXML component with a title bar (currently done with 
VBoxes and HBoxes) and a content area (a Canvas). Rolling over an info icon in 
the tile bar causes another component to be overlaid (made visible) in the 
content area.

I used rollOver on the info button to make the overlay visible, and I added a 
rollOut on the root (window-like) component and on the overlay itself to hide 
the overlay. The puzzling thing is that the root-level rollOut fires when I 
move the cursor out of the info icon to the right (remaining within the title 
bar), but not when I move down towards the content area and overlay (even with 
a gap between the title bar and overlay top). This is actually not a terrible 
thing, user-experience-wise, but it's not what I expected. Any ideas what's 
going on?

Thanks.



Re: [flexcoders] Dynamicaly loading of images

2008-10-30 Thread Mark Carter

Ben Stucki came up with a neat solution to this:

http://blog.benstucki.net/?p=42

I took his idea a bit further:

http://blog.flex.mark.carter.name/2008/05/displaying-icons-loaded-at-runtime-in.html

Let me know if this helps - I've received no feedback on my icon stuff at
all so far!
-- 
View this message in context: 
http://www.nabble.com/Dynamicaly-loading-of-images-tp20251153p20259565.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] load fla file into web UI then edit image inside it

2008-10-30 Thread vuthecuong

Suppose that I biuld a wab app with php as back-end and flex sitting on
font-end with porpose to load fla file to display on web UI, then extract
text and image inside it, edit these text and images, then save back to that
fla file.
- How can do this with Flex or with anything else? 
I just want to know the general way to get this done.
regards


-- 
View this message in context: 
http://www.nabble.com/load-fla-file-into-web-UI-then-edit-image-inside-it-tp20260510p20260510.html
Sent from the FlexCoders mailing list archive at Nabble.com.