[flexcoders] Re: ToolTipManager stops processing of styles and updates of the displaylist?

2009-08-18 Thread florian.salihovic
I don't like unanswered questions, so i'll answer it myself. It was actually a 
style-inheritence problem.

My implementention had a lil' bug. But because of style inheritence, it seemed 
to work fine in the first context i used the component in. But using it in a 
second environment, the bug occoured.

So: beware of style ineritence :)

--- In flexcoders@yahoogroups.com, florian.salihovic florian.saliho...@... 
wrote:

 I have noticed a strange behaviour regarding the ToolTipMananger. Actually 
 i'm not quite sure, since the ToolTipManger seems to be the cause.
 
 I implemented a component which works just fine. Styles are applied, 
 measuring works etc.
 
 The component should also be used as tooltip in certain parts of the 
 application. But now the magic comes into play. A subclass of the component 
 is implementing mx.core.IToolTip to ensure the component can be used as 
 ToolTip.
 
 But it seems styles are not applied and at least one call of 
 updateDisplayList is lost when the subclass is used as a tooltip.
 
 What can be the reason for this behaviour? Is the mechanism for creating 
 tooltips responsible for stopping updates of the UIComponent used as a 
 tooltip?
 
 Best regards and thanks in advanced.





[flexcoders] ToolTipManager stops processing of styles and updates of the displaylist?

2009-07-30 Thread florian.salihovic
I have noticed a strange behaviour regarding the ToolTipMananger. Actually i'm 
not quite sure, since the ToolTipManger seems to be the cause.

I implemented a component which works just fine. Styles are applied, measuring 
works etc.

The component should also be used as tooltip in certain parts of the 
application. But now the magic comes into play. A subclass of the component is 
implementing mx.core.IToolTip to ensure the component can be used as ToolTip.

But it seems styles are not applied and at least one call of updateDisplayList 
is lost when the subclass is used as a tooltip.

What can be the reason for this behaviour? Is the mechanism for creating 
tooltips responsible for stopping updates of the UIComponent used as a tooltip?

Best regards and thanks in advanced.



[flexcoders] ToolTipManager stops processing of styles and updates of the displaylist?

2009-07-30 Thread florian.salihovic
I have noticed a strange behaviour regarding the ToolTipMananger. Actually i'm 
not quite sure, since the ToolTipManger seems to be the cause.

I implemented a component which works just fine. Styles are applied, measuring 
works etc.

The component should also be used as tooltip in certain parts of the 
application. But now the magic comes into play. A subclass of the component is 
implementing mx.core.IToolTip to ensure the component can be used as ToolTip.

But it seems styles are not applied and at least one call of updateDisplayList 
is lost when the subclass is used as a tooltip.

What can be the reason for this behaviour? Is the mechanism for creating 
tooltips responsible for stopping updates of the UIComponent used as a tooltip?

Best regards and thanks in advanced.



[flexcoders] FXG: Rect radiusX, radiusY

2009-06-15 Thread florian.salihovic
I'm currently making my first steps with FXG. I really like the idea of using 
Illustrator for doing the graphical stuff and using the FXG markup in Flex.

What i stumbled across was the generation of rects with rounded rounded 
corners. Why is Illustrator exporting a complex path? It's pretty hard to read 
and can be quite tripping for postproduction.

Now the real question. Is the rounded rect converted into a path when the 
markup is coverted into code? So Illustrator is exporting properly regarding 
the real representation in Flex or is it something which seemed the appropriate 
solution for Illustrator as drawing tool?

Best regards from Germany.



[flexcoders] Accessing the border of a container

2009-04-09 Thread florian.salihovic
I don't know if i'm just blind atm or if it's indded hard to access the border 
of a Container.

I can access the rawChildren. That's good since i could introspect the 
children's class name and search for the classname of the asset. But my problem 
ist, that the border get's compiled and the classname might change. As far as i 
see, the original name will bechanged to something like:

suprise__embed_cssflash_PlaylistAssets_swf_some_name_for the 
asset_1052501028

Is there a chance to simply get access to the border?

Best regards!



[flexcoders] Re: Accessing the border of a container

2009-04-09 Thread florian.salihovic
Thanx,

that was a tough one ;)

Best regards!

--- In flexcoders@yahoogroups.com, Michael Schmalle teoti.grap...@... wrote:

 Hi,
 
 using mx_internal you could;
 
 import mx.core.mx_internal;
 
 myInstance.tk_internal::background
 
 
 or;
 
 rawChildren.getChildByName(border);
 
 Mike
 
 --- In flexcoders@yahoogroups.com, florian.salihovic florian.salihovic@ 
 wrote:
 
  I don't know if i'm just blind atm or if it's indded hard to access the 
  border of a Container.
  
  I can access the rawChildren. That's good since i could introspect the 
  children's class name and search for the classname of the asset. But my 
  problem ist, that the border get's compiled and the classname might change. 
  As far as i see, the original name will bechanged to something like:
  
  suprise__embed_cssflash_PlaylistAssets_swf_some_name_for the 
  asset_1052501028
  
  Is there a chance to simply get access to the border?
  
  Best regards!
 





[flexcoders] ToggleButtonBar, NavBar and selectedIndex - error in accessor implementation?

2009-04-08 Thread florian.salihovic
I found some weird implementation.

The inheritance hierarchie is at follows:
ToggleButtonBar - ButtonBar - NavBar

ToggleButtonBar overrides the accessors and mutators for _selectedIndex. But 
why is the Accessor implemented in ToggleButtonBar like:

override public function get selectedIndex():int
{
return super.selectedIndex;
//return _selectedIndex;
}

It seems like this can cause a runtime error since 2 _selectIndex fields exist: 
in ToggleButtonBar and NavBar and both are accessed.



[flexcoders] Re: How to dispatch an Event in static function?

2009-04-01 Thread florian.salihovic
In this case, there is no need to inherit. Instead use a static EventDispatcher 
instance as a class member, which dispatches an Event in the static function.

Best regards.

--- In flexcoders@yahoogroups.com, flexawesome flexawes...@... wrote:

 hey there,
 
 I was trying to dispatch an Event in static function and I got an error
 msg of 1180: Call to a possibly undefined method dispatchEvent.
 
 There is no problem in normal function ( without static function ).
 
 Would u pls show me how to address this problem?
 
 Thank you so much
 
 --- code ---
 
 package com
 {
  public final class MyClass
  {
 
  import flash.events.EventDispatcher;
 
  public function MyClass() extends EventDispatcher
  {
  }
 
  public static function checkLink():void
  {
  // My code is here, once it has finished then call the
 onComplete() method to dispatch a new EVENT
  }
 
  private static function onComplete():void
  {
  var e:MyEvent = new MyEvent( MyEvent.COMPLETE );
 
  dispatchEvent( e );   // Display an error msg of  1180:
 Call to a possibly undefined method dispatchEvent.
  }
  }
 }





[flexcoders] Re: Question for [Bindable(event=event)] syntax?

2009-03-31 Thread florian.salihovic
private var _name:String;

[Bindable(nameChanged)]
[Bindable(myNameChanged)]
public function get name():String
{
return _name;
}

public function set name(value:String):void
{
if (_name == value) return;
_name = value;
dispatchEvent(new Event(nameChanged));
dispatchEvent(new Event(myNameChanged));
}

--- In flexcoders@yahoogroups.com, markflex2007 markflex2...@... wrote:

 I confuse the syntax if two event more events triage the Binding?
 
 Is the following syntax right or not?
 
 [Bindable(event=event1,event=event2,event=event3)]
 
 Thanks
 
 
 Mark





[flexcoders] Re: HTML component does not display images

2009-03-11 Thread florian.salihovic
Nope, actually if i#m loading images from the web, there's no problem in 
displaying the images. What kind of sandbox behaviour am i missing?

--- In flexcoders@yahoogroups.com, sunild99 sunilbd...@... wrote:

 Maybe you need a body tag in your html?
 
 --- In flexcoders@yahoogroups.com, florian.salihovic florian.salihovic@ 
 wrote:
 
  What am i missing? Passing htmlHttp Worldimg src='pic1.png' //html 
  to the HTML component's htmlText property will only display the text, not 
  the image.
  
  Best regards.
 





[flexcoders] HTML component does not display images

2009-03-10 Thread florian.salihovic
What am i missing? Passing htmlHttp Worldimg src='pic1.png' //html to 
the HTML component's htmlText property will only display the text, not the 
image.

Best regards.



[flexcoders] Re: Error: Error #1023: Stack overflow occurred.

2009-02-25 Thread florian.salihovic
Nope, it's the ListCollectionView's length property.


--- In flexcoders@yahoogroups.com, Gregor Kiddie gkid...@... wrote:

 Is it the HierarchicalCollectionView that the problem lies?
 
  
 
 If so it might be related to this bug
 
 https://bugs.adobe.com/jira/browse/FLEXDMV-1755
 
  
 
 A fix is coming, thankfully.
 
  
 
 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 is.helpd...@...
 
 






[flexcoders] Re: HTTPRequest and Air too slow?

2009-02-24 Thread florian.salihovic
Interessting! I will keep that in mind but regarding the fact, that i use JSON 
and pass just 
one single param, it seems to be a strange behaviour i recognized.

Hm, i'll have some more research to do...

--- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote:

 --- In flexcoders@yahoogroups.com, florian.salihovic 
 florian.salihovic@ wrote:
 
  Yes, actually i did so.
  
  I ran an URLLoader against different backend api calls. Those are 
 usually defined values 
  for server-side calls.
  
  I had a slighty overhead: ~80 - 120ms + parsing the data and adding 
 it into an 
  ArrayCollection compared to the values i got via Charles.
  
  So i can be sure that an HTTP request done by Air 
 (ActionScript/Flex) will not behave 
  differently then a HTTP request by another application? And we 
 should take a look in 
  some other corners of the system?
 
 Here is one place I have found a difference:
 
 http://flexdiary.blogspot.com/2007/07/flex-reorders-url-string-
 parameters.html






[flexcoders] Error: Error #1023: Stack overflow occurred.

2009-02-24 Thread florian.salihovic
I am the only developer in my team who gets this error. Three more people 
compiled the 
code successfully.

The error appears when i try to access the length property of an 
ArrayCollection/ListCollectionView. The code is processed recursively. i need 
to process 
arround 4000 lines of text which is mapped onto a hierarchy of defined objects 
- not generic 
object kind of {}...

Any ideas, pointers?

Best regards!



[flexcoders] Re: Error: Error #1023: Stack overflow occurred.

2009-02-24 Thread florian.salihovic
HI Tom my friend ;)

I actually just found one difference after reinstalling everything and got 
myself a fresh new 
version of the sources from the repository - the only differnce is the 
operating system.

I actually process the datastructure recusively and use the ArrayCollection - 
untill the 
length property is undefined and the system throws the Error.

Best regards.

--- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiver...@... wrote:

 On Tuesday 24 Feb 2009, florian.salihovic wrote:
  I am the only developer in my team who gets this error. Three more people
  compiled the code successfully.
 
 Well, clearly there is something different about your environment.
 
  The error appears when i try to access the length property of an
  ArrayCollection/ListCollectionView. The code is processed recursively. 
 
 Why do you need to use recursion to find the length of an AC ?
 How come this AC is different for you and the other people ?
 
 -- 
 Tom Chiverton
 Helping to economically maximize high-end 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 together with a list of those non members 
who are 
referred to as partners.  We use the word ?partner? to refer to a member of the 
LLP, or an 
employee or consultant with equivalent standing and qualifications. Regulated 
by the 
Solicitors Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above and may 
 be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and 
must not use any information contained in nor copy it nor inform any person 
other than 
Halliwells LLP or the addressee of its existence or contents.  If you have 
received this email 
in error please delete it and notify Halliwells LLP IT Department on 0870 365 
2500.
 
 For more information about Halliwells LLP visit www.halliwells.com.






[flexcoders] Re: Error: Error #1023: Stack overflow occurred.

2009-02-24 Thread florian.salihovic
Hey Alex, thanx for the reply.

Actually this is the first time i get confronted with this problem. Is there 
any way to 
determine how big the plattforms stack size is?

Best regards!

--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 Different platforms may have different stack sizes.  You might have to 
 flatten your 
algorithm.
 
 Alex Harui
 Flex SDK Developer
 Adobe Systems Inc.http://www.adobe.com/
 Blog: http://blogs.adobe.com/aharui
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
 Behalf Of 
florian.salihovic
 Sent: Tuesday, February 24, 2009 1:10 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Error: Error #1023: Stack overflow occurred.
 
 
 HI Tom my friend ;)
 
 I actually just found one difference after reinstalling everything and got 
 myself a fresh 
new
 version of the sources from the repository - the only differnce is the 
 operating 
system.
 
 I actually process the datastructure recusively and use the ArrayCollection 
 - untill the
 length property is undefined and the system throws the Error.
 
 Best regards.
 
 --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Tom 
Chiverton tom.chiverton@ wrote:
 
  On Tuesday 24 Feb 2009, florian.salihovic wrote:
   I am the only developer in my team who gets this error. Three more people
   compiled the code successfully.
 
  Well, clearly there is something different about your environment.
 
   The error appears when i try to access the length property of an
   ArrayCollection/ListCollectionView. The code is processed recursively.
 
  Why do you need to use recursion to find the length of an AC ?
  How come this AC is different for you and the other people ?
 
  --
  Tom Chiverton
  Helping to economically maximize high-end 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 together with a list of those non members 
 who are
 referred to as partners. We use the word ?partner? to refer to a member of 
 the LLP, or an
 employee or consultant with equivalent standing and qualifications. Regulated 
 by the
 Solicitors Regulation Authority.
 
  CONFIDENTIALITY
 
  This email is intended only for the use of the addressee named above and 
  may be
 confidential or legally privileged. If you are not the addressee you must not 
 read it and
 must not use any information contained in nor copy it nor inform any person 
 other than
 Halliwells LLP or the addressee of its existence or contents. If you have 
 received this 
email
 in error please delete it and notify Halliwells LLP IT Department on 0870 365 
 2500.
 
  For more information about Halliwells LLP visit www.halliwells.com.
 






[flexcoders] Re: HTTPRequest and Air too slow?

2009-02-23 Thread florian.salihovic
Yes, actually i did so.

I ran an URLLoader against different backend api calls. Those are usually 
defined values 
for server-side calls.

I had a slighty overhead: ~80 - 120ms + parsing the data and adding it into an 
ArrayCollection compared to the values i got via Charles.

So i can be sure that an HTTP request done by Air (ActionScript/Flex) will not 
behave 
differently then a HTTP request by another application? And we should take a 
look in 
some other corners of the system?

Best regards. 

--- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiver...@... wrote:

 On Wednesday 18 Feb 2009, florian.salihovic wrote:
  Any ideas regarding Air and some problems when it comes to network issues?
 
 I don't recall any. Did you try a stripped down test case ?
 
 -- 
 Tom Chiverton
 Helping to widespreadedly disseminate visionary e-services
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in England and 
 Wales under 
registered number OC307980 whose registered office address is at Halliwells 
LLP, 3 
Hardman Square, Spinningfields, Manchester, M3 3EB.  A list of members is 
available for 
inspection at the registered office together with a list of those non members 
who are 
referred to as partners.  We use the word ?partner? to refer to a member of the 
LLP, or an 
employee or consultant with equivalent standing and qualifications. Regulated 
by the 
Solicitors Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above and may 
 be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and 
must not use any information contained in nor copy it nor inform any person 
other than 
Halliwells LLP or the addressee of its existence or contents.  If you have 
received this email 
in error please delete it and notify Halliwells LLP IT Department on 0870 365 
2500.
 
 For more information about Halliwells LLP visit www.halliwells.com.






[flexcoders] Re: HTTPRequest and Air too slow?

2009-02-18 Thread florian.salihovic
I actually used Charles to have a look at the network communication. It seems 
like the 
data is received in the URLLoader (in my tests i use an URLLoader instead of 
the 
HTTPService) about 100 - 120 ms after the data is received. Which is some sort 
of 
overhead which might be caused from the infrastructure overhead from 
AIR-Runtime to 
the actual URLLoader instance.

Any ideas regarding Air and some problems when it comes to network issues? 


--- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiver...@... wrote:

 On Tuesday 17 Feb 2009, florian.salihovic wrote:
  But somehow the HTTPService seems to wait longer for the service's
  response.
 
 Can you get a packet trace off the network ?
 
 -- 
 Tom Chiverton
 Helping to authoritatively benchmark compelling fine-grained back-end 
 best-of-breed functionalities
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in England and 
 Wales under 
registered number OC307980 whose registered office address is at Halliwells 
LLP, 3 
Hardman Square, Spinningfields, Manchester, M3 3EB.  A list of members is 
available for 
inspection at the registered office together with a list of those non members 
who are 
referred to as partners.  We use the word ?partner? to refer to a member of the 
LLP, or an 
employee or consultant with equivalent standing and qualifications. Regulated 
by the 
Solicitors Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above and may 
 be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and 
