RE: [flexcoders] How can I place custom components into custom components?

2005-07-05 Thread Erik Westra
The only way (as far as I know) is to create a.mxml in Actionscript, make it an 
Actionscript component.

Greetz Erik 


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
dimkapimkakolbasa
Sent: maandag 4 juli 2005 16:11
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How can I place custom components into custom components?

The problem is:

I want to create a component A in the file a.mxml and a component B in a file 
b.mxml, and to use them both in the file main.mxml like here (I've replaced 
triangle brackets by square ones!):

main.mxml
=

[mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; 
xmlns:local=*]
[local:A]
[local:B /]
[/local:A]
[mx:Application]

a.mxml
===
[mx:Canvas xmlns:mx=http://www.macromedia.com/2003/mxml; 
xmlns:local=*]
[mx:Label ... /]
[/mx:Canvas]

b.mxml

[mx:Canvas xmlns:mx=http://www.macromedia.com/2003/mxml; 
xmlns:local=*]
[mx:Image ... /]
[/mx:Canvas]

this example produces such an error: 

1 Error found.

Error main.mxml:

The component B may not be used as a child of A because the A is a container 
with internal children.

If I understand it all correctly, then if I want to use such a construction

[local:A]
[local:B /]
[/local:A]

then I should leave component A description in a.mxml empty, otherwise it's not 
allowed to insert component B into it.

Why is it so and how can I solve this problem?

Thanks!
Dima,
[EMAIL PROTECTED]



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

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

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

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




RE: [flexcoders] How can I place custom components into custom components?

2005-07-05 Thread Erik Westra
From the top of my head (not tested and most likely not working):


import mx.containers.Canvas;
import mc.controls.Label;

class A extends Canvas
{
private var _label:Label;

public function Canvas()
{
};

public function createChildren():Void
{
super.createChildren();
_label = Label(createChild(Label));
};
};


Then in mxml u can do:

[local:A]
[local:B /]
[/local:A]


If I make a component in ActionScript, how can I later integrate it
with MXML?

Nothing special :)


How can I make a component with an MXML container as a GUI and some
data simultaneously in ActionScript?

I don't understand your question completely, but I think u just want to
extend some container class and code away.




Greetz Erik


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ch_flex
Sent: dinsdag 5 juli 2005 17:06
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] How can I place custom components into custom
components?

If I make a component in ActionScript, how can I later integrate it with
MXML? For example, if I describe a component in A.as - what should I
do to enable such a construction in main.mxml in my example:
[local:A /]

How can I make a component with an MXML container as a GUI and some data
simultaneously in ActionScript?

Thanks,
Dima.



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

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

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

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




RE: [flexcoders] Problem using removeNode()

2005-07-01 Thread Erik Westra
Title: Message







Even 
shorter:

for (var locNode:XMLNode=aNode.firstChild; locNode 
!= null;){  if (locNode.nodeType == 1  locNode.nodeName=="location"){ 
 
 var 
exclude:Boolean = 
false;  
 if (some 
condition here){  
 
 exclude 
= true; 
 
 } 
  
 }
 var 
nextNode = 
loclNode.nextSibling; if(exclude==true){
 
locNode.removeNode();
 
}
localNode 
= nextNode;} 


Greetz 
Erik





From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Dogra, 
DamanSent: donderdag 30 juni 2005 17:51To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Problem using 
removeNode()

It 
surely would I mentioned I was having a coder's block :)
I had 
to modify the code a little . The "locNode=locNode.nextSibling"in the for(.) statement made it jump two nodes instead of one 
.
So 
here's what I did...took off that line from the for () statement and added an 
else block (highlighted).
Thanks lot for 
your help, Erik.

for (var 
locNode:XMLNode=aNode.firstChild; locNode != null;){  if (locNode.nodeType == 1  locNode.nodeName=="location"){ 
 
 var 
exclude:Boolean = 
false;  
 if (some 
condition here){  
 
 exclude 
= true; 
 
 } 
  
 }  if(exclude==true){
var 
nextNode = 
loclNode.nextSibling; 
locNode.removeNode();
localNode 
= nextNode; }else{ 
locNode = locNode.nextSibling;

 
}} 
-Daman


  
  -----Original Message-From: Erik Westra 
  [mailto:[EMAIL PROTECTED] Sent: Thursday, June 30, 2005 11:31 
  AMTo: flexcoders@yahoogroups.comSubject: RE: 
  [flexcoders] Problem using removeNode()
  
  Wouldnt this work:
  for (var 
  locNode:XMLNode=aNode.firstChild; locNode != null; locNode=locNode.nextSibling){ 
   if 
  (locNode.nodeType == 1 
   locNode.nodeName=="location"){ 
   
   var 
  exclude:Boolean = 
  false;  
   if (some 
  condition here){  
   
   exclude 
  = true; 
   
   } 

   }  if(exclude==true){
  var 
  nextNode = 
  loclNode.nextSibling; 
  loclNode.removeNode();
  localNode 
  = nextNode; } } 
  
  Another thing u could do i 
  create an array with nodes to be removed, and remove them after u found out 
  wich ones needed to be removed.
  
  
  
  GreetzErik
  
  
  
  From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] On Behalf Of Dogra, 
  DamanSent: donderdag 30 juni 2005 16:39To: 
  flexcoders@yahoogroups.comSubject: [flexcoders] Problem using 
  removeNode()
  
  Hi All, 
  I am facing a Coder's block here and would 
  appreciate help . This is kind of long and I apologize for the same . 
  
  Using actionscript I am looping some nodes (called 
  "location") in a XML document and based on some condition would like to remove 
  a few "location" nodes from the XML . Here's my initial code
  for (var locNode:XMLNode=aNode.firstChild; locNode != null; 
  locNode=locNode.nextSibling){ 
   if (locNode.nodeType == 1  
  locNode.nodeName=="location"){ 
   
   var exclude:Boolean = false; 
   
   if (some condition here){ 
   
   
   exclude = true; 
   
   }  
   
   }  
  if(exclude==true){  
   loclNode.removeNode(); 
   } } 
  The above code does not work, because after 
  removing the first "location" node, the loop is never executed again as loop 
  condition locNode != null is not fullfilled (because the locNode being 
  evaluated just got deleted). 
  I tried to solve this by having another pointer 
  (called delNode) moving along with locNode and using delNode to remove nodes , 
  while keep moving locNode on to next sibling . The problem I now face is that 
  after delNode deletes a node, I am not able to have it catch up with locNode . 
  Here's the code
  for (var locNode:XMLNode=aNode.firstChild; locNode != null;){ 
   if (locNode.nodeType == 1  
  locNode.nodeName=="location"){ 
   
   var exclude:Boolean = false; 
   
   if (some condition here){ 
   
   
   exclude = true; 
   
   }  } 
   if(exclude==true){ 
   
   locNode=delNode.nextSibling; 
   
   delNode.removeNode(); 
   
   //would like some kind of statement here to have delNode catch up with 
  locNode  }else{ 
   
   locNode=locNode.nextSibling; 
   
   delNode=delNode.nextSibling; 
   } } 
  Would appreciate any suggestions / 
  modifications. 
  Thanks -Daman --Flexcoders Mailing 
  ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
  Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
  --Flexcoders 
  Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
  Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
  --Flexcoders 
  Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
  Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
  


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



  
  
SPONS

RE: [flexcoders] Flex, Remoting and more

2005-06-30 Thread Erik Westra
Sorry for this late reaction. I've done some tests with ColdFusion 7 and their 
new event gateways.

I modified an existing Java socket server to be an event gateway type. This 
enabled me to be able to push data from ColdFusion to all connected Flash 
clients. In Flash I used XMLSocket.

I don't know what kind of server side software u are using, but the combination 
of a socketserver and some server side logic can do the trick. 

The cutback of this is that messages can only be send as string. Offcourse u 
can send xml for complex data, but then u still have problems with numbers and 
booleans. Its however fairly easy to create a serializer / deserializer to send 
complex data as string and still keep certain types.

I hope this information helps u in your quest.


Greetz Erik


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alberto 
Albericio Salvador
Sent: maandag 27 juni 2005 12:57
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex, Remoting and more

Hi all,

I've been reading about connecting flex client applications using Flash 
Communication Server(FCS) and shared objects. Thats seems to cover the needs 
for developing chat-like applications...
Now, imagine I have an external Notification server (yukon notification 
server, or whatever) And I want FCS to listen
*persistently* to this server. With FCS and Remoting I know how to POLL a 
database 1 time or every 10 seconds and format that answer to feed the FCS 
but HOW can I create a persistent link to a notification server,socket server 
or similar, get the data this server is pushing, format this data and pass it 
to the FCS?

So basically, I want to know how to replace POLLING with PERSISTENT LISTENING.

Example application: A Flex application that shows the queue of  a call center. 
When a new call arrives, it is shown in every client running the application. 
And it is the call center notification server that tells the FCS it has 
received the new call and NOT the FCS that polls the queue of the notification 
server to see if there is any new call pending.

Thank you mates!

--
Alberto Albericio Salvador
Aura S.A. Seguros
Departamento Informática



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

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

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

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




RE: [flexcoders] Problem using removeNode()

2005-06-30 Thread Erik Westra
Title: Problem using removeNode()






Wouldnt 
this work:
for (var 
locNode:XMLNode=aNode.firstChild; locNode != null; locNode=locNode.nextSibling){ 
 if 
(locNode.nodeType == 1 
 locNode.nodeName=="location"){  
 var 
exclude:Boolean = 
false;  
 if (some 
condition here){  
 
 exclude 
= true; 
 
 } 
  
 }  if(exclude==true){
var 
nextNode = 
loclNode.nextSibling; 
loclNode.removeNode();
localNode 
= nextNode; } } 

Another thing u could do i 
create an array with nodes to be removed, and remove them after u found out wich 
ones needed to be removed.



GreetzErik



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Dogra, 
DamanSent: donderdag 30 juni 2005 16:39To: 
flexcoders@yahoogroups.comSubject: [flexcoders] Problem using 
removeNode()

Hi All, 
I am facing a Coder's block here and would appreciate 
help . This is kind of long and I apologize for the same . 
Using actionscript I am looping some nodes (called 
"location") in a XML document and based on some condition would like to remove a 
few "location" nodes from the XML . Here's my initial code
for (var locNode:XMLNode=aNode.firstChild; locNode != null; locNode=locNode.nextSibling){ 
 if (locNode.nodeType == 1  
locNode.nodeName=="location"){ 
 
 var exclude:Boolean = false; 
 
 if (some condition here){ 
 
 
 exclude = true; 
 
 }  
 
 }  
if(exclude==true){  
 loclNode.removeNode(); 
 } } 
The above code does not work, because after removing 
the first "location" node, the loop is never executed again as loop condition 
locNode != null is not fullfilled (because the locNode being evaluated just got 
deleted). 
I tried to solve this by having another pointer 
(called delNode) moving along with locNode and using delNode to remove nodes , 
while keep moving locNode on to next sibling . The problem I now face is that 
after delNode deletes a node, I am not able to have it catch up with locNode . 
Here's the code
for (var locNode:XMLNode=aNode.firstChild; locNode != null;){ 
 if (locNode.nodeType == 1  
locNode.nodeName=="location"){ 
 
 var exclude:Boolean = false; 
 
 if (some condition here){ 
 
 
 exclude = true; 
 
 }  }  
if(exclude==true){  
 locNode=delNode.nextSibling; 
 
 delNode.removeNode(); 
 
 //would like some kind of statement here to have delNode catch up with 
locNode  }else{ 
 
 locNode=locNode.nextSibling; 
 
 delNode=delNode.nextSibling; 
 } } 
Would appreciate any suggestions / 
modifications. 
Thanks -Daman --Flexcoders Mailing 
ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch 
Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 



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



  
  





  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] globalisation in flex..

2005-06-28 Thread Erik Westra





I dint follow the whole thread, but i noticed 
"includes" are used.

So if u need the locale thingies in more then one mxml 
the locale thingieswill be included in all of the files, wich is offcourse 
not efficient.

I would say a class would be more approprate, maybe 
something like this:


 class 
fly.language.LanguageManager 
{ static private var 
_currentLanguage_str:String; 
static public function 
init(init_obj:Object):Void 
{ 
_currentLanguage_str = 
init_obj.language; 
}; 
static public function 
getLanguage():String 
{ return 
_currentLanguage_str; 
}; 
static public function 
getText(type_str:String):String 
{ return 
(_global.fly.language[_currentLanguage_str][type_str]); 
};};


Then u 
have locale files like this:

 class 
fly.language.English 
{ static public var name:String = 
"Name"; static public var 
adress:String = "Adress"; static 
public var phoneNumber:String = "Phonenumber"; static 
public var send:String = "Send"; 
};


 class 
fly.language.Dutch 
{ static public var name:String = 
"Naam"; static public var 
adress:String = "Adres"; static 
public var phoneNumber:String = "Telefoonnummer"; static 
public var send:String = "Verzenden"; 
};

Then in your 
application u would have this:

?xml version="1.0"?mx:Application 
xmlns:mx="http://www.macromedia.com/2003/mxml" 
initialize="start()"
mx:Script
 
![CDATA[
 
import fly.language.LanguageManager
 
public function start()
 
{
 

 
//make sure one of the language classes is included in the 
application
 
//fly.language.Dutch;
 
fly.language.English;
 
fly.language.LanguageManager.init({language: 
"English"});
 
};
 
]]
 
/mx:Script
 mx:Form 
mx:FormItem 
label="{LanguageManager.getText("name")}" 
mx:TextInput / 
/mx:FormItem mx:FormItem 
label="{LanguageManager.getText("adress")}" 
mx:TextArea / 
/mx:FormItem mx:FormItem 
label="{LanguageManager.getText("phoneNumber")}" 
mx:TextInput / 
/mx:FormItem 
mx:FormItem mx:Button 
label="{LanguageManager.getText("send")}" / 
/mx:FormItem 
/mx:Form/mx:Application


This 
makes sure that your language translations are included only once in your 
application. And reachable in every class via the 
LanguageManager.


Greetz 
Erik




From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Matt 
ChotinSent: dinsdag 28 juni 2005 7:30To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] globalisation in 
flex..


Search the docs for the 
whitelist, it’s mentioned in plenty of places.

As for your 
buttons:

mx:Button 
label=”French” click=”locale = fr_FR” /
mx:Button 
label=”English” click=”locale = en_US” /

Matt





From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of nithya 
karthikSent: Monday, June 27, 
2005 10:27 PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] globalisation in 
flex..


hi Matt,

 I tried the 
approach 3 but i get an error which says "Http service fault" you are not 
allowed to access the url http://localhost:8088/flex/globalisatio/en_US.xml 
via this proxy. This URL is not in the proxy's whitelist. what does it mean? 




and I tried the approach 2. the code is 
:



?xml version="1.0"?mx:Application 
xmlns:mx="http://www.macromedia.com/2003/mxml" 
mx:Model id="en_US" source="en_US.xml" / mx:Model 
id="fr_FR" source="fr_FR.xml" / mx:Object 
id="locale"{en_US}/mx:Object 
mx:Form mx:FormItem 
label="{locale.name}" mx:TextInput 
/ /mx:FormItem 
mx:FormItem label="{locale.address}" 
mx:TextArea / 
/mx:FormItem mx:FormItem 
label="{locale.phoneNumber}" 
mx:TextInput / 
/mx:FormItem 
mx:FormItem mx:Button 
label="{locale.send}" / /mx:FormItem 
/mx:Form/mx:Application



here say i have 2 buttons, one for english and 
other for french.how should i make it work? please send me the code for 
this.. 



thanks,

nithya


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



  
  





  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] PNG not supported in cellRenderer?

2005-06-24 Thread Erik Westra
The Flash player is small in size, and that's not without a reason.
Macromedia made a choice to support only one format of each type of
media to be loaded dynamicly:

Video:
- .flv
Audio:
- .mp3
Image:
- .jpg (non-progressive)

And with that it also supports:
- .swf


If they would have add any other formats the filesize of the player
would increase, and with all technoligy we have available today (think
server-side converters) there are no limitations these formats bring.


Greetz Erik

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of a1
Sent: vrijdag 24 juni 2005 7:16
To: flexcoders@yahoogroups.com
Subject: [flexcoders] PNG not supported in cellRenderer?

Maybe I have missed something obvious, but it appears that only jpg and
swf are available with a cellRenderer. In particular I am using a
TileList with a dataprovider that makes the images dynamic, and i'm
using a cellRenderer like they use in the flexstore example code.