must not use any information contained in nor copy it nor inform any person 
other than 
Halliwells LLP or the addressee of its existence or contents.  If you have 
received this email 
in error please delete it and notify Halliwells LLP IT Department on 0870 365 
2500.
 
 For more information about Halliwells LLP visit www.halliwells.com.






[flexcoders] HTTPRequest and Air too slow?

2009-02-17 Thread florian.salihovic
I'm currently devloping an AIR app. This causes some serious headaches, because 
of the 
following problem:

When i run the application in my local network, it is fast and responses are in 
the client in a 
blink of an eye. But it seems like the app doesn't behave the same way 
everytime. It was 
tested in a different environment and the responses reached the client after 
seconds.

It was compared to an HTML-frontend which uses the same PHP-API in the 
background. The 
HTML frontend was constantly fast.

The data is send via HTTPService and JSON to the PHP service in the background.

Now the question: is the AIR client restricted to anything that i might forgot 
about?

Best regards.



[flexcoders] Re: HTTPRequest and Air too slow?

2009-02-17 Thread florian.salihovic
Actually both are doing the same thing. The HTML Frontend is an AJAX Client. It 
sends 
requests and gets the result.

Allthough flex processes more data (about 10 times more), it's just a few k's...

But somehow the HTTPService seems to wait longer for the service's response.

--- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiver...@... wrote:

 On Tuesday 17 Feb 2009, florian.salihovic wrote:
  behave the same way everytime. It was tested in a different environment and
  the responses reached the client after seconds.
  It was compared to an HTML-frontend which uses the same PHP-API in the
  background. The HTML frontend was constantly fast.
 
 Are you measuring the same thing ? By which I mean does the Flex app do much 
 processing after getting the data, and maybe the HTML version is better at 
 that part.
 
 -- 
 Tom Chiverton
 Helping to globally customize web-readiness
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in England and 
 Wales under 
registered number OC307980 whose registered office address is at Halliwells 
LLP, 3 
Hardman Square, Spinningfields, Manchester, M3 3EB.  A list of members is 
available for 
inspection at the registered office together with a list of those non members 
who are 
referred to as partners.  We use the word ?partner? to refer to a member of the 
LLP, or an 
employee or consultant with equivalent standing and qualifications. Regulated 
by the 
Solicitors Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above and may 
 be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and 
must not use any information contained in nor copy it nor inform any person 
other than 
Halliwells LLP or the addressee of its existence or contents.  If you have 
received this email 
in error please delete it and notify Halliwells LLP IT Department on 0870 365 
2500.
 
 For more information about Halliwells LLP visit www.halliwells.com.






[flexcoders] Re: Alex Harui DataGrid and DTO question

2009-02-14 Thread florian.salihovic
Even if it would be possible, wouldn't it break the model/view seperation? You 
are much 
more restricted to the data then you are using the common way to display data.

- What about formating the displayed data. This would be needed to be done by 
the DTO.
- Other orders... without columns not possible.
- displaying complex content... renderer needed and this is something the DTO 
shouldn't 
care about either.

--- In flexcoders@yahoogroups.com, Cato Paus ca...@... wrote:

 
 Hi Alex is there somway to force the datagird to use the DTO getters and
 setters insted of columns ?
 
 ex:
 
 mx:DataGrid 
 
 FileDTO
 
 
 
 /FileDTO
 
 
 /mx:DataGrid






[flexcoders] Public constant fields are null?

2009-02-09 Thread florian.salihovic
I'm more then confused! I declare in a class some string constants:

// MyConstants.as
package {
public class MyConstants {
public static const My_CONST:String = myConst;
}
}

In one of my classes i declare a setter, which makes sure only allowed values 
can be 
processed, otherwise the class will throw an error.

// MyClass.as
package {
public class MyClass {
public function set property(value:String):void
if (value != MyConstants.My_CONST)
throw new Error(Ivnalid value passed:  + value);
}
}

Now it turns out, that sometimes - in a nondeterministic behaviour - null is 
passed 
allthough i pass the constant. How can this be? It can't be a race condition 
since the fields 
should be instantiated at compile time and the can't be null...

Any help? What am i missing? It would really be appreciated!



[flexcoders] Re: Public constant fields are null?

2009-02-09 Thread florian.salihovic
To give some more input: the error occours when the data is manipulated in an 
itemrenderer of an advanced datagrid which displays items of an filtered 
ArrayCollection.

But what confuses me is, that the constant is null via it is passed, not the 
object.
 

--- In flexcoders@yahoogroups.com, florian.salihovic florian.saliho...@... 
wrote:

 I'm more then confused! I declare in a class some string constants:
 
 // MyConstants.as
 package {
 public class MyConstants {
 public static const My_CONST:String = myConst;
 }
 }
 
 In one of my classes i declare a setter, which makes sure only allowed values 
 can be 
 processed, otherwise the class will throw an error.
 
 // MyClass.as
 package {
 public class MyClass {
 public function set property(value:String):void
 if (value != MyConstants.My_CONST)
 throw new Error(Ivnalid value passed:  + value);
 }
 }
 
 Now it turns out, that sometimes - in a nondeterministic behaviour - null is 
 passed 
 allthough i pass the constant. How can this be? It can't be a race condition 
 since the 
fields 
 should be instantiated at compile time and the can't be null...
 
 Any help? What am i missing? It would really be appreciated!






[flexcoders] Re: Public constant fields are null?

2009-02-09 Thread florian.salihovic
Found the error. Everthing works fine - i had some other method to run as well.

--- In flexcoders@yahoogroups.com, florian.salihovic florian.saliho...@... 
wrote:

 To give some more input: the error occours when the data is manipulated in an 
 itemrenderer of an advanced datagrid which displays items of an filtered 
ArrayCollection.
 
 But what confuses me is, that the constant is null via it is passed, not the 
 object.
  
 
 --- In flexcoders@yahoogroups.com, florian.salihovic florian.salihovic@ 
 wrote:
 
  I'm more then confused! I declare in a class some string constants:
  
  // MyConstants.as
  package {
  public class MyConstants {
  public static const My_CONST:String = myConst;
  }
  }
  
  In one of my classes i declare a setter, which makes sure only allowed 
  values can be 
  processed, otherwise the class will throw an error.
  
  // MyClass.as
  package {
  public class MyClass {
  public function set property(value:String):void
  if (value != MyConstants.My_CONST)
  throw new Error(Ivnalid value passed:  + value);
  }
  }
  
  Now it turns out, that sometimes - in a nondeterministic behaviour - null 
  is passed 
  allthough i pass the constant. How can this be? It can't be a race 
  condition since the 
 fields 
  should be instantiated at compile time and the can't be null...
  
  Any help? What am i missing? It would really be appreciated!
 






[flexcoders] Re: Best Practices: ArrayCollection of custom objects?

2008-12-16 Thread florian.salihovic
Regaring the modelling of a domain, you should wrap your collection (Array, 
ListCollectionView, ArrayCollection, XMLListCollection...) in your own 
collection type.

That will make your collection typesafe. When you need access to the underlying 
collection, 
you could make it accessible by implementing a get 
collection():ICollectionView.

That's also recommended in Fowler's Reafctoring book.

--- In flexcoders@yahoogroups.com, burttram br...@... wrote:

 Thank you both for your time and replies.






[flexcoders] UIMovieClip shows nondeterministic behaviour

2008-12-10 Thread florian.salihovic
I have a pretty big application. The app uses various in Flash created 
components. Everything works fine untill some certain point, which varies from 
test to 
test. At some point, my app crashes with a typeerror:

TypeError: Error #1009: Cannot access a property or method of a null object 
reference. 
at 
mx.flash::UIMovieClip/removeFocusEventListeners()[E:\dev\trunk\frameworks\projects\flash-integration\src\mx\flash\UIMovieClip.as:2466]
at 
mx.flash::UIMovieClip/focusOutHandler()[E:\dev\trunk\frameworks\projects\flash-integration\src\mx\flash\UIMovieClip.as:2509]
at flash.display::Stage/set focus()
at 
mx.core::UIComponent/setFocus()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\core\UIComponent.as:6797]
at 
mx.managers::FocusManager/setFocus()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\managers\FocusManager.as:396]
at 
mx.managers::FocusManager/mouseDownHandler()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\managers\FocusManager.as:1388]

The stacktrace is not that helpfull to me... seems a similar problem like: 
http://bugs.adobe.com/jira/browse/SDK-13182

The error is not reproduceable/hard to reproduce, since it happens randomly 
when trying to remove some displayobjects...

Any infos or help would be appreciated!



[flexcoders] Re: UIMovieClip shows nondeterministic behaviour

2008-12-10 Thread florian.salihovic
Hi Alex,

yes indeed, the object gets removed but i don't know how to identify which 
component 
actually is the source of the problem.

What gets removed is a composite of components, each skind with a UIMovieClip. 
Sometimes, when i want to remove it, the error occours. but it is the 
sometimes, that bugs 
me.

Best regards, Florian

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

 The indication is that the object somehow got removed from the displaylist on 
 the 
mouseDown.
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
florian.salihovic
 Sent: Wednesday, December 10, 2008 4:11 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] UIMovieClip shows nondeterministic behaviour
 
 
 I have a pretty big application. The app uses various in Flash created 
 components. 
Everything works fine untill some certain point, which varies from test to
 test. At some point, my app crashes with a typeerror:
 
 TypeError: Error #1009: Cannot access a property or method of a null object 
 reference.
 at 
mx.flash::UIMovieClip/removeFocusEventListeners()[E:\dev\trunk\frameworks\projects\fla
sh-integration\src\mx\flash\UIMovieClip.as:2466]
 at 
 mx.flash::UIMovieClip/focusOutHandler()[E:\dev\trunk\frameworks\projects\flash-
integration\src\mx\flash\UIMovieClip.as:2509]
 at flash.display::Stage/set focus()
 at 
mx.core::UIComponent/setFocus()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\
core\UIComponent.as:6797]
 at 
mx.managers::FocusManager/setFocus()[E:\dev\3.1.0\frameworks\projects\framework\sr
c\mx\managers\FocusManager.as:396]
 at 
mx.managers::FocusManager/mouseDownHandler()[E:\dev\3.1.0\frameworks\projects\fra
mework\src\mx\managers\FocusManager.as:1388]
 
 The stacktrace is not that helpfull to me... seems a similar problem like: 
http://bugs.adobe.com/jira/browse/SDK-13182
 
 The error is not reproduceable/hard to reproduce, since it happens randomly 
 when 
trying to remove some displayobjects...
 
 Any infos or help would be appreciated!






[flexcoders] Re: Get parent object in an array collection

2008-11-28 Thread florian.salihovic
I would suggest to create a real data structure and skip the version with the 
play Object 
instances. Following this approach, you could add references to the parents, 
add 
eventlisteners and reconstruct the structure when needed automatically (you 
have to 
implement th logic thogh ;) ).

Best regards.

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

 Hello all,
 I am using an array collection as a dataprovider for the Kap Lab
 (http://lab.kapit.fr/display/visualizer/Visualizer) which is like a
 spring graph.  So when I click on an end node, I get the id of the
 node. If I have an id to an object, how can find the parent object and
 get access to it?  Has anyone done this before?  Here is my
 ArrayCollection:
 
 private var myDataProvider:ArrayCollection = new ArrayCollection([
 {Region:Southwest,ID:1, children: [
  {Region:Arizona,ID:2, children: [
   {Territory_Rep:Barbara Jennings, ID:3}, 
 {Territory_Rep:Dana Binn,ID:4}]},  
  {Region:Central California,ID:5, children: [ 
{Territory_Rep:Joe Smith, ID:6}]},  
  {Region:Nevada, ID:7, children: [ 
{Territory_Rep:Bethany Pittman,ID:8}]},  
  {Region:Northern California, ID:9, children: [ 
{Territory_Rep:Lauren Ipsum,ID:10}, 
{Territory_Rep:T.R. Smith,ID:11}]},  
  {Region:Southern California,ID:'12', children: [ 
{Territory_Rep:Alice Treu, ID:'13'}, 
  {Territory_Rep:Jane Grove,ID:14}]}
 ]}
 ]);
 
 Thanks for the read,
 happy TGiving ,
 timgerr






[flexcoders] How to prevent an enabled ComboBox from openeng?

2008-11-27 Thread florian.salihovic
See subject...

I tried rowCount = 0; event.preventDefault... nothing...

Any ideas?

Best regards!



[flexcoders] Re: How to prevent an enabled ComboBox from openeng?

2008-11-27 Thread florian.salihovic
mouseChildren = false;

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

 See subject...
 
 I tried rowCount = 0; event.preventDefault... nothing...
 
 Any ideas?
 
 Best regards!






[flexcoders] Re: How to set reference to parent?

2008-11-25 Thread florian.salihovic
It would be component.parent, not just parent unless you are working in the 
child's scope.

A better way would be to register an eventlistener (don't forget to remove it 
if it's not 
necessary anymore) for the child in the parent's scope. Why? To me it's the 
same problem 
you might run into when working with the stage. Sometimes the stage and parent 
references might be null - that's the case when the child is not added.

Best regards.

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

 Hi,
 
 I added a component to a container like this:
 
 container1.addChild(component1);
 
 now I want to change the property of container in the component.how to
 set the reference of the parent container,I do not remember that.
 
 Please help me.
 
 I try parent.x = 1 but it doesn't work.Thanks
 
 
 Mark






[flexcoders] Re: Skinning does not work properly. 2 skins appear.

2008-11-23 Thread florian.salihovic
Stupid me...

it's the icon-style i had to use...

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

 This is my weekend nw quite long. Basically i have a Programmatic skin which i
 want to use
 for my RadioButton. It works, since i see them. But the Halo theme does not
 disappear.
 Instead i see both skins... i apply the skin via:
 
 mx:Style
 RadioButton
 {
 skin:ClassReference(fs.layout.skins.RadioButton);
 }
 /mx:Style
 
 in my application file. What am i missing? This is not the first time i use
 skins but this effect
 is new...
 
 Best regards.






[flexcoders] Original skins won't disappear - 2 skins instead.

2008-11-22 Thread florian.salihovic
This is my weekend nw quite long. Basically i have a Programmatic skin which i 
want to use 
for my RadioButton. It works, since i see them. But the Halo theme does not 
disappear. 
Instead i see both skins... i apply the skin via:

mx:Style
RadioButton
{

skin:ClassReference(fs.diplom.layout.skins.SmallButtonSkin);
}
/mx:Style

in my application file. What am i missing? This is not the first time i use 
skins but this effect 
is new...

Best regards.



[flexcoders] Skinning does not work properly. 2 skins appear.

2008-11-22 Thread florian.salihovic
This is my weekend nw quite long. Basically i have a Programmatic skin which i
want to use
for my RadioButton. It works, since i see them. But the Halo theme does not
disappear.
Instead i see both skins... i apply the skin via:

mx:Style
RadioButton
{
skin:ClassReference(fs.layout.skins.RadioButton);
}
/mx:Style

in my application file. What am i missing? This is not the first time i use
skins but this effect
is new...

Best regards.



[flexcoders] Re: AS3 Class, MXML implements it

2008-11-07 Thread florian.salihovic
Just just the implements Attribute in the root node and specify ypur interface, 
which will be 
implement.

Best regards.

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

 Hello,
 
 Do you know any way to implement an interface in a MXML file?
 
 Thanks for any info,
 
 G






[flexcoders] Re: Listeners and weak references

2008-11-05 Thread florian.salihovic
When u register an EventListener to en IEventDispatcher instance not using weak 
references, the object won't be garbage collected untill all references got 
null. This not 
only affects references by objects and arrays, but also eventlistener. Using 
weak references 
will allow the garbage collection to remove objects, even if there are 
eventlisteners left.

But using weak references will also slow the machine down, if i remember right 
aboit 
10clock cycles.

Here's a blog entry u might want to read: 
http://www.onflex.org/ted/2008/09/useweakreferencesboolean-false.php

I was using weak refernces heavily, but u don't have to.

When u are using eventlistener as members of the instance, they don't have to 
be weak, 
since the whole object can be garbage collected.

But, when u have for example a sprite instanciated in the scope of another 
object, u 
should for example use the eventlistener for Event.ADDED weak referenced. The 
other 
listeners will be added and removed depending on the state of sprite - an 
example; why 
should a sprite listen to mouse events, when it is not in the displaylist. Add 
the necessary 
listeners when it is on the stage.

So it always depends on what u are doing.

Best regards.

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

 I have a question on the weak references when adding a listener like 
 this:
 
 btnSave.addEventListener(MouseEvent.CLICK, onBtnSaveClick, false, 0, 
 true);
 
 I have found this approach with weak reference as an advise 
 somewhere, but I would like to understand what happens really.
 
 If we add a listener specifying useWeakReference = true as in the 
 example above, does this mean that the garbage collection might 
 remove unexpectedly the event listener and the mouse event handling 
 to stop working?
 
 When using weak reference for the event listener, is it needed to 
 explicitly remove the event listener at some point in time?
 
 In general – what is the best practice in this regard?
 
 Kind Regards,
 Nikolay






[flexcoders] Re: unable to bind to property 'width' on class 'Object'

2008-11-05 Thread florian.salihovic
Code?

--- In flexcoders@yahoogroups.com, Juan Carlos M. [EMAIL PROTECTED] wrote:

 but the problem is that component doesn´t appear on screen...
 ...it seems that it is unable to add it's child components... (measure
 method is called in an infinite loop)
 
 
 
 --- In flexcoders@yahoogroups.com, Vijay Anand Mareddy vam2@ wrote:
 
  dont worry its only a warning. 
  You can get ride of it by typecasting your Object into an XML like this:
  {  XML(object).width  }
  
  --- In flexcoders@yahoogroups.com, Juan Carlos M. colombia@ wrote:
  
   Hi... may this is weird
   
   I´ve extended a Canvas component using mxml. When I use that component
   inside a titlewindow it works...
   but it doesn´t work inside other components and flex's console shows
   this error:
   
   warning: unable to bind to property 'width' on class 'Object' (class
   is not an IEventDispatcher)
   
   (it seems that measure method is in an infinite loop... )
  
 