My jpg's and swf's show up perfectly but everything else shows up blank.
Does anyone have any ideas?

Thanks




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

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

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

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




RE: [flexcoders] Trademark Symbol

2005-06-23 Thread Erik Westra
Just do it the simple way :)

mx:Panel title=My Company(tm)/mx:Panel 

Copy the sign from a webpage, or somewhere else and paste it into the
string u use as title.

Greetz Erik



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Malcolm
Sent: donderdag 23 juni 2005 7:48
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Trademark Symbol

Hi yo all,

I am new to the Flex crusade (cf over sql background), so here goes with
my first question.

How do I get the proper trademark (TM) symbol in Flex?

For example:

mx:Panel title=My ApplicationTM/mx:Panel

Using anything like:

mx:Panel title=My Applicationtrade;/mx:Panel

OR

mx:Panel title=My Application#8482/mx:Panel

Doesn't work, and besides this is this not the world of html anymore :-)

The closest I have come is using escape (unicode) characters. For
example:

mx:Script
![CDATA[   
function myTitle()
{
var myTitle:String;
myTitle=My Application\u00ae;
return myTitle;
}   
]]
/mx:Script

mx:Panel title={myTitle}/mx:Panel

But \u00ae is the registered trademark (R) symbol not (TM). I realize
that the TM symbol is not part of the ISO 8859-1 character set supported
by the flash player.

Is there anyway to get the trademark symbol in flash? IE Unicode
characters higher than 256.

Many thanks in advance,
Malcolm



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



 





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

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

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

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





RE: [flexcoders] Columns of data-grid and not in right order if dataprovider is set dynamically

2005-05-31 Thread Erik Westra
The only way to specify an exact order of columns is to specify the
columns before u set the dataprovider.


Greetz Erik 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ashish Abrol
Sent: dinsdag 31 mei 2005 13:40
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Columns of data-grid and not in right order if
dataprovider is set dynamically

HI friends,


I have a very weird problem. 

When I say -

mx:Model id=myModel source=xyz.xml/
dataGrid.dataProvider=myModel.b at run-time although it works fine but
it changes the order in which I mention the atttribute names in my model
i.e. my xml file (xyz.xml). For e.g. suppose the xyz.xml is like this

a
b attribute1=ccc attribute2= attribute3=c ... / /a


The columns that the datagrid will not be in the order
attribute1,attribute2,attribute3...

I would appreciate if anyone can fix my problem or tell me any workaroud
for this because I am making a function to set the dataprovider for
datagrid at run-time and the ordering of columns is essential.

Regards
Ashish Abrol



 
Yahoo! Groups Links

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

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

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




RE: [flexcoders] Using custom classes in RSL

2005-05-31 Thread Erik Westra
Whooohooo! nice :)

And ehh is there a way to create the swf with either compc or mxmlc? Or
should I use mtasc if I want to compile this class via the commandline?


Greetz Erik


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Darron J. Schall
Sent: dinsdag 31 mei 2005 16:53
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Using custom classes in RSL

Erik Westra wrote:

class fly.language.English
{
   //button labels
   static public var okLabel:String = OK; snip


//=== Language.sws ===
library url=Language.swf
component name=fly.language.English uri=* /
/library

//=== Test.mxml ===
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; 
rsl=Language.sws
mx:Button label={fly.language.English.okLabel}/
/mx:Application

There is no class tag for defining a library, rather you need to use 
component which is a little mislead.  The above has been tested and
works.

-d



 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] Applications forgetting variables

2005-05-25 Thread Erik Westra





The difference between 
these two approaches is scope. 

In your first example u 
create a variable on the instance of the class u are working in. This variable 
exists as long as that instance has a reference somewhere in the 
application.

In the second example u 
create a variable inside a function definition. This means that at the }, the 
end of the function this variable is destroyed.


Greetz 
Erik


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of 
[EMAIL PROTECTED]Sent: woensdag 25 mei 2005 4:41To: 
flexcoders@yahoogroups.comSubject: [flexcoders] Applications 
forgetting variables

I can not help but feel I have ran in to more problems than neccessary 
because my flex applicaitons forget variables. I mean I know from a code 
standpoint I am doing the right thing when I write my code but I think it 
forgets variables and I think this is causing me more stress than need be. What 
I want to know is how does someone go about making sure it does not forget 
variables I mean is this a way to do it:
If I have a function and a variablethat looks like this say:
public var age:Number
public function compute(){
age = 23
}
but lets say that for some odd reason when you get to the compute function 
it keeps forgetting the age variable will this solve it to write the function 
like this:

public function compute(){
var age:Number
age = 23
}
If there is any other suggestions let me know 







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] Compiling a set of classes

2005-05-25 Thread Erik Westra





Well i have been stumbling over using RSL the last few 
days. Using compc, etc.

What i tried was creating an SWC wich contains all classes 
needed by the framework (called TAP). I compiled them using the following sws 
file in combination with compc:

library rsl="empty.swc" /namespace 
uri="TAP" all="true" //library

empty.swc is a swc file containing all components used by 
an empty flex application, created from a class like this:

class empty
{
 var a = 
mx.core.Application;
};

The part 'rsl="empty.swc"' is used so it wont compile the 
classes allrdy available in the flex generated swf into the 
library.


As commandline arguments i gave compc the namespace TAP and 
a manifest.xml:

?xml 
version="1.0"?componentPackage component 
id="fly.TAP.alertErrors" class="fly.TAP.alertErrors"/ 
component id="fly.TAP.appCore" class="fly.TAP.appCore"/ 
component id="fly.TAP.cfcConnector" 
class="fly.TAP.cfcConnector"/ component 
id="fly.TAP.commonDialogManager" 
class="fly.TAP.commonDialogManager"/ component 
id="fly.TAP.ErrorHandler" class="fly.TAP.ErrorHandler"/ 
component id="fly.TAP.EventDispatcher" 
class="fly.TAP.EventDispatcher"/ component 
id="fly.TAP.EventStructure" class="fly.TAP.EventStructure"/ 
component id="fly.TAP.eventTracker" 
class="fly.TAP.eventTracker"/ component 
id="fly.TAP.flowControl" class="fly.TAP.flowControl"/
com/componentPackage
This resulted in a SWC with all TAP classes compiled into a 
swf together with some flex classes the TAP framework uses and are not by 
default in the flex generated swf.

In order to use the RSL in the flex application i used the 
following sws:

library url=""http://pc021:8300/_TAP/Library.swf">http://pc021:8300/_TAP/Library.swf"namespace uri="TAP" all="true" 
//library
Thishowevermadetheapplicationhangonafullloadersaying"Initializing".


So far what i have done. I'll explain again what i 
want:


I want to make a set of classes available in memory at 
runtime. 
These classes (AS and MXML) should be compiled into an 
swf. 
This swf containing these classes should not contain 
the classes wich are allrdy in the flex generated 
swf.
I can then in my application load this swf, and as soon 
as this swf is loaded the classes in the swf are available since they reside in 
the global scope.
This way i can use my framework in any flex 
application.


With flash i would do that just by creating a fla. Put 
in the appropreate classes (only referencing them so the compiler knows 
iwill use them). And then export, resulting in an swf with a library of 
classes. For the classes i dont want in there i create intrinsic class 
descriptions.

I cant do this with flex since some of my classes are 
mxml files, containing visual 
components.


Maybe u have an idea on how to solve 
this.


Greetz 
Erik





From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Matt 
ChotinSent: maandag 23 mei 2005 4:19To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Compiling a set 
of classes


Would an RSL be 
appropriate in this case?





From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] 
On Behalf Of Erik 
WestraSent: Friday, May 20, 
2005 9:24 AMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] Compiling a set of 
classes

We are planning a large application. This application 
uses a frameworkwe developed. Different developers will be creating 
components wich willfunction only 
within this framework. In order to let developers work 
ontheir own module while not 
bothering others in their testing. We want tobe able to load different libraries at 
runtime.The ways to do this are 
allrdy completed.The problem 
here is how to compile an as file like this:class commonDialogs{ public function 
commonDialogs() {  
fly.TAP.commonDialogs.Alert;  
fly.TAP.commonDialogs.Login;  
fly.TAP.commonDialogs.Waiting;  
fly.TAP.commonDialogs.Preloader;  
fly.TAP.commonDialogs.Prompt; };};fly.TAP.commonDialogs.Login for example extends LoginVisual, 
wich is anmxml file laying out the 
visual parts of this window extendingtitlewindow.I want to compile these classes into a swf. However I don't 
want toinclude the basic flex 
classes (think of UIObject, TitleWindow,Container, etc.). Does any1 know a way of compiling classes 
whiledefining wich classes to leave 
out?I hope my problem is 
clear, if not, just say so :)Greetz Erik







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] is there any way to get rid of the settings tab in the context menu

2005-05-25 Thread Erik Westra
Nope, no way.

Greetz Erik 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of send2martin
Sent: woensdag 25 mei 2005 15:05
To: flexcoders@yahoogroups.com
Subject: [flexcoders] is there any way to get rid of the settings tab in
the context menu

 


 
Yahoo! Groups Links

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

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

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




RE: [flexcoders] Register a ChangeEvent listener on a static property

2005-05-25 Thread Erik Westra
Another way is just to use object.watch on the property:

ModelLocator.watch(user, _changeFunction);


Greetz Erik
 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alistair McLeod
Sent: woensdag 25 mei 2005 14:37
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Register a ChangeEvent listener on a static
property

Hi Lauren,

I think you're getting things mixed up. Your code should be something
like this (incomplete and untested):

class ModelLocator
{

  static function initialize() : Boolean
  {
EventDispatcher.initialize( ModelLocator.prototype );

return true;
  }

  static var mixIn : Boolean = ModelLocator.initialize();

  private static var _user : User;

  [ChangeEvent(userChanged)]
  public static function get user() : User
  {
return _user;
  }

  public static function set user( user : User ) : Void
  {
_user = user;
  }
}


class AnotherClass
{

  public function AnotherClass()
  {
ModelLocator.addEventListener( userChanged, this );
  }

  ...

}

Theres quite a lot going on in there, search the archives for the static
initialization (you can alternatively just use
EventDispatcher.initialize in a constructor), or read this article about
mixins:
http://www.macromedia.com/support/documentation/en/flex/1/mixin/index.ht
ml

You should probably also use the Delegate class in your
addEventListener.

Cheers,

Ali



 
Yahoo! Groups Links

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

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

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




RE: [flexcoders] how to use the setInterval() in flex actionscript ?

2005-05-25 Thread Erik Westra
The documentation seems not correct here:

setInterval(objectName:Object, methodName:Function, interval:Number [,
param1:Object, param2, ..., paramN]) : Number 

I thought methodName should be of type string when using an object as
1th parameter.


Greetz Erik

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of loveewind
Sent: woensdag 25 mei 2005 13:52
To: flexcoders@yahoogroups.com
Subject: [flexcoders] how to use the setInterval() in flex actionscript
?

the code run normally in swf,

ActionScript:
function checkOut()
{
 TextToCheck = spellCheck_txt.text;
 url_string = javascript:SpellCheck();;
 getURL(url_string, );
 checkOut_interval = setInterval(function ()
 {
  if (spellResult != undefined)
  {
   spellCheck_txt.text = spellResult;
   clearInterval(checkOut_interval);
  } // end if
 }, 100);
}




and how to use setInterval() in flex actionscript

as referred in flex actionscript reference:

setInterval(functionName:Function, interval:Number [, param1:Object,
param2, ..., paramN]) : Number setInterval(objectName:Object,
methodName:Function, interval:Number [, param1:Object, param2, ...,
paramN]) : Number Parameters functionName A function name or a reference
to an anonymous function.

interval The time in milliseconds between calls to the functionName or
methodName parameter.

param1, param2, ..., paramN Optional parameters passed to the
functionName or methodName parameter.

objectName An object containing the method methodName. You must include
this parameter when using setInterval() in an mx:Script block in Flex
applications.



thanks



 
Yahoo! Groups Links

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

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

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




RE: [flexcoders] Validating XML

2005-05-25 Thread Erik Westra
All that is possible in Flex is based on the Flash Players capabilities.
Validation with XSD is not implemented in the player and thus not
possible in Flex.

The flash player only has most basic features available, as u know its
only possible to dynamicly load one type of image, sound and movie. This
is don't in order to keep the player itself small. I guess the same
reason has made that XSD didn't make it into the player.


Greetz Erik


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: dinsdag 24 mei 2005 17:51
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Validating XML

My perception of Castor and the reason to use it is based on the ability
to validate your data/value objects in Java, thus ensuring that if your
data is valid, and another system has problems using it, it is the other
system and not the base Java code.

Furthermore, the use of XSD's for data objects allows the proliferation
of many standard value objects to be used across a myriad of
applications with the ability of those applciations to validate the data
they are sending, thus ensuring ease of communication across disparate
systems.

With the above 2 said, that is my guess as to why someone would expect
Flex to validate the XML via the XSD before sending; that way you can
ensure the data you are sending back to Java is valid ... in form, not
in contents. 
So, if the number is 0-0-0-0-0 instead of 000-000-, that is a data
input validation error, but at least the data is well formed.

Does that make sense?  I'm not saying I agree with using an XSD vs. just
straight RemoteObject and mapping both server-side and client side value
object classes to match as close as possible, and through testing you
are ensured that the data works since you mirrored the Java class client
side in a value object, but your thoughts do help me understand the
why someone would want to do it; I'm trying to build up a decent
inference here.



 
Yahoo! Groups Links

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

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

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





[flexcoders] mxmlc and JVM

2005-05-20 Thread Erik Westra
When I run mxmlc it sais: Error: could not find a JVM.


How can I solve this? 



 
Yahoo! Groups Links

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

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

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




RE: [flexcoders] mxmlc and JVM

2005-05-20 Thread Erik Westra
Thnx, just what I needed :) 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Manish Jethani
Sent: vrijdag 20 mei 2005 14:19
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] mxmlc and JVM

On 5/20/05, Erik Westra [EMAIL PROTECTED] wrote:
 When I run mxmlc it sais: Error: could not find a JVM.

I think you need to set the java.home in your
$FLEX_INSTALL/bin/jvm.config file.




 
Yahoo! Groups Links

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

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

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




[flexcoders] Compiling a set of classes

2005-05-20 Thread Erik Westra
We are planning a large application. This application uses a framework
we developed. Different developers will be creating components wich will
function only within this framework. In order to let developers work on
their own module while not bothering others in their testing. We want to
be able to load different libraries at runtime.

The ways to do this are allrdy completed.

The problem here is how to compile an as file like this:

class commonDialogs
{
public function commonDialogs()
{
fly.TAP.commonDialogs.Alert;
fly.TAP.commonDialogs.Login;
fly.TAP.commonDialogs.Waiting;
fly.TAP.commonDialogs.Preloader;
fly.TAP.commonDialogs.Prompt;
};
};

fly.TAP.commonDialogs.Login for example extends LoginVisual, wich is an
mxml file laying out the visual parts of this window extending
titlewindow.

I want to compile these classes into a swf. However I don't want to
include the basic flex classes (think of UIObject, TitleWindow,
Container, etc.). Does any1 know a way of compiling classes while
defining wich classes to leave out?


I hope my problem is clear, if not, just say so :)

Greetz Erik


 
Yahoo! Groups Links

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

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

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




RE: [flexcoders] Development of components with AS

2005-05-17 Thread Erik Westra
Title: Message





This is a great help (the trick with fdb). In order to make 
it somehow more workable i run fdb.exe like this:

 fdb.exe http://adresfdb.log

Then when fdb is running i type:

 list package.Class:1 
3

This will put the whole class in the fdb.log 
file.

In order to get feedback from the commands u can run this 
java application in a sepperate window:

import java.io.*;public class LogReader 