[flexcoders] Re: Research - Flex Metatags useable in F.C.K.

2008-11-04 Thread florian.salihovic
The Bindbale Metatag will be compiled into the bytecode so when u implement 
accessors 
by hand and dispatch the events yourself, the designer can already implement 
the whole 
basecomponent. The developer just has to subclass when logic get involved.

Best regards.

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

 Ah ok,
 
 Don't know that answer. :)
 
 Mike
 
 On Thu, Sep 18, 2008 at 8:37 AM, florian.salihovic 
 [EMAIL PROTECTED] wrote:
 
Hi, that would be if i used MXMLC for compilation. What i was asking for
  is, when the
  *.swc gets compiled in Flash with the FCK.
 
  Best regards.
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Michael
  Schmalle teoti.graphix@ wrote:
  
   Hi,
  
   you would use;
  
   -keep-as3-metadata MetaTagName
  
   to keep any meta data tags at compile time. If you look in the build.xml
   file for the framework the keep;
  
   target name=framework description=Builds libs/framework.swc
   compc include-classes=FrameworkClasses
   output=${basedir}/libs/framework.swc locale= accessible=true
   include-namespaces uri=http://www.adobe.com/2006/mxml/
   namespace uri=http://www.adobe.com/2006/mxml;
   manifest=${framework.dir}/manifest.xml/
   source-path path-element=${framework.dir}/src/
   external-library-path dir=${basedir}/libs/player
   includes=playerglobal.swc/
   library-path/
   include-file name=defaults.css
   path=${framework.dir}/defaults.css/
   include-file name=defaults-2.0.0.css
   path=${framework.dir}/defaults-2.0.0.css/
   include-file name=defaults-2.0.1.css
   path=${framework.dir}/defaults-2.0.1.css/
   include-file name=Assets.swf
   path=${framework.dir}/assets/Assets.swf/
   keep-as3-metadata name=Bindable /
   keep-as3-metadata name=Managed /
   keep-as3-metadata name=ChangeEvent /
   keep-as3-metadata name=NonCommittingChangeEvent /
   keep-as3-metadata name=Transient /
   /compc
   /target
  
   Mike
  
   On Thu, Sep 18, 2008 at 5:51 AM, florian.salihovic 
   florian.salihovic@ wrote:
  
I'm currently doing a research on the Flex Component Kit. I need to
outsource some custom
components to a designer. The baseclasses are defined, but will the
metatags (custom events
used for the databinding) also be recognized/compiled into the source?
   
Best regards.
   
   
   
  
  
  
   --
   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] Different Itemrenderer in ComoBox

2008-11-04 Thread florian.salihovic
Is it possible to set an itemrenderer and itemeditor in a ComboBox depending on 
the type of 
object which is displayed?

Or do is have to use one renderer for all items and determine in the renderer 
itself how it 
should be displayed - same goes for the itemeditor.

Best regards



[flexcoders] Re: my first flex website

2008-11-04 Thread florian.salihovic
Sorry, imho it's hard to believe that this website is used to present yourself 
on the market.
- pictures simply appear randomly... load first the content, then show it.
- pictures aren't antialiased, the pictures in pricing don't look nice.
- pictures and icons don't work well together (simple gradients, 3d icons... ), 
the visual 
impression is not that nice since the colors don't work.
- i miss the concept of the site

Sorry, just my opinion...

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

 HI, finally I've done my first flex web siteit is done, or at  
 least is that what I think...maybe tomorrow I'll add something else.
 
 please check it at:
 
 http://leftandrightsolutions.com/lrsad/bin/lrsad.html
 
 please don't be so hard in critics, is ok to be criticized but don't  
 be offensive.
 
 I hope you like, is not the big deal, but is something that did by  
 myself, I thank in advance to all of you who help me out
 with your advices.
 
 regards,
 
 Gustavo
 
 
 
 Gustavo A. Duenas
 Creative Director
 LEFT AND RIGHT SOLUTIONS
 904.  265 0330 - 904. 386 7958
 www.leftandrightsolutions.com
 Jacksonville - Florida






[flexcoders] Re: How can I stop my HTTPService?

2008-11-03 Thread florian.salihovic
How about the cancel method of HTTPService?

Best regards.

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

 Hi everyone,
 
 I have an HTTPService that I load in a module. When I unload the module 
 the HTTPService keeps working...
 
 This is my HTTPService:
 mx:HTTPService url=test.php method=POST id=rate useProxy=false 
 result=getRate(event) fault=FaultHandler() showBusyCursor=true/
  
 I start my HTTPService with the following command:
 rate.send();
 
 What command can I use to kill the HTTPService when I unload my module?
 
 Thanks.






[flexcoders] Re: Extending Datagrid dynamically

2008-11-02 Thread florian.salihovic
I would think about the datastructure u use... an Array of mixed content is not 
necessarily 
the optimum. I for example would create a new datatype.

If u need a certain formatted renderer even for complex data: implement an 
itemrenderer. 
A simple approach is to implementing a component which implements the necessary 
interfaces. Depending on the given column, the specific information is 
displayed. U can 
simply determine what should be displayed in the set data. Just lookup for 
the column 
and display what should be displayed.
If u need fewer or lesser columns, use ActionScript.

Best regards.

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

 So, what you want is:
 
 10  11  12   etc.
 
 Joesickworkplay
 
 Bill   workworkwork
 
 John   playplaywork
 
  
 
 You need to check out the OLAPDataGrid. It's specifically designed to
 support this kind of data. In Excel, you'd call this a pivot table.
 
  
 
 ~randy
 
  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of donvoltz
 Sent: Saturday, November 01, 2008 11:32 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Extending Datagrid dynamically
 
  
 
 Hi Everyone,
 
 can someone point me in the right direction for accomplishing the
 following. I have a value object that contains a username and an array
 of assignments for each day of the week
 
 vo
 public var username:String;
 public var assignments:Array (also a vo with date = 2008-10-02,
 assignment = 'Sick') this array contains a date and assignment for
 each day of a given month.
 
 These vo's are added to an arrayCollection which is bound to a datagrid
 
 What I am trying to accomplish is the following
 
 For each day of a specified month, I would like to generate a column
 with the header text being the date (ie march 10, 2008 would display
 10) and the data in the column would be bound to the assignments array
 for the user who belongs to the row.
 
 I also want this datagrid to be regenerated when the user of the
 application selects a different month(the datagrid dataProvider is
 updated with new data from the server).
 
 I am lost with how I can add dynamic columns to the datagrid and bind
 these to an array of dates to present the appropriate assignment.
 
 Thanks in advance for any help. 
 
 Don






[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] 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] States in UIMovieClip working properly?

2008-10-29 Thread florian.salihovic
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: States in UIMovieClip working properly?

2008-10-29 Thread florian.salihovic
And a link to the sources: http://www.box.net/shared/48p7bc63hj

It would be really great, if anybody had some clue or hint for me.

--- 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: Gosh what a state to be in..

2008-10-28 Thread florian.salihovic
Hm, actually i don't quite get the problem, i think.

States should be used in my opinion to really abstract view-states. The state 
of the 
application should be stored in a domain model.

If u have buttons - just register listeners for the interaction and let a 
controller decide 
what to to depending on the view state. As i understand your problem it's like 
you have 
different states, which not only refer to view states but als to states in 
terms of 
functionality which is bound directly to a statewhich i think leads to too much 
logic in view 
components...

Or i just didn't get your intention right...

Best regards

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

 I think I know the answer to this, but here goes..
 
 Lets suppose I have an application with states A, B and C, plus the default.
 
 There are buttons in states A, B and default to switch the application to 
 state C.
 
 That would be all fine and dandy, but once I have entered state C, I can 
 press a button to leave state C and return to the  state from whence it was 
 called (A, B or default).
 
 Still, no problem with that, but I'd like to keep the context of the 
 previous state so that when I return to state A (for example) from state C, 
 I can present the same view as before.
 
 Similarly, it may be that state B is really a substate of A (state Ab, if 
 you like), so returning to the status quo might be a bit more difficullt.
 
 Really speaking I just need a state/state context stack that I push and pop 
 as I move from one state to the next and back.
 
 Anyone already done similar with a different approach?
 
 I know I could get away without the stack if I implemented variants of state 
 C that took into account the 'calling' state, but it quickly becomes a 
 nightmare.
 
 This is certainly doable, I'm just seeing if there's a tried and tested way 
 of managing state contexts like this.
 
 Paul






[flexcoders] Re: Return two instances of objects keeping the same reference on the Actionscri

2008-10-28 Thread florian.salihovic
Could you not just use the old object again and just map in the new values? 
That's the 
only idea i have to make sure u'll have the same object all the time at runtime 
- which 
will ensure that there's no need for new references to be set.

Best regards!
 