{ public static void main(String 
args[])
 { if (args.length 
1)
 { 
System.out.println("Usage LogReader 
filename"); 
return; } BufferedReader 
d=null; try
 { d= 
new BufferedReader(new InputStreamReader(new FileInputStream(args[0])) 
); while (true)
 
{ String 
s=d.readLine(); if 
(s!=null)
 
{ 
System.out.println(s); } 
else
 
{ //give up 
system and ignore 
Exceptionstry
  
{
 
 Thread.sleep(500);
}catch(Exception 
e){catch(Exception 
e)
{
 
e.printStackTrace();
 
}finally
{ 
try
 {
 
d.close();
 } catch(Exception 
e)
{
 
e.printStackTrace();
 } 
} }}
Greetz Erik



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Simon 
FifieldSent: dinsdag 17 mei 2005 9:29To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Development of 
components with AS

Hi 
Gordon,

Thanks 
for the reply. I had a look at that but I kept on getting an error "Expected 
line number; got 1,". It seems that although you should be able to specify a 
start and end location ("1, 500" for example) this does not 
work!

Looks 
like its back to listing 10 lines at a time. I have increased my buffer size now 
though so that I can list the whole thing, then copy paste into an 
editor.

Does 
anyone know of a better way of doing this?

Regards,
Simon









Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] Default Text Color?

2005-05-13 Thread Erik Westra





We are coding in AS right?

var num = 
734012;trace(num.toString(16));

Greetz Erik


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of michael 
keirnanSent: donderdag 12 mei 2005 19:20To: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] Default Text 
Color?
Matt Chotin wrote: 

  
  
  
  
  Yep. I just use 
  the calculator in Windows in scientific mode to help me out for stuff like 
  this Jugh, 
why go through all that trouble?perl -e 'printf("%x\n", 
"734012")';) /mgk

  







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










[flexcoders] Development of components with AS

2005-05-13 Thread Erik Westra
Hello, some questions :)

1:
_measuredWidth
_measuredHeight
_measuredPreferredWidth
_measuredPreferredHeight
__width
__height
etc.

Is there anywhere a list of these kind of properties that can be used
with the development of a custom component in actionscript. I would be
interested in knowing wich properties are available and what effect they
have in the framework.


2:

MyCustomComponent
mx:TextArea /
/MyCustomComponent

The above piece of xml creates a child on the MyCustomComponent. Im
wondering what code is used to determine wich childs must be created. If
u extend container, either the container createChildren function or the
View container function takes care of this creation. But how does it
work?


3:

In (for instance) the accordion class the visibility of childs is
explicitly set with setVisible(false, true). This is not documented, but
an importend part of the framework. Im wondering how many of these (for
component development) usefull functions there exists.


4:

mx.effects.EffectManager
mx.core.UIObjectDescriptor
mx.container.Box;
mx.container.VBox;
mx.container.HBox;

These classes are not included in the FlexForFlash.zip file while they
can be valuable to the development of good UI components. Does any1 know
why?


5.

Does any1 know how a Box determines the size of its children? I mean
when u resize a child within a box, the positions of the other childs
(and sometimes their sizes) are recalculated. How does this process
exactly work.


6.

In the documentation of the V2 architecture I miss the overview. I see a
lot of examples of parts of the framework, but I don't see a list of
goals connected to the theory of its implementation. It seems in the
general documentation everything is ordered by feature and in component
creation documentation all simple features are included and minimaly
explained (think init, createChildren, measure, etc.). 

Im missing a structured view of how the framework is tied together. From
concepts all the way down to parts of implementation code in components.




For your information I have the following documents (I may have missed
some importend ones):

The Version 2 Component Architecture - An Overview
http://www.ultrashock.com/tutorials/_sourcefiles/v2a.pdf.zip

Flex Components Basics - Part1: Coding an Analog Clock
http://www.macromedia.com/devnet/flex/articles/creating_comp_print.html

Developing Flex Components and Themes in Flash Authoring
http://download.macromedia.com/pub/documentation/en/flex/15/flex_compone
nts_themes.pdf

Stepping into the New Macromedia Flash MX 2004 Component Structure
http://www.macromedia.com/devnet/mx/flash/articles/v2component_migration
_print.html

Building the FooterNav Component
http://www.macromedia.com/devnet/mx/flash/articles/footer_component_prin
t.html

Building and Testing Components in Macromedia Flash MX 2004
http://www.macromedia.com/devnet/mx/flash/articles/buildtest_comp_print.
html

Exploring Version 2 of the Macromedia Flash MX 2004 Component
Architecture
http://www.macromedia.com/devnet/mx/flash/articles/component_architectur
e_print.html

Creating Components with Flash MX 2004
http://www.person13.com/articles/components/creatingcomponents.html

Developing Components in Flash 2004
http://www.ultrashock.com/ff.htm?http://www.ultrashock.com/tutorials/fla
shmx2004/components.php



Greetz Erik


 
Yahoo! Groups Links

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

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

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




RE: [flexcoders] Trigger flex from Java listener

2005-05-11 Thread Erik Westra
Title: Trigger flex from Java listener





Agreed, a socketserver in java is very easy to build (or 
download). From that socketserver u can push information to your 
client.

Greetz Erik


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Peter 
FarlandSent: woensdag 11 mei 2005 15:11To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Trigger flex from 
Java listener

Have you looked at Flash's XMLSocket 
class?

http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary860.html



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Jeroen De 
VosSent: Wednesday, May 11, 2005 7:55 AMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] Trigger flex from 
Java listener

Hi all, 
I need to trigger actions in Flex based on values 
received by a Java listener. So, the listener 
sees a certain value and needs to send a message to Flex telling it to do 
something. 
Is there any way that I can do this? I thought using LocalConnection, but there is no Java 
equivalent for this ActionScript function. 
Thanks, Jeroen. 
 
Jeroen De Vos Gemeentelijk Havenbedrijf Antwerpen 
C/ICT - AMARIS  
Deze e-mail en alle gekoppelde bestanden zijn officiele 
documenten van het Gemeentelijk Havenbedrijf Antwerpen en kunnen vertrouwelijke 
of persoonlijke informatie bevatten. Gelieve de afzender onmiddellijk via e-mail 
of telefonisch te verwittigen als u deze e-mail per vergissing heeft ontvangen 
en verwijder vervolgens de e-mail zonder deze te lezen, te reproduceren, te 
verspreiden of te ontsluiten naar derden. Het Gemeentelijk Havenbedrijf 
Antwerpen is op geen enkele manier verantwoordelijk voor fouten of 
onnauwkeurigheden in de inhoud van deze e-mail. Het Gemeentelijk Havenbedrijf 
Antwerpen kan niet aansprakelijk gesteld worden voor directe of indirecte 
schade, verlies of ongemak veroorzaakt als gevolg van een onnauwkeurigheid of 
fout in deze e-mail. English Translation: This e-mail and all attached 
files are official documents of Antwerp Port Authority and may contain 
confidential or personal information. If you have received this e-mail in error, 
you are asked to inform the sender by e-mail or telephone immediately, and to 
remove it from your system without reading or reproducing it or passing it on to 
other parties. Antwerp Port Authority is in no way responsible for any errors or 
inaccuracies in the contents of this e-mail, nor can it be held liable for any 
direct or indirect loss, damage or inconvenience arising from any such errors or 
inaccuracies.[GHA#Disclaimer]







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] Help i don't know

2005-05-04 Thread Erik Westra
It's a common floating point problem. U can solve it by multiplying both values 
with 100 and then ehh / (don't know what the word is) the resulting value by 
100.

var x = ((Number(40) * 100) - (39.90 * 100)) / 100;

trace(x); 


Greetz Erik


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt 
Chotin
Sent: woensdag 4 mei 2005 7:55
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Help i don't know

Should Number(tx_inc.text) be parseFloat(tx_inc.text) instead?

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL 
PROTECTED]
Sent: Tuesday, May 03, 2005 9:33 AM
To: Flex Coders
Subject: [flexcoders] Help i don't know

Hi,

if you can see my code, please, Resto()  function it's very simple.
If in my tx_inc.text put 40EUR, and in my 
ShoppingCart(mx.core.Application.application.shopping).total put 39.90EUR 
return me 0.10001???
I have trace my var the value for tx_inc.text and for total it's correct, but 
my resto var is crazy? what's i wrong?



?xml version=1.0 encoding=utf-8?
mx:Canvas xmlns:mx=http://www.macromedia.com/2003/mxml; height=20% 
width=100% visible=true xmlns=*
mx:Script
![CDATA[
  import as.*;
  var resto=0;
  public var vendite;
 
  function Resto():Void
  {
   
if(ShoppingCart(mx.core.Application.application.shopping).total0 )
{
  resto=
Number(tx_inc.text)-ShoppingCart(mx.core.Application.application.shopping).t
otal;
  mx.controls.Alert.show(resto);
 
}
else
{
   resto=0;
   tx_inc.text='';
}
   
   
  }
 
 
  ]]
/mx:Script

 mx:NumberFormatter id=ft_price
  precision=2
  rounding=none
  decimalSeparatorTo=,
  thousandsSeparatorTo=.
  useThousandsSeparator=true/
 
mx:Panel id=tot title=Totale Scontrino width=100% height=100% 
headerColors=[#FF6600,#FF]

mx:Tile
mx:Label id=ltot text=Totale EUR
{ft_price.format(ShoppingCart(mx.core.Application.application.shopping).tota
l)} 
fontSize=20/
mx:Label id=lresto text=Resto EUR {ft_price.format(resto)} 
fontSize=20/
mx:Label text=Articoli
{ShoppingCart(mx.core.Application.application.shopping).size} 
fontSize=20/
mx:Label id=lvendite text=Vendite n°{vendite} fontSize=20/ mx:Label  
text=Incassato fontSize=20/ mx:TextInput id=tx_inc change=Resto() 
fontSize=20 / /mx:Tile /mx:Panel

/mx:Canvas




 
Yahoo! Groups Links



 





 
Yahoo! Groups Links



 





 
Yahoo! Groups Links

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

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

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




RE: [Fwd: Re: [flexcoders] Tips on Custom component]

2005-05-03 Thread Erik Westra
Joe, Jester and Ali,

thnx for your replies. These were the kind of ideas I was after. Joe,
thank u a lot for the roadmap. I will look into it soon. I know it will
be a lot of work, but it has to be done :) 

I have created some componentent in Flash, but the biggest problem is
the (so it seems) complexity of the V2 framework (along with the fact
that I allways resisted to use it).

If I were you, I'd read up on the various Flash component integration
articles.

This is the only one I found, any suggestions are welcome.
http://mxdu.v4.breezecentral.com/p27914483/

I guess I should have mentioned that what I consider 
the hard part here is creating the kind of animation 
effects that are shown in the SWF that you posted.
 
Yeah, animations are allways hard... Though they are very importend for
the user experience :)

http://www.macromedia.com/support/documentation/en/flex/1_5/createcompo
nents/index.html

Thnx for this link. This used the same kind of example as I noticed in
the pdf 'Designing Flex Componenents and Themes in Flash Authoring'. I
will check for additional information though.

To create such a component, with all the features you're after, 
I'd say that you're undertaking a fairly complicated component 
development task, with effort measured in days, if not weeks, and 
I've not seen a great deal evidence that completely new components 
of such complexity have been created, outwith of Macromedia.

I agree, but we are basing our core product on Flex wich is a modulair
CMS. Im doing the research  development part to check how we can do it
all. I need to gather as much knowledge of Flex as possible so we
eventually will be able to build everything our designers and creative
minds can come up with. The best way to learn is to do it. And allthough
it may take some time, it will be of value for my company :)


Greetz and Thank you,


Erik



-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Joe Berkovitz
Sent: vrijdag 29 april 2005 21:53
To: flexcoders@yahoogroups.com
Subject: [Fwd: Re: [flexcoders] Tips on Custom component]

Erik, one more thing:

I guess I should have mentioned that what I consider the hard part here
is creating the kind of animation effects that are shown in the SWF that
you posted.

If all you want is to just have the appropriate components appearing and
disappearing in a VBox with no animation or tweening, it's much simpler
and JesterXL's suggestion applies -- it's pretty straightforward Flex
component stuff.

.   ..  . ...j

 



 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] dispatchEvent in AS class?

2005-05-03 Thread Erik Westra


static var mixIt = EventDispatcher.initalize(SocketManager.prototype);
That is at all not nescessary


I rewrote a part of your code, wich is pasted below, here the code to
test:

?xml version=1.0 encoding=utf-8?

mx:Application
verticalGap=0
backgroundColor=#7D8FA8
xmlns:mx=http://www.macromedia.com/2003/mxml; xmlns=*
pageTitle=Things
width=690 height=484 initialize=start()

mx:Script
![CDATA[
public function start()
{
var sm:SocketManager =
SocketManager.getInstance();
sm.addEventListener(onConnectTest, this);
sm.connect();

};

public function onConnectTest(event_obj)
{
mx.core.Application.alert(onConnectTest);
};
]]
/mx:Script
/mx:Application

And here the class:


import mx.utils.Delegate;
import mx.events.*;

class SocketManager
{
static private var _instance:SocketManager;

private var _socket:XMLSocket;
private var _isSocketConnected_bool:Boolean = false;

public var addEventListener:Function;
public var removeEventListener:Function;
private var dispatchEvent:Function;

private function SocketManager()
{   
_socket = new XMLSocket();
_socket.onConnect = Delegate.create(this,
_handleConnect);
_socket.onClose = Delegate.create(this, _handleClose);
_socket.onXML = Delegate.create(this, _handleIncoming);
EventDispatcher.initialize(this);
};

static public function getInstance():SocketManager
{
if (!_instance)
{
_instance = new SocketManager();
};
return _instance;
}

public function connect(url_str, port_num)
{
//for the test:
dispatchEvent({type: onConnectTest});

if(!isSocketConnected)
{
if (!_socket.connect(url_str, port_num)) 
{
throw new Error(SocketManager: socket
connection attempt failed early);
};
} else
{
throw new Error(SocketManager: connect method
called while connected);
};
};

public function get isSocketConnected():Boolean
{
return _isSocketConnected_bool;
};

public function set
isSocketConnected(isSocketConnected_bool:Boolean):Void
{
//read only
};

private function _handleConnect(success_bool:Boolean) 
{
if(success_bool)
{
trace(SocketManager: Socket connection attempt
succeeded);
_isSocketConnected_bool = true;
dispatchEvent({type:onSocketOpen});
};
};

private function _handleClose () 
{
trace(SocketManager: server closed connection);
_isSocketConnected_bool = false;
dispatchEvent({type:onSocketClose});
};

private function _handleIncoming(messageObj) 
{
// display the received xml data in the output window
trace( + messageObj.toString() + );
};
};


Greetz Erik


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: zaterdag 30 april 2005 0:48
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] dispatchEvent in AS class?

Add this as a static member:

static var mixIt = EventDispatcher.initalize(SocketManager.prototype);

- Original Message -
From: Sean McKibben [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, April 29, 2005 5:49 PM
Subject: [flexcoders] dispatchEvent in AS class?


I'm trying to wrap an XMLSocket object in a singleton class to manage 
my (single) XMLSocket connection, but I can't seem to get it to throw 
any events. Is it that I need to put it into my .mxml file as a 
component or something? Right now it is just an actionScript class.
I was wanting to stick to the cairngorm framework's delegate model, but 
my SocketManager actually initiates commands from the server it is 
connected to (the whole point of my XMLSocket) so this class will need 
to dispatch a bunch events, preferably using the 
addEventListener+dispatchEvent model.

Whenever the socket connection succeeds, I get my SocketManager: 
Socket connection attempt succeeded trace statement, then I get a 
warning which says Warning: dispatchEvent is not a function which 

RE: [flexcoders] dispatchEvent in AS class?

2005-05-03 Thread Erik Westra
Hmm, I think u are missing the point that this class is a singleton and
thus only instantiated once.

The constructor is private and the instance can only be retrieved via
the getInstance method:

static public function getInstance():SocketManager
{
if (!_instance)
{
_instance = new SocketManager();
};
return _instance;
}

This method checks if the instance is created. If it is it simply
returns the instance, making sure only instance of this class exists.

If im missing something here, please point me to it :)


Greetz Erik

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: dinsdag 3 mei 2005 16:43
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] dispatchEvent in AS class?

Doing this:

EventDispatcher.initialize(this);

Puts the addEventListener, removeEventListener, and dispatchEvent
functions as well as the arrays to hold the events on each instance of
the class. 
Additionally, that method is run each time a class instance is
instatiated, doing the redudant re-initializing again.

The reason I mentioned do it this way:

static var mixIt = EventDispatcher.initalize(SocketManager.prototype);

Is because by being static, it is only initialized once, not per each
class instantiation, and secondly, the methods are added to the class
once, thus using significantly less RAM.

So, it is necessarey if you want a more efficient class.


- Original Message -
From: Erik Westra [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, May 03, 2005 7:18 AM
Subject: RE: [flexcoders] dispatchEvent in AS class?




static var mixIt = EventDispatcher.initalize(SocketManager.prototype);
That is at all not nescessary



 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] iteration::two AdvancedTabNavigator problem

2005-05-03 Thread Erik Westra





There might be another flex-config.xml file in this 
directory:

\WEB-INF\cfform