--- In flexcoders@yahoogroups.com, João [EMAIL PROTECTED] wrote:

 Hello,
 
 imagine the following scenario:
 
 - backend in AMFPHP;
 - a remote procedure that returns a complex type:
 
 Categories[]
 CategoryVO (#12334)
id: 1
name: Accounting
etc...
 CategoryVO (#34221)
id: 2
name: Reporting
etc...
 
 
 
 - Another remote procedure that returns another complex object:

UserVO (#5456)
id: 1
name: John Doe
CategoryVO (#2145)
   id: 2
   name: Reporting
 
 The category of the user John Doe is Reporting, id 2. It's the same
 previously returned by the other service, on the position 1 of the
 categories array. The problem is that, on the client side:
 
 categories[1]==user.category
 
 is false. It's the same category, the problem is that when the object
 mapping occurs on the client side, it creates a new reference, so they
 are different instances of the same object.
 Right now, we need to make some loopings on the client-side to find
 and replace references. This involves a lot of work, and has
 performance considerations.
 
 Is it possible, or is there a solution to make same objects returned
 from the server side have same references on the client side?
 
 Thanks,
 
 João Saleiro
 
 CTO @ Webfuel
 Adobe Community Expert
 Co-founder of the Portuguese RIA Community






[flexcoders] Re: best practice XML hyphens

2008-10-28 Thread florian.salihovic
That's why many people tend to use camelcase i think...

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

 Hi I'm looking for info on best practices for creating XML and using
 hyphens inside the XML.
 
  
 
 The reason being that a feed that I'm having to work through contains
 the node language-block ln=en which makes it awkward to get at due
 to the '-'.
 
  
 
 I can only find one doc which isn't enough weight to get the XML changed
 to be something like languageBlock ln=en when they've been using
 language-block ln=en for years, even though I'm sure it's a 5 min
 job to change it.  
 
  
 
 if you're interested I'm having to do something like
 xml[language-block].(@ln == _language) rather than the standard way of
 just doing xml.language-block.(@ln == _language).
 
  
 
 It may not be best practice, but I'd like it if it was J.
 
 Cheers.
 
  
 
  
 
 Kenneth Sutherland
 
 Technical Developer
 
 Realise Ltd
 
 0131 476 7432
 
 www.realise.com
 
 enlightened e-business solutions
 
  
 
 Disclaimer 
 ---

 This electronic message contains information which may be privileged and 
 confidential. 
The information is intended to be for the use of the individual(s) or entity 
named above. If 
you are not the intended recipient, be aware that any disclosure, copying, 
distribution or 
use of the contents of this information is prohibited. If you have received 
this electronic 
message in error, please notify us by telephone on 0131 476 6000 and delete the 
material 
from your computer. 
 Registered in Scotland number: SC 172507. 
 Registered office address: Quay House 142 Commercial Street Edinburgh EH6 
 6LB. 
 
 This email message has been scanned for viruses by Mimecast.
 ---







[flexcoders] Re: Equivalent to Java's Class.isInstance(Object) instance method?

2008-10-27 Thread florian.salihovic
Then i got the problem right? Thought i had to get back to school for some 
english 
lessons...

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

 Yeah, builder's not so smart when you're trying to do anything out of the
 ordinary :)
 
 On Mon, Oct 27, 2008 at 4:01 PM, Mark Carter [EMAIL PROTECTED] wrote:
 
 
  Oops, sorry. Thanks, you're right!
 
  FlexBuilder code completion wasn't giving me the chance to put a variable
  after is - so I just assumed it wasn't possible (like in Java).
 
 
  andrii_olefirenko wrote:
  
   obj is cls  - it works for me, no compile error (Flex SDK 3).
  
 
  --
  View this message in context:
  http://www.nabble.com/Equivalent-to-Java%27s-Class.isInstance%28Object%29-
instance-method--tp20171501p20182274.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
 
 
 
 
 
 
 -- 
 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: Programmatically Determine if FlexEvent.CREATION_COMPLETE has been dispatche

2008-10-27 Thread florian.salihovic
One way to do so:

private var dictionaty:Dictionary = new Dictionary();
private var button:Button = new Button();

protected function initializeComponent():void
{
this.button.addEventListener(FlexEvent.CREATION_COMPLETE, onCreationComplete);
this.dictionary[this.button] = false;
}

function onCreationComplete(event:Event):void
{
if (event.target == this.button)
{
dictionary[this.button] = true;
}

Working this way you can allways test, wether the component-creation has been 
completed or not.

Best regards from Germany

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

 I need to programmatically determine if a component has dispatched
 FlexEvent.CREATION_COMPLETE so that I know it has finished being
 created as well as all of it's children.
 
 I don't see a creationCompleted property, is there some other way to
 tell?  I know I can listen for the event I am wondering if there is
 some other way to tell that it had already happened.  So I can have
 logic similar:
 
 if ( comp.creationCompleted )
 {
// do stuff to a child
comp.fooView.fooButton.addEventListener(...);
 }
 else
 {
 comp.addEventListener(FlexEvent.CREATION_COMPLETE, handleCreation);
 }






[flexcoders] Re: Programmatically Determine if FlexEvent.CREATION_COMPLETE has been dispatche

2008-10-27 Thread florian.salihovic
Ah forgot to tell about that one.

Or delete the reference manually. There have been some discussion about 
weakReferences 
 when registering eventlisteners.But that's another topic...

Best regards.

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

 Any time you're going to create a Dictionary to keep track of things like
 this, make sure to use weak references, by calling new Dictionary(true) or
 your app is likely to leak memory like a sieve :)
 
 And you might be able to get away with UIComponent.initialized, depending on
 what it is you're actually trying to achieve.
 
 -Josh
 
 On Mon, Oct 27, 2008 at 9:22 PM, florian.salihovic 
 [EMAIL PROTECTED] wrote:
 
  One way to do so:
 
  private var dictionaty:Dictionary = new Dictionary();
  private var button:Button = new Button();
 
  protected function initializeComponent():void
  {
  this.button.addEventListener(FlexEvent.CREATION_COMPLETE,
  onCreationComplete);
  this.dictionary[this.button] = false;
  }
 
  function onCreationComplete(event:Event):void
  {
  if (event.target == this.button)
  {
  dictionary[this.button] = true;
  }
 
  Working this way you can allways test, wether the component-creation has
  been
  completed or not.
 
  Best regards from Germany
 
  --- In flexcoders@yahoogroups.com, cwicky99 codecraig@ wrote:
  
   I need to programmatically determine if a component has dispatched
   FlexEvent.CREATION_COMPLETE so that I know it has finished being
   created as well as all of it's children.
  
   I don't see a creationCompleted property, is there some other way to
   tell?  I know I can listen for the event I am wondering if there is
   some other way to tell that it had already happened.  So I can have
   logic similar:
  
   if ( comp.creationCompleted )
   {
  // do stuff to a child
  comp.fooView.fooButton.addEventListener(...);
   }
   else
   {
   comp.addEventListener(FlexEvent.CREATION_COMPLETE, handleCreation);
   }
  
 
 
 
 
  
 
  --
  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
 
 
 
 
 
 
 -- 
 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] Custom [Bindable] declarerd accessors.

2008-10-27 Thread florian.salihovic
The simple approach for classes to offer databinding enabled properties is to 
simply 
declard the whole class as [Bindable].

To make full use of the feature instances/references to objects must be 
declared as 
[Bindable] as well.

Well, since it is said in the documentation to use custom bindings á la 
[Bindable(myPropertyChanged)], i'll implement the properties that way.

When i have, let's say two properties, each having its own metadata tag 
declaring the 
property as [Bindable], do i have to declare the instances as [Bindable] by 
using the 
standard tag? Or must i explicitly declare the instance as [Bindable] by using 
all custom 
tags. It's works with [Bindable], but i'm asking for the clean implementation.

Example:
package {

public class DataBindingExample {

private var _propertyOne:String;
private var _propertyTow:String;

[Bindable(propertyOneChanged)]
public function get propertyOne():String { return this._propertyOne; }

public function set propertyOne(value:String):void {
if (this._propertyOne == value) return;
this._propertyOne = value;
this.dispatchEvent(new Event(propertyOneChanged));
}

[Bindable(propertyTowChanged)]
public function get propertyTow():String { return this._propertyTow; }
public function set propertyTow(value:String):void {
if (this._propertyTow == value) return;
this._propertyTow = value;
this.dispatchEvent(new Event(propertyTowChanged));
}
}
}

Do i have to declare it like:

[Bindable]
private var _dbe:DataBindingExample

or:

[Bindable(propertyTowChanged)]
[Bindable(propertyOneChanged)]
private var _dbe:DataBindingExample

?

I'm so curious! Best regards!



[flexcoders] Re: Equivalent to Java's Class.isInstance(Object) instance method?

2008-10-26 Thread florian.salihovic
You are searching for the is-operator:

var displayObject:DisplayObject = new Sprite();
trace(displayObject is DisplayObject);
trace(displayObject is Sprite);
trace(displayObject is UIComponent);

Best regards

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

 
 I've got an array of objects which I want to filter according to the object's
 class. The class itself is referenced by a variable so I cannot use the is
 operator.
 
 I'd like to be able to do something like:
 
 filterClass.isInstance(obj)
 
 Do I need to use isPrototypeOf()? - I don't really understand what that
 means.
 -- 
 View this message in context: http://www.nabble.com/Equivalent-to-Java%27s-
Class.isInstance%28Object%29-instance-method--tp20171501p20171501.html
 Sent from the FlexCoders mailing list archive at Nabble.com.






[flexcoders] Re: Equivalent to Java's Class.isInstance(Object) instance method?

2008-10-26 Thread florian.salihovic
Then i might have misread/misunderstood ur problem. Perhaps this is something 
to work 
with:

?xml version=1.0 encoding=utf-8?
mx:Application initialize=eventListener(event) layout=absolute 
xmlns:mx=http://www.adobe.com/2006/mxml;
mx:Script
![CDATA[
import flash.utils.describeType;
private function eventListener(event:Event):void
{
var classTypeXML:XML = 
describeType(flash.display.Sprite);
var instanceTypeXML:XML = describeType(new 
Sprite());  
trace([EMAIL PROTECTED], [EMAIL PROTECTED]);
}
]]
/mx:Script
/mx:Application

Best regards.

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

 
 I don't think that works when I have a variable of Class type.
 
 public static function isObjectInstanceOfClass(obj:Object,
 cls:Class):Boolean {
return obj is cls; // compile error
 }
 
 
 florian.salihovic wrote:
  
  You are searching for the is-operator:
  
  var displayObject:DisplayObject = new Sprite();
  trace(displayObject is DisplayObject);
  trace(displayObject is Sprite);
  trace(displayObject is UIComponent);
  
  Best regards
  
  --- In flexcoders@yahoogroups.com, Mark Carter code@ wrote:
 
  
  I've got an array of objects which I want to filter according to the
  object's
  class. The class itself is referenced by a variable so I cannot use the
  is
  operator.
  
  I'd like to be able to do something like:
  
  filterClass.isInstance(obj)
  
  Do I need to use isPrototypeOf()? - I don't really understand what that
  means.
  -- 
  View this message in context:
  http://www.nabble.com/Equivalent-to-Java%27s-
  Class.isInstance%28Object%29-instance-method--tp20171501p20171501.html
  Sent from the FlexCoders mailing list archive at Nabble.com.
 
  
  
  
  
  
 
 -- 
 View this message in context: http://www.nabble.com/Equivalent-to-Java%27s-
Class.isInstance%28Object%29-instance-method--tp20171501p20172786.html
 Sent from the FlexCoders mailing list archive at Nabble.com.






[flexcoders] Re: Resizing a class file

2008-10-20 Thread florian.salihovic
Why don't u want to create an instance? 

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

 Is it possible to resize a Class file? Say you embed a swf or png. Can
 you then resize it by casting is as something else?
 
 [Bindable]
 [Embed(source=ui/nicePngImage.png)]
 static public var myIcon:Class;
 myIcon.width = 30; // won't work
 
 TIA






[flexcoders] Re: Interfaces WHY?

2008-10-10 Thread florian.salihovic
Polymorphism.

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

 Pseudo multiple inheritance.
 
 Ryan Gravener
 http://twitter.com/ryangravener
 
 
 On Fri, Oct 10, 2008 at 10:23 AM, Richard Rodseth [EMAIL PROTECTED]wrote:
 
And sometimes you even have interfaces with no methods. In this case
  it's a marker (often a parent of other interfaces) and when used in method
  signatures you get type checking.
 
 
  On Fri, Oct 10, 2008 at 6:26 AM, Michael Schmalle [EMAIL PROTECTED]
   wrote:
 
Hi,
  It's ICommand.
 
  The reason is you can stack interfaces on top of each other allowing more
  decoupling to the implementing concrete classes.
 
  This interface is obvious. Any class that implements it needs eval() and
  only eval. It's like a singleton declaration of implementation.
 
  If you jammed this evel() method into IUIComponent, maybe all components
  don't need eval. Make sense?
 
  Also another good example of this type of interface in the flex framework
  is IDataRenderer, it's only declared property is 'data'.
 
  Mike
 
   On Fri, Oct 10, 2008 at 9:19 AM, flexaustin [EMAIL PROTECTED]wrote:
 
I was wondering if someone can explain why you would need an interface
  so short?
 
  INTERFACE:
 
  package my.package.area
  {
  /**
  * Interface for methods that evaluate an object and return a result.
  */
  public interface IEval
  {
  /**
  * Evaluates the input object
  * @o the object to evaluate
  * @return the computed result value
  */
  function eval(o:Object=null):*;
 
  } // end of interface IEval
  }
 
  USAGE OF INTERFACE:
 
  if (value is IEval) { value = IEval(value).eval(o) };
 
  Cairngorm has a short interface like this as well, though I cannot
  remember what it is. In Cairngorm they say its for naming or to make
  the code easier to understand? I am just not sure why you would do
  this? Help me see the light!
 
  TIA
 
 
 
 
  --
  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] Understanding component measuring

2008-10-07 Thread florian.salihovic
Hi there,

since i realized that i don't fully understand compont measuring in custom 
UICmponent's, I 
wrote some tests. The Problem i face atm is: how to deal with deep hierachies 
of custom 
UIComponents.

My current approach is setting the dimensions (width and height) additionally 
to the 
measureWidth and measureHeight in the component.

My tests can be found here. I would really appreciate some input on my 
implementation and 
my thoughts.

Here are the sources: http://florian.salihovic.info/flexcoders/

Best regards and thanks in advance.



[flexcoders] Re: Dimensions of a UIComponent are allways 0, 0?!

2008-10-05 Thread florian.salihovic
Sorry fpr the late reply,

my Problem is in fact not implementing teh measure() method. It is more the 
problem how 
to deal with composites and detecting changes of components that are embedded 
in my 
custom component.

My current strategy is dispatching an event when the displaylist of my embedded 
composite changes in order to call measure of my container.

Example: i have a container which is a composite of my own list component. When 
i 
change the contents of my list, the diaplaylist of the list will be updated and 
the container 
will be informed in order to call measure. Layoutcontainers are now able 
refresh the 
layout with the right sizes.

Is that a good strategy or is there something else i missed to detect changes 
in the 
container automatically? Do i have to dispatch events by my own or is their 
some kind of automatism i did not think of?

Best regards.


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

 Hi,
 Search the archives for this, I know I have explained it quite a bit. :)
 
 If you can't find it there read up on Creating Custom Components.
 
 You problem has to do with the fact you have not overridden measure() and
 set measuredWidth and measuredHeight of you component.
 
 If you don't do this, the layout manager will set the size of your component
 to 0,0.
 
 Mike
 
 On Wed, Oct 1, 2008 at 4:02 AM, florian.salihovic 
 [EMAIL PROTECTED] wrote:
 
I have a UIComponent which Dimensions never change?! When i add a child
  in the overriden
  createChildren i expect the dimensions to be changed... but nothing
  happens...
 
  override protected function createChildren():void {
  super.createChildren();
  if (!this._uibase) {
  this._uibase = new UIBase();
  this.addChild(_uibase);
  }
 
  The UIBase class is a component made with the Flex Component Kit and it has
  width an
  height  0.
 
  I have no clue what i am doin wrong...
 
   
 
 
 
 
 -- 
 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] Cairngorm

2008-10-02 Thread florian.salihovic
Don't foget the subject next time. The following link might help.

http://www.adobe.com/devnet/flex/articles/cairngorm_pt1.html

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

 Hi,
 
 Please some one explain me about  Cairngorm architecture.
 
 Thanks
 Anand






[flexcoders] Dimensions of a UIComponent are allways 0, 0?!

2008-10-01 Thread florian.salihovic
I have a UIComponent which Dimensions never change?! When i add a child in the 
overriden 
createChildren i expect the dimensions to be changed... but nothing happens...

override protected function createChildren():void {
super.createChildren();
if (!this._uibase) {
this._uibase = new UIBase();
this.addChild(_uibase);
}

The UIBase class is a component made with the Flex Component Kit and it has 
width an 
height  0.

I have no clue what i am doin wrong...



[flexcoders] Viewing massive data in charts

2008-09-22 Thread florian.salihovic
Hello everybody,

i have a question which is not technical in first place. I'm more in a search 
for a pattern.

The problem: i have  a massive collection of objects (~35000 instance) which 
should be 
displayed in the charting components. But not all at once, just intervals which 
can be as big 
as the whole collection (similar to google finance: 
http://finance.google.com/finance).

My Problem: is there a useful pattern? From my observation working with this 
massive 
amount of data i use, it demands quite some performance and it doesn't run that 
fluid. But i 
have seen some implementations which allways reset the dataprovider with a 
completely new 
collection which is sliced out of the original collection with all objects. 
This approach doesn't 
feel right though...

Can anybody share some informationens or expiriences? Any input would be 
apprciated.

Best regards!



[flexcoders] Re: Viewing massive data in charts

2008-09-22 Thread florian.salihovic
Running some tests i found out, that the DateTimeAxis doesn't refesh the 
minimum and 
maximum values for example. I tested with a dataset of objects which 
represented data 
for everyday in 2 years (~17900 instances).

The recalculated min/max where displayed via trace one reset too late... it's 
seems like 
there is quite a lot to understand doing some more complex stuff with the chart 
components...


Best regards

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

 Hello everybody,
 
 i have a question which is not technical in first place. I'm more in a search 
 for a pattern.
 
 The problem: i have  a massive collection of objects (~35000 instance) which 
 should be 
 displayed in the charting components. But not all at once, just intervals 
 which can be as 
big 
 as the whole collection (similar to google finance: 
 http://finance.google.com/finance).
 
 My Problem: is there a useful pattern? From my observation working with this 
 massive 
 amount of data i use, it demands quite some performance and it doesn't run 
 that fluid. 
But i 
 have seen some implementations which allways reset the dataprovider with a 
 completely 
new 
 collection which is sliced out of the original collection with all objects. 
 This approach 
doesn't 
 feel right though...
 
 Can anybody share some informationens or expiriences? Any input would be 
 apprciated.
 
 Best regards!






[flexcoders] Research - Flex Metatags useable in F.C.K.

2008-09-18 Thread florian.salihovic
I'm currently doing a research on the Flex Component Kit. I need to outsource 
some custom 
components to a designer. The baseclasses are defined, but will the metatags 
(custom events 
used for the databinding) also be recognized/compiled into the source?

Best regards.



[flexcoders] Re: Multiple webservice calls

2008-09-18 Thread florian.salihovic
Thanx for the helpful input everybody!

That was very helpful!

Best regards.

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

 Ok, all that may have some value, but is it way more complicated than it
 needs to be.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of app.developer
 Sent: Wednesday, September 17, 2008 10:51 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Multiple webservice calls
 
  
 
 (NOTE: I wrote this with the ability of italics so it may be a wee 
 bit confusing reading this.)
 
 Assumptions: You are calling the same WS method with different 
 parameters.
 Possible situation: You have a Zoo application in your Flex / AIR 
 application. 
 Lets say a zoo visitor is at the base state of your zoo when he/she 
 may click on any section of the zoo. 
 
 1) From the MXML page :: CLICK on the selection
 (Ex: AnimalSelector.MXML)
 
 2) Dispatch an Event as the AnimalSelectionEvent
 AnimalSelectionEvent is a custom event to carry data
 dispatchEvent(new AnimalSelectionEvent(SELECT_ANIMAL, 
 animalSelection);
 
 3) The registered mediator to the MXML page hears the event in the 
 mediator registered to the MXML page
 In the mediator constructor add an event listener 
 addEventListener( AnimalSelector.SELECT_ANIMAL, selectAnimal );
 
 private function selectAnimal (event:AnimalSelectionEvent) : void
 {
 sendNotification( 
 ApplicationFacade.ANIMAL_INFORMATION_REQUEST, event.animalID );
 } 
 
 4)Each notification will be heard by a command file
 AnimalCommand.as
 switch(notification.getName())
 {
 case ApplicationFacade.ANIMAL_INFORMATION_REQUEST:
 proxy.loadAnimalInformation(notification.getName());
 break;
 }
 
 5) Call the WS through the AnimalProxy
 Build the URL for the WS call
 Build the data parameters into an object
 Send the parameters to ServiceProxy
 
 6) call the WS ServiceProxy
 Define the send method [Post || Get]
 
 var service:HTTPService = new HTTPService;
 service.method = sendMethod;
 service.showBusyCursor = true;
 service.url = url;
 
 var token:AsyncToken = service.send(fullParams);
 token.addResponder(responder);
 
 responder is the AnimalProxy so the WS knows where to send the 
 results
 
 7) AnimalProxy should have a results method to received the data 
 back from the WS
 Place the data in a dataProvider 
 
 ***Rinse and Repeat Time***
 
 8) From AnimalProxy...still in the Results method
 Send a notification for the next WS call
 (Basically do steps 3- 7 how ever many times you need to call the WS)
 
 sendNotification( ApplicationFacade.ANIMAL_HABITAT_REQUEST, 
 animalID );
 
 THE END :) 
 
 ~~
 Reference
 ~~
 Send a call to the WS to get animal information, habitat, and diet. 
 All of theses can be called from the same WS and the same method with 
 different parameters.
 
 URL: http://localhost:8080/services/getAnimalDetails
 http://localhost:8080/services/getAnimalDetails 
 
 Animal information WS call:
 http://localhost:8080/services/getAnimalDetails?
 http://localhost:8080/services/getAnimalDetails? 
 animal=liondata=information
 
 Animal habitat WS call:
 http://localhost:8080/services/getAnimalDetails?
 http://localhost:8080/services/getAnimalDetails? 
 animal=liondata=habitat
 
 Animal diet WS call:
 http://localhost:8080/services/getAnimalDetails?animal=liondata=diet
 http://localhost:8080/services/getAnimalDetails?animal=liondata=diet 
 ~~
 ~~
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , florian.salihovic 
 florian.salihovic@ wrote:
 
  Thanx for the info,
  
  i'll look deeper into the informations rigt after sending this post 
 (i would appreciate if you 
  could post some further informations).
  
  @Tracy
  By it didn't seem to work i meant that the ready property was 
 false after sending a 
  request. By concurrentyl i mean having one Web Service instance 
 which can call multiple 
  operations without canceling the previous and let all calls be 
 managerable (in a sence of 
  be able to differentiate between the single results that come in).
  
  
  Best regards and thanx for the info so far.
  
  
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com , app.developer appdeveloper@ 
 wrote:
  
   Look up AsyncToken. This extend the EventDispatcher.
   
   This class provides a place to set additional or token-level data 
 for 
   asynchronous RPC operations. It also allows an IResponder to be 
   attached for an individual call.
   
   Associate this to the SEND
   var token:AsyncToken = service.send(Params);
   token.addResponder(responder);
   
   The 'responder' will let your WS know where to return the results.
   
   I can write a longer answer

[flexcoders] Re: Research - Flex Metatags useable in F.C.K.

2008-09-18 Thread florian.salihovic
Hi, that would be if i used MXMLC for compilation. What i was asking for is, 
when the 
*.swc gets compiled in Flash with the FCK.