Im using CF7 and thats 
where the settings used by the flex-bootstrap shizzle are 
located.


Greetz Erik



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Rick 
SchmittySent: dinsdag 3 mei 2005 16:47To: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] iteration::two 
AdvancedTabNavigator problem
Thanks for the reply Ali, and yes, your component works fine in a 
.mxml page. I have CFMX installed under IIS6 and then integrated Flex 
under CF following these tech notes:http://www.macromedia.com/support/documentation/en/flex/1/flexforcf.htmlhttp://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=96611248http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19344That 
leaves me with a shared context 
rootC:\CFusionMX\wwwroot\WEB-INF\flex\flex-config.xmlC:\CFusionMX\wwwroot\WEB-INF\flex\user_classesC:\webs\dev\test.cfm 
(this is the cfimport with your SWC which cant find the class 
path)C:\webs\dev\test.mxml (this is just the mxml code from the cfm page and 
works)Perhaps this is a question for the ColdFusion team then 
regarding the flex-bootstrap as I don't see any other flex-config.xml 
files?Thanks
On 5/3/05, Alistair 
McLeod [EMAIL PROTECTED] 
wrote:

  Hi 
  Rick,
  
  I've never 
  used it in a ColdFusion environment, but theres no reason why it shouldn't 
  work. Did you get it to work OK in the standalone JRun environment? Is the 
  flex classpath in flex-confi.xml ok - ie. does it still include user_classes. 
  Can you give us more info on the setup you have - it might give us a 
  clue.
  
  Has anyone 
  used a SWC in the same enviroment as Rick is using here?
  
  Cheers,
  
  Ali
  
  
  
  
  --
  Alistair McLeodDevelopmentDirector
  iteration::two[EMAIL PROTECTED]
  
  Office: +44 (0)131 338 6108
  
  This 
  e-mail and any associated attachments transmitted with it may contain 
  confidential information and must not be copied, or disclosed, or used by 
  anyone other than the intended recipient(s). If you are not the intended 
  recipient(s) please destroy this e-mail, and any copies of it, 
  immediately.Please also note that while software systems have 
  been used to try to ensure that this e-mail has been swept for viruses, 
  iteration::two do not accept responsibility for any damage or loss caused in 
  respect of any viruses transmitted by the e-mail. Please ensure your own 
  checks are carried out before any attachments are 
  opened.
  
  
  
  
  From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Rick 
  SchmittySent: 02 May 2005 15:25To: flexcoders@yahoogroups.comSubject: [flexcoders] 
  iterationtwo AdvancedTabNavigator problem
  Hi all!I'm trying out the AdvancedTabNavigator and ran into 
  some problems when using Cold FusionI have 
  AdvancedComponentSet-0_1.swc in my user_classes directory. But when I use Ben 
  Forta's method described here: http://www.forta.com/blog/index.cfm?mode=eentry=1038I 
  get the following error:Error /test.cfm:5Don't know how to parse 
  element "com.iterationtwo.containers.*:AdvancedTabNavigator". It is not a 
  known type or a property of mx.core.Application.Here is the code 
  for test.cfm!--- 
  Import Flex JSPs ---CFIMPORT TAGLIB="/WEB-INF/lib/flex-bootstrap.jar" 
  PREFIX="mm"!--- Page ---HTMLBODYH1Flex Embedded in 
  ColdFusion/H1 !--- Start of MXML 
  ---mm:mxmlmx:Application xmlns:mx=" 
  http://www.macromedia.com/2003/mxml" xmlns:iterationtwo="com.iterationtwo.containers.*" 
   
  iterationtwo:AdvancedTabNavigator tabPlacement="bottom" mx:Panel width="200" 
  height="150" title="tab1"/mx:Panel width="200" 
  height="150" title="tab2"/ 
  /iterationtwo:AdvancedTabNavigator/mx:Application /mm:mxml/BODY/HTMLThis 
  works fine in in a pure .mxml page in the same directory in my test.mxml 
  example file:mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns:iterationtwo="com.iterationtwo.containers.*" 
  iterationtwo:AdvancedTabNavigator tabPlacement="bottom"mx:Panel width="200" 
  height="150" title="tab1"/ mx:Panel width="200" 
  height="150" title="tab2"/ 
  /iterationtwo:AdvancedTabNavigator/mx:Application 
  Any help appreciated, thanks!
  
  Yahoo! Groups Links
  
To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ 
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]  
Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service. 







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










[flexcoders] Tips on Custom component

2005-04-29 Thread Erik Westra
With this email attached an swf. This swf was created by our designer.
When u click the second item a pane opens. Its my job to make this into
a component. However this component must be V2 compatable and should be
usable like the accordian pane, via tags.

Does any1 have a clue where to find the right information I need to
create a V2 component wich has the functionalities the attached
representation has. 

The component has:
- an variable amount of children
- a variable space between different items
- an mxml component (like TabNavigator and Accordion) as child per item

The component must be fully stylable and skinnable.

Does any1 have some hints on how to start?

Your help is greatly appreciated.


Greetz Erik 


 
Yahoo! Groups Links

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

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

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


menuExample.swf
Description: menuExample.swf


RE: [flexcoders] Asfunction not working inside htmlText

2005-04-29 Thread Erik Westra
The problem here is that asfunction (at least the function asfunction is
calling) is called on the parent movieclip where the textfield resides.
So in this case your call will end up in your text component.

If u change asfunction:hello_you to asfunction:_parent.hello_you the
example should work.


Greetz Erik


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: donderdag 28 april 2005 18:31
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Asfunction not working inside htmlText

I just now needed this myself, and sure enough, it doesn't work.

Is this an known bug?  Has anyone discovered a workaround?

Tracy

-Original Message-
From: Greg Fuller [mailto:[EMAIL PROTECTED]
Sent: Friday, February 25, 2005 5:20 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Asfunction not working inside htmlText


Hi everyone,

I'm having trouble getting asfunction to work inside htmlText.

This post in the MM flex newgroup suggests that asfunction may have
been broken with the release of 1.5:
http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=
346threadid=929079highlight_key=ykeyword1=asfunction


Here's a super simplified version of what I'm trying to do:

---
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
xmlns=*

mx:Script
   function hello_you(you:String) {
 alert(hello  + you);
   }
/mx:Script

mx:Text
   mx:htmlText![CDATA[ 
 Click a href=asfunction:hello_you,'Dolly'here/a to say hello.
   ]]/mx:htmlText
/mx:Text

mx:Spacer height=20/

!-- this works, but asfunction above does not --
mx:Button label=Click to say hello click=hello_you('Polly');/

/mx:Application


 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] Newbie: Flash vs. Flex, CPUs, Lazslo

2005-04-29 Thread Erik Westra
An example would be Remoting, any here who have used Flash 
Remoting in IDE form know its more tedious to implement then 
FLEX. 

I don't have this problem, but that may be because we internally use our
own remoting components.

On all other point I agree with u. We chose flex for another importend
reason: the component framework. Allthough I personally don't like the
V2 components, macromedia uses them in Flex and will continue to develop
them. They are with a large team wich is capable of managing such a
component library. We could develop components ourself wich would be
half the size and more optimized, but the developing takes a lot of time
and getting them completely bugfree would not be doable.


Greetz erik


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Scott Barnes
Sent: vrijdag 29 april 2005 3:00
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Newbie: Flash vs. Flex, CPUs, Lazslo

On 4/29/05, Jim Schneider [EMAIL PROTECTED] wrote:
 1. Could someone explain (or point me to a doc/faq) that tells me why 
 I would choose Flex over Flash. What can Flex do that Flash can't? 
 Even if it's more difficult in Flash, perhaps it's worth it given the
cost of Flex.

I'll take a stab at this one.

As a Flash IDE developer for many a year, I've found that its really a
bottle neck and a slow process at times. Flash IDE takes a lot of
discipline and understanding of the concept of flash itself and you
better be armed before taking on a large project.

When developing in large projects you tend to be a one man show, as to
share resources or code amongst other developers takes a lot of
communication and patience. That alone improves why FLEX is a valid
purchase.

As for what can FLEX do FLASH can't? not much technically as FLEX is
really an alternative approach to the end goal. It does bring a lot more
to the table then FLASH IDE in terms of Rapid Development. An example
would be Remoting, any here who have used Flash Remoting in IDE form
know its more tedious to implement then FLEX. Its examples like this
that change your perspective on FLASH vs FLEX.

On top of that, FLEX handles a lot of your tasks for you, things like
initialization modals, busy cursors, history management etc are all
automated tasks within FLEX.

In terms of costs, i've seen soo many projects take months to do
what could be done in FLEX in half the time. These are also run by some
very competent FLASH developers who have years of experience and know
the language/tool off by heart. Its just cumbersome, slow and at times
very tedious.

That being said, you do a lot more control visually / debugging wise in
FLASH IDE then you currently at present have in FLEX. On top of that
your portability is much more open then at present with FLEX.

Implementing Runtime Shared Libraries in FLASH IDE is awful and painful,
just ask JessterXL all about that one, he's mastered it but he went
through a learning curve and pain to get to that point. I like wise, i
think i've got it mastered but found it took a lot of imagination and
research.

In FLEX? bah its next to easy as implementing a Tree component.

In FLASH MX 2004 Pro, implementing even a Tree component (databinding
aside) isn't a simple task and requires some extra work then compared to
FLEX.

Cost wise, you'll blow more money using FLASH IDE then you will via FLEX
for a large application.

If you are building a small RIA app that isn't as large and doesn't
require a team of developers to work on, then yes FLASH MX 2004 Pro is
the suitable resource.

 2. Speaking of cost, I read on MM's site that they recommend a typical

 deployment of a Flex app have 6 - 8 CPUs. Is this true in practice? If

 I have an app that has 50 users (would grow to perhaps 10K users) who 
 don't hit the system very hard, what are CPU requirements? Are there 
 any performance benchmarks that I can use as a guideline for what I 
 would need initially and at what point I would need to upgrade. As a 
 small company, we can probably chew off $12K, $70K is another story 
 (unless I misunderstand the licensing).

Not sure on server-side, i've oftend wondered that my self and while
i've read various optimization techniques and resources i'm still
skeptical of its use in terms of high volume. That being said, we could
easily use a DUAL CPU setup here at work for a FLEX application (approx
300-500 end users hitting it daily) and provided there is enough ram
thrown at it, it should hold up fine. If need be i'd look into
clustering the servers or throwing more RAM at it. I've FLEX Server
tends to have ok automated garbage collection and simply apply the same
server-side rules as i do with a CFMX server.

 3. Has anyone had any real-world experience/lessons-learned with 
 Laszlo and any comparisons with Flex?

I've gone down the path of using Laszlo as a prototype concept,
comparing it to FLEX? In many ways the XML flavour Laszlo brings to the
table is more simplistic but at 

RE: [flexcoders] KeyDown Event returns incorrect ascii values

2005-04-29 Thread Erik Westra





U could also try and see if Key.getCode does return the 
right value.

Greetz Erik



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Matt 
ChotinSent: vrijdag 29 april 2005 6:15To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] KeyDown Event 
returns incorrect ascii values


Can you try setting 
System.useCodepage = true and see if that changes which values you 
get?









Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










[flexcoders] Tips on Custom component

2005-04-28 Thread Erik Westra
With this email attached an swf. This swf was created by our designer.
When u click the second item a pane opens. Its my job to make this into
a component. However this component must be V2 compatable and should be
usable like the accordian pane, via tags.

Does any1 have a clue where to find the right information I need to
create a V2 component wich has the functionalities the attached
representation has. 

The component has:
- an variable amount of children
- a variable space between different items
- an mxml component (like TabNavigator and Accordion) as child per item

The component must be fully stylable and skinnable.

Does any1 have some hints on how to start?

Your help is greatly appreciated.


Greetz Erik 


 
Yahoo! Groups Links

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

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

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


menuExample.swf
Description: menuExample.swf


RE: [flexcoders] Flash Player/Flex Feature

2005-04-26 Thread Erik Westra

As far as I know this 'bug' can only come up if u have more than 32 k of
code in a certain class. So in each class u can have 32k of code, this
is a lot of code per class. If u have more code in your class, there is
something wrong, this will result in having pain in your finger from
scrolling and wont help with the development speed as u will be
searching for code most of the time.

I worked with flash for quite some time and never encountered this
error. I would love to see an example where u receive this error, im
curious as to how such a class would look like.


Greetz Erik
 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Laudrup
Sent: maandag 25 april 2005 21:13
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flash Player/Flex Feature


The 32k error is really annoying and I consider it more a Flash
Player/Flex bug than a feature   In fact it's quite difficult for me
to understand how the garbage collector works and how the mxml pages are
translated in AS2 classes Is there any documentation in regards with
those issues 

Jumping to another topic, I've looked over the Flex System requirements
and look what I found...


Intel Pentium processor or higher
256 MB RAM (512 MB recommended)
400 MB available disk space
Microsoft Windows 2000 Server, XP Professional, or
2003 Server

Isn't this a little bit misleading? I have 1 Gb RAM and after
deploy/re-deploy the application 2-3 times, JRun almost crawls on his
knees and finally get the blessing... Out of Memory...


Thanks,
Michael



 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] Re: createClassObject

2005-04-26 Thread Erik Westra

Manish Jethani [EMAIL PROTECTED] said:
Try avoiding the call to getNextHighestDepth() by maintaining 
your own counter.

I want to know why I should avoid using getNextHighestDepth(). This is
partially awnsered by:

JesterXL [EMAIL PROTECTED]
getNextHighestDepth is, from experience, overrwritten from the 
Flash implementation, and handles depth management in ActionScript 
rather than letting the player do it; this allows depth to work in 
the framework.  The problem is, this slows getNextHighestDepth 
considerably since it's now written in ActionScript instead of native
C.  

Is this true?

And if its actionscript, my guess is the performance of this mechanism
cant be an issue. I imagine the functionality works something like this:

var _highestDepth_num = 0;

function attachMovie(linkageID_str, newName_str, depth_num)
{
_highestDepth_num = _highestDepth_num  depth_num ? depth_num :
_highestDepth_num;
originalAttachMovie(linkageID_str, newName_str, depth_num);
};

function createEmptyMovieClip(newName_str, depth_num)
{
_highestDepth_num = _highestDepth_num  depth_num ? depth_num :
_highestDepth_num;
originalCreateEmptyMovieClip(newName_str, depth_num);
};

//etc, u get the point

function getNextHighestDepth()
{
return (_highestDepth_num + 1)
};


How can this be a performance hit? 


Greetz Erik


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: maandag 25 april 2005 15:48
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: createClassObject


If you are just controlling visibility, use setVisible(false/true)
instead of creating the objects each time; that should be significantly
more efficient.

Secondly, yeah, z order is a good concept.  Basically, each element in
Flash is drawn on a depth.  Higher depths are where things are drawn
closer to you, and lower depths are where things are drawn farther away,
and below those are higher depths.  Only 1 element can occupy a given
depth at any given time, and if something is created in an occupied
depth, it destroys whatever object is there, and then creates itself.

getNextHighestDepth is, from experience, overrwritten from the Flash
implementation, and handles depth management in ActionScript rather than
letting the player do it; this allows depth to work in the framework.
The problem is, this slows getNextHighestDepth considerably since it's
now written in ActionScript instead of native C.  Therefore, set a
private var depth:Number up top in your class, set it to -1 in your init
function, and then do:

createClassObject(Control, name, ++depth);

That way, it'll auto-increment.

...you don't have to do with any of this if you extend mx.core.View
instead of UIComponent for your cell renderers.

- Original Message -
From: viraf_bankwalla [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Monday, April 25, 2005 9:37 AM
Subject: [flexcoders] Re: createClassObject




I have two images and three labels in each cell.  Their visibility
is controlled by the data and user display criteria - thus I specify
a name for them.

I noticed that if I did not specify getNextHighestDepth() it
appeared that each time createClassObject was called the prior
object was destroyed and the new one created.

Could someone please provide me an explanation on what
getNextHighestDepth does.  My understanding was that this was the z-
order, thus could I just set all the children to be at the same z-
order ?  If not, is a simple one up counter sufficent ?

Thanks.



--- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote:
 If only a single Image named imgE is being created per cell,
then you
 don't have to specify a unique name -- only children of a single
parent have
 to have unique names. However, there is generally no good reason
to ever
 specify a name in createClassObject. If you pass undefined for the
second
 argument, Flex will generate a unique name for you.

 - Gordon

 -Original Message-
 From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED]
 Sent: Sunday, April 24, 2005 11:26 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: createClassObject




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

  imgE = createClassObject(Image,imgE, getNextHighestDepth());

 Try avoiding the call to getNextHighestDepth() by maintaining your