Best regards.

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

 Hi,
 
 you would use;
 
  -keep-as3-metadata MetaTagName
 
 to keep any meta data tags at compile time. If you look in the build.xml
 file for the framework the keep;
 
 target name=framework description=Builds libs/framework.swc
 compc include-classes=FrameworkClasses
 output=${basedir}/libs/framework.swc locale= accessible=true
 include-namespaces uri=http://www.adobe.com/2006/mxml/
 namespace uri=http://www.adobe.com/2006/mxml;
 manifest=${framework.dir}/manifest.xml/
 source-path path-element=${framework.dir}/src/
 external-library-path dir=${basedir}/libs/player
 includes=playerglobal.swc/
 library-path/
 include-file name=defaults.css
 path=${framework.dir}/defaults.css/
 include-file name=defaults-2.0.0.css
 path=${framework.dir}/defaults-2.0.0.css/
 include-file name=defaults-2.0.1.css
 path=${framework.dir}/defaults-2.0.1.css/
 include-file name=Assets.swf
 path=${framework.dir}/assets/Assets.swf/
 keep-as3-metadata name=Bindable /
 keep-as3-metadata name=Managed /
 keep-as3-metadata name=ChangeEvent /
 keep-as3-metadata name=NonCommittingChangeEvent /
 keep-as3-metadata name=Transient /
 /compc
 /target
 
 Mike
 
 On Thu, Sep 18, 2008 at 5:51 AM, florian.salihovic 
 [EMAIL PROTECTED] wrote:
 
I'm currently doing a research on the Flex Component Kit. I need to
  outsource some custom
  components to a designer. The baseclasses are defined, but will the
  metatags (custom events
  used for the databinding) also be recognized/compiled into the source?
 
  Best regards.
 
   
 
 
 
 
 -- 
 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: Multiple webservice calls

2008-09-17 Thread florian.salihovic
Thanx for the info,

i'll look deeper into the informations rigt after sending this post (i would 
appreciate if you 
could post some further informations).

@Tracy
By it didn't seem to work i meant that the ready property was false after 
sending a 
request. By concurrentyl i mean having one Web Service instance which can call 
multiple 
operations without canceling the previous and let all calls be managerable (in 
a sence of 
be able to differentiate between the single results that come in).


Best regards and thanx for the info so far.



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

 Look up AsyncToken. This extend the EventDispatcher.
 
 This class provides a place to set additional or token-level data for 
 asynchronous RPC operations.  It also allows an IResponder to be 
 attached for an individual call.
 
 Associate this to the SEND
 var token:AsyncToken = service.send(Params);
 token.addResponder(responder);
 
 The 'responder' will let your WS know where to return the results.
 
 I can write a longer answer after EOB.
 
 PCC
 
 --- In flexcoders@yahoogroups.com, florian.salihovic 
 florian.salihovic@ wrote:
 
  I'm currently trying to call with one WebService instance a WebService
  several time concurrently. But it seems like it won't work. Is there a
  way to achieve it?
  
  I'm using an instance of mx.rpc.soap.WebService.
  
  Any help would be appreciated.
 






[flexcoders] Multiple webservice calls

2008-09-16 Thread florian.salihovic
I'm currently trying to call with one WebService instance a WebService
several time concurrently. But it seems like it won't work. Is there a
way to achieve it?

I'm using an instance of mx.rpc.soap.WebService.

Any help would be appreciated.



[flexcoders] Re: Problems installing the Flex Component Kit for Flash CS3

2008-09-01 Thread florian.salihovic
Thanx for the input. But it was just a simple click: i had to activate the 
extensions.

Best regards from Germany


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

 I donno off the top of my head. Perhaps this helps.
 
   I've done it with PS and it wasn't tough.
 
 
 http://www.adobe.com/devnet/flex/articles/skins_styles.html
 
 
 Alan
 
 
 
 
 On Aug 31, 2008, at 10:58 AM, florian.salihovic wrote:
 
  But when i start flash, wether the templates apear nor the 'Convert  
  Symbol to Flex
  Component' and 'Convert Symbol to Flex Container' were added.
 
  I'm pretty clueless at the moment. Any hints, pointers?






[flexcoders] Problems installing the Flex Component Kit for Flash CS3

2008-08-31 Thread florian.salihovic
Installed Software:
Adobe Flash CS3 Professional
Adobe Flex 3
Adobe Extension Manager 1.8.169

I use Flex to code but since i thought it might be a good idea to impove the 
designer/programmer workflow i thought i'd give the FCK4FCS3 a try.

So i downloaded
* FLEX SKIN DESIGN EXTENSION FOR FLASH
* FLEX COMPONENT KIT FOR FLASH CS3 PROFESSIONAL
from http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex_skins

So far so good. After clicking the *.mxp files the Extension manager popped up 
and the files 
were installed.

But when i start flash, wether the templates apear nor the 'Convert Symbol to 
Flex 
Component' and 'Convert Symbol to Flex Container' were added.

I'm pretty clueless at the moment. Any hints, pointers?



[flexcoders] Re: ItemRenderer returns empty Object instead of encapsuled data.

2008-08-19 Thread florian.salihovic
Here is the stacktrace:
TypeError: Error #1034: Typumwandlung fehlgeschlagen: [EMAIL PROTECTED] kann 
nicht in 
de.blitzeinschlag.playlisteditor.model.playlists.IPlayListItem umgewandelt 
werden.
at 
de.blitzeinschlag.playlisteditor.view.playlists.listClasses::ListItemRenderer/set
 
data()[/Users/florian/Workspaces/blitzeinschlag/PlayListEditor/src/de/blitzeinschlag/playlisteditor/view/playlists/listClasses/ListItemRenderer.mx
ml:99]
at 
mx.controls::List/makeRowsAndColumns()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\List.as:1286]
at 
mx.controls.listClasses::ListBase/makeRowsAndColumnsWithExtraRows()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\listClasses
\ListBase.as:1359]
at 
mx.controls.listClasses::ListBase/updateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:3657]
at 
mx.controls::List/updateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\List.as:1003]
at 
mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:3279]
at 
mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:605]
at 
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:678]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at 
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8565]
at 
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8508]

And this is the argument which is passed to the set data-field implementation:
type name=Object isDynamic=true isFinal=false isStatic=false
  method name=hasOwnProperty declaredBy=Object returnType=Boolean 
uri=http://adobe.com/AS3/2006/builtin;
parameter index=1 type=* optional=true/
  /method
  method name=isPrototypeOf declaredBy=Object returnType=Boolean 
uri=http://adobe.com/AS3/2006/builtin;
parameter index=1 type=* optional=true/
  /method
  method name=propertyIsEnumerable declaredBy=Object returnType=Boolean 
uri=http://adobe.com/AS3/2006/builtin;
parameter index=1 type=* optional=true/
  /method
/type

Any input would be thankfull!

Best regards

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

 If you get an runtime exception, always use a debug build and post the
 full stacktrace.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of florian.salihovic
 Sent: Monday, August 18, 2008 9:30 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] ItemRenderer returns empty Object instead of
 encapsuled data.
 
  
 
 I have two instances of mx:controls::List. Both use the same
 ItemRenderer. A TypeError 
 occours, when i drop one item from one List into the other List. Instead
 of the encapsuled 
 type (an instance of an interface, typed to the interface) just an empty
 Ombject instance is 
 returned.
 
 I implement mx.core.IDataRenderer,
 mx.controls.listClasses.IDropInListItemRenderer and 
 mx.controls.listClasses.IListItemRenderer in my component. Here is the
 code for the 
 overwritten data and listData Propertys:
 
 private var _item:IPlayListItem;
 private var _listData:BaseListData;
 
 [Bindable(dataChange)]
 override public function get data():Object {
 return this._item;
 }
 
 [Bindable(dataChange)]
 public function get listData():BaseListData {
 return this._listData
 }
 
 override public function set data(value:Object):void {
 trace(ListItemRenderer.data: +value);
 super.data = value;
 if (!value) {
 return;
 }
 if (this._item == value) {
 return;
 }
 if (value is IPlayListItem) {
 super.data = IPlayListItem(value);
 this._item = IPlayListItem(value);
 }
 this.dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
 
 }
 
 public function set listData(value:BaseListData):void {
 if (this._listData == value) {
 return;
 }
 this._listData = value;
 this.dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
 }
 
 What am i missing?
 
 Best regards!






[flexcoders] Re: ItemRenderer returns empty Object instead of encapsuled data.

2008-08-19 Thread florian.salihovic
Something i forgot to add:
in the Debugger the passed Object, which is said to be not convertable in the 
desired 
type, shows the right properties.

Pretty strange to me.



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

 Here is the stacktrace:
 TypeError: Error #1034: Typumwandlung fehlgeschlagen: [EMAIL PROTECTED] kann 
 nicht 
in 
 de.blitzeinschlag.playlisteditor.model.playlists.IPlayListItem umgewandelt 
 werden.
   at 
 de.blitzeinschlag.playlisteditor.view.playlists.listClasses::ListItemRenderer/set
  
 
data()[/Users/florian/Workspaces/blitzeinschlag/PlayListEditor/src/de/blitzeinschlag/playl
isteditor/view/playlists/listClasses/ListItemRenderer.mx
 ml:99]
   at 
mx.controls::List/makeRowsAndColumns()[E:\dev\3.1.0\frameworks\projects\framework\
src\mx\controls\List.as:1286]
   at 
 
mx.controls.listClasses::ListBase/makeRowsAndColumnsWithExtraRows()[E:\dev\3.1.0\fra
meworks\projects\framework\src\mx\controls\listClasses
 \ListBase.as:1359]
   at 
 
mx.controls.listClasses::ListBase/updateDisplayList()[E:\dev\3.1.0\frameworks\projects\fr
amework\src\mx\controls\listClasses\ListBase.as:3657]
   at 
mx.controls::List/updateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\m
x\controls\List.as:1003]
   at 
 
mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\f
ramework\src\mx\controls\listClasses\ListBase.as:3279]
   at 
mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\fra
mework\src\mx\managers\LayoutManager.as:605]
   at 
 
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.1.0\frameworks\projects\
framework\src\mx\managers\LayoutManager.as:678]
   at Function/http://adobe.com/AS3/2006/builtin::apply()
   at 
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.1.0\frameworks\projects\framewo
rk\src\mx\core\UIComponent.as:8565]
   at 
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.1.0\frameworks\projects\framewor
k\src\mx\core\UIComponent.as:8508]
 
 And this is the argument which is passed to the set data-field 
 implementation:
 type name=Object isDynamic=true isFinal=false isStatic=false
   method name=hasOwnProperty declaredBy=Object returnType=Boolean 
uri=http://adobe.com/AS3/2006/builtin;
 parameter index=1 type=* optional=true/
   /method
   method name=isPrototypeOf declaredBy=Object returnType=Boolean 
uri=http://adobe.com/AS3/2006/builtin;
 parameter index=1 type=* optional=true/
   /method
   method name=propertyIsEnumerable declaredBy=Object 
 returnType=Boolean 
uri=http://adobe.com/AS3/2006/builtin;
 parameter index=1 type=* optional=true/
   /method
 /type
 
 Any input would be thankfull!
 
 Best regards
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  If you get an runtime exception, always use a debug build and post the
  full stacktrace.
  
   
  
  
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
  Behalf Of florian.salihovic
  Sent: Monday, August 18, 2008 9:30 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] ItemRenderer returns empty Object instead of
  encapsuled data.
  
   
  
  I have two instances of mx:controls::List. Both use the same
  ItemRenderer. A TypeError 
  occours, when i drop one item from one List into the other List. Instead
  of the encapsuled 
  type (an instance of an interface, typed to the interface) just an empty
  Ombject instance is 
  returned.
  
  I implement mx.core.IDataRenderer,
  mx.controls.listClasses.IDropInListItemRenderer and 
  mx.controls.listClasses.IListItemRenderer in my component. Here is the
  code for the 
  overwritten data and listData Propertys:
  
  private var _item:IPlayListItem;
  private var _listData:BaseListData;
  
  [Bindable(dataChange)]
  override public function get data():Object {
  return this._item;
  }
  
  [Bindable(dataChange)]
  public function get listData():BaseListData {
  return this._listData
  }
  
  override public function set data(value:Object):void {
  trace(ListItemRenderer.data: +value);
  super.data = value;
  if (!value) {
  return;
  }
  if (this._item == value) {
  return;
  }
  if (value is IPlayListItem) {
  super.data = IPlayListItem(value);
  this._item = IPlayListItem(value);
  }
  this.dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
  
  }
  
  public function set listData(value:BaseListData):void {
  if (this._listData == value) {
  return;
  }
  this._listData = value;
  this.dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
  }
  
  What am i missing?
  
  Best regards!
 






[flexcoders] Re: ItemRenderer returns empty Object instead of encapsuled data - update

2008-08-19 Thread florian.salihovic
Update:

Using a for each loop shows me even the right value, but it's type is lost.
override public function set data(value:Object):void {
trace(describeType(value));
for each(var a:* in value) {
trace(a)
}
if (this._item == value) {
return;
}
super.data = value;
if (value is IPlayListItem) {
this._item = IPlayListItem(value);
}
this.dispatchEvent(new 
FlexEvent(FlexEvent.DATA_CHANGE));
}

- the condition value is IPLayListItem is actually never true.

Best regards

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

 Something i forgot to add:
 in the Debugger the passed Object, which is said to be not convertable in the 
 desired 
 type, shows the right properties.
 
 Pretty strange to me.
 
 
 
 --- In flexcoders@yahoogroups.com, florian.salihovic florian.salihovic@ 
 wrote:
 
  Here is the stacktrace:
  TypeError: Error #1034: Typumwandlung fehlgeschlagen: [EMAIL PROTECTED] 
  kann 
nicht 
 in 
  de.blitzeinschlag.playlisteditor.model.playlists.IPlayListItem umgewandelt 
  werden.
  at 
  de.blitzeinschlag.playlisteditor.view.playlists.listClasses::ListItemRenderer/set
   
  
 
data()[/Users/florian/Workspaces/blitzeinschlag/PlayListEditor/src/de/blitzeinschlag/playl
 isteditor/view/playlists/listClasses/ListItemRenderer.mx
  ml:99]
  at 
 
mx.controls::List/makeRowsAndColumns()[E:\dev\3.1.0\frameworks\projects\framework\
 src\mx\controls\List.as:1286]
  at 
  
 
mx.controls.listClasses::ListBase/makeRowsAndColumnsWithExtraRows()[E:\dev\3.1.0\fra
 meworks\projects\framework\src\mx\controls\listClasses
  \ListBase.as:1359]
  at 
  
 
mx.controls.listClasses::ListBase/updateDisplayList()[E:\dev\3.1.0\frameworks\projects\fr
 amework\src\mx\controls\listClasses\ListBase.as:3657]
  at 
 
mx.controls::List/updateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\m
 x\controls\List.as:1003]
  at 
  
 
mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\f
 ramework\src\mx\controls\listClasses\ListBase.as:3279]
  at 
 
mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\fra
 mework\src\mx\managers\LayoutManager.as:605]
  at 
  
 
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.1.0\frameworks\projects\
 framework\src\mx\managers\LayoutManager.as:678]
  at Function/http://adobe.com/AS3/2006/builtin::apply()
  at 
 
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.1.0\frameworks\projects\framewo
 rk\src\mx\core\UIComponent.as:8565]
  at 
 
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.1.0\frameworks\projects\framewor
 k\src\mx\core\UIComponent.as:8508]
  
  And this is the argument which is passed to the set data-field 
  implementation:
  type name=Object isDynamic=true isFinal=false isStatic=false
method name=hasOwnProperty declaredBy=Object returnType=Boolean 
 uri=http://adobe.com/AS3/2006/builtin;
  parameter index=1 type=* optional=true/
/method
method name=isPrototypeOf declaredBy=Object returnType=Boolean 
 uri=http://adobe.com/AS3/2006/builtin;
  parameter index=1 type=* optional=true/
/method
method name=propertyIsEnumerable declaredBy=Object 
  returnType=Boolean 
 uri=http://adobe.com/AS3/2006/builtin;
  parameter index=1 type=* optional=true/
/method
  /type
  
  Any input would be thankfull!
  
  Best regards
  
  --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
  
   If you get an runtime exception, always use a debug build and post the
   full stacktrace.
   

   
   
   
   From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
   Behalf Of florian.salihovic
   Sent: Monday, August 18, 2008 9:30 AM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] ItemRenderer returns empty Object instead of
   encapsuled data.
   

   
   I have two instances of mx:controls::List. Both use the same
   ItemRenderer. A TypeError 
   occours, when i drop one item from one List into the other List. Instead
   of the encapsuled 
   type (an instance of an interface, typed to the interface) just an empty
   Ombject instance is 
   returned.
   
   I implement mx.core.IDataRenderer,
   mx.controls.listClasses.IDropInListItemRenderer and 
   mx.controls.listClasses.IListItemRenderer in my component. Here is the
   code for the 
   overwritten data and listData Propertys:
   
   private var _item:IPlayListItem;
   private var _listData:BaseListData;
   
   [Bindable(dataChange)]
   override public function get data():Object

[flexcoders] Re: ItemRenderer returns empty Object instead of encapsuled data - update

2008-08-19 Thread florian.salihovic
Another wierd observation: when i set dragMoveEnabled=true from the 
source-list, i get 
the expected results. But i don't want it to be dragMoveEnabled.

But at least i'm moving forward...

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

 Update:
 
 Using a for each loop shows me even the right value, but it's type is lost.
 override public function set data(value:Object):void {
   trace(describeType(value));
   for each(var a:* in value) {
   trace(a)
   }
   if (this._item == value) {
   return;
   }
   super.data = value;
   if (value is IPlayListItem) {
   this._item = IPlayListItem(value);
   }
   this.dispatchEvent(new 
 FlexEvent(FlexEvent.DATA_CHANGE));
   }
 
 - the condition value is IPLayListItem is actually never true.
 
 Best regards
 
 --- In flexcoders@yahoogroups.com, florian.salihovic florian.salihovic@ 
 wrote:
 
  Something i forgot to add:
  in the Debugger the passed Object, which is said to be not convertable in 
  the desired 
  type, shows the right properties.
  
  Pretty strange to me.
  
  
  
  --- In flexcoders@yahoogroups.com, florian.salihovic florian.salihovic@ 
  wrote:
  
   Here is the stacktrace:
   TypeError: Error #1034: Typumwandlung fehlgeschlagen: [EMAIL PROTECTED] 
   kann 
 nicht 
  in 
   de.blitzeinschlag.playlisteditor.model.playlists.IPlayListItem 
   umgewandelt werden.
 at 
   de.blitzeinschlag.playlisteditor.view.playlists.listClasses::ListItemRenderer/set

   
  
 
data()[/Users/florian/Workspaces/blitzeinschlag/PlayListEditor/src/de/blitzeinschlag/playl
  isteditor/view/playlists/listClasses/ListItemRenderer.mx
   ml:99]
 at 
  
 
mx.controls::List/makeRowsAndColumns()[E:\dev\3.1.0\frameworks\projects\framework\
  src\mx\controls\List.as:1286]
 at 
   
  
 
mx.controls.listClasses::ListBase/makeRowsAndColumnsWithExtraRows()[E:\dev\3.1.0\fra
  meworks\projects\framework\src\mx\controls\listClasses
   \ListBase.as:1359]
 at 
   
  
 
mx.controls.listClasses::ListBase/updateDisplayList()[E:\dev\3.1.0\frameworks\projects\fr
  amework\src\mx\controls\listClasses\ListBase.as:3657]
 at 
  
 
mx.controls::List/updateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\m
  x\controls\List.as:1003]
 at 
   
  
 
mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\f
  ramework\src\mx\controls\listClasses\ListBase.as:3279]
 at 
  
 
mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\fra
  mework\src\mx\managers\LayoutManager.as:605]
 at 
   
  
 
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.1.0\frameworks\projects\
  framework\src\mx\managers\LayoutManager.as:678]
 at Function/http://adobe.com/AS3/2006/builtin::apply()
 at 
  
 
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.1.0\frameworks\projects\framewo
  rk\src\mx\core\UIComponent.as:8565]
 at 
  
 
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.1.0\frameworks\projects\framewor
  k\src\mx\core\UIComponent.as:8508]
   
   And this is the argument which is passed to the set data-field 
   implementation:
   type name=Object isDynamic=true isFinal=false isStatic=false
 method name=hasOwnProperty declaredBy=Object returnType=Boolean 
  uri=http://adobe.com/AS3/2006/builtin;
   parameter index=1 type=* optional=true/
 /method
 method name=isPrototypeOf declaredBy=Object returnType=Boolean 
  uri=http://adobe.com/AS3/2006/builtin;
   parameter index=1 type=* optional=true/
 /method
 method name=propertyIsEnumerable declaredBy=Object 
returnType=Boolean 
  uri=http://adobe.com/AS3/2006/builtin;
   parameter index=1 type=* optional=true/
 /method
   /type
   
   Any input would be thankfull!
   
   Best regards
   
   --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
   
If you get an runtime exception, always use a debug build and post the
full stacktrace.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of florian.salihovic
Sent: Monday, August 18, 2008 9:30 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ItemRenderer returns empty Object instead of
encapsuled data.

 

I have two instances of mx:controls::List. Both use the same
ItemRenderer. A TypeError 
occours, when i drop one item from one List into the other List. Instead
of the encapsuled 
type (an instance of an interface, typed to the interface) just an empty
Ombject instance is 
returned.

I

[flexcoders] Re: ItemRenderer returns empty Object instead of encapsuled data - update

2008-08-19 Thread florian.salihovic
Hello Alex,

dragMoveEnabled is making the difference. When i don't use any ItemRenderer the 
called i 
get [object PlayListItem] and the collections i wrapped in typed methods.

It seems like the DataGridDragProxy works not right, when dragMoveEnabled is 
set to 
false. Actually it does in my case as far as i can say.

Best regards.



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

 Are you using modules or sub-applications?  Where does the data come
 from?  It seems like it isn't being converted correctly.  Have you
 proven that each collection contains the correct object and not Objects?
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of florian.salihovic
 Sent: Tuesday, August 19, 2008 2:05 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ItemRenderer returns empty Object instead of
 encapsuled data - update
 
  
 
 Update:
 
 Using a for each loop shows me even the right value, but it's type is
 lost.
 override public function set data(value:Object):void {
 trace(describeType(value));
 for each(var a:* in value) {
 trace(a)
 }
 if (this._item == value) {
 return;
 }
 super.data = value;
 if (value is IPlayListItem) {
 this._item = IPlayListItem(value);
 }
 this.dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
 }
 
 - the condition value is IPLayListItem is actually never true.
 
 Best regards
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , florian.salihovic florian.salihovic@ wrote:
 
  Something i forgot to add:
  in the Debugger the passed Object, which is said to be not convertable
 in the desired 
  type, shows the right properties.
  
  Pretty strange to me.
  
  
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com , florian.salihovic
 florian.salihovic@ wrote:
  
   Here is the stacktrace:
   TypeError: Error #1034: Typumwandlung fehlgeschlagen:
 [EMAIL PROTECTED] kann 
 nicht 
  in 
   de.blitzeinschlag.playlisteditor.model.playlists.IPlayListItem
 umgewandelt werden.
   at
 de.blitzeinschlag.playlisteditor.view.playlists.listClasses::ListItemRen
 derer/set 
   
  
 data()[/Users/florian/Workspaces/blitzeinschlag/PlayListEditor/src/de/bl
 itzeinschlag/playl
  isteditor/view/playlists/listClasses/ListItemRenderer.mx
   ml:99]
   at 
  
 mx.controls::List/makeRowsAndColumns()[E:\dev\3.1.0\frameworks\projects\
 framework\
  src\mx\controls\List.as:1286]
   at 
   
  
 mx.controls.listClasses::ListBase/makeRowsAndColumnsWithExtraRows()[E:\d
 ev\3.1.0\fra
  meworks\projects\framework\src\mx\controls\listClasses
   \ListBase.as:1359]
   at 
   
  
 mx.controls.listClasses::ListBase/updateDisplayList()[E:\dev\3.1.0\frame
 works\projects\fr
  amework\src\mx\controls\listClasses\ListBase.as:3657]
   at 
  
 mx.controls::List/updateDisplayList()[E:\dev\3.1.0\frameworks\projects\f
 ramework\src\m
  x\controls\List.as:1003]
   at 
   
  
 mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\3.1.0\fra
 meworks\projects\f
  ramework\src\mx\controls\listClasses\ListBase.as:3279]
   at 
  
 mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.1.0\frameworks
 \projects\fra
  mework\src\mx\managers\LayoutManager.as:605]
   at 
   
  
 mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.1.0\framewor
 ks\projects\
  framework\src\mx\managers\LayoutManager.as:678]
   at Function/http://adobe.com/AS3/2006/builtin::apply
 http://adobe.com/AS3/2006/builtin::apply ()
   at 
  
 mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.1.0\frameworks\proj
 ects\framewo
  rk\src\mx\core\UIComponent.as:8565]
   at 
  
 mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.1.0\frameworks\proje
 cts\framewor
  k\src\mx\core\UIComponent.as:8508]
   
   And this is the argument which is passed to the set data-field
 implementation:
   type name=Object isDynamic=true isFinal=false
 isStatic=false
   method name=hasOwnProperty declaredBy=Object
 returnType=Boolean 
  uri=http://adobe.com/AS3/2006/builtin
 http://adobe.com/AS3/2006/builtin 
   parameter index=1 type=* optional=true/
   /method
   method name=isPrototypeOf declaredBy=Object
 returnType=Boolean 
  uri=http://adobe.com/AS3/2006/builtin
 http://adobe.com/AS3/2006/builtin 
   parameter index=1 type=* optional=true/
   /method
   method name=propertyIsEnumerable declaredBy=Object
 returnType=Boolean 
  uri=http://adobe.com/AS3/2006/builtin
 http://adobe.com/AS3/2006/builtin 
   parameter index=1 type=* optional=true/
   /method
   /type
   
   Any input would be thankfull!
   
   Best regards
   
   --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote:
   
If you get an runtime exception, always use a debug build and post
 the
full stacktrace.





From: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[flexcoders] Re: ItemRenderer returns empty Object instead of encapsuled data - update

2008-08-19 Thread florian.salihovic
Thanx for the info. This is really helpful to know.

Is there perhaps a short example to start with?

Best regards and thanx for the help!

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

 Ah, ok.  The default copy mechanism won't work on typed objects unless
 they are [RemoteClass] or use registerClassAlias.  You can always
 override the dragDrop handle and do your own intelligent copy.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of florian.salihovic
 Sent: Tuesday, August 19, 2008 3:18 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ItemRenderer returns empty Object instead of
 encapsuled data - update
 
  
 
 Hello Alex,
 
 dragMoveEnabled is making the difference. When i don't use any
 ItemRenderer the called i 
 get [object PlayListItem] and the collections i wrapped in typed
 methods.
 
 It seems like the DataGridDragProxy works not right, when
 dragMoveEnabled is set to 
 false. Actually it does in my case as far as i can say.
 
 Best regards.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Are you using modules or sub-applications? Where does the data come
  from? It seems like it isn't being converted correctly. Have you
  proven that each collection contains the correct object and not
 Objects?
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of florian.salihovic
  Sent: Tuesday, August 19, 2008 2:05 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: ItemRenderer returns empty Object instead of
  encapsuled data - update
  
  
  
  Update:
  
  Using a for each loop shows me even the right value, but it's type is
  lost.
  override public function set data(value:Object):void {
  trace(describeType(value));
  for each(var a:* in value) {
  trace(a)
  }
  if (this._item == value) {
  return;
  }
  super.data = value;
  if (value is IPlayListItem) {
  this._item = IPlayListItem(value);
  }
  this.dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
  }
  
  - the condition value is IPLayListItem is actually never true.
  
  Best regards
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , florian.salihovic florian.salihovic@ wrote:
  
   Something i forgot to add:
   in the Debugger the passed Object, which is said to be not
 convertable
  in the desired 
   type, shows the right properties.
   
   Pretty strange to me.
   
   
   
   --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com , florian.salihovic
  florian.salihovic@ wrote:
   
Here is the stacktrace:
TypeError: Error #1034: Typumwandlung fehlgeschlagen:
  [EMAIL PROTECTED] kann 
  nicht 
   in 
de.blitzeinschlag.playlisteditor.model.playlists.IPlayListItem
  umgewandelt werden.
at
 
 de.blitzeinschlag.playlisteditor.view.playlists.listClasses::ListItemRen
  derer/set 

   
 
 data()[/Users/florian/Workspaces/blitzeinschlag/PlayListEditor/src/de/bl
  itzeinschlag/playl
   isteditor/view/playlists/listClasses/ListItemRenderer.mx
ml:99]
at 
   
 
 mx.controls::List/makeRowsAndColumns()[E:\dev\3.1.0\frameworks\projects\
  framework\
   src\mx\controls\List.as:1286]
at 

   
 
 mx.controls.listClasses::ListBase/makeRowsAndColumnsWithExtraRows()[E:\d
  ev\3.1.0\fra
   meworks\projects\framework\src\mx\controls\listClasses
\ListBase.as:1359]
at 

   
 
 mx.controls.listClasses::ListBase/updateDisplayList()[E:\dev\3.1.0\frame
  works\projects\fr
   amework\src\mx\controls\listClasses\ListBase.as:3657]
at 
   
 
 mx.controls::List/updateDisplayList()[E:\dev\3.1.0\frameworks\projects\f
  ramework\src\m
   x\controls\List.as:1003]
at 

   
 
 mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\3.1.0\fra
  meworks\projects\f
   ramework\src\mx\controls\listClasses\ListBase.as:3279]
at 
   
 
 mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.1.0\frameworks
  \projects\fra
   mework\src\mx\managers\LayoutManager.as:605]
at 

   
 
 mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.1.0\framewor
  ks\projects\
   framework\src\mx\managers\LayoutManager.as:678]
at Function/http://adobe.com/AS3/2006/builtin::apply
 http://adobe.com/AS3/2006/builtin::apply 
  http://adobe.com/AS3/2006/builtin::apply
 http://adobe.com/AS3/2006/builtin::apply  ()
at 
   
 
 mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.1.0\frameworks\proj
  ects\framewo
   rk\src\mx\core\UIComponent.as:8565]
at 
   
 
 mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.1.0\frameworks\proje
  cts\framewor
   k\src\mx\core\UIComponent.as:8508]

And this is the argument which

[flexcoders] Re: ItemRenderer returns empty Object instead of encapsuled data - update

2008-08-19 Thread florian.salihovic
Thanx Alex, this helps me a lot!

Best regards!

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

 To copy yourself would look something like this
 
  
 
 myDragDropHandler(event:DragEvent):void
 
 {
 
 If (event.action == DragManager.COPY)
 
 {
 
 event.preventDefault();
 
 var index:int = calculateDropIndex(event);
 
 var items:Array =
 event.dragSource.dataForFormat(items);
 
 var n:int = items.length;
 
 for (var i:int = 0; I  n; i++)
 
 {
 
 var newVO:VO = new VO();
 
 var oldVO:VO = items[i] as VO;
 
 newVo.prop1 = oldVO.prop1;
 
 newVo.prop2 = oldVO.prop2;
 
 dataProvider.addItemAt(newVO,
 index);
 
  
 
 }
 
 }
 
 }
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of florian.salihovic
 Sent: Tuesday, August 19, 2008 4:37 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ItemRenderer returns empty Object instead of
 encapsuled data - update
 
  
 
 Thanx for the info. This is really helpful to know.
 
 Is there perhaps a short example to start with?
 
 Best regards and thanx for the help!
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Ah, ok. The default copy mechanism won't work on typed objects unless
  they are [RemoteClass] or use registerClassAlias. You can always
  override the dragDrop handle and do your own intelligent copy.
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of florian.salihovic
  Sent: Tuesday, August 19, 2008 3:18 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: ItemRenderer returns empty Object instead of
  encapsuled data - update
  
  
  
  Hello Alex,
  
  dragMoveEnabled is making the difference. When i don't use any
  ItemRenderer the called i 
  get [object PlayListItem] and the collections i wrapped in typed
  methods.
  
  It seems like the DataGridDragProxy works not right, when
  dragMoveEnabled is set to 
  false. Actually it does in my case as far as i can say.
  
  Best regards.
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Alex Harui aharui@ wrote:
  
   Are you using modules or sub-applications? Where does the data come
   from? It seems like it isn't being converted correctly. Have you
   proven that each collection contains the correct object and not
  Objects?
   
   
   
   
   
   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 florian.salihovic
   Sent: Tuesday, August 19, 2008 2:05 PM
   To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
   Subject: [flexcoders] Re: ItemRenderer returns empty Object instead
 of
   encapsuled data - update
   
   
   
   Update:
   
   Using a for each loop shows me even the right value, but it's type
 is
   lost.
   override public function set data(value:Object):void {
   trace(describeType(value));
   for each(var a:* in value) {
   trace(a)
   }
   if (this._item == value) {
   return;
   }
   super.data = value;
   if (value is IPlayListItem) {
   this._item = IPlayListItem(value);
   }
   this.dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
   }
   
   - the condition value is IPLayListItem is actually never true.
   
   Best regards
   
   --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
   , florian.salihovic florian.salihovic@ wrote:
   
Something i forgot to add:
in the Debugger the passed Object, which is said to be not
  convertable
   in the desired 
type, shows the right properties.

Pretty strange to me.



--- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com 
   mailto:flexcoders%40yahoogroups.com , florian.salihovic
   florian.salihovic@ wrote:

 Here is the stacktrace:
 TypeError: Error #1034: Typumwandlung fehlgeschlagen:
   [EMAIL PROTECTED] kann 
   nicht 
in 
 de.blitzeinschlag.playlisteditor.model.playlists.IPlayListItem
   umgewandelt werden

[flexcoders] Re: ItemRenderer returns empty Object instead of encapsuled data - update

2008-08-19 Thread florian.salihovic
One last question:

is there some part in the documentation i missed?

It would be nice to know if there are soe article about this topic is floating 
arround.