own
 counter.

 Also, I think the second argument to createClassObject() needs to
be
 unique.






 Yahoo! Groups Links






Yahoo! Groups Links








 
Yahoo! Groups Links



 






 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] EventDispatcher Question.

2005-04-26 Thread Erik Westra

Hmm, this set me thinking about what was the original question:

1. Remove an obj as listener for all events its registered for with the
dispatching object. 

A method to do this:

obj.removeListener(click, obj1);  
obj.removeListener(change, obj1); 
obj.removeListener(something, obj1);

like this:

obj.removeAllEvents(obj1);


2. Remove all listeners from a dispatching object.

A method to do this:

obj.removeListener(click, obj1);  
obj.removeListener(click, obj2);  
obj.removeListener(click, obj3);  
obj.removeListener(change, obj1); 
obj.removeListener(change, obj2); 
obj.removeListener(something, obj1);

like this:

obj.removeAllListeners();



Greetz Erik

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Uhlmann
Sent: dinsdag 26 april 2005 12:46
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] EventDispatcher Question.


Just curious as to whether or not others have built/extended the
EventDispatcher solution and what they found worked?.

you, could use GDispatcher that offers this functionality. 
http://www.gskinner.com/blog/archives/2003/09/code_gdispatche.html

The version shipped with AnimationPackage works with Flex. Note,
GDispatcher API is not compatible to the W3C standard as
mx.events.EventDispatcher is.

Best,
Alex

--
Alex Uhlmann
Software Engineer
iteration::two


 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] Having trouble using createTextField

2005-04-21 Thread Erik Westra

This could be a depth and naming problem. U should use
mc.getNextHighestDepth() to determine the depth. And u also need to make
sure the instance name if unique for this component. Other thing is that
createTextField doesn't accept an init object. The colow does what u
want:


?xml version=1.0 encoding=utf-8?

mx:Application
verticalGap=0
backgroundColor=#7D8FA8
xmlns:mx=http://www.macromedia.com/2003/mxml; xmlns=*
pageTitle=Dingen
width=690 height=484
mx:Script
![CDATA[
public function start()
{
var x_num = my_mc.mouseX;
var y_num = my_mc.mouseY;
var depth_num = my_mc.getNextHighestDepth();
var name_str = myOriginalInstanceName +
depth_num;

my_mc.createTextField(name_str, depth_num,
x_num, y_num, 10, 20);
var txt = my_mc[name_str];
txt.autoSize = left;
txt.text = great1!!;
};
]]
/mx:Script
mx:Canvas width=300 height=200 id=my_mc
mouseDown=start() backgroundColor=#FF/mx:Canvas
/mx:Application
 

Greetz Erik

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of carmhuntress
Sent: donderdag 21 april 2005 7:14
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Having trouble using createTextField



I am trying to create a textfield when you click inside a canvas at the
x and y coordinates and it continues not to work.  My understanding is
that the canvas extends movieclip so I could add a textfield to it.  It
would help to possibly get a better understanding of how this all works.

Here is my code:

mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;

mx:Script
![CDATA[
function onMouseDownEvent()
{
var point = {x:mouseX, y:mouseY};
canvasText.createTextField(mytext,0,point.x,point.y, 40, 40,
{text:'this is a test'}); };


]]
/mx:Script

mx:Canvas id=canvasText mouseDown=onMouseDownEvent(); width=300
height=300/
/mx:Application

I also cannot define properties when the app starts for instance
canvasText.mytext.border can not be defined in the function.  I modified
this slightly and it work well in flash.  Please help.  Thanks.





 
Yahoo! Groups Links



 






 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] How to populate tree control from web service re sult (server side java objects)

2005-04-20 Thread Erik Westra





I think that the problem u describe comes from the fast 
that (as far as i know) a tree canhave a dataProvider wich is a XML 
object. The tree dataprovider is used to provider an API to modify the xml more 
easy.

In order to use a combination of arrays and objects to 
fill your tree u need to use a function wich uses the dataProvider API for 
u.

From the top of my head i wrote the code below. Im not 
sure if its bugfree, but u should get the idea. Maybe macromedia has a better 
solution than the one i wrote below. Its also possible to comvert your object to 
xml 1th but in that case the tree component will have to iterate over data 
structure again to do what the function below does.

I hope this helps :)



code

public function fillTree(node, dataProvider_array, 
folderKey_str, nodeKey_str, folderName_str, nodeName_str)
{
 for (var i = 0; i  
dataProvider_array.length; i++)
 {
 var 
currentItem_obj:Object = dataProvider_array[i];
 
varnodeName_str:String = 
currentItem_obj[nodeName_str];

 if 
(nodeName_str)
 
{
 
//its a node, not a folder
 
node.addTreeNode(nodeName_str, currentItem_obj);
 } 
else
 
{
 
//its a folder
 
nodeName_str = currentItem_obj[folderName_str];
 
var newNode:XMLNode = node.addTreeNode(nodeName_str, 
currentItem_obj);
 
fillTree(newNode, currentItem_obj[folderKey_str], folderKey_str, nodeKey_str, 
folderName_str, nodeName_str);
 
fillTree(newNode, currentItem_obj[nodeKey_str], folderKey_str, nodeKey_str, 
folderName_str, nodeName_str);
 
};
 };
};

fillTree(myTree.dataProvider, myInfo_array, 
"childFolders", "systemFiles", "folderName", "fileName");

/code


Greetz Erik




From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Shlomi 
CohenSent: woensdag 20 april 2005 10:49To: 
'flexcoders@yahoogroups.com'Subject: RE: [flexcoders] How to populate 
tree control from web service re sult (server side java 
objects)

Hi 
Manish and Matt

Its 
not simple as you describe . even the documentation does have a bug , i've tried 
the code from below and the output is 
[object],[object].
http://livedocs.macromedia.com/flex/15/flex_docs_en/0226.htm


let me 
remind you that my objects are jave objects that come from the server in SOAP 
and i have no idea what flex does with them , and believe mei tried and 
read all your documentation .

Manish 
your example is good for Tree that was built on XML and not from objects , cause 
in my case you would have 
get 
[object Object],1,[object Object] 

my 
Java objectsare very simple they like this 

class SystemFile 
{
 
 String 
fileName;
 String 
fileGuid;
}

class 
SystemFolder{
 
 String 
folderName;
 SystemFolder[] 
childFolders;
 SystemFile[] 
systemFiles;
}

trying 
to get to item.folderName didn't work also not 
item.fileName.



i 
didn't find any way to access my original object members besides backing object 
, what is wrong here ?

thanks 
Shlomi



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Matt 
ChotinSent: Wednesday, April 20, 2005 00:54To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] How to populate 
tree control from web service re sult (server side java 
objects)


Also check out the 
TreeDataProvider API. You should always use the methods specified in that 
API when working with either XML or Objects in a Tree or Menu. That way 
you don't have to worry about backingObject which is an implementation detail 
purposely not documented.

Matt





From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] Sent: Tuesday, April 19, 2005 1:10 
PMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] How to populate 
tree control from web service re sult (server side java 
objects)

On 4/19/05, Shlomi Cohen [EMAIL PROTECTED] 
wrote: if i have a function that get a node like this 
 
 function 
myLabelFunc(item):String { 
 var 
type=typeof item; // always return {Object}  return 
item._??? 
} 
 how do i know which properties 
the variable 'item' has ? If 
you're writing a labelFunction for a tree, you're expected to 
knowthe format of the item so you 
can construct the label string out ofthe data within the item. For example, I have an item 
with properties'name' and 'phone' 
(number), and I want the label to be a combinationof both: mx:Tree labelFunction="makeLabel" 
/ function 
makeLabel(item):String 
{ 
return item.name + ": " + item.phone; }makeLabel() is called for every node in the 
tree.-- 
[EMAIL PROTECTED]http://manish.revise.org/__This 
email has been scanned by the MessageLabs Email Security System.For more 
information please visit http://www.messagelabs.com/email 
This 
email has been scanned by the MessageLabs Email Security System.For more 
information please visit http://www.messagelabs.com/email 

RE: [flexcoders] string to xml - datagrid

2005-04-20 Thread Erik Westra

To create XML from a string u can just do this:

var xml:XML = new XML(str);

Then u can use an xmlToObject coverter to convert the xml object to an
object wich consists of arrays and objects. I believe there is a
macromedia utility available for this.

Greetz Erik
 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of core_elements
Sent: woensdag 20 april 2005 13:41
To: flexcoders@yahoogroups.com
Subject: [flexcoders] string to xml - datagrid



Hi I don't know if this is possible.

I have an soap-function that returns a string. The content of the
string:

ticketsticketticketID1/ticketID/ticketticketticketID2/
ticketID/ticket/tickets

Of course this is just a string. Is it possible to convert the string to
an xml object and then bind that object to a datagrid?

I did found this :

var xmlStr:String;
xmlStr=ticketsService.getTickets.result;

var xml:XML;
xml=mx.utils.XMLUtil.createXML(xmlStr);


but I don't know if this is the right way ... 






 
Yahoo! Groups Links



 






 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] Re: setting conditional enabled with AS

2005-04-20 Thread Erik Westra

Well in theory u could create a function witch lets u bind properties
yourself, the problem here is that if u want to bind properties
dynamicly u need to know what properties of what objects are bound.



From the top of my head this will look something like:


private function _propChanged(prop_str:String, oldVal, newVal, data_obj)
{
data_obj.receivingObj[data_obj.receivingProp] = newVal;
return newVal;
};

public function bindProperty(receivingProp_str, receiving_obj,
sendingProp_str, sending_obj)
{
sending_obj.watch(sendingProp_str, 
_propChanged, 
{receivingProp: receivingProp_str,
receivingObj: receiving_obj});
};



Greetz Erik


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Joe Berkovitz
Sent: woensdag 20 april 2005 16:06
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: setting conditional enabled with AS


What Darron says is all true: watch() is more general despite its
limitations, which one can work around.  One must pick one's poison in
this case...

Anyway, I think this discussion provides one more data point for MM
suggesting that AS access to the data binding facility could be helpful.


Darron J. Schall wrote:
 Joe Berkovitz wrote:
I don't recommend using watch() as Darron suggested, because you can 
only have one user of watch() per watched object property.  It's
better 
to do what MXML bindings do and listen for change events.
 
 The problem is you can only get change events in certain situations.
If 
 I have a variable x and I want to know when it changes, I can't say 
 x.addEventListener(modelChanged) because it doesn't exist in any
data 
 provider.  Not all changes to variables generate change events, which
is 
 why we use watch.  Watch is the way to catch changes to any variable. 



 
Yahoo! Groups Links



 






 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] Re: NuSoap / Flex error

2005-04-19 Thread Erik Westra

The problem is fixed and for the acrchives:

The sollution is to add the domain to the unnamed whitelist of
web-service-proxy in flex-config.xml.


Greetz Erik
 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of core_elements
Sent: dinsdag 19 april 2005 9:43
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: NuSoap / Flex error



hmm

when I load this MXML, I first get the error

Could not load the WSDL



 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] SharedObject across Applications

2005-04-14 Thread Erik Westra





It is also possible to share SharedObjects between 
applications running on a different domain, check this link for more 
information:

http://www.thoughtsabout.net/blog/archives/03.html


Greetz Erik


From: peter blazejewicz 
[mailto:[EMAIL PROTECTED] Sent: donderdag 14 april 2005 
0:51To: flexcoders@yahoogroups.comSubject: Re: 
[flexcoders] SharedObject across Applications
Hello everyone,I'm not sure if that will work with Flex 
application but to avoid such collision names in standalone desktop application 
I've used names following package pattern:eg:var soName:String = "com.company.cookieName";
var so:SharedObject = SharedObject.getLocal(soName, "/");there 
is a subset of characters which are not allowed in SO name but dots are 
allowed:)hth,regards,PeterPeter 
BlazejewiczJesterXL wrote: 
As long as your apps are both deployed on 
  "cow.com", then just add a "/" to the 2nd parameter of your get, and it'll put 
  the .sol at the top level of the domain. Currently, it's scoped to a 
  folder name same as your app path. The 2nd parameter creates it's own 
  folderpath/namespace. Maknig a "/" puts it at the top. 
  
  however, watch for out collisions of data 
  since your both sharing. You don't have to worry about file handles or 
  anything, but you know why checkin/checkout systems were invented in the first 
  place...







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] MXMXL Editor

2005-04-14 Thread Erik Westra

A question about primascript. 

I have all my classes in a central location. In Flash MX 2004 I set a
classpath. How can I set a classPath with primalscript?


Greetz Erik
 

-Original Message-
From: Rich Tretola [mailto:[EMAIL PROTECTED] 
Sent: donderdag 14 april 2005 14:24
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] MXMXL Editor


Primalscript, love it.

Rich



 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] MXMXL Editor

2005-04-14 Thread Erik Westra

Well I want to be able to use 'primalsence' (codehinting) that
primalscript offers on the classes I use on different projects.

Greetz Erik
 

-Original Message-
From: Abdul Qabiz [mailto:[EMAIL PROTECTED] 
Sent: donderdag 14 april 2005 15:02
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] MXMXL Editor


Why would you want to set classpath in PrimalScript? Are you compiling
code from Primal script using JSFL? In that case, your classpath needs
to be set for individual .fla file or globally in your Flash IDE.

-abdul 

-Original Message-
From: Erik Westra [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 14, 2005 6:17 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] MXMXL Editor


A question about primascript. 

I have all my classes in a central location. In Flash MX 2004 I set a
classpath. How can I set a classPath with primalscript?


Greetz Erik
 

-Original Message-
From: Rich Tretola [mailto:[EMAIL PROTECTED] 
Sent: donderdag 14 april 2005 14:24
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] MXMXL Editor


Primalscript, love it.

Rich



 
Yahoo! Groups Links



 





 
Yahoo! Groups Links



 






 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] ActionScript Components

2005-04-07 Thread Erik Westra
Title: Message





A good reason to make pure actionscript components is that 
they can be subclassed. 

When u create an mxml component, u cant extends a custom 
mxml component wich has children.

Greetz Erik


From: Gordon Smith 
[mailto:[EMAIL PROTECTED] Sent: donderdag 7 april 2005 
9:04To: 'flexcoders@yahoogroups.com'Subject: RE: 
[flexcoders] ActionScript Components

It is 
essentially a matter of preference. There are no performance differences that I 
know of.

I 
generally recommend creatingcomponents in MXML because it makes several 
things easier, such as creating internal subcomponents, laying them out, and 
assigning event handlers to them.For example, if I was creating a 
LoginPanel, I would certainly do it in MXML.

Can 
you explain what is "a bit messy" about MXML components?

- 
Gordon

  







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] Associative Arrays / Hashes

2005-04-07 Thread Erik Westra


So if I understand it correctly u have a series of events. If u would
convert this xml to and object u would have something like this:

event[0].month = 04;
event[0].day = 14;
event[0].short = heckey;
event[0].description = bla;


Now u want to get access to all events on a certain day in a certain
month like this

myObject[04][14][0].short = hockey;
myObject[04][14][0].description = bla;


In order to be able to do that u need to convert your initial data, u
can do that like this:

/*
input:

events_array
[0]
month
day
short
description
[1]
...

output:

object
[month_str]
[day_str]
[0]
short
description
[1]
...
[day_str]
...
[month_str] 
...


*/
public function convertData(events_array:Array):Object
{
var obj:Object = new Object();
var length_num:Number = events_array.length;
while (length_num--)
{
var currentEvent_obj:Object = events_array[length_num];
var month_str:String = currentEvent_obj.month;
var day_str:String = currentEvent_obj.day;

var month_obj:Object = obj[month_str];
if (!month_obj)
{
month_obj = myObject_obj[month_str] =
new Object();
};

var day_array:Array = month_obj[day_str];
if (!day_array)
{
day_array = month_obj[day_str] = new Array();
};

day_array.push({short: currentEvent_obj.short, 
description:
currentEvent_obj.description});
};
return obj;
};


Greetz Erik

-Original Message-
From: heybluez [mailto:[EMAIL PROTECTED] 
Sent: donderdag 7 april 2005 14:52
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Associative Arrays / Hashes



I am trying to see if I can get an array to be more like a hash...

what i mean is say I have the following:

node
events
  month04/month
  day14/day
  shorthockey/short
  descriptionblah/description
/events
events
  month04/month
  day14/day
  shortreading/short
  descriptionblah/description
/events
events
  month04/month
  day14/day
  shortbaseball/short
  descriptionblah/description
/events
node

I want to loop through that and produce something like this...

myObject[month][day]=Array(of Objects for that day);

so I could just do a myObject[month][day] and get back an array of
objects of those events.

First, does this make sense and two how would I do this in AS?

Thanks,
Michael





 
Yahoo! Groups Links



 






 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] ActionScript Components

2005-04-07 Thread Erik Westra
Title: Message





Well, flex is whining about subclassing mxml components 
wich have children with other mxml components containing 
children:

The component 
mx.controls.Button may not be used as a child of erik.extend.panel because the 
erik.extend.panel is a container with internal children.
[panel.mxml]
mx:Panel xmlns:mx="http://www.macromedia.com/2003/mxml"mx:Button 
label="crazy" //mx:Panel

[panelSub.mxml]
panel xmlns:mx="http://www.macromedia.com/2003/mxml" 
xmlns="erik.extend.*"mx:Button label="yellow" 
//panel

Greetz 
Erik




From: JesterXL [mailto:[EMAIL PROTECTED] 
Sent: donderdag 7 april 2005 16:48To: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] ActionScript 
Components

Can you be more specific? I don't have any 
problems sub-classes my MXML components.

- Original Message - 
From: Erik Westra 

To: flexcoders@yahoogroups.com 
Sent: Thursday, April 07, 2005 5:42 AM
Subject: RE: [flexcoders] ActionScript Components

A good reason to make pure actionscript components is that 
they can be subclassed. 

When u create an mxml component, u cant extends a custom 
mxml component wich has children.

Greetz Erik


From: Gordon Smith 
[mailto:[EMAIL PROTECTED] Sent: donderdag 7 april 2005 
9:04To: 'flexcoders@yahoogroups.com'Subject: 
RE: [flexcoders] ActionScript Components

It is 
essentially a matter of preference. There are no performance differences that I 
know of.

I 
generally recommend creatingcomponents in MXML because it makes several 
things easier, such as creating internal subcomponents, laying them out, and 
assigning event handlers to them.For example, if I was creating a 
LoginPanel, I would certainly do it in MXML.

Can 
you explain what is "a bit messy" about MXML components?

- 
Gordon

  







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] ActionScript Components

2005-04-07 Thread Erik Westra
Title: Message





Nope, same error. Im sure its a namespace problem. And yes, 
u can use "" (nothing) as a namespace. Usually i use the whole package path as 
namespace:

com.package:panel 
xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns:com.package="com.package.*"/com.package:panel


Greetz Erik


From: JesterXL [mailto:[EMAIL PROTECTED] 
Sent: donderdag 7 april 2005 17:16To: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] ActionScript 
Components

That doesn't look like the correct way to do a 
namespace; I'm still learning the freedom of syntax, so bare with me. It 
appears your colliding your namespace with the mx one. Instead, make your 
own; where you have xmlns="erik.extend" I changed it to 
xmlns:ew="erik.extend".

Try that.


ew:panel xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns:ew="erik.extend.*"mx:Button 
label="yellow" //ew:panel


- Original Message - 
From: Erik Westra 

To: flexcoders@yahoogroups.com 
Sent: Thursday, April 07, 2005 11:03 AM
Subject: RE: [flexcoders] ActionScript Components

Well, flex is whining about subclassing mxml components 
wich have children with other mxml components containing 
children:

The component 
mx.controls.Button may not be used as a child of erik.extend.panel because the 
erik.extend.panel is a container with internal children.
[panel.mxml]
mx:Panel xmlns:mx="http://www.macromedia.com/2003/mxml"mx:Button 
label="crazy" //mx:Panel

[panelSub.mxml]
panel xmlns:mx="http://www.macromedia.com/2003/mxml" 
xmlns="erik.extend.*"mx:Button label="yellow" 
//panel

Greetz 
Erik




From: JesterXL [mailto:[EMAIL PROTECTED] 
Sent: donderdag 7 april 2005 16:48To: 
flexcoders@yahoogroups.comSubject: Re: [flexcoders] ActionScript 
Components

Can you be more specific? I don't have any 
problems sub-classes my MXML components.

- Original Message - 
From: Erik Westra 

To: flexcoders@yahoogroups.com 
Sent: Thursday, April 07, 2005 5:42 AM
Subject: RE: [flexcoders] ActionScript Components

A good reason to make pure actionscript components is that 
they can be subclassed. 

When u create an mxml component, u cant extends a custom 
mxml component wich has children.

Greetz Erik


From: Gordon Smith 
[mailto:[EMAIL PROTECTED] Sent: donderdag 7 april 2005 
9:04To: 'flexcoders@yahoogroups.com'Subject: 
RE: [flexcoders] ActionScript Components

It is 
essentially a matter of preference. There are no performance differences that I 
know of.

I 
generally recommend creatingcomponents in MXML because it makes several 
things easier, such as creating internal subcomponents, laying them out, and 
assigning event handlers to them.For example, if I was creating a 
LoginPanel, I would certainly do it in MXML.

Can 
you explain what is "a bit messy" about MXML components?

- 
Gordon

  







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] Re: createChild dynamically via DB arguments..

2005-04-06 Thread Erik Westra

Agreed,

We use a similair system to create instances from strings at runtime. In
our main class we have this line of code:

Components;

The class components look like this:

class Components
{
public function Components()
{
package.Component1;
package.Component2;
};
};

This way, we are able to instantiate the classes inside Components.as at
runtime via a string. Eventually Components.as will be generated by
ColdFusion before the Flex application is loaded.


Greetz Erik


-Original Message-
From: Dirk Eismann [mailto:[EMAIL PROTECTED] 
Sent: woensdag 6 april 2005 11:04
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: createChild dynamically via DB arguments..


Hi Abdul,

 I think, mx.utils.ClassUtil.findClass() would only work when class 
 definition is present in app...

yeah, that's right. I think Scott's code snippet implies that he has the
classes compiled into the SWF file - otherwise it wouldn't work for him
:)

  say you have a situation like this
  
  var x = com[str1][str2][str3];
  
  container.createChild(x);
  
  that works ok.

Dirk.


 
Yahoo! Groups Links



 






 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] Re: createChild dynamically via DB arguments..

2005-04-06 Thread Erik Westra

The framework we now use in flex was different than the one we used with
Flash on one crucial point. With the Flash version every class (or
actually module, a set of classes) was loaded in at runtime and had its
own swf, wich contained only one line of code:

package.ClassName;

When u needed a class, the swf was loaded in and as soon as it finished
loading the class would be available.

The problem with flex is that u also use mxml classes, wich is something
the Flash Compiler cannot compile. U might want to investigate this
approach using the flex compiler and create swf's of all classes. It
wouldn't be to hard to write a piece of software that loops recursively
through a given directory compiling classes. A problem here might be
classes referencing another class, resulting in an swf with more than
just one class.

Hope this helps your thinking..

Greetz Erik


-Original Message-
From: Dirk Eismann [mailto:[EMAIL PROTECTED] 
Sent: woensdag 6 april 2005 12:06
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: createChild dynamically via DB arguments..


sorry, should read

in general: the compiler includes a class into the resulting SWF if
there's at least *one* reference to it.

instead of

 in general: the compiler includes all classes into the resulting SWF 
 if there's at least *one* reference to it.
 There's no class loader as in Java.

Dirk.



 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] Re: createChild dynamically via DB arguments..

2005-04-06 Thread Erik Westra

Im sure we can lay out allot of possibilities, but that's not what u
want.

There are two possible reasons for the fact that u would like to
instantiate a class runtime (via createChild):

1. U want your main application to be as light as possible.
2. U don't know (at compile time) which class will represent the child.


My guess is that number 2 is the one u are after. To achieve that goal
take the following steps.


A.
Place the following code inside your initialize function in your main
application:

Components;

B.
Create (in the same dir as the main application) a 'Components.as' file,
this file contains the following code:

class Components
{
public function Components()
{
//put all possible children inhere
com.myProject.MyClass;
};
};


The above two steps make sure the possible childs are included in the
flex application (they are compiled in the resulting swf).


C.
Create a function in your application that looks like this:

public function getClassRef(classPath_str:String):Object
{
var classRef_obj:Object = _global;
var class_array:Array = classPath_str.split(.);

for (var i = 0; i  class_array.length; i++)
{
classRef_obj = classRef_obj[class_array[i]];
};

return classRef_obj;
};

D.
In the initialize function u can create a child like this:

baseContainer.createChild(getClassRef(com.myProject.MyClass));


I hope this helps :)

Greetz Erik



-Original Message-
From: Scott Barnes [mailto:[EMAIL PROTECTED] 
Sent: woensdag 6 april 2005 13:55
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: createChild dynamically via DB arguments..


Heres a test for yas:

Inside a new FLEX app directory (ie start fresh), create a dir, then
inside that dir, create another and another (go as deep as ya want),
then finally create a mxml file.

Then create an simple class file, and instantiate it via initialize() on
mx.Application, then inside this class, do the same as you did (make as
many nested ones as you want if need be) then at some point, simply do
this

mx.core.Application.application.baseContainer.createChild(blah[arg1][arg
2]
etc..)

Then explain if you can / want to, how the hell that works. As I must be
dumber then originally thought as i can't seem to connect the dots on
how the hell that works? hell i'm struggling to even explain it
(also i put another sequence of the above inside the
unknown-loaded-at-runtime-class and they came up aswell heh).

imho its as if at compile time, the entire app is packaged together, and
seperated into whats FLASH code and whats other, if other do i embed it
inside the swf and all that... i''ll pop the hood a later day (if i can
figure it out) but *shrug* my level of FLEX expertises ends here hehehe.

_level0[com] or _global[com] etc  won't work. As well as
findClass();

On a side note/question. I am also unsure if (hell i have no idea to
test) whether or not if you have assets embedded inside the mxml files
in question (even declared as RSL) will they request a new asset per
instantiation...

Any input / help is most welcomed heh.





 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] Image caching

2005-03-25 Thread Erik Westra

Well, my guess is that this has nothing to do with cache, but the fact
that the flex components delete and create the movieclips again and then
load the image. If it is cached or not, it takes some time before the
image can appear. I don't know exactly how these components are
constructed or if there are settings for this 'paging' feature...

Greetz Erik 

-Original Message-
From: pioplacz [mailto:[EMAIL PROTECTED] 
Sent: vrijdag 25 maart 2005 11:55
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Image caching



Have a question i made a movie library based on the exampel flex
store... and i have aroun 150 images loading everytime i want to found a
movie... is it possible to make the images stor in cache to make a
faster browsing. it loads fast cause it's local but i can only feat
aroun 20 images in a box and have to scroll to see the rest and the it
have to loads images... and there a no images in about 2 seconds. that's
why i want to make them cache is it possible?




 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] Silly question

2005-03-25 Thread Erik Westra

This subject has been discussed many times (either here or on
FlashCoders).

The main problem lies in the fact that the class must be compiled into
the swf. There are several ways to do this. One is to have a swf for
each class with only one line of code on the root, to make sure the
class is compiled:

myPackage.myClass;

Then u can load the swf into your main movie and have the class
instantiated.

Another option is to have a list with possible classes in a class file:

class Components
{
public function Components()
{
myPackage.MyClass;
myPackage.MyOtherClass;
};
};


To call the class dynamicly u can use code like this:

function getInstance(class_str:String):Object
{

var classRef:Object = _global;
var classPath_array:Array = class_str.split(.);

for (var i = 0; i  classPath_array.length; i++)
{
classRef = classRef[classPath_array];
};

return new classRef();
};

var instance = getInstance(myPackage.MyClass);


Greetz Erik



-Original Message-
From: Robert Stuttaford [mailto:[EMAIL PROTECTED] 
Sent: vrijdag 25 maart 2005 12:53
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Silly question


Probably not specifically Flex related.

Can I do what the following is accomplishing, using Actionscript 2, with
out statically mapping it out?

switch ( className ) {
// base
case ClassA:
return new ClassA();
break;
case ClassB:
return new ClassB();
break;
}

I'd love to be able to

var x = new [ className ]();

But obviously the compiler doesn't like that. 

I'm looking to have classes instantiated based on nodenames from XML,
but without the convertor actually having any knowledge of what classes
need to be instantiated.

Any ideas? :)

Robert



 
Yahoo! Groups Links



 





 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] Re: internal representation of an array

2005-03-24 Thread Erik Westra

1. for..in loops walk through the object or array with a stack based
order, so u can never know for sure if it's the exact reverse order
unless u added the elements to the array yourself one after another and
didn't modify the array.

2. Why would u populate your array like this? If u want only to have
these elements u should create an object with those keys. U will lose
the array functionality, but I doubt those functions are usefull with an
array like this.


Greetz Erik

-Original Message-
From: Eric Raymond [mailto:[EMAIL PROTECTED] 
Sent: donderdag 24 maart 2005 1:59
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: internal representation of an array



--- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote:
 The Flash player implements both Array and Object as hashtables. In

Two somewhat related questions:

1) How does the implementation work with for in loops?  Is there any
natural order in which the propery names are returned?  Does this vary
from an Array to an Object?

2) Is there an efficient way to walk a sparsely populated array in
order?  That is if a[2], a[100] and a[2000] are the only elements of an
array, is there a way to visit the three nodes in order without testing
all the empty elements between the sparse nodes.

for (var i:Number=2; i  a.length; i++) {
  if (a[i] != undefined) ...
}

If the array elements were created in order of the increasing index,
would that help?  That is, walking the sparse elements in creation order
would suffice in this case.




 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] Flex book chapter 20

2005-03-24 Thread Erik Westra

 var sviluppo:CTabellaSviluppoVO = (CTabellaSviluppoVO) result;

In this line u mixed java syntax with AS2. To cast a variable to a
certain type format your code like this:

var sviluppo:CTabellaSviluppoVO = CTabellaSviluppoVO(result);


This works with all custom types and with most build in Flash type.
There are however some build in classes that have an other effect:

var sviluppo:Array = Array(result);

The above line of code will return an array with one element wich
contains result while u would think that it would just cast result to
the array type. This is because in older versions of Flash the global
function Array was used to create an array.

Greetz Erik


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: donderdag 24 maart 2005 11:32
To: Flex Coders
Subject: [flexcoders] Flex book chapter 20


Hi, i'm trying to use the examples in chapter 20 of flex book, all work
fine, but in my delegate class  i have put this


public function onResult( result ) : Void
{
  var sviluppo:CTabellaSviluppoVO = (CTabellaSviluppoVO)
result;
mx.core.Application.application.vosviluppo = sviluppo;
 
}


i have also debug and flex pass this function ok.

but if i use in my mxml file this

   import vo.as400.*;
   import com.pdm.control.*;
   public var controller:PdmController;
   public var vosviluppo:CTabellaSviluppoVO;
  
  function Test(){
controller=new PdmController();
 
EventBroadcaster.getInstance().broadcastEvent(fetchSviluppo,vopf[0]);
   }

mx:Button id=d click=Test()/
mx:DataGrid id=dg dataProvider={vosviluppo}/

the dataGrid don't display nothing but in the 
mx.core.Application.application.vosviluppo there are datas.

Can you help me please.
Devis




 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] Custom Control Components

2005-03-24 Thread Erik Westra





I feel u there, 

I myself want to create components that are fully 
functional, skinnable and fit right into the V2 architecture. I havent been able 
to put my head around it yet. I think i found the the same PDF u are talking 
about (Developing Flex Components and Themes in Flash Authoring) wich i hope 
gives enough detail.

A problem in this matter is that the flow of components 
(UIObject and UIComponent with their helper classes) is very complex and not 
easy to understand. And besides that, i couldnt find a document that describes 
the flow very good (it may be in the PDF though).

I understand that this is a complex problem for macromedia 
as well, as they are familiar with this architecture. Maybe we could provide 
them with a list of questions regarding the building of components. Questions 
like:

- How can i makea custom component 
skinnable?
-- And how does the skinning of components work 
internally?
- Say i want to build a 'wizard' (next, previous) 
component, how would u do it?
- I want to make a component with buttons from wich the 
states are dynamicly loaded images combined with a label. The placement of the 
label is dependend of the available size of the component. In wich 'hook' would 
i place the check function. And how would i build a button component with 
different states?

As u can see these are more practical based questions of 
problems i ran into. Im guessing that more of us developers are having these 
kind of questions.


Greetz Erik