Best regards and thanx again for the tiem and effort here of the adobe team - u 
do a great 
job!

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

 Thanx Alex, this helps me a lot!
 
 Best regards!
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  To copy yourself would look something like this
  
   
  
  myDragDropHandler(event:DragEvent):void
  
  {
  
  If (event.action == DragManager.COPY)
  
  {
  
  event.preventDefault();
  
  var index:int = calculateDropIndex(event);
  
  var items:Array =
  event.dragSource.dataForFormat(items);
  
  var n:int = items.length;
  
  for (var i:int = 0; I  n; i++)
  
  {
  
  var newVO:VO = new VO();
  
  var oldVO:VO = items[i] as VO;
  
  newVo.prop1 = oldVO.prop1;
  
  newVo.prop2 = oldVO.prop2;
  
  dataProvider.addItemAt(newVO,
  index);
  
   
  
  }
  
  }
  
  }
  
   
  
  
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
  Behalf Of florian.salihovic
  Sent: Tuesday, August 19, 2008 4:37 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: ItemRenderer returns empty Object instead of
  encapsuled data - update
  
   
  
  Thanx for the info. This is really helpful to know.
  
  Is there perhaps a short example to start with?
  
  Best regards and thanx for the help!
  
  --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  , Alex Harui aharui@ wrote:
  
   Ah, ok. The default copy mechanism won't work on typed objects unless
   they are [RemoteClass] or use registerClassAlias. You can always
   override the dragDrop handle and do your own intelligent copy.
   
   
   
   
   
   From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  ] On
   Behalf Of florian.salihovic
   Sent: Tuesday, August 19, 2008 3:18 PM
   To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
   Subject: [flexcoders] Re: ItemRenderer returns empty Object instead of
   encapsuled data - update
   
   
   
   Hello Alex,
   
   dragMoveEnabled is making the difference. When i don't use any
   ItemRenderer the called i 
   get [object PlayListItem] and the collections i wrapped in typed
   methods.
   
   It seems like the DataGridDragProxy works not right, when
   dragMoveEnabled is set to 
   false. Actually it does in my case as far as i can say.
   
   Best regards.
   
   --- In flexcoders@yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com
   , Alex Harui aharui@ wrote:
   
Are you using modules or sub-applications? Where does the data come
from? It seems like it isn't being converted correctly. Have you
proven that each collection contains the correct object and not
   Objects?





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 florian.salihovic
Sent: Tuesday, August 19, 2008 2:05 PM
To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
  mailto:flexcoders%40yahoogroups.com 
Subject: [flexcoders] Re: ItemRenderer returns empty Object instead
  of
encapsuled data - update



Update:

Using a for each loop shows me even the right value, but it's type
  is
lost.
override public function set data(value:Object):void {
trace(describeType(value));
for each(var a:* in value) {
trace(a)
}
if (this._item == value) {
return;
}
super.data = value;
if (value is IPlayListItem) {
this._item = IPlayListItem(value);
}
this.dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
}

- the condition value is IPLayListItem is actually never true.

Best regards

--- In flexcoders@yahoogroups.com
  mailto:flexcoders%40yahoogroups.com 
   mailto:flexcoders%40yahoogroups.com
   mailto:flexcoders%40yahoogroups.com
, florian.salihovic florian.salihovic@ wrote:

 Something i forgot to add:
 in the Debugger the passed Object, which is said to be not
   convertable
in the desired 
 type, shows the right properties.
 
 Pretty strange to me

[flexcoders] ItemRenderer returns empty Object instead of encapsuled data.

2008-08-18 Thread florian.salihovic
I have two instances of mx:controls::List. Both use the same ItemRenderer. A 
TypeError 
occours, when i drop one item from one List into the other List. Instead of the 
encapsuled 
type (an instance of an interface, typed to the interface) just an empty 
Ombject instance is 
returned.

I implement mx.core.IDataRenderer, 
mx.controls.listClasses.IDropInListItemRenderer and 
mx.controls.listClasses.IListItemRenderer in my component. Here is the code for 
the 
overwritten data and listData Propertys:

private var _item:IPlayListItem;
private var _listData:BaseListData;

[Bindable(dataChange)]
override public function get data():Object {
return this._item;
}

[Bindable(dataChange)]
public function get listData():BaseListData {
return this._listData
}

override public function set data(value:Object):void {
trace(ListItemRenderer.data: +value);
super.data = value;
if (!value) {
return;
}
if (this._item == value) {
return;
}
if (value is IPlayListItem) {
super.data = IPlayListItem(value);
this._item = IPlayListItem(value);
}
this.dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));

}

public function set listData(value:BaseListData):void {
if (this._listData == value) {
return;
}
this._listData = value;
this.dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
}

What am i missing?

Best regards!



[flexcoders] Backgroudimage in Datagrid row

2008-08-17 Thread florian.salihovic
Is there a chance to set a background image on a row of a datagrid? I'm 
searching now for 
quite a while but can't find any infos in that topic. Just setting the row's 
background-color.

Best regards.



[flexcoders] Re: Error while Building Flex

2008-08-11 Thread florian.salihovic
I got the error message when had an empty switch() statement. Also i'd 
recommend not 
having the 2000 lines of XML in the app...

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

 hi ,
  I m getting an error while building flex application 
 Error Description 
 An internal Build Error has occured Right click for more information'
 In my flex application there are around 5000 line of code .
 i am binding 2000 Xml to the application
 
 this much line of code causing a error 
 Please Help Me out 
 ThanX






[flexcoders] Flex won't create all Components

2008-08-11 Thread florian.salihovic
I have a little Application which uses states in different components (if it 
should matter to 
know). Most of my Panels i use, use a controlbar to place buttons. Currently, i 
can't figure out 
myself what's the problem but two compnents inherited from Panel seem to 
share a 
controlbar and the one which is use first won't get the controlbar/display its 
controlbar.

Any help would be appreciated.

Best regards from Germany.



[flexcoders] Re: Large XML /w E4X vs. serialized objects /w tree traversal

2008-08-03 Thread florian.salihovic
I would choose the class hierachy approach. Write your own classes for 
relationships, 
people etc.

The pros of this approach:
* You do not depend on a datasource: it does not matter where the data comes 
from 
((different) XML sources, remoting [,...]).
* You have strong typed objects and you can embed your own events and errors. 
This 
means (unit-) testing becomes more effective.

The cons:
* You have to implement a parser.

Best regards from Germany.


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

 Hi,
 
 I am building an app that deals with a fair bit of people relationship data 
 coming down 
as XML, so the hierarchical nature of XML actually comes in handy here.  I have 
a few 
options: one is to serialize each person XML node into an object, and setup the 
appropriate data structure for hierarchical data traversal (e.g. rooted tree).  
Another option 
is to keep everything in memory as XML and accessed the node data via E4X.  The 
third 
option is to take a hybrid approach, won't consider this route right now unless 
this 
appears to be the best.
 
 My concern is that instantiating thousands of objects will create a 
 performance issue 
(happened at another project that dealt with thousands of dto's), not to 
mention it's very 
slow to instantiate lots of objects.  At the same time, I am not sure how fast 
E4X is at 
dealing with large XML.
 
 Which approach would you take? Which one is likely to scale better? Large 
 in-memory 
XML + E4X traversal or data structure with lots of objects + algorthmic tree 
traversal? 
 
 - boon






[flexcoders] Re: Large XML /w E4X vs. serialized objects /w tree traversal

2008-08-03 Thread florian.salihovic
Well, here it would be interessting for me how and when the XML object creates 
its 
descendants. My approach might be a bit outdated, since i might have the old 
DOM model 
in mind.

Best regards

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

 
 Thanks Florian.  Problem is the performance actually degrades quite a bit 
 when there are 
a lot of objects in memory.  Instantiating a lot of objects is dog slow as 
well. Also, there 
would really be no dependency with the datasource even if we go XML (assuming 
this is 
the best option) because either way we have to write code to process/transform 
the 
incoming data, in this case it would be just code that transforms whatever 
format it comes 
in as into XML.  There is also no need for events in this case as well since 
they are plain 
vanilla data objects with only public properties in it.
 
 - boon
 
 --- On Sun, 8/3/08, florian.salihovic [EMAIL PROTECTED] wrote:
 From: florian.salihovic [EMAIL PROTECTED]
 Subject: [flexcoders] Re: Large XML /w E4X vs. serialized objects /w tree 
 traversal
 To: flexcoders@yahoogroups.com
 Date: Sunday, August 3, 2008, 12:53 AM
 
 
 
 
 
 
 
 
 
 
 
 I would choose the class hierachy approach. Write your own 
 classes for 
relationships, 
 
 people etc.
 
 
 
 The pros of this approach:
 
 * You do not depend on a datasource: it does not matter where the data comes 
 from 
 
 ((different) XML sources, remoting [,...]).
 
 * You have strong typed objects and you can embed your own events and errors. 
 This 
 
 means (unit-) testing becomes more effective.
 
 
 
 The cons:
 
 * You have to implement a parser.
 
 
 
 Best regards from Germany.
 
 
 
 --- In [EMAIL PROTECTED] ups.com, Boon Chew waspfish@ . wrote:
 
 
 
  Hi,
 
  
 
  I am building an app that deals with a fair bit of people relationship data 
  coming 
down 
 
 as XML, so the hierarchical nature of XML actually comes in handy here.  I 
 have a few 
 
 options: one is to serialize each person XML node into an object, and setup 
 the 
 
 appropriate data structure for hierarchical data traversal (e.g. rooted 
 tree).  Another 
option 
 
 is to keep everything in memory as XML and accessed the node data via E4X.  
 The third 
 
 option is to take a hybrid approach, won't consider this route right now 
 unless this 
 
 appears to be the best.
 
  
 
  My concern is that instantiating thousands of objects will create a 
  performance issue 
 
 (happened at another project that dealt with thousands of dto's), not to 
 mention it's very 
 
 slow to instantiate lots of objects.  At the same time, I am not sure how 
 fast E4X is at 
 
 dealing with large XML.
 
  
 
  Which approach would you take? Which one is likely to scale better? Large 
  in-memory 
 
 XML + E4X traversal or data structure with lots of objects + algorthmic tree 
 traversal? 
 
  
 
  - boon
 
 






[flexcoders] TexInput#text temporarily null - when accessible

2008-07-23 Thread florian.salihovic
From the language reference:

 The text property can temporarily have the value null, which indicates that 
the htmlText has 
been recently set and the corresponding text value has not yet been determined.

Actually i can wait for seconds an i'll get a null reference to the text 
property. How can i 
determine if the text and currespoding htmlText aren't null anymore? Or are 
there any 
known bugs regarding this problem?

Best regards



[flexcoders] Re: TexInput#text temporarily null - when accessible

2008-07-23 Thread florian.salihovic
Stupid me,

i'm working with a TabNavigator which stores different views which off course 
might not 
be instanciated when calling them...

Till next time.

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

 From the language reference:
 
  The text property can temporarily have the value null, which indicates that 
 the 
htmlText has 
 been recently set and the corresponding text value has not yet been 
 determined.
 
 Actually i can wait for seconds an i'll get a null reference to the text 
 property. How can i 
 determine if the text and currespoding htmlText aren't null anymore? Or are 
 there any 
 known bugs regarding this problem?
 
 Best regards






[flexcoders] Inline EventListener in MXML tags - confusing description in Developers guide.

2008-07-21 Thread florian.salihovic
Quoted from Adobe Flex Developers Guide, page 78

However, it is best practice to use the addEventListener() method.
This method gives you greater control over the event by letting
you configure the priority and capturing settings, and use event constants.
In addition, if you use addEventListener() to add an event handler, you can
use removeEventListener() to remove the handler when you no longer need
it. If you add an event handler inline, you cannot call removeEventListener()
on that handler.

 - End of Quote -

What i think is a little bit confusing is, that it's said that inline 
EventListener can't be 
removed? Or is it just a little bit unluckily expressed? Why can't i just call 
removeEventListener in ActionScript on the type of event declared in MXML?

Best regards from Germany



[flexcoders] Re: Inline EventListener in MXML tags - confusing description in Developers guid

2008-07-21 Thread florian.salihovic
Instead of waiting for an answer i just ran a lil' test:
?xml version=1.0 encoding=utf-8?
mx:Application creationComplete=eventListener(event)
xmlns:mx=http://www.adobe.com/2006/mxml;
  mx:Script
![CDATA[
  import flash.utils.getQualifiedClassName;
  import mx.events.FlexEvent;

  private function eventListener(event:Event):void {
trace(getQualifiedClassName(event)+#+event.type);
switch(event.type) {
  case FlexEvent.APPLICATION_COMPLETE:
this.registeredEventListenerTrace(FlexEvent.CREATION_COMPLETE);
this.registeredEventListenerTrace(FlexEvent.APPLICATION_COMPLETE);
this.removeEventListener(FlexEvent.CREATION_COMPLETE,
eventListener, false);
this.removeEventListener(FlexEvent.APPLICATION_COMPLETE,
eventListener, false);
this.registeredEventListenerTrace(FlexEvent.CREATION_COMPLETE);
this.registeredEventListenerTrace(FlexEvent.APPLICATION_COMPLETE);
break;
  case FlexEvent.CREATION_COMPLETE:
this.removeEventListener(FlexEvent.CREATION_COMPLETE,
eventListener, false);
this.registeredEventListenerTrace(FlexEvent.CREATION_COMPLETE);
this.registeredEventListenerTrace(FlexEvent.APPLICATION_COMPLETE);
this.addEventListener(FlexEvent.APPLICATION_COMPLETE, eventListener,
false, 0, true);
this.registeredEventListenerTrace(FlexEvent.CREATION_COMPLETE);
this.registeredEventListenerTrace(FlexEvent.APPLICATION_COMPLETE);
break;
}
  }
  private function registeredEventListenerTrace(type:String):void {
trace(\t + type +  is registered:  +
this.hasEventListener(type));
  }
]]
  /mx:Script
/mx:Application

I was surprised that the FlexEvent.CREATION_COMPLETE can't be removed. This is 
quite 
shocking...

Best regards.

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

 Quoted from Adobe Flex Developers Guide, page 78
 
 However, it is best practice to use the addEventListener() method.
 This method gives you greater control over the event by letting
 you configure the priority and capturing settings, and use event constants.
 In addition, if you use addEventListener() to add an event handler, you can
 use removeEventListener() to remove the handler when you no longer need
 it. If you add an event handler inline, you cannot call removeEventListener()
 on that handler.
 
  - End of Quote -
 
 What i think is a little bit confusing is, that it's said that inline 
 EventListener can't be 
 removed? Or is it just a little bit unluckily expressed? Why can't i just 
 call 
 removeEventListener in ActionScript on the type of event declared in MXML?
 
 Best regards from Germany




[flexcoders] Understanding DataGridColumn#sortCompareFunction with composite custom classes

2008-07-21 Thread florian.salihovic
I'm currently working with a custom classes which are composites. I display the 
needed 
data via custom ItemRenderer which extends the mx.controls.Text component. It 
works 
pretty nice and is pretty flexible. But i need to sort my data as well. After 
some researches 
i learned to implement a custom sortCompareFunction. My current implementation 
works 
just like the following in a class subclassing 
mx.controls.dataGridClasses.DataGridColumn:

 /* Begin */

protected function compare(arg1:CustomClass, arg2: 
CustomClass):int {
if (!super.dataField) {
return 0;
}
return 1;
if (arg1.hasOwnProperty(super.dataField) 
arg2.hasOwnProperty(super.dataField)) {
return 
ObjectUtil.stringCompare(arg1[super.dataField].toString(),

arg2[super.dataField].toString(), true);
}
// property is a known property of the custom class
if (arg1.property.hasOwnProperty(super.dataField) 

arg2.property.hasOwnProperty(super.dataField)) {
return 
ObjectUtil.stringCompare(arg1property[super.dataField].toString(),

arg2.property[super.dataField].toString(), true);
} 
return 0;
}

/* End */

But i get the error message:
Error: Find criteria must contain at least one sort field value.

Where do i have to set it?

Any examples of sorting custom object hierachies in DataGrid controls would be 
appreciated.

Best regards!



[flexcoders] Working with tokens and additional configuration files via ant (and flextasks).

2008-06-30 Thread florian.salihovic
I currently use a combination of ant and flextasks to compile and test my 
appilcation. But to 
clean my Ant scripts up, i use configuration files. It works quite well, but i 
need to adress 
directories directly(/absolute). I haven't figured out yet how to pass tokens 
to the 
configuration files, It seems like it won't work at all. I haven't that much 
just something like

load-config filename=${myFlex-config}+myVar=myValue /

Any pointers/hints?

Best regards from Germany.



[flexcoders] Additional Configuration files part 2

2008-06-30 Thread florian.salihovic
After some editing it seemed i have to specify the compiler.library-path as 
well as the 
compiler.source-path targeting the sdks libs and sources in both, the default 
and the 
custom configuration file. I thought the custom configuration file would be 
used in addition 
to the default one, adding new properties instead of overwriting old values. I 
include both 
files via flextasks using:

mxmlc ...
load-config filename=${FLEX_HOME}/frameworks/flex-config.xml /
load-config filename=${configuration.mxmlc.file} /
/mxmlc

Or am i missing something?



[flexcoders] Re: Additional Configuration files part 2

2008-06-30 Thread florian.salihovic
I forgot to add the append attribute to set: library-path append=true / and 
 source-
path append=true /

Problem solved. Thanx for reading ;)

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

 After some editing it seemed i have to specify the compiler.library-path as 
 well as the 
 compiler.source-path targeting the sdks libs and sources in both, the default 
 and the 
 custom configuration file. I thought the custom configuration file would be 
 used in 
addition 
 to the default one, adding new properties instead of overwriting old values. 
 I include 
both 
 files via flextasks using:
 
 mxmlc ...
 load-config filename=${FLEX_HOME}/frameworks/flex-config.xml /
 load-config filename=${configuration.mxmlc.file} /
 /mxmlc
 
 Or am i missing something?






[flexcoders] Re: Bidirection databinding with states

2008-03-14 Thread florian.salihovic

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

 I'm trying to create a little application, which consists of multiple
states and forms. When i try
 to establish a bidirectional databing connection between my model (a
simple
 XMLListCollection) and my controls, it simply won't work.

 So does anybody have some pointers for me how to initialize
databinding when using states?

 Best regards





[flexcoders] Bidirection databinding with states

2008-03-13 Thread florian.salihovic
I'm trying to create a little application, which consists of multiple states 
and forms. When i try 
to establish a bidirectional databing connection between my model (a simple 
XMLListCollection) and my controls, it simply won't work.

So does anybody have some pointers for me how to initialize databinding when 
using states?

Best regards



[flexcoders] Re: ListCollectionView#removeAll wants to dispatch undefined

2007-12-01 Thread florian.salihovic

I managed my Problem by adding a wrapper which manages the access of the tree.

Thanx for the helpful infos.

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

 Yes.  Basically we need unique child collections
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of florian.salihovic
 Sent: Friday, November 30, 2007 12:34 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: ListCollectionView#removeAll wants to dispatch
 undefined
 
 
 
 
 Thanx for the reply!
 
 So would it be alright from the perspective of modelling the
 application, that i create a 
 field children in each class, that hold references to all of its childs
 that i want to display?
 
 I thought that the treedatadesciptor would be responsible melting the
 children to display 
 together. But the classes themselves are responsible for providing an
 access to the childs 
 to be displayed?
 
 Sorry if my english ain't that good. I'm from Germany and i may need to
 refresh grammar 
 and vocab ;)
 
 Best regards!
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  Actually, you don't want to do either option. You want to implement
  getChildren to return a separate array collection for each collection
 of
  children. This is because the individual sets of children are tracked
  an managed by the tree so you can't reuse one collection instance, and
  you should not return different instances for the same set of
 children,
  otherwise one part of the tree code will make changes that some other
  part will not notice. Look at the default descriptor and see that it
  caches the AC instances per node/children set
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of florian.salihovic
  Sent: Thursday, November 29, 2007 4:27 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] ListCollectionView#removeAll wants to dispatch
  undefined
  
  
  
  Currently i write a lil' component to display class hierachies. I
 wrote
  my own 
  TreeDataDescriptor. SInce i work with my own class-, packages- and
  interface-descriptor 
  classes to describe the structure, i encapsule some ArrayCollection.
 In
  order to display the 
  structures in a tree, i need to melt them together in one
  ArrayCollection. So far so good...
  
  Since i want not to create a new ArrayCollection everytime the 
  ITreeDataDescriptor#getChildren is called, i thought to create one
  ArrayCollection and 
  remove all items when the function is called. I thought it would be ok
  to create a new field 
  (typed: ArrayCollection) for the class. But actually the forces my
  component to crash. 
  Here's the code:
  precode
  public function getChildren(node:Object,
  model:Object=null):ICollectionView {
  trace(this._className+#getChildren);
  try {
  if(node is PackageDescriptor) {
  this._children.sort = null;
  /*try {
  this._children.removeAll();
  this._children.refresh();
  } catch (e:Error) {
  trace(Error: +e.message)
  } catch (e1:StackOverflowError) {
  trace(StackOverflowError: +e1.message);
  } catch (e2:CollectionViewError) {
  trace(CollectionViewError: +e2.message);
  } catch (e3:ArgumentError) {
  trace(ArgumentError: +e2.message);
  }*/
  trace(\tnode.className: +PackageDescriptor(node).className);
  this._children = new ArrayCollection();
  var packageDescriptor:PackageDescriptor = PackageDescriptor(node);
  for (var i:uint = 0; ipackageDescriptor.packages.length; i++) {
 
 this._children.addItem(PackageDescriptor(packageDescriptor.packages.getI
  temAt(i)));
  }
  for (var j:uint = 0; jpackageDescriptor.classes.length; j++) {
 
 this._children.addItem(ClassDescriptor(packageDescriptor.classes.getItem
  At(j)));
  }
  for (var k:uint = 0; kpackageDescriptor.interfaces.length; k++) {
 
 this._children.addItem(InterfaceDescriptor(packageDescriptor.interfaces.
  getItemAt(k)));
  }
  /*for (var l:uint = 0; lthis._children.length; l++) {
  trace(\t\t+l+: +this._children.getItemAt(l).name);
  }*/
  return this._children;
  }
  } catch (e:Error) {
  trace(Error: +e.message)
  } catch (e1:StackOverflowError) {
  trace(StackOverflowError: +e1.message);
  } catch (e2:CollectionViewError) {
  trace(CollectionViewError: +e2.message);
  } finally {
  return _children;
  }
  }/code/pre
  So why is it at this point wrong to call removeAll to remove all
  references from the 
  ArrayCollection instead of creating a new ArrayCollection all the
 time?
  The code above 
  compiles. If i uncomment the first try/ctach statement, the
 application
  crashes.
 






[flexcoders] Re: ListCollectionView#removeAll wants to dispatch undefined

2007-11-30 Thread florian.salihovic

Thanx for the reply!

So would it be alright from the perspective of modelling the application, that 
i create a 
field children in each class, that hold references to all of its childs that i 
want to display?

I thought that the treedatadesciptor would be responsible melting the children 
to display 
together. But the classes themselves are responsible for providing an access to 
the childs 
to be displayed?

Sorry if my english ain't that good. I'm from Germany and i may need to refresh 
grammar 
and vocab ;)