From: Simon Fifield 
[mailto:[EMAIL PROTECTED] Sent: donderdag 24 maart 2005 
14:59To: [EMAIL PROTECTED] ComSubject: [flexcoders] 
Custom Control Components

Is it just me, or 
are custom control (actionscript) components really really difficult to get your 
head around?

I am struggling with 
just about every aspect of creating custom controls, from deciding what to 
extend, through sizing/layout,right down to event 
handling.

I have created some 
custom controls but they have never turned out to be what I really 
wanted.

There is a real lack 
of documentation about this subject. I've read the Flex Components PDF, 
andI've read the relevant parts of Developing Flex Apps, but none of these 
really covers creating components in actionscript from scratch through to more 
advanced components at reasonable steps. Some of the more basic examples that 
are given require you to draw a circle in Flash first - I don't want to (and I 
know I shouldn't) have to use Flash to create a basic custom 
component.

I would like a more 
in-depth discussion of what the various sizes are - _measuredXXX, preferredXXX, 
defaultXXXproperties etc
A clearer 
explanation of the instantiation and display order/process.
Perhaps a breakdown 
of some existing components that have both been built from scratch and has 
extended other components.

Anyoneelsefindingthistopichard going like 
me?


Kind Regards,

Simon Fifield







Yahoo! Groups Sponsor


  ADVERTISEMENT 












Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










[flexcoders] Hooks in custom components

2005-03-23 Thread Erik Westra

Does any1 have a list of wich hooks i can use in custom component and
when they are called?

With hooks i mean functions like init and createChildren.


Greez Erik


 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] Hooks in custom components

2005-03-23 Thread Erik Westra

Thnx, that list is perfect :)

Greetz Erik
 

-Original Message-
From: Dirk Eismann [mailto:[EMAIL PROTECTED] 
Sent: woensdag 23 maart 2005 11:41
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Hooks in custom components


Try this PDF 

http://download.macromedia.com/pub/documentation/en/flex/15/flex_compone
nts_themes.pdf

it's titled Developing Flex Components and Themes in Flash Authoring
but it also gives a good overview about the instantiation process etc.

According to the PDF the following methods are invoked during
instantiation:

Class constructor
constructObject2()
init()
createChildren()
measure()
layoutChildren()
draw()

Dirk.

 -Original Message-
 From: Erik Westra [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 23, 2005 11:30 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Hooks in custom components
 
 
 
 Does any1 have a list of wich hooks i can use in custom component and 
 when they are called?
 
 With hooks i mean functions like init and createChildren.
 
 
 Greez Erik
 
 
  
 Yahoo! Groups Links
 
 
 
  
 
 
 
 


 
Yahoo! Groups Links



 





 
Yahoo! Groups Links

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

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

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





[flexcoders] ScrollPane

2005-03-23 Thread Erik Westra

I noticed that there is no ScrollPane component in flex.

What can i use as alternative?


Greetz Erik


 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] ScrollPane

2005-03-23 Thread Erik Westra

Yeah, I just found that out... I feel stupid, hehe...

Thnx though.

Greetz Erik 

-Original Message-
From: Dirk Eismann [mailto:[EMAIL PROTECTED] 
Sent: woensdag 23 maart 2005 12:50
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] ScrollPane


No need for a ScrollPane as all components that subclass mx.core.View
support scrolling (e.g. VBox)

Dirk.



 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] internal representation of an array

2005-03-22 Thread Erik Westra


Yeah that was likely to cause the problem.

U could create a static class to hold the array. And then reference the
array in your separate classes that way they are all working with the
same array.


Greetz Erik

 

-Original Message-
From: Krzysztof Szlapinski [mailto:[EMAIL PROTECTED] 
Sent: dinsdag 22 maart 2005 0:59
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] internal representation of an array


the problem with memory was my programming mistake I included this array
in every external component in my application (I have around 50
components) by mistake so I assume that with creation of every component
the same array was created but in different memory space am I right?

btw
is there something like include_once from PHP in Action Script?
I wonder if including the same piece od code (function) twice makes the
final application with doubled code?

krzysiek



 How much ram would be recommended?

 -- Matthew


 On Mon, 21 Mar 2005 14:54:37 -0800, Gordon Smith 
 [EMAIL PROTECTED]
 wrote:
  That's a tiny amount of RAM for a Flex server.

  - Gordon


 
Yahoo! Groups Links

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

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

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





[flexcoders] Create ViewStack children via Actionscript

2005-03-18 Thread Erik Westra

Does any1 know how i do that?


Greetz Erik


 
Yahoo! Groups Links

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

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

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





RE: [flexcoders] BIRTHDAY: THE FATHER OF DATA BINDING

2005-03-18 Thread Erik Westra



Gratz :)



RE: [flexcoders] more on popup

2005-03-18 Thread Erik Westra
U can find more information about the LocalConnection object in the
Flash MX 2004 livedocs on the macromedia website :)

Greetz Erik
 