Best regards!

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

 Actually, you don't want to do either option.  You want to implement
 getChildren to return a separate array collection for each collection of
 children.  This is because the individual sets of children are tracked
 an managed by the tree so you can't reuse one collection instance, and
 you should not return different instances for the same set of children,
 otherwise one part of the tree code will make changes that some other
 part will not notice.  Look at the default descriptor and see that it
 caches the AC instances per node/children set
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of florian.salihovic
 Sent: Thursday, November 29, 2007 4:27 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] ListCollectionView#removeAll wants to dispatch
 undefined
 
 
 
 Currently i write a lil' component to display class hierachies. I wrote
 my own 
 TreeDataDescriptor. SInce i work with my own class-, packages- and
 interface-descriptor 
 classes to describe the structure, i encapsule some ArrayCollection. In
 order to display the 
 structures in a tree, i need to melt them together in one
 ArrayCollection. So far so good...
 
 Since i want not to create a new ArrayCollection everytime the 
 ITreeDataDescriptor#getChildren is called, i thought to create one
 ArrayCollection and 
 remove all items when the function is called. I thought it would be ok
 to create a new field 
 (typed: ArrayCollection) for the class. But actually the forces my
 component to crash. 
 Here's the code:
 precode
 public function getChildren(node:Object,
 model:Object=null):ICollectionView {
 trace(this._className+#getChildren);
 try {
 if(node is PackageDescriptor) {
 this._children.sort = null;
 /*try {
 this._children.removeAll();
 this._children.refresh();
 } catch (e:Error) {
 trace(Error: +e.message)
 } catch (e1:StackOverflowError) {
 trace(StackOverflowError: +e1.message);
 } catch (e2:CollectionViewError) {
 trace(CollectionViewError: +e2.message);
 } catch (e3:ArgumentError) {
 trace(ArgumentError: +e2.message);
 }*/
 trace(\tnode.className: +PackageDescriptor(node).className);
 this._children = new ArrayCollection();
 var packageDescriptor:PackageDescriptor = PackageDescriptor(node);
 for (var i:uint = 0; ipackageDescriptor.packages.length; i++) {
 this._children.addItem(PackageDescriptor(packageDescriptor.packages.getI
 temAt(i)));
 }
 for (var j:uint = 0; jpackageDescriptor.classes.length; j++) {
 this._children.addItem(ClassDescriptor(packageDescriptor.classes.getItem
 At(j)));
 }
 for (var k:uint = 0; kpackageDescriptor.interfaces.length; k++) {
 this._children.addItem(InterfaceDescriptor(packageDescriptor.interfaces.
 getItemAt(k)));
 }
 /*for (var l:uint = 0; lthis._children.length; l++) {
 trace(\t\t+l+: +this._children.getItemAt(l).name);
 }*/
 return this._children;
 }
 } catch (e:Error) {
 trace(Error: +e.message)
 } catch (e1:StackOverflowError) {
 trace(StackOverflowError: +e1.message);
 } catch (e2:CollectionViewError) {
 trace(CollectionViewError: +e2.message);
 } finally {
 return _children;
 }
 }/code/pre
 So why is it at this point wrong to call removeAll to remove all
 references from the 
 ArrayCollection instead of creating a new ArrayCollection all the time?
 The code above 
 compiles. If i uncomment the first try/ctach statement, the application
 crashes.






[flexcoders] Re: ListCollectionView#removeAll wants to dispatch undefined

2007-11-30 Thread florian.salihovic
I really thought i got it - but i was wrong... i isolated my problem and 
perhaps someone 
could elaborate what i need to change and why.

Here are the srcs: [FONT=Century Gothic]Ich konnte den Fehler rekonstruieren 
auch bei 
einem anderen Modell feststellen. Ich glaube ich hab eine Blockade gerade. 
Vielleicht mag 
sich das nochmal jemand anschauen?

http://www.box.net/shared/gmbrc5yc2k

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

 Actually, you don't want to do either option.  You want to implement
 getChildren to return a separate array collection for each collection of
 children.  This is because the individual sets of children are tracked
 an managed by the tree so you can't reuse one collection instance, and
 you should not return different instances for the same set of children,
 otherwise one part of the tree code will make changes that some other
 part will not notice.  Look at the default descriptor and see that it
 caches the AC instances per node/children set
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of florian.salihovic
 Sent: Thursday, November 29, 2007 4:27 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] ListCollectionView#removeAll wants to dispatch
 undefined
 
 
 
 Currently i write a lil' component to display class hierachies. I wrote
 my own 
 TreeDataDescriptor. SInce i work with my own class-, packages- and
 interface-descriptor 
 classes to describe the structure, i encapsule some ArrayCollection. In
 order to display the 
 structures in a tree, i need to melt them together in one
 ArrayCollection. So far so good...
 
 Since i want not to create a new ArrayCollection everytime the 
 ITreeDataDescriptor#getChildren is called, i thought to create one
 ArrayCollection and 
 remove all items when the function is called. I thought it would be ok
 to create a new field 
 (typed: ArrayCollection) for the class. But actually the forces my
 component to crash. 
 Here's the code:
 precode
 public function getChildren(node:Object,
 model:Object=null):ICollectionView {
 trace(this._className+#getChildren);
 try {
 if(node is PackageDescriptor) {
 this._children.sort = null;
 /*try {
 this._children.removeAll();
 this._children.refresh();
 } catch (e:Error) {
 trace(Error: +e.message)
 } catch (e1:StackOverflowError) {
 trace(StackOverflowError: +e1.message);
 } catch (e2:CollectionViewError) {
 trace(CollectionViewError: +e2.message);
 } catch (e3:ArgumentError) {
 trace(ArgumentError: +e2.message);
 }*/
 trace(\tnode.className: +PackageDescriptor(node).className);
 this._children = new ArrayCollection();
 var packageDescriptor:PackageDescriptor = PackageDescriptor(node);
 for (var i:uint = 0; ipackageDescriptor.packages.length; i++) {
 this._children.addItem(PackageDescriptor(packageDescriptor.packages.getI
 temAt(i)));
 }
 for (var j:uint = 0; jpackageDescriptor.classes.length; j++) {
 this._children.addItem(ClassDescriptor(packageDescriptor.classes.getItem
 At(j)));
 }
 for (var k:uint = 0; kpackageDescriptor.interfaces.length; k++) {
 this._children.addItem(InterfaceDescriptor(packageDescriptor.interfaces.
 getItemAt(k)));
 }
 /*for (var l:uint = 0; lthis._children.length; l++) {
 trace(\t\t+l+: +this._children.getItemAt(l).name);
 }*/
 return this._children;
 }
 } catch (e:Error) {
 trace(Error: +e.message)
 } catch (e1:StackOverflowError) {
 trace(StackOverflowError: +e1.message);
 } catch (e2:CollectionViewError) {
 trace(CollectionViewError: +e2.message);
 } finally {
 return _children;
 }
 }/code/pre
 So why is it at this point wrong to call removeAll to remove all
 references from the 
 ArrayCollection instead of creating a new ArrayCollection all the time?
 The code above 
 compiles. If i uncomment the first try/ctach statement, the application
 crashes.




[flexcoders] ListCollectionView#removeAll wants to dispatch undefined

2007-11-29 Thread florian.salihovic
Currently i write a lil' component to display class hierachies. I wrote my own 
TreeDataDescriptor. SInce i work with my own class-, packages- and 
interface-descriptor 
classes to describe the structure, i encapsule some ArrayCollection. In order 
to display the 
structures in a tree, i need to melt them together in one ArrayCollection. So 
far so good...

Since i want not to create a new ArrayCollection everytime the 
ITreeDataDescriptor#getChildren is called, i thought to create one 
ArrayCollection and 
remove all items when the function is called. I thought it would be ok to 
create a new field 
(typed: ArrayCollection) for the class. But actually the forces my component to 
crash. 
Here's the code:
precode
public function getChildren(node:Object, model:Object=null):ICollectionView {
trace(this._className+#getChildren);
try {
if(node is PackageDescriptor) {
this._children.sort = null;
/*try {
this._children.removeAll();
this._children.refresh();
} catch (e:Error) {
trace(Error: +e.message)
} catch (e1:StackOverflowError) {
trace(StackOverflowError: +e1.message);
} catch (e2:CollectionViewError) {
trace(CollectionViewError: +e2.message);
} catch (e3:ArgumentError) {
trace(ArgumentError: +e2.message);
}*/
trace(\tnode.className: 
+PackageDescriptor(node).className);
this._children = new ArrayCollection();
var packageDescriptor:PackageDescriptor = 
PackageDescriptor(node);
for (var i:uint = 0; 
ipackageDescriptor.packages.length; i++) {

this._children.addItem(PackageDescriptor(packageDescriptor.packages.getItemAt(i)));
}
for (var j:uint = 0; 
jpackageDescriptor.classes.length; j++) {

this._children.addItem(ClassDescriptor(packageDescriptor.classes.getItemAt(j)));
}
for (var k:uint = 0; 
kpackageDescriptor.interfaces.length; k++) {

this._children.addItem(InterfaceDescriptor(packageDescriptor.interfaces.getItemAt(k)));
}
/*for (var l:uint = 0; lthis._children.length; l++) {
trace(\t\t+l+: 
+this._children.getItemAt(l).name);
}*/
return this._children;
}
} catch (e:Error) {
trace(Error: +e.message)
} catch (e1:StackOverflowError) {
trace(StackOverflowError: +e1.message);
} catch (e2:CollectionViewError) {
trace(CollectionViewError: +e2.message);
} finally {
return _children;
}
}/code/pre
So why is it at this point wrong to call removeAll to remove all references 
from the 
ArrayCollection instead of creating a new ArrayCollection all the time? The 
code above 
compiles. If i uncomment the first try/ctach statement, the application crashes.



[flexcoders] flexTasks and asdoc

2007-11-25 Thread florian.salihovic
I'm just switched to ANT for building my flex projects and documentation but it 
seems like 
there are some things not working properly.

When i run the html-wrapper, i don't get fullscreen default application 
container is usually 
get when compiling flex projects.

Also when invoking asdoc via ANT, the @see tag won't work properly as well. 
Hyperlinks 
won't be generated - they're plain text. Is there also a way to generate 
include the inherited 
properties and functions?

Best regards from Germany.



[flexcoders] flexTasks and asdoc

2007-11-25 Thread florian.salihovic
I just switched to ANT to build my Flex projects, but there are some
things that don't seem to work properly.
* The generated swf and wrapper using flexTasks seem not to be full
screen (window document). Is there any way to fix this?
* The asdoc tag @see does not generate hyperlinks - well, it
generates some.
* The asdoc tag @throw does not show the thrown error.
* The asdoc tag @inheritDoc does not work at all.
Here's the link to my build.xml http://www.box.net/shared/jexdvcl467
  @box.net


  1   2   >