-Original Message-
From: Doodi, Hari - BLS CTR [mailto:[EMAIL PROTECTED] 
Sent: vrijdag 18 maart 2005 15:20
To: 'flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] more on popup


Hi Abdul,
Thank you very much for your consideration. The example you send
me was a great example. Where can I find documentation about
LocalConnection object? Also if you don't mind can you send me a code
about following.

In the example you send , mainapp is invoking popupapp and popupapp
setting a value in mainapp. What I want to do is - mainapp should pass
an argument(image file name) to popupapp so that popupapp opens with
passed image. When ever user selects another reportcode (either from
comboBox or textinput or selecting a row from datagrid) then that value
should be passed to popupapp and refresh the popupapp with the
corresponding image file passed as an argument. Popupapp should have a
loder to load image or a direct image controller ? Which container has
drag enabled attribute??

Thanks!
Hari





RE: [flexcoders] Re: Flow Control in Flex

2005-03-18 Thread Erik Westra
U mean something like this?

Greetz Erik


-Original Message-
From: Steven Webster [mailto:[EMAIL PROTECTED] 
Sent: vrijdag 18 maart 2005 16:14
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Flow Control in Flex


What can't you achieve with a viewstack and buttons ?

Steven 


zipXAdOXQU0eX.zip
Description: wizard.zip


Dynamicly calling a webservice

2005-03-16 Thread Erik Westra
I know u can call a webservice like this:

mx:WebService id=ws wsdl=http://api.google.com.GoogleSearch.wsdl;
mx:operation name=doGoogleSearch
mx:request
key1/key1
key2/key2
/mx:request
/mx:operation
/mx:WebService


But i cant find anything on calling an operation from a webservice
dynamicly. I want to have class that registers itself with our framework
and then makes the call when it recieves an event. This way we are able
to debug shizzle.

But how do i create the request object via actionscript?
Or is there a way to instantiate the webservice class via actionscript?


Greetz Erik




RE: [flexcoders] call popup with string

2005-03-09 Thread Erik Westra
To instantiate classes via a string I do the folowing:

I have a class Popups.as:

class Popups
{
public function Popups()
{
package.className1;
package.className2;
package.className3;
};
};

The above class makes sure the classes are included in the swf.

Then when I need to access it I can do things like:

var classString = package.className3;

var classRef = _global;
var class_array = classString.split(.);
for (var i = 0; i  class_array.length; i++)
{
classRef = classRef[class_array[i]];
};

Then u can use classRef to do whatever u want.

Greetz Erik


-Original Message-
From: Manish Jethani [mailto:[EMAIL PROTECTED] 
Sent: woensdag 9 maart 2005 13:05
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] call popup with string


On Wed, 9 Mar 2005 08:29:44 -0300, Fernando Lobos
[EMAIL PROTECTED] wrote:

 yes, i know but , who can instantiate a class via string from
variable?

Actually that's what UIObject does internally. It does attachMovie() on
the class's symbolName. So, yes, it's possible to create an object from
a string identifying the class. Using the class reference seems to be
the preferred way in Flex.

If all you have is strings, you can create a mapping from the strings to
their corresponding class references and look up the mapping every time
you need a reference. Maybe there's a better Flash Way (TM) that I'm
not aware of (some sibling of Object.registerClass() ).

Manish


 
Yahoo! Groups Links



 







RE: [flexcoders] How do you convert a string to a number

2005-03-09 Thread Erik Westra



U could do thefolowing 
things:

var str = 
"10";
var num = 
Number(str);

or

var str = 
"10";
var num = 
parseInt(str);
//wich also works like 
this
var str = 
"10abc";
var num = parseInt(str); 
//10


Greetz Erik



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: woensdag 9 maart 2005 15:58To: 
flexcoders@yahoogroups.comSubject: [flexcoders] How do you convert a 
string to a number
I am just curious because I am trying to do this in Flex 



RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML

2005-03-03 Thread Erik Westra
Personaly I don't like putting code into mxml's too, for me they are
just the visual part of the application. I also don't like the idea of
having a class somewhere far away from my form wich is called on a (for
example) submit button event and then accesses the formfields to check
their values.

What I do is naming the mxml (class) file like this:
classNameVisual.mxml and subclass that file with an .as file called
className.as. This way I can instantiate the form as className and have
a local reference to the formfields inside my .as file. There I do
actions that apply to the form only and use events to communicate with
the rest of the application.

This approach results in two files vor each view (form, mxml, whaever).
The only consern of the .as file is the mxml file. And they are easy to
find.

Greetz Erik


-Original Message-
From: Aral Balkan [mailto:[EMAIL PROTECTED] 
Sent: donderdag 3 maart 2005 11:10
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML


Hi Steven,

 I'd also like to pick up the idea of
 no code in MXML as a best theory rather than a best practice.

Since we have been able to successfully apply this to Flex applications,
I would have to disagree with this assessment.

 when we were building RIA with
 Flash, that it was essential not to scatter ActionScript code around 
 the actual Flash movie itself. So ... we would advocate that code was

 not scattered around the timeline, that there was a single layer in 
 the timeline, with a single frame, where a single file includes.as 
 was included in the application,

This is definitely one, valid way of doing things -- however the
#include method of loading code into Flash projects is the old-school
way we were forced to use in the days of AS1. With AS2 and the ability
to link classes to movie clips, this method is no longer necessary. It
makes sense to keep all code in external classes and link them to your
movie clips (forms) when necessary. The code Application form, then,
becomes a natural entry point into your application. Natural in the
Flash-way of doing things.

Does this method of working translate to Flex? Of course -- Flex *is*
Flash :) The most striking difference between Flash and Flex (apart form
Flex actually having *useful* components that work) is the way you
layout your forms: Using MXML instead of an FLA. The fact that Flex is a
server product is irrelevant (and completely unnecessary -- it *should*
ideally be a client-side tool that outputs SWFs.) In Flex, instead of
linking your form classes to an ArpForm or an mx.screens.Form, you link
them to mx.containers.Form or mx.core.Application. Migrating an
application from Flash to Flex thus becomes simply modifying your forms
to handle any component API differences between Flash and Flex and
reconstructing your form layouts using MXML (the reverse is also true
for migrating a Flex application to Flash.)

Any code you have in your FLAs or MXMLs just makes you less flexible and
for what? A potential few seconds saved when you are initially writing
the code. It has been my experience that actually writing code takes the
least amount of time in a project -- debugging, maintaining and scaling
an application all take far more time and that's what we must try to
reduce.  
It all comes down to one thing: I like simplicity. The less rules there
are the less I have to think. If I know that there's no code in my MXML
or FLAs, I don't waste one second of my time searching through them. I
know where everything is the moment I look at a new ARP project, even if
I've never seen that particular project before. For me, this is more
important than saving a few seconds during initial development by adding
code to my FLA or MXMLs.

 Inevitably, some code might find it's way into a component in the 
 Flash Symbol library; but if this ever were the case, then it would be

 code that BELONGED on that component, and was typically responsible in

 some way for the view logic associated with that component - so some 
 degree of encapsulation was achieved. But code in the FLA rather than 
 in external ActionScript 2.0 was a bad code smell.

This was inevitable with the V1 components but not so with the V2
architecture.

 Let's now move to Flex.
 Let me first state the obvious; I would not advocate placing business 
 logic (or lots of it) within mx:Script blocks in Flex, if it can be 
 extracted into an external ActionScript 2.0 class. I would *never* 
 use the Include functionality in Flex to pull in blocks of script, and

 where possible, I would always encourage that external classes, 
 imports, and object creation is used.

Agreed.

 Maintainability and Scalability
 If we have AS2.0 code in our MXML, does it make our code harder to 
 maintain ? Not necessarily -- if the code is directly related to that

 MXML file, it may be the case that encapsulation would encourage the 
 code to belong as a method on the MXML file.

This is the main point 

RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML

2005-03-03 Thread Erik Westra



What i do is extending the mxmlclass with an AS 
class. Then instead of using the mxml i use the AS subclass. If the class is 
empty, things just work like they did before. But inside the AS class u have the 
usual callBacks (createChildren, init, etc) and a 
constructor.

Via code u can add listeners to the UI components and 
manage everything from within the AS class.

Greetz Erik




From: Robert Brueckmann 
[mailto:[EMAIL PROTECTED] Sent: donderdag 3 maart 
2005 15:14To: flexcoders@yahoogroups.comSubject: RE: 
[flexcoders] Theory and Practice: Mixing AS2.0 in MXML



Can I ask how you 
manage an MXML without any ActionScript at all? How in a file that has 
components with click or change listeners would you not have any supporting 
ActionScript codeI mean just about every single one of my MXML fileshas 
initialize or creationComplete listeners in the parent container tag with dozens 
of other components that are dependent on dataproviders changing and user 
interactions like clicking or dragging and dropping and I cant beginto imagine 
how I could extract every bit of ActionScript from my MXML files into individual 
ActionScript classesmaybe Im not grasping the Cairgorm designarchitecture 
fullyI thought I had a pretty good grasp on it but to hear that youre writing 
MXML files with no ActionScript in them whatsoever kind of baffles mecan you 
give me an example?

Thanks for bearing with 
me! ;)


RE: [flexcoders] Theory and Practice: Mixing AS2.0 in MXML

2005-03-03 Thread Erik Westra



That was my initial approach too, but eventualy it was 
easier to track bugs and 'mis-references' since i extended the component i was 
accessing. Now i get an error when i try to reference a textfield that isnt 
there. Another thing that is a pro for this kind of approach, is that the mxml 
file doesnt have to know wich method to call in the helper 
class.

Greetz Erik



From: Dimitrios Gianninas 
[mailto:[EMAIL PROTECTED] Sent: donderdag3 
maart 2005 16:22To: flexcoders@yahoogroups.comSubject: RE: 
[flexcoders] Theory and Practice: Mixing AS2.0 in MXML

I tend to put such code in the 
corresponding ViewHelper class, so every view (MXML file) has a corresponding 
ViewHelper class. See sample below:

Inboxes.mxml
mx:Box
 ...
 vw:InboxesViewHelper id="inboxesHelper" 
view="{this}"/
 ...

 mx:List id="inboxList" width="165" height="100%" 
labelField="name" 
vScrollPolicy="auto" 
change="inboxesHelper.doLoadInbox(inboxList.selectedItem.id)" 
/

 ...
/mx:Box

Jimmy 
Gianninas
Software Developer - 
Optimal Payments 
Inc.



RE: [flexcoders] fscommand and flex

2005-03-03 Thread Erik Westra
Why don't u try to use getURL?

U can use it like this: 
getURL(javascript:functionName('arg1', 'arg2'));

Internally fscommand is converted to something like:

getURL(fscommand:functionName...), I don't know exactly, but there was
a thread about it on flexcoders a month or so ago.

Greetz Erik


-Original Message-
From: jeff tapper [mailto:[EMAIL PROTECTED] 
Sent: donderdag 3 maart 2005 16:21
To: flexcoders@yahoogroups.com
Subject: [flexcoders] fscommand and flex



Hey folks, im trying to call fscommand from flex, but without much luck,
i was wondering if anyone can help me.


Heres a simple POC of what im trying:

Test.jsp
%@ taglib uri=FlexTagLib prefix=mm %
html
head
script language=javascript
function myMovie_doFSCommand(arg1,arg2){
alert(fscommand called);
alert(arg1 + arg1);
alert(arg2 + arg2);
}
/script
/head
body
mm:mxml source=TestApp.mxml id=myMovie name=myMovie/
/body
/html

TestApp.mxml

mx:Application width=200 height=200 
xmlns:mx=http://www.macromedia.com/2003/mxml;
mx:Button label=MXML Button click=doClick()/
mx:Script
function doClick(){
fscommand(arg1,arg2);
}
/mx:Script
/mx:Applicaiton

Needless to say, the javascript alerts are never showing. i suspect 
im missing something basic, but even back in my heydays of flash, i 
rarely if ever used fscommand.

can someone point me in the right direction?

thanks.

jeff






 
Yahoo! Groups Links



 







RE: [flexcoders] Question about making an array of buttons

2005-03-01 Thread Erik Westra
This works:


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; 

mx:Script
var letterids=[A,B,C,D,E,F,G,H];
/mx:Script

mx:Array id=eachoftheids
mx:Object label=L1 /
mx:Object label=L2 /
mx:Object label=L3 /
mx:Object label=L4 /
mx:Object label=L5 /
mx:Object label=L6 /
mx:Object label=L7 /
mx:Object label=L8 /
/mx:Array

mx:HBox
mx:Repeater id=list dataProvider={eachoftheids}mx:Button
label={list.currentItem.label} //mx:Repeater
 
/mx:HBox

/mx:Application


Greetz Erik 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: dinsdag 1 maart 2005 17:22
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Question about making an array of buttons


I am trying to make an array of buttons that has an array of strings on
it and I was wondering why this code does not work?
   



?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; 

mx:Script

   
  
var letterids=[A,B,C,D,E,F,G,H];
  

/mx:Script
mx:Array id=eachoftheids
mx:Object label=L1 /
mx:Object label=L2 /
mx:Object label=L3 /
mx:Object label=L4 /
mx:Object label=L5 /
mx:Object label=L6 /
mx:Object label=L7 /
mx:Object label=L8 /
/mx:Array

mx:HBox
mx:Repeater
dataProvider={eachoftheids}mx:Button/mx:Button/mx:Repeater
 
/mx:HBox

/mx:Application

all I get when I run the code is 8 empty buttons whereas I want to make
an array of strings appear on the buttons from either the letterids
array or the eachoftheids array. I just want to know if an array of
buttons with an array of strings on each of them is possible?






 
Yahoo! Groups Links



 







RE: [flexcoders] Re: Flex Trial Edition - Setting up JRun as Windows Service?

2005-03-01 Thread Erik Westra
The key in this is to merge both web.xml files.

Say u deployed ColdFusion first. In the cFusion directory there is a
WEB-INF directory. U can open the .war file with winrar or some other
expander and extract its content. Then u need to add all info in the
flex web.xml to the web.xml wich was created by coldFusion. All other
files should just be copied and probably do not overlap.


Greetz Erik



-Original Message-
From: Jeff Chastain [mailto:[EMAIL PROTECTED] 
Sent: dinsdag 1 maart 2005 3:39
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Flex Trial Edition - Setting up JRun as
Windows Service?



I have been messing with this some today and I am having troubles
deploying the flex.war and samples.war on JRun next to ColdFusion. Is
there any documentation on how to do this?

Also, by doing this, how can I call both CFM files and MXML files on the
IIS localhost without having to go to different port numbers?

Thanks
-- Jeff





NetShop phonebuying application

2005-03-01 Thread Erik Westra
Hey list,

Does any1 know if the source is available on this example application?

http://www.macromedia.com/devnet/flex/example_apps/netshop/moreinfo.html

Im particulairy interested in the way they did the
cellsize-depends-on-amount-of-item thing. More information is show as
there are less products on display. How did they do this?


Greetz Erik





RE: [flexcoders] Execute code before any component is put on the stage

2005-02-22 Thread Erik Westra
Title: Message



Hmm, this is an interesting idea.

I still have one small problem though. When i use this 
MXMLObject interface my code will be run before the visual mxml components, 
right? But in the code i need to load an external ini file, wich could takesome 
time. When its loaded, some visual components mich be on the stage. A possible 
solution was to use the mx:String tag. This way the content would be 
included in the swf.

There is however one problem with the mx:String 
tag, it tries to parse the string thats in the source. And with css files, { and 
} are pretty common...

So is there a way to include a string in a flex application 
(compile time) without having it parsed?


Greetz Erik



From: Dirk Eismann 
[mailto:[EMAIL PROTECTED] Sent: vrijdag 18 februari 
2005 16:56To: flexcoders@yahoogroups.comSubject: RE: 
[flexcoders] Execute code before any component is put on the 
stage

Ahh - 
I see :)

If 
your parser is a "code only" classyou do notnecessarily need to 
subclass a Flex class.Take a look at the mx.core.MXMLObject interface. By 
implementing it you can use your class in MXML and still get it initialized 
before visible UI components.

Cheers,
Dirk

-Original Message-From: Erik Westra 
[mailto:[EMAIL PROTECTED]Sent: Friday, February 18, 2005 4:48 
PMTo: flexcoders@yahoogroups.comSubject: RE: 
[flexcoders] Execute code before any component is put on the 
stage
What i want to achieve?

I created a custom CSS parser wich enables u to set 
styles per component instance and also enable u to use CSS classes with the 
same nameon different types of elements (instances). In order to doso i 
needed to make the UIObject extend a class of my own at runtime (wich is 
fairly easy) the problem was, this needed to be done before the components are 
instantiated.

I'll send the source with an example when i haveit 
cleaned up and ready to go :)

Greetz Erik


From: Dirk Eismann 
[mailto:[EMAIL PROTECTED] Sent: vrijdag 18 februari 
2005 16:39To: flexcoders@yahoogroups.comSubject: RE: 
[flexcoders] Execute code before any component is put on the 
stage

Sorry, but what exactly do you want to achieve?

The 
initialize event on the main app will fire when all components are 
initialized, that's true. Flex instantiates the components from bottom totop, 
the most nested component is initialized first.

Dirk.

-Original Message-From: Erik Westra 
[mailto:[EMAIL PROTECTED]Sent: Friday, February 18, 2005 4:19 
PMTo: flexcoders@yahoogroups.comSubject: RE: 
[flexcoders] Execute code before any component is put on the 
stage
When the initialize event is called, all 'mx:'tags 
that refer to mxml files (wich are compiled to components) are allready 
instantiated. If they were not u would not be able to (for example) setthe 
text of a TextArea instance.

Greetz Erik



From: Dirk Eismann 
[mailto:[EMAIL PROTECTED] Sent: vrijdag 18 
februari 2005 16:08To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Execute code 
before any component is put on the stage

Try the initialize event on the main Application 
tag:

 mx:Application initialize="yourFunction()" ... 


Dirk.

-Original Message-----From: Erik Westra 
[mailto:[EMAIL PROTECTED]Sent: Friday, February 18, 2005 
3:26 PMTo: flexcoders@yahoogroups.comSubject: 
[flexcoders] Execute code before any component is put on the 
stage
Is it possible to execute some code before aflex 
application starts with instantiating visual 
components?

Greetz Erik



RE: [flexcoders] popup window with custom component ( not extending TitleWindow )

2005-02-22 Thread Erik Westra
 
WineDetail.mxml There is no property with the name 'PopUpDetail'

The class PopUpDetail, is it in the same folder as WineDetail?
Is the class PopUpDetail in the same folder as the .mxml file with the
application tag in it?

If not, add this line to your script (at the TOP):

import path.to.file.PopUpDetail;


Greetz Erik



-Original Message-
From: Owen van Dijk [mailto:[EMAIL PROTECTED] 
Sent: dinsdag 22 februari 2005 17:42
To: flexcoders@yahoogroups.com
Subject: [flexcoders] popup window with custom component ( not extending
TitleWindow )


I've been working on a Flex application that requires a modal
popupwindow. I have created a PopUpDetail.mxml that uses a Canvas. I
then have another custom MXML component that is also based on a Canvas.
The component is called WineDetail.mxml.

In WineDetail.mxml is a Script block that uses the following AS (
straight from the Flex book ):

--
function openWineDetail()
{
var parentToPopUpOver = this;
var isModal:Boolean = true;
var initObj = {};
var popUp = mx.managers.PopUpManager.createPopUp(
parentToPopUpOver, PopUpDetail, isModal, initObj ); }
--

WineDetail is then put into a Repeater object , something like this:

mx:Repeater id=rp
dataProvider={jumboWS.GetWineTop10.result.diffgram.NewDataSet.Table}
WineDetail wineID={rp.currentItem.ID}
winenumber={rp.currentIndex} winedetaillabel={rp.currentItem.NAME}
wineimage={host}Images/wine/wine_{rp.currentItem.ID}_1.jpg xmlns=*
/
/mx:Repeater

note the xmlns attribute. When i click on a WineDetail component, it's
supposed to create a PopUpWindow, but i never got it to work.I'm getting
the following error, among others:

WineDetail.mxml There is no property with the name 'PopUpDetail'

It might be something obvious i'm missing here, but i'm working against
a killer deadline, and this close to find another hack around it...if
somebody has a clue, you may enlighten me :) ( I figured that it's
something as simple as using a Titlewindow instead of a Canvas? )

Thnx

--
Owen van Dijk


 
Yahoo! Groups Links



 







Execute code before any component is put on the stage

2005-02-18 Thread Erik Westra
Title: Message



Is it possible to execute some code before a flex 
application starts with instantiating visual components?

Greetz Erik



RE: [flexcoders] Execute code before any component is put on the stage

2005-02-18 Thread Erik Westra
Title: Message



Nope, tried that, still to late...


From: Matt Horn [mailto:[EMAIL PROTECTED] 
Sent: vrijdag 18 februari 2005 15:33To: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Execute code 
before any component is put on the stage

Maybe trigger the code from the load event of the 
container?

matt h



From: Erik Westra [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 18, 2005 9:26 AMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] Execute code before 
any component is put on the stage

Is it possible to execute some code before a flex 
application starts with instantiating visual components?

Greetz Erik



RE: [flexcoders] Execute code before any component is put on the stage

2005-02-18 Thread Erik Westra
Title: Message



When the initialize event is called, all 'mx:' tags that 
refer to mxml files (wich are compiled to components) are allready instantiated. 
If they were not u would not be able to (for example) set the text of a TextArea 
instance.

Greetz Erik



From: Dirk Eismann 
[mailto:[EMAIL PROTECTED] Sent: vrijdag 18 februari 
2005 16:08To: flexcoders@yahoogroups.comSubject: RE: 
[flexcoders] Execute code before any component is put on the 
stage

Try 
the initialize event on the main Application tag:

 
mx:Application initialize="yourFunction()" ... 

Dirk.

-Original Message-From: Erik Westra 
[mailto:[EMAIL PROTECTED]Sent: Friday, February 18, 2005 3:26 
PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] 
Execute code before any component is put on the stage
Is it possible to execute some code before a flex 
application starts with instantiating visual components?

Greetz Erik



RE: [flexcoders] Execute code before any component is put on the stage

2005-02-18 Thread Erik Westra
Title: Message



What i want to achieve?

I created a custom CSS parser wich enables u to set styles 
per component instance and also enable u to use CSS classes with the same 
nameon different types of elements (instances). In order to do so i needed 
to make the UIObject extend a class of my own at runtime (wich is fairly easy) 
the problem was, this needed to be done before the components are 
instantiated.

I'll send the source with an example when i have it cleaned 
up and ready to go :)

Greetz Erik


From: Dirk Eismann 
[mailto:[EMAIL PROTECTED] Sent: vrijdag 18 februari 
2005 16:39To: flexcoders@yahoogroups.comSubject: RE: 
[flexcoders] Execute code before any component is put on the 
stage

Sorry, 
but what exactly do you want to achieve?

The 
initialize event on the main app will fire when all components are initialized, 
that's true. Flex instantiates the components from bottom to top, the most 
nested component is initialized first.

Dirk.

-Original Message-From: Erik Westra 
[mailto:[EMAIL PROTECTED]Sent: Friday, February 18, 2005 4:19 
PMTo: flexcoders@yahoogroups.comSubject: RE: 
[flexcoders] Execute code before any component is put on the 
stage
When the initialize event is called, all 'mx:' tags that 
refer to mxml files (wich are compiled to components) are allready 
instantiated. If they were not u would not be able to (for example) set the 
text of a TextArea instance.

Greetz Erik



From: Dirk Eismann 
[mailto:[EMAIL PROTECTED] Sent: vrijdag 18 februari 
2005 16:08To: flexcoders@yahoogroups.comSubject: RE: 
[flexcoders] Execute code before any component is put on the 
stage

Try 
the initialize event on the main Application tag:

 mx:Application initialize="yourFunction()" ... 


Dirk.

-Original Message-From: Erik Westra 
[mailto:[EMAIL PROTECTED]Sent: Friday, February 18, 2005 3:26 
PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] 
Execute code before any component is put on the stage
Is it possible to execute some code before a flex 
application starts with instantiating visual components?

Greetz Erik



RE: [flexcoders] Alert strangeness

2005-02-17 Thread Erik Westra
Well, normally there shouldn't be a problem since there in two different
packages.

But thnx for the tip on setStyle. That will do the trick :)

Greetz Erik
 

-Original Message-
From: Manish Jethani [mailto:[EMAIL PROTECTED] 
Sent: woensdag 16 februari 2005 20:04
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Alert strangeness


Erik Westra wrote:

 The one with the name 'Alert' has at the bottom when created with the 
 popupManager rounded edges.
 The one with the name 'Allert' has at the bottom when created with the

 popupManager square edges.

Alert is a component in Flex (it's what the alert function displays). 
The Alert component has its edges set to rounded, by default -- using
CSS styles.

In general you should avoid having classes with the same names as those
in Flex, but if you must, you have the option of setting up the default
style in the constructor:

class my.library.Alert
{
function Alert()
{
setStyle(cornerRadius, 0); // square corner
}
}

I'm not a styles expert, and I haven't tried this code, but you get the
idea.

Manish



 
Yahoo! Groups Links



 







Alert strangeness

2005-02-16 Thread Erik Westra
Ok, I have two different classes with exectly the same code (except for
their names).

The one with the name 'Alert' has at the bottom when created with the
popupManager rounded edges.
The one with the name 'Allert' has at the bottom when created with the
popupManager square edges.

Does any1 have a clue?

Greetz Erik



 class 1 =
import mx.controls.Button;
import fly.TAP.commonDialogs.CommonDialog;

class fly.TAP.commonDialogs.Allert extends mx.containers.TitleWindow
{
private var _button_mc:Button;

public function Allert()
{
_button_mc = Button(createChild(mx.controls.Button,
undefined, {label: OK}));
};

public function onLoad():Void
{
super.onLoad();
_button_mc.addEventListener(click, this);
};

public function click()
{
deletePopUp();
};
};

 class 2 =
import mx.controls.Button;
import fly.TAP.commonDialogs.CommonDialog;

class fly.TAP.commonDialogs.Alert extends mx.containers.TitleWindow
{
private var _button_mc:Button;

public function Alert()
{
_button_mc = Button(createChild(mx.controls.Button,
undefined, {label: OK}));
};

public function onLoad():Void
{
super.onLoad();
_button_mc.addEventListener(click, this);
};

public function click()
{
deletePopUp();
};
};




Class path

2005-02-11 Thread Erik Westra
In flex-config.xml i tried to set the classpath:

actionscript-classpath
path-element/WEB-INF/flex/user_classes/path-element
 
path-elementC:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\classes/
path-element
/actionscript-classpath

And i also tried:

actionscript-classpath
path-element/WEB-INF/flex/user_classes/path-element
path-element/classes/path-element
/actionscript-classpath

Doesnt work...

It can find the classes if i put them (or their packages) in the same
dir as the mxml...


Does any1 have a clue to what i might do?


Greetz Erik




RE: [flexcoders] Class path

2005-02-11 Thread Erik Westra
I noticed that this problem only exists if I combine coldfusion with
flex.

Doesn't work (test.cfm):

CFIMPORT TAGLIB=/WEB-INF/lib/flex-bootstrap.jar PREFIX=mm
mm:mxml
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
xmlns:com=com.* width=400 height=300 direction=horizontal
com:MyClass /
/mx:Application
/mm:mxml 


Does work (test.mxml):

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml;
xmlns:com=com.* width=400 height=300 direction=horizontal
com:MyClass /
/mx:Application


Any1?


Greetz Erik


-Original Message-
From: Erik Westra 
Sent: vrijdag 11 februari 2005 14:55
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Class path


In flex-config.xml i tried to set the classpath:

actionscript-classpath
path-element/WEB-INF/flex/user_classes/path-element
 
path-elementC:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\classes/
path-element
/actionscript-classpath

And i also tried:

actionscript-classpath
path-element/WEB-INF/flex/user_classes/path-element
path-element/classes/path-element
/actionscript-classpath

Doesnt work...

It can find the classes if i put them (or their packages) in the same
dir as the mxml...


Does any1 have a clue to what i might do?


Greetz Erik


 
Yahoo! Groups Links