RE: [flexcoders] Only last row shown from dataservice result (Hibernate+LCDS)

2008-07-24 Thread Jeff Vroom
It sounds like you have a complex identity object – i.e. not a set of primitive 
properties.   Try adding a toString() method in your identity class which 
returns a unique string for each instance.   I think that we fixed this in 2.6 
so that is not necessary (now available on our web site).

Jeff

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Yohanes 
Iwan Sugiarto
Sent: Wednesday, July 23, 2008 6:56 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Only last row shown from dataservice result 
(Hibernate+LCDS)

Hi,

I'm using hibernate  LCDS 2.51
Using dataservices, result gets filled into an ArrayCollection, which is then 
bound to a Datagrid.

My object uses composite ID, which already have the hashCode and equals methods 
in the identity object.
Now the problem is only the last row is shown in the datagrid.
The rest are just blank rows and when I clicked on the blank row, the Cannot 
access property null object reference error pops out.

Everything seems normal based on the log (especially when the object gets 
serialized)

Have anyone experience this behaviour before?
I've read somewhere about this similar case in adobe bug reports, but I'm not 
really sure if this case is a known bug or merely my bad code.
Any comments are greatly appreciated.
Thanks
--
/ i w a n

inline: image001.jpginline: image002.jpg

[flexcoders] Drag and drop steals all mouse events

2008-07-24 Thread Mike Pearce
Ok, so I guess this is fair enough.

 

But what happens when you need to know the xmouse and ymouse position during
the drag operation?

 

Can anyone help out here? There _has_ to be a way to do this.

 

I need to provide visual feedback in my component that requires knowing the
mouse's location during a drag-and-drop operation.

 

Thanks in advance,

Mike



[flexcoders] Thick Java Client for LCDS

2008-07-24 Thread Shailesh Mangal
Has java client (thick) for LCDS been tried? Any ideas how can this be
done.

-Shailesh



Re: [flexcoders] Re: new Component() ?

2008-07-24 Thread Josh McDonald
If you have:

mx:Component id=inlineEditor className=MyClass
  mx:Canvas/
/mx:Component

You get a subclass of Canvas named MyClass, and a local public scoped
instance of an IFactory called inlineEditor, right?

-Josh


On Thu, Jul 24, 2008 at 3:36 PM, Alex Harui [EMAIL PROTECTED] wrote:

  If you've defined a component via mx:Component, the name is
 auto-generated as Josh says, but it generates an IFactory, so you can use
 the factory to get new instances



 mx:List id=myList

 mx:itemRenderer

 mx:Component

 mx:Canvas

 ..





 From AS:



  myList.itemRenderer.newInstance()


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *rafaelrfc00
 *Sent:* Wednesday, July 23, 2008 9:53 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Re: new Component() ?



 Text was just an example.

 It can be date, text, textarea, some other customcomponents. I was
 just curious how i would create item renderes without creating a file.

 I thought if you are able to use mx:component you would be able to
 create it from actionscript as well.

 guess i was wrong. Flex didn't think about everything, do they? :P

 raf

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  Well no, you can't do what you're asking :)
 
  When you use:
 
  mx:component
  canvas
  ...
  /canvas
  /mx:component
 
  It's creating a new subclass of Canvas with a generated name, and
 you can't
  create new classes at run-time without bytecode manipulation (which
 isn't
  really an option in Flex yet unfortunately).
 
  But what exactly are you trying to achieve? If you're just
 displaying text,
  but it needs to be different to the field data, what you need is a
  labelFunction, not an itemRenderer.
 
  -Josh
 
  On Thu, Jul 24, 2008 at 10:34 AM, Rafael Faria [EMAIL PROTECTED]
  wrote:
 
   Hi Pedro,
  
   How do you mean about putting some getters? Can you give me an
 example?
  
   Thanks
   Raf
  
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Pedro Sena sena.pedro@ wrote:
   
Hi Rafael,
   
What do u think of put some getters in your object instead of create
   various
item renderers that just have little funcionality ?
   
Just my 2 cents
   
  
  
   
  
   --
   Flexcoders Mailing List
   FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
   Search Archives:
   http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
   Links
  
  
  
  
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 

 




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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


RE: [flexcoders] LCDS Memory Usage

2008-07-24 Thread Jeff Vroom
That is basically how it works but only if you have auto-sync enabled=true and 
cache-items=true on your destination settings.   The auto-sync feature requires 
that we maintain at least the identities of all objects managed on every client 
so that we know where to push changes.   The goal here is that you don't have 
to worry about tracking that and can still easily keep clients in sync.   Also, 
if two clients fetch an object with the same id, only one copy is cached.  If 
you turn cache-items=false, we cache only the ids, not the items so we keep a 
lot less state around (though we do have to go back to the assembler more often 
so that is more load on the database).

If you turn auto-sync off, the server maintains no state but the 
synchronization functionality would then only work if you enable manual sync 
- i.e. where your clients specify subscriptions they want to listen to and also 
can specify meta-data that is attached to all changes made.  That meta-data is 
used to route changes to the right subscribed clients.

Jeff

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey
Sent: Wednesday, July 23, 2008 5:21 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] LCDS Memory Usage


Looking in the LiveCycle Data Services ES Developer's Guide, page 190,
it states:
By default, the Data Management Service caches items returned
from fill() and getItem() calls and uses cached items to implement
paging and to build object graphs on the server when implementing lazy
associations. This causes a complete copy of the managed state of all
active clients to be kept in each server's memory.

Here's what I think that means. If I have 100 clients, and each
client has one managed collection that contains 100 items in it, then
there would be 10,000 copies residing in memory on the server(100
objects for 100 users).

Am I understanding this correctly? Does this seem inefficient? What
if those objects happened to be really big objects... I mean really
big. Seems like that would take up a lot of memory on the server.

Has anyone come up against this in practice?

Thanks,
Geoff

inline: image001.jpginline: image002.jpg

[flexcoders] Opening for Flex Professionals

2008-07-24 Thread genius_gen2k
Hello People,

Sopra India is looking for keen development professional who are
interested in making a career with the company.
 
In one of teams at Sopra India we are developing a full-fledged,
browser based Process Modeling tool that uses Flex technologies
extensively.

For that team presently we have openings for people with Flex
development experience and solid OOP skills.

The plus points for the job are:

1.   Challenging product development
2.   Excellent work environment
3.   Cross functional team
4.   Working with team members across countries
5.   Opportunity to build a career with the European IT Leader
(www.sopragroup.com)
6.   Opportunity to gain experience about an upcoming B2Bi domain

Contact: Amit Saini
 AVP-Delivery
 Sorpa India Pvt. Ltd.
 (www.sopragroup.com)
  Ph: +91 120 4056100

Regards,
Amol.



RE: [flexcoders] Drag and drop steals all mouse events

2008-07-24 Thread Kenneth Sutherland
J I had this issue a few days ago and spent a few hours trying lots of
weird and wonderful ways of trying to figure out where the mouse was,
then within 5 mins of posting to flexcoders (typical really) I
remembered that I could just listen to the drag event (enter / over
should do).

 

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Pearce
Sent: 24 July 2008 07:37
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Drag and drop steals all mouse events

 

Ok, so I guess this is fair enough...

 

But what happens when you need to know the xmouse and ymouse position
during the drag operation?

 

Can anyone help out here? There _has_ to be a way to do this...

 

I need to provide visual feedback in my component that requires knowing
the mouse's location during a drag-and-drop operation.

 

Thanks in advance,

Mike

 

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

This email message has been scanned for viruses by Mimecast.
---

[flexcoders] Loading style sheets at run time

2008-07-24 Thread kaushal_bshah
I have created few fonts css and compiled them into swf to load them
at run time.

There is one custom component Card, is placed into a Module and this
Module is loaded by main application.

The Card component contains TextArea, MyTextArea(custom component) and
ComboBox (which display font list).

Now when user select any font from ComboBox, Card component load css
and when it get loaded, it updates fontFamily of TextArea and
MyTextArea. But only TextArea updated with new fonts while MyTextArea
is not getting update anytime.

Can anyone help me to figure out this.

I am using following code to load css run time.

var myEvent:IEventDispatcher =
StyleManager.loadStyleDeclarations(fontSource[0].src,true,false,ApplicationDomain.currentDomain);
myEvent.addEventListener(StyleEvent.COMPLETE,fontComplete);
myEvent.addEventListener(StyleEvent.ERROR,fontError);

Any help is appreciated, Thanks




[flexcoders] Re: Can someone help me with this code please?

2008-07-24 Thread ucabb4u
Thank you very much for this suggestion.  I can see it is a much better 
approach than all 
the others I have tried and failed with.  Exactly the kind of answer I hoped to 
elicit by 
phrasing the question in this way.  I will study this technique for my homework 
:)

Thanks Amy, I truly appreciate your help.

Andy

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

 --- In flexcoders@yahoogroups.com, ucabb4u arc@ wrote:
 
  Can someone help me with the code required to do the action 
 described in the comment 
  block please?
  
  Script
  import mx.collections.ArrayCollection;
  
  
  [Bindable]
  public var tempArray:ArrayCollection = new ArrayCollection();
  
  private function showSelection(event:Event):void{
   
  trace(slct.selectedIndex);
  
   /*  Use the selectedIndex create an array name 
 e.g. data1, data2, data3, etc.
   Replace the contents of the tempArray collection with 
 the contents of the array 
  collection selected - data1, data2, data3, etc.   
 
   */  
  }
  /Script
 
 
 It seems to be that you'd be better off with an array containing your 
 ArrayCollections and then just pull out the one by index.  However, 
 this['myVarName'] will allow you to dynamically reference the 
 variable.  Good luck with your homework :-)




[flexcoders] Framework RSL and subclassing

2008-07-24 Thread jimmy5804

I have a medium size project and am trying to reduce .swf size. There
are several places in my project where I can either 1) put a bunch of
code in a mx:script tag or included .as file or 2) subclass to make
things look cleaner. In some quick tests, it looks like creating a new
class adds ~80 bytes (plus or minus about 10) to the .swf compared to
putting it in an mxml or script tag.

1) Does this observation seem about right as a general rule?

2) Are there any other considerations for subclassing vs. not
subclassing that relate to .swf size?

Thanks!




[flexcoders] Re: numericStepper as an itemRenderer

2008-07-24 Thread zyzzx00_99
oops.  I left our international language class in there.  Take out the
ULang jive inside of the headerText.

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

 Hey all.  I have a numeric stepper and would like to set the max value
 from another data.field.  Certainly there are dozens of code-around
 fixes for problems like these, but it seems like this should work:
 (I'm copying and pasting code form a project I'm working on and with
 the init function I'm replicating data in the fashion that it comes
 back from a different team of developers)
 
 [Bindable]
 public var arrayCol : ArrayCollection = new ArrayCollection();
 
 private function initHandler():void
 {
   var i : int;
   var objArray : Array = new Array();
   
   for(i=0; i  10  ; i++ )
   {
 objArray.push( {QTY_TO_ISSUE:0,
 QTY_ON_HAND:Math.round(Math.random()*50) } );
   }
   
   this.arrayCol = new ArrayCollection(objArray);
 }
 
 ]]
 /mx:Script
 
 
 mx:DataGrid id=test dataProvider={arrayCol} height=50%
 mx:columns
 mx:DataGridColumn dataField=QTY_ON_HAND
 headerText={ULang.Current.getString('On Hand')} /
 mx:DataGridColumn dataField=QTY_TO_ISSUE headerText=To Issue 
   sortable=false editable=true editorDataField=value
 rendererIsEditor=true 
   mx:itemRenderer
   mx:Component
   mx:NumericStepper maximum={ getMaxValue(data) } minimum=0
   mx:Script
   ![CDATA[
   
   private function getMaxValue(obj:Object=null):Number
   {
   if(data)
   return data['QTY_ON_HAND'];
   
   return 0;
   }
   
   ]]
   /mx:Script
   /mx:NumericStepper
   /mx:Component
   /mx:itemRenderer
 /mx:DataGridColumn
 /mx:columns
 /mx:DataGrid
 
 
 it looks like 'data' isn't defined, or some such thing, but an inline
 if statement to check if data exists doesn't seem to help.  Any ideas?





[flexcoders] Re: Thick Java Client for LCDS

2008-07-24 Thread meteatamel
By LCDS, you mean DataService in Java? I haven't heard anyone try
implementing that in Java. I don't think it'll be that easy though
because, first you need to implement all Channels (or at least one
that you'll use in your application) in Java and that by itself is not
trivial. You need to figure out how to make HTTP calls (URLConnection
vs. HTTPClient), figure out how AMF serialization/deserialization is
going to work, etc. 

After you have your Channel, you need to implement Producer/Consumer
so you can do messaging. And finally, you can build DataService on top
of those. 

-Mete

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

 Has java client (thick) for LCDS been tried? Any ideas how can this be
 done.
 
 -Shailesh





[flexcoders] numericStepper as an itemRenderer

2008-07-24 Thread zyzzx00_99
Hey all.  I have a numeric stepper and would like to set the max value
from another data.field.  Certainly there are dozens of code-around
fixes for problems like these, but it seems like this should work:
(I'm copying and pasting code form a project I'm working on and with
the init function I'm replicating data in the fashion that it comes
back from a different team of developers)

[Bindable]
public var arrayCol : ArrayCollection = new ArrayCollection();

private function initHandler():void
{
var i : int;
var objArray : Array = new Array();

for(i=0; i  10  ; i++ )
{
  objArray.push( {QTY_TO_ISSUE:0,
QTY_ON_HAND:Math.round(Math.random()*50) } );
}

this.arrayCol = new ArrayCollection(objArray);
}

]]
/mx:Script


mx:DataGrid id=test dataProvider={arrayCol} height=50%
mx:columns
mx:DataGridColumn dataField=QTY_ON_HAND
headerText={ULang.Current.getString('On Hand')} /
mx:DataGridColumn dataField=QTY_TO_ISSUE headerText=To Issue 
sortable=false editable=true editorDataField=value
rendererIsEditor=true 
mx:itemRenderer
mx:Component
mx:NumericStepper maximum={ getMaxValue(data) } minimum=0
mx:Script
![CDATA[

private function getMaxValue(obj:Object=null):Number
{
if(data)
return data['QTY_ON_HAND'];

return 0;
}

]]
/mx:Script
/mx:NumericStepper
/mx:Component
/mx:itemRenderer
/mx:DataGridColumn
/mx:columns
/mx:DataGrid


it looks like 'data' isn't defined, or some such thing, but an inline
if statement to check if data exists doesn't seem to help.  Any ideas?



[flexcoders] Flex 3 Preloader broken when using deep linking ?

2008-07-24 Thread Adnan Doric
Hello,

I don't know if this was already discussed so sorry in advance.

After few days of hard debugging, I sadly noted that Flex 3 preloader
is completely broken while using # in the URL.

It doesn't show at all.

Does anyone have any workarounds as preloading 2Mb without preloader
is actually real pain ?

Thank you.



[flexcoders] Bar Chart scrolling problem.... plz help

2008-07-24 Thread Vaibhav Chauhan
Hi All,

 I am facing an issue of scrollbar in my barchart. If the data grows to
bigger size, the width of the bar starts decreasing. I intend to fix width
of bars and if data grows, scrollbar should appear so that data is readable.
Please let me know how can I do this?

My code:


mx:VBox id=vbDateGraph width=600 height=300 horizontalAlign=left
scroll=true
horizontalScrollPolicy=auto
verticalScrollPolicy=auto

mx:BarChart id=barDate width=90% horizontalAxisRatio=
paddingLeft=5 paddingRight=5
showDataTips=true dataProvider={books}
maxHeight=300 maxBarWidth=10
mx:verticalAxis
mx:CategoryAxis categoryField=showId
labelFunction=createLabel dataProvider={books}/
/mx:verticalAxis
mx:series
mx:BarSeries xField=price/
/mx:series

/mx:BarChart
/mx:VBox


Regards
Vaibhav Chauhan


[flexcoders] Weird compiler/debugger issue

2008-07-24 Thread lynxoid7
I ran into this yesterday and so far have not figured out what's the
problem. So I have this piece of code:

private function foo(value:XMLList):void{
trace(foo);
if (value == null || value.length() == 0)
// a comment line here
// another comment here

var a:Object = new Object();
var b:Object = new Object();
var a:Object = new Object();

}

compiler issues a warning that a is defined twice, however, when I
debug this code, debugger skips the very first line of code after the
comment lines leaving a uninitialized. Had I not inited a the second
time, I'll get a runtime null pointer exception. Have anyone run into
anything similar? My guess is that somewhere some cache doesn't get
deleted/updated, however, I tried Clean, tried removing some cache
files, tried deleting and creating the project.




[flexcoders] Re: new Component() ?

2008-07-24 Thread Amy
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 If you've defined a component via mx:Component, the name is
 auto-generated as Josh says, but it generates an IFactory, so you 
can
 use the factory to get new instances
 
  
 
 mx:List id=myList
 
 mx:itemRenderer
 
 mx:Component
 
 mx:Canvas
 
 ..
 
  
 
  
 
 From AS:
 
  
 
  myList.itemRenderer.newInstance()

This makes it sound like the equivalent to new Component() in AS 
might be

myRenderer:ClassFactory = new ClassFactory(mx.containers.Canvas);

Presumably from there you can add stuff to myRenderer before using it 
as your rubber stamp, but I've never personally used ClassFactory 
for anything other than setting global properties on a class I 
created in AS3 or MXML.

Is this a correct interpretation of how AS3 works?

Thanks;

Amy



[flexcoders] overlapping buttons problem

2008-07-24 Thread dlymbo
Hello,

i'm trying to create a custom component which is basically a button
which i can drag, but it also has a child button which, when pressed,
disables dragging but allows the component to be resized.

similar to this:
http://www.aboutflex.net/flex/resizable-panel/

except i'm using a button instead of a panel (which i'm assuming is
the problem here)

soo, why doesn't activateResizing() get called by the resizer's
ROLL_OVER listener?

http://rafb.net/p/oRzZb777.html

many thanks!
dlymbo



[flexcoders] Covering XML possibilities for automate object building

2008-07-24 Thread Guilherme Blanco
Hi all,

I have an automate script that converts a Form to params in both ways:
HTTP or Flex.
So, if you want to pick information from Form to be used in the Flex
application, you simply do var params:Object = form1.getParamObject();
Also, I optimized it to work ok in HTTPServices, do it becomes enabled
to automatically send POST params:
service.send(form1.getParamObject(true)); // the argument is
httpFormat? (default=false)

Maybe there's an easier way to do it without having to define the
mx:request params by hand, and I'm interested to listen your
solution regarding this.

By now, my application has two possible implementations in a ComboBox:

item id=1 label=foo/

or

item
  id1/id
  labelfoo/label
/item


There's no restriction to this yet.
So, my automate script needs to cover both situations. I tried this:

var selection:XML = formItem.selectedItem as XML;
params[formItem.id] = (httpFormat) ? XMLList(selection.id ||
[EMAIL PROTECTED]).toString() : selection;

Without success.

I'm interested to know how to achieve it in a simpler way.


Can you help me with this one?
Thanks in advance


Cheers,

-- 
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9166-6902
MSN: [EMAIL PROTECTED]
URL: http://blog.bisna.com
Rio de Janeiro - RJ/Brazil


[flexcoders] Re: LCDS Memory Usage

2008-07-24 Thread Geoffrey
I saw that you can turn cache-items to false and it will only store
the IDs in memory, but at the expense of paging, or at least more
efficient paging.  Is this true?  I thought the docs said that to do
paging it would have to grab all the objects again, then grab the
subset of data you want.

In our particular instance, we have very large objects that are
relatively unique across clients.  Some objects will be shared, but
most won't.  Just trying to forecast how it will effect the server.

Thanks,
 Geoff

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

 That is basically how it works but only if you have auto-sync
enabled=true and cache-items=true on your destination settings.   The
auto-sync feature requires that we maintain at least the identities of
all objects managed on every client so that we know where to push
changes.   The goal here is that you don't have to worry about
tracking that and can still easily keep clients in sync.   Also, if
two clients fetch an object with the same id, only one copy is cached.
 If you turn cache-items=false, we cache only the ids, not the items
so we keep a lot less state around (though we do have to go back to
the assembler more often so that is more load on the database).
 
 If you turn auto-sync off, the server maintains no state but the
synchronization functionality would then only work if you enable
manual sync - i.e. where your clients specify subscriptions they
want to listen to and also can specify meta-data that is attached to
all changes made.  That meta-data is used to route changes to the
right subscribed clients.
 
 Jeff
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Geoffrey
 Sent: Wednesday, July 23, 2008 5:21 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] LCDS Memory Usage
 
 
 Looking in the LiveCycle Data Services ES Developer's Guide, page 190,
 it states:
 By default, the Data Management Service caches items returned
 from fill() and getItem() calls and uses cached items to implement
 paging and to build object graphs on the server when implementing lazy
 associations. This causes a complete copy of the managed state of all
 active clients to be kept in each server's memory.
 
 Here's what I think that means. If I have 100 clients, and each
 client has one managed collection that contains 100 items in it, then
 there would be 10,000 copies residing in memory on the server(100
 objects for 100 users).
 
 Am I understanding this correctly? Does this seem inefficient? What
 if those objects happened to be really big objects... I mean really
 big. Seems like that would take up a lot of memory on the server.
 
 Has anyone come up against this in practice?
 
 Thanks,
 Geoff





[flexcoders] streaming audio

2008-07-24 Thread Kenneth Sutherland
Does anyone know of any reason why streaming audio in flex would work in
firefox but not IE.

The sound clips do not play in IE unless the entire file has loaded, but
in firefox it plays immediately?

 

I'm not using a media server or similar, just loading a music file
through a URLRequest.

 

 

Kenneth Sutherland

Technical Developer

Realise Ltd

0131 476 7432

www.realise.com

enlightened e-business solutions

 

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

This email message has been scanned for viruses by Mimecast.
---

[flexcoders] Re: Covering XML possibilities for automate object building

2008-07-24 Thread Guilherme Blanco
I fixed myself.

That was easy... I just need another eye to not do stupid questions and things.

Solution:

var selection:XML = formItem.selectedItem as XML;
params[formItem.id] = (httpFormat)
? (selection.hasOwnProperty('id')
? XML(selection.id).toString()
: XMLList([EMAIL PROTECTED]).toString())
: selection;



Thanks anyway!


On Thu, Jul 24, 2008 at 11:20 AM, Guilherme Blanco
[EMAIL PROTECTED] wrote:
 Hi all,

 I have an automate script that converts a Form to params in both ways:
 HTTP or Flex.
 So, if you want to pick information from Form to be used in the Flex
 application, you simply do var params:Object = form1.getParamObject();
 Also, I optimized it to work ok in HTTPServices, do it becomes enabled
 to automatically send POST params:
 service.send(form1.getParamObject(true)); // the argument is
 httpFormat? (default=false)

 Maybe there's an easier way to do it without having to define the
 mx:request params by hand, and I'm interested to listen your
 solution regarding this.

 By now, my application has two possible implementations in a ComboBox:

 item id=1 label=foo/

 or

 item
  id1/id
  labelfoo/label
 /item


 There's no restriction to this yet.
 So, my automate script needs to cover both situations. I tried this:

 var selection:XML = formItem.selectedItem as XML;
 params[formItem.id] = (httpFormat) ? XMLList(selection.id ||
 [EMAIL PROTECTED]).toString() : selection;

 Without success.

 I'm interested to know how to achieve it in a simpler way.


 Can you help me with this one?
 Thanks in advance


 Cheers,

 --
 Guilherme Blanco - Web Developer
 CBC - Certified Bindows Consultant
 Cell Phone: +55 (16) 9166-6902
 MSN: [EMAIL PROTECTED]
 URL: http://blog.bisna.com
 Rio de Janeiro - RJ/Brazil




-- 
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9166-6902
MSN: [EMAIL PROTECTED]
URL: http://blog.bisna.com
Rio de Janeiro - RJ/Brazil


[flexcoders] How to Reset ProgressBar?

2008-07-24 Thread gabsaga

I have an application that when you click on a button, it loads an image in a
panel. There is a progress bar that shows progress on the image being
loaded. The progress bar works fine when I load the first image but when I
load subsequent images, it still shows the last status of the first progress
bar. Is there a way to reset a progress bar so that it starts from 0 each
time a new image is loaded?

Thanks.

Gabsaga
-- 
View this message in context: 
http://www.nabble.com/How-to-Reset-ProgressBar--tp18634463p18634463.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Can't change font on ToggleButtonBar items

2008-07-24 Thread djepyon
Thanks in advance to anyone who can help me with this.

I have a toggleButton bar with the following CSS definition

ToggleButtonBar{

button-style-name: MenuTab;

}

.MenuTab{

font-family: PowerWindows;

color: #FF;
font-size: 12pt;

textRollOverColor: #909090;
textSelectedColor: #00;

padding-left: 3px;
padding-right: 3px;
padding-bottom: 0px;
pading-top: 0px;

}

And the font is embedded as such:

@font-face {
fontFamily: PowerWindows;
src:url(../assets/fonts/PowerWindows.ttf);
advancedAntiAliasing: true;
}

If I drop the fontFamily: PowerWindows onto another component (tested
this on MenuBar) it works just fine, but I can't seem get the
ToggleButtonBar font to change. Any idea what I'm doing wrong here?

Thanks guys.



[flexcoders] Re: Can't change font on ToggleButtonBar items

2008-07-24 Thread djepyon
Five minutes later I figure this out. ;)

I needed to set the font-weight style.

font-family: PowerWindows;
font-weight: normal;

I would have assumed that normal was the default value but
apparently not.


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

 Thanks in advance to anyone who can help me with this.
 
 I have a toggleButton bar with the following CSS definition
 
 ToggleButtonBar{
 
   button-style-name: MenuTab;
   
 }
 
 .MenuTab{
   
   font-family: PowerWindows;
   
   color: #FF;
   font-size: 12pt;
   
   textRollOverColor: #909090;
 textSelectedColor: #00;
   
   padding-left: 3px;
   padding-right: 3px;
 padding-bottom: 0px;
 pading-top: 0px;
   
 }
 
 And the font is embedded as such:
 
 @font-face {
 fontFamily: PowerWindows;
 src:url(../assets/fonts/PowerWindows.ttf);
 advancedAntiAliasing: true;
 }
 
 If I drop the fontFamily: PowerWindows onto another component (tested
 this on MenuBar) it works just fine, but I can't seem get the
 ToggleButtonBar font to change. Any idea what I'm doing wrong here?
 
 Thanks guys.





[flexcoders] Re: How to Reset ProgressBar?

2008-07-24 Thread Adnan Doric
progressBar.setProgress( 0, 100 );

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

 
 I have an application that when you click on a button, it loads an
image in a
 panel. There is a progress bar that shows progress on the image being
 loaded. The progress bar works fine when I load the first image but
when I
 load subsequent images, it still shows the last status of the first
progress
 bar. Is there a way to reset a progress bar so that it starts from 0
each
 time a new image is loaded?
 
 Thanks.
 
 Gabsaga
 -- 
 View this message in context:
http://www.nabble.com/How-to-Reset-ProgressBar--tp18634463p18634463.html
 Sent from the FlexCoders mailing list archive at Nabble.com.





[flexcoders] Line chart renderers cut off for first and last data point

2008-07-24 Thread Amy
Is there a way to bring the first and last data points on a line 
chart in from the sides so that the item renderer dots aren't cut in 
half?

Thanks;

Amy



[flexcoders] Re: overlapping buttons problem - solved.

2008-07-24 Thread dlymbo
i added
this.mouseChildren = true;

and now it works, yay...


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

 Hello,
 
 i'm trying to create a custom component which is basically a button
 which i can drag, but it also has a child button which, when pressed,
 disables dragging but allows the component to be resized.
 
 similar to this:
 http://www.aboutflex.net/flex/resizable-panel/
 
 except i'm using a button instead of a panel (which i'm assuming is
 the problem here)
 
 soo, why doesn't activateResizing() get called by the resizer's
 ROLL_OVER listener?
 
 http://rafb.net/p/oRzZb777.html
 
 many thanks!
 dlymbo





[flexcoders] 2 default buttons in form

2008-07-24 Thread ghus32
Hello Everyone,

I have a form and I am using a validation script to enable button when 
form is filled out.. I need to have  2 buttons activated not just one.

Is it possible to do this, or to classify 2 buttons into one group?

utils:ValidatorForm 
id=addEmployeeForm 
defaultButton={add_report_crm} 
 
validators={validators} 
 
 height=394 width=353


basically I want to have two buttons in the defaultButton.

Thanks



[flexcoders] Hslider scrubber won't work with some flv files

2008-07-24 Thread [EMAIL PROTECTED]
http://reenie.org/test/ScrubTest3/ScrubTest.html

This flex application has a video which plays an flv file, but the 
scrubber, built with an HSlider, does not work.

It does work with other flv files, so what is it about this particular 
file that the scrubber doesn't like?  Any idea what the problem is ?


Re: [flexcoders] Hslider scrubber won't work with some flv files

2008-07-24 Thread [EMAIL PROTECTED]
Actually, to my surprize, this example does allow you to move the video, 
so it does actually work, however, the bar to indicate progress is a 
thick grey line, instead of the usual parallel lines. (usually when that 
happens, it won't work at all).



[EMAIL PROTECTED] wrote:
 
  http://reenie.org/test/ScrubTest3/ScrubTest.html
 
  This flex application has a video which plays an flv file, but the
  scrubber, built with an HSlider, does not work.
 
  It does work with other flv files, so what is it about this particular
  file that the scrubber doesn't like? Any idea what the problem is ?
  




RE: [flexcoders] 2 default buttons in form

2008-07-24 Thread Alex Harui
Gee, I hope not.  The defaultButton is the button that gets clicked
when you hit Enter.  I don't think you want both buttons to fire at the
same time do you?

 

You might want to have some focusIn logic that switches what the
defaultButton is.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ghus32
Sent: Thursday, July 24, 2008 9:54 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] 2 default buttons in form

 

Hello Everyone,

I have a form and I am using a validation script to enable button when 
form is filled out.. I need to have 2 buttons activated not just one.

Is it possible to do this, or to classify 2 buttons into one group?

utils:ValidatorForm 
id=addEmployeeForm 
defaultButton={add_report_crm} 

validators={validators} 

height=394 width=353


basically I want to have two buttons in the defaultButton.

Thanks

 



RE: [flexcoders] Weird compiler/debugger issue

2008-07-24 Thread Tracy Spratt
Var a's scope is the whole function, thus the duplicate variable
warning.

 

However, the assignment is subject to the conditional.  If the condition
is not satisfied the assignment does not happen and var a is null.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of lynxoid7
Sent: Thursday, July 24, 2008 10:50 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Weird compiler/debugger issue

 

I ran into this yesterday and so far have not figured out what's the
problem. So I have this piece of code:

private function foo(value:XMLList):void{
trace(foo);
if (value == null || value.length() == 0)
// a comment line here
// another comment here

var a:Object = new Object();
var b:Object = new Object();
var a:Object = new Object();

}

compiler issues a warning that a is defined twice, however, when I
debug this code, debugger skips the very first line of code after the
comment lines leaving a uninitialized. Had I not inited a the second
time, I'll get a runtime null pointer exception. Have anyone run into
anything similar? My guess is that somewhere some cache doesn't get
deleted/updated, however, I tried Clean, tried removing some cache
files, tried deleting and creating the project.

 



[flexcoders] Re: Hslider scrubber won't work with some flv files

2008-07-24 Thread Cato Paus
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails\
postId=1921productId=2
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetail\
spostId=1921productId=2
--- In flexcoders@yahoogroups.com, [EMAIL PROTECTED] [EMAIL PROTECTED] 
wrote:

 http://reenie.org/test/ScrubTest3/ScrubTest.html

 This flex application has a video which plays an flv file, but the
 scrubber, built with an HSlider, does not work.

 It does work with other flv files, so what is it about this particular
 file that the scrubber doesn't like? Any idea what the problem is ?




RE: [flexcoders] Weird compiler/debugger issue

2008-07-24 Thread Alex Harui
Try it in a small test case and post the whole test case if you still
have a problem.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of lynxoid7
Sent: Thursday, July 24, 2008 7:50 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Weird compiler/debugger issue

 

I ran into this yesterday and so far have not figured out what's the
problem. So I have this piece of code:

private function foo(value:XMLList):void{
trace(foo);
if (value == null || value.length() == 0)
// a comment line here
// another comment here

var a:Object = new Object();
var b:Object = new Object();
var a:Object = new Object();

}

compiler issues a warning that a is defined twice, however, when I
debug this code, debugger skips the very first line of code after the
comment lines leaving a uninitialized. Had I not inited a the second
time, I'll get a runtime null pointer exception. Have anyone run into
anything similar? My guess is that somewhere some cache doesn't get
deleted/updated, however, I tried Clean, tried removing some cache
files, tried deleting and creating the project.

 



RE: [flexcoders] Re: new Component() ?

2008-07-24 Thread Alex Harui
You can't add to the class definition of the Canvas at runtime.
ClassFactory has a properties bag where you can have properties slapped
on the new instance, but that's not really a new class definition.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Amy
Sent: Thursday, July 24, 2008 7:36 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: new Component() ?

 

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

 If you've defined a component via mx:Component, the name is
 auto-generated as Josh says, but it generates an IFactory, so you 
can
 use the factory to get new instances
 
 
 
 mx:List id=myList
 
 mx:itemRenderer
 
 mx:Component
 
 mx:Canvas
 
 ..
 
 
 
 
 
 From AS:
 
 
 
 myList.itemRenderer.newInstance()

This makes it sound like the equivalent to new Component() in AS 
might be

myRenderer:ClassFactory = new ClassFactory(mx.containers.Canvas);

Presumably from there you can add stuff to myRenderer before using it 
as your rubber stamp, but I've never personally used ClassFactory 
for anything other than setting global properties on a class I 
created in AS3 or MXML.

Is this a correct interpretation of how AS3 works?

Thanks;

Amy

 



RE: [flexcoders] numericStepper as an itemRenderer

2008-07-24 Thread Alex Harui
Maximum is set when the component is created and data isn't valid yet.
It will be later, so binding might pick it up, but binding to functions
could cause the value change to be missed.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of zyzzx00_99
Sent: Thursday, July 24, 2008 6:32 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] numericStepper as an itemRenderer

 

Hey all. I have a numeric stepper and would like to set the max value
from another data.field. Certainly there are dozens of code-around
fixes for problems like these, but it seems like this should work:
(I'm copying and pasting code form a project I'm working on and with
the init function I'm replicating data in the fashion that it comes
back from a different team of developers)

[Bindable]
public var arrayCol : ArrayCollection = new ArrayCollection();

private function initHandler():void
{
var i : int;
var objArray : Array = new Array();

for(i=0; i  10 ; i++ )
{
objArray.push( {QTY_TO_ISSUE:0,
QTY_ON_HAND:Math.round(Math.random()*50) } );
}

this.arrayCol = new ArrayCollection(objArray);
}

]]
/mx:Script

mx:DataGrid id=test dataProvider={arrayCol} height=50%
mx:columns
mx:DataGridColumn dataField=QTY_ON_HAND
headerText={ULang.Current.getString('On Hand')} /
mx:DataGridColumn dataField=QTY_TO_ISSUE headerText=To Issue 
sortable=false editable=true editorDataField=value
rendererIsEditor=true 
mx:itemRenderer
mx:Component
mx:NumericStepper maximum={ getMaxValue(data) } minimum=0
mx:Script
![CDATA[

private function getMaxValue(obj:Object=null):Number
{
if(data)
return data['QTY_ON_HAND'];

return 0;
}

]]
/mx:Script
/mx:NumericStepper
/mx:Component
/mx:itemRenderer
/mx:DataGridColumn
/mx:columns
/mx:DataGrid

it looks like 'data' isn't defined, or some such thing, but an inline
if statement to check if data exists doesn't seem to help. Any ideas?

 



RE: [flexcoders] Framework RSL and subclassing

2008-07-24 Thread Alex Harui
The overhead of classes and methods is currently higher than we like,
and maybe future players (post FP10) will reduce that overhead.  In
general, I wouldn't let 80 bytes keep me from using good programming
practices if the entire SWF is going to be 500K or more.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jimmy5804
Sent: Thursday, July 24, 2008 2:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Framework RSL and subclassing

 


I have a medium size project and am trying to reduce .swf size. There
are several places in my project where I can either 1) put a bunch of
code in a mx:script tag or included .as file or 2) subclass to make
things look cleaner. In some quick tests, it looks like creating a new
class adds ~80 bytes (plus or minus about 10) to the .swf compared to
putting it in an mxml or script tag.

1) Does this observation seem about right as a general rule?

2) Are there any other considerations for subclassing vs. not
subclassing that relate to .swf size?

Thanks!

 



[flexcoders] Re: Weird compiler/debugger issue

2008-07-24 Thread lynxoid7
It was a really simple issue: I accidentally deleted the return
statement after the if(), so the next line of code was skipped bc the
if statement evaluated to false:) 


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

 Try it in a small test case and post the whole test case if you still
 have a problem.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of lynxoid7
 Sent: Thursday, July 24, 2008 7:50 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Weird compiler/debugger issue
 
  
 
 I ran into this yesterday and so far have not figured out what's the
 problem. So I have this piece of code:
 
 private function foo(value:XMLList):void{
 trace(foo);
 if (value == null || value.length() == 0)
 // a comment line here
 // another comment here
 
 var a:Object = new Object();
 var b:Object = new Object();
 var a:Object = new Object();
 
 }
 
 compiler issues a warning that a is defined twice, however, when I
 debug this code, debugger skips the very first line of code after the
 comment lines leaving a uninitialized. Had I not inited a the second
 time, I'll get a runtime null pointer exception. Have anyone run into
 anything similar? My guess is that somewhere some cache doesn't get
 deleted/updated, however, I tried Clean, tried removing some cache
 files, tried deleting and creating the project.





RE: [flexcoders] Loading style sheets at run time

2008-07-24 Thread Alex Harui
Are you embedding fonts?  Or just setting the font family?

 

What kinds of selectors are you using to tell MyTextArea about its font?

 

What does MyTextArea extend?

 

Is the code that loads the CSS SWF in the module or main app?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of kaushal_bshah
Sent: Thursday, July 24, 2008 3:06 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Loading style sheets at run time

 

I have created few fonts css and compiled them into swf to load them
at run time.

There is one custom component Card, is placed into a Module and this
Module is loaded by main application.

The Card component contains TextArea, MyTextArea(custom component) and
ComboBox (which display font list).

Now when user select any font from ComboBox, Card component load css
and when it get loaded, it updates fontFamily of TextArea and
MyTextArea. But only TextArea updated with new fonts while MyTextArea
is not getting update anytime.

Can anyone help me to figure out this.

I am using following code to load css run time.

var myEvent:IEventDispatcher =
StyleManager.loadStyleDeclarations(fontSource[0].src,true,false,Applicat
ionDomain.currentDomain);
myEvent.addEventListener(StyleEvent.COMPLETE,fontComplete);
myEvent.addEventListener(StyleEvent.ERROR,fontError);

Any help is appreciated, Thanks

 



RE: [flexcoders] Re: new Component() ?

2008-07-24 Thread Alex Harui
Yes, I think you can specify the name of the class as you did.  Not sure
if it gets further decorated or what happens if you have a collision of
names.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Wednesday, July 23, 2008 11:52 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: new Component() ?

 

If you have:

mx:Component id=inlineEditor className=MyClass
  mx:Canvas/
/mx:Component

You get a subclass of Canvas named MyClass, and a local public scoped
instance of an IFactory called inlineEditor, right?

-Josh



On Thu, Jul 24, 2008 at 3:36 PM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

If you've defined a component via mx:Component, the name is
auto-generated as Josh says, but it generates an IFactory, so you can
use the factory to get new instances

 

mx:List id=myList

mx:itemRenderer

mx:Component

mx:Canvas

..

 

 

From AS:

 

 myList.itemRenderer.newInstance()

 



From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ]
On Behalf Of rafaelrfc00
Sent: Wednesday, July 23, 2008 9:53 PM
To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
Subject: [flexcoders] Re: new Component() ?

 

Text was just an example. 

It can be date, text, textarea, some other customcomponents. I was
just curious how i would create item renderes without creating a file.

I thought if you are able to use mx:component you would be able to
create it from actionscript as well.

guess i was wrong. Flex didn't think about everything, do they? :P

raf

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

 Well no, you can't do what you're asking :)
 
 When you use:
 
 mx:component
 canvas
 ...
 /canvas
 /mx:component
 
 It's creating a new subclass of Canvas with a generated name, and
you can't
 create new classes at run-time without bytecode manipulation (which
isn't
 really an option in Flex yet unfortunately).
 
 But what exactly are you trying to achieve? If you're just
displaying text,
 but it needs to be different to the field data, what you need is a
 labelFunction, not an itemRenderer.
 
 -Josh
 
 On Thu, Jul 24, 2008 at 10:34 AM, Rafael Faria
[EMAIL PROTECTED]
 wrote:
 
  Hi Pedro,
 
  How do you mean about putting some getters? Can you give me an
example?
 
  Thanks
  Raf
 
 
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Pedro Sena sena.pedro@
wrote:
  
   Hi Rafael,
  
   What do u think of put some getters in your object instead of
create
  various
   item renderers that just have little funcionality ?
  
   Just my 2 cents
  
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt 
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo ! Groups
  Links
 
 
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  

 



RE: [flexcoders] Re: Runtime CSS and SWF is not a loadable module

2008-07-24 Thread Alex Harui
The attached SWF works fine for me.

 

Maybe clean the project and rebuild.  Make sure the SDK version you are
using for both SWFs are the same.  Post the test app SWF if there are
still problems

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jamal wally
Sent: Wednesday, July 23, 2008 10:24 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Runtime CSS and SWF is not a loadable module

 

Hello again,

OK, I'm sending the style swf as an attachment to this post. If it
doesn't work, I will email directly to you Alex (thank you very much for
your patience). 

Alex, to answer your question about the location of the style swf: The
style SWF is local to my machine and lives in a subdirectory of the
project. 

I named the flex project testRuntimeCss and the project files are in:
~/Documents/Flex Builder 3/testRuntimeCss/
The main MXML file is in the default location (src/) and the style CSS
and SWF files are both in assets/.

Let me also point out that in order to minimize the potential for
user-error on my part, I have re-done my test runtime css Flex Project
so that it follows the Adobe example at:
http://livedocs.adobe.com/flex/3/html/help.html?content=styles_10.html
http://livedocs.adobe.com/flex/3/html/help.html?content=styles_10.html


I copied/pasted their example simple CSS into a file called
BasicStyles.css which lives in the assets/ folder of my project. For
completeness, here is the content of the CSS file, copied directly from
the Adobe help page listed above.

/* styles/runtime/assets/BasicStyles.css */
Button {
fontSize: 24;
color: #FF9933;
}

Label {
fontSize: 24;
color: #FF9933;
}

I then compiled the CSS file into a SWF with:
 mxmlc BasicStyle.css

The resulting swf, BasicStyle.swf, is attached.

By the way, I am using the mxmlc app from SDK 3.0.0 (on Mac Leopard)
 which mxmlc
/Applications/Adobe Flex Builder 3/sdks/3.0.0/bin/mxmlc

Another thing to point out is that I have done this both with Compile
CSS to SWF option for the BasicStyle.css file on and off. Both
approaches give the same result (runtime error -- described below).

I then copied/pasted the MXML content from the Adobe help page into my
main MXML file. Again, for completeness, here is the MXML that I used:

?xml version=1.0?
!-- styles/BasicApp.mxml --
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
mx:Script
![CDATA[
import mx.styles.StyleManager;

public function applyRuntimeStyleSheet():void {
StyleManager.loadStyleDeclarations(../assets/BasicStyles.swf)
}
]]
/mx:Script 
mx:Label text=Click the button to load a new CSS-based SWF file/
mx:Button id=b1 label=Click Me click=applyRuntimeStyleSheet()/
/mx:Application


When I debug in FB3, the application SWF successfully loads in my web
browser. But when I click on the button labeled Click Me, the
application crashes. The error I get is:

Error: Unable to load style(SWF is not a loadable module):
../assets/BasicStyles.swf.

Just before that error, I get the following trace which suggests that
the SWF style file was, indeed found.

[SWF] Users:jbattat:Documents:Flex Builder
3:testRuntimeCss:assets:BasicStyles.swf - 34,571 bytes after
decompression

Please let me know if you find a problem with the attached swf. 

-- j

 



[flexcoders] Zoom Tile Container

2008-07-24 Thread Nate Pearson
I want to make a custom component and I think I can extend the tile
container to do it.

Here's what I want to do:
Have four boxes fill up the screen.  If I click on one of the boxes
that box zooms to fill the whole screen and the other three boxes
shrink to nothing.  

Inside of that box I want another set of boxes, lets say 6.  If I
click on that box it zooms and does the same thing as above. 

Can anyone point me in the right direction?  I'm pretty good at making
custom components so if someone could just kinda nudge me in the right
direction that would be great.

Thanks!

Nate



Re: [flexcoders] How to Reset ProgressBar?

2008-07-24 Thread gabsaga

I have tried progressBar.setProgress(0, 100) but it looks like it doesn't
have any effect. Is it because the mode in my progress bar is set to
polled ? When I change the mode to manual, I don't see any progress. It
says at 0 all the time.




Adnan Doric wrote:
 
 progressBar.setProgress( 0, 100 );
 
 --- In flexcoders@yahoogroups.com, gabsaga [EMAIL PROTECTED] wrote:

 
 I have an application that when you click on a button, it loads an
 image in a
 panel. There is a progress bar that shows progress on the image being
 loaded. The progress bar works fine when I load the first image but
 when I
 load subsequent images, it still shows the last status of the first
 progress
 bar. Is there a way to reset a progress bar so that it starts from 0
 each
 time a new image is loaded?
 
 Thanks.
 
 Gabsaga
 -- 
 View this message in context:
 http://www.nabble.com/How-to-Reset-ProgressBar--tp18634463p18634463.html
 Sent from the FlexCoders mailing list archive at Nabble.com.

 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-Reset-ProgressBar--tp18634463p18637875.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] ColorPicker.selectedColor to #hex

2008-07-24 Thread Merrill, Jason
I don't mean for this to be a cross-post, I sent it to Flashcoders
accidentally.
This must have been done many times before.  How can I translate the
ColorPicker.selectedValue to a 6 digit hex number? i.e. if the color
selected is, 66, if I trace ColorPicker.selectedColor, traces 102. I
tried gooling for an Actionscript hex converter, but didn't come up with
anything. This is in order to display the selected hex# to the user as
#006699, not to manipulate the number.  

Thanks.

 

Jason Merrill
Bank of America 
Enterprise Technology  Global Risk LLD
Instructional Technology  Media 

Join the Bank of America Flash Platform Developer Community
blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default.as
px  

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  GTO Innovative Learning Blog
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.
aspx   subscribe
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts
/SubNew.aspx?List=\{41BD3FC9-BB07-4763-B3AB-A6C7C99C5B8D\}Source=http:/
/sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/Posts/Archive.aspx
 . 



Re: [flexcoders] Datagrid Query Issue

2008-07-24 Thread Scott Bachman
On the change event for dgCountry, do another httpService call passing in
the country identifier as a parameter (e.g. dgCountry.selectedItem.id) to
filter your store query by the country.

Scott

On Wed, Jul 23, 2008 at 8:15 PM, spark.edesigns [EMAIL PROTECTED]
wrote:

   New to Flex but enjoying it!

 I have a datagrid, dgCountry, that is populated by a httpservice call. The
 datagrid shows the
 list of countries in a group, for example, Latin America, Caribbean, etc,
 etc.

 When the user chooses a country from the grid, I need to query the database
 again to locate
 the store locations in the chosen country and populate another grid, the
 dgStoreList.

 How is the accomplished in FLEX 2? I've been working at this for quite some
 time but can't
 find a solution. Please help, I'm dying over here!!

 All knowledge is greatly appreciated.

 cheers.

  



[flexcoders] Re: need help with a custom item renderer

2008-07-24 Thread ndele_sutton
thanks, alex.  that worked like a charm.

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

 I'd start with mx.controls.listClasses.ListItemRenderer.  It can 
already
 display an icon and text.  Copy the source and modify as needed.
 Putting stuff at negative coordinates is generally not recommended.
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of ndele_sutton
 Sent: Wednesday, July 23, 2008 7:35 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] need help with a custom item renderer
 
  
 
 i am developing using flex 3.0 and was trying to expand on some of 
 the item renderer examples that i saw at alex's flex closet, but i 
 ran into some trouble. i am trying to create a renderer that has a 
 clickable image and a text component. i decided to subclass 
TextInput 
 and add a preceding image but it just doesn't render properly. when 
 first displayed, the image is positioned at x=-8, y=-8 despite 
 explicitly setting the x and y coordinates. when the mouseover 
forces 
 a redraw, the image is properly positioned. also, there appears to 
be 
 a thin border at the bottom of the cell that i cannot get rid of. 
any 
 help would be appreciated. the code is listed below. i am new to 
 flex, so alternatives to this approach are welcome.
 
 thanks
 
 ublic class ParameterRenderer extends TextInput
 {
 private var image:Image;
 
 public function ParameterRenderer()
 {
 super();
 setStyle(borderStyle, none);
 setStyle(paddingBottom, 0);
 }
 
 override public function validateNow():void
 {
 // see BackgroundColorRenderer
 }
 
 override protected function updateDisplayList(w:Number, 
 h:Number):void {
 super.updateDisplayList(w, h);
 
 // lifted from CenteredImage
 if (image.content) {
 var contentHolder:Loader = image.content.parent as Loader;
 contentHolder.width = contentHolder.contentLoaderInfo.width;
 contentHolder.height = contentHolder.contentLoaderInfo.height;
 contentHolder.x = textField.x;
 contentHolder.y = (h - contentHolder.contentLoaderInfo.height) / 2;
 }
 }
 
 override protected function createChildren():void {
 super.createChildren();
 
 textField.selectable = false;
 
 if (!image) {
 image = new Image();
 // attempt to get image to position properly
 image.width = 16;
 image.height = 16;
 image.source = ../img/delete2.gif;
 addChild(DisplayObject(image));
 image.addEventListener(MouseEvent.CLICK, delete_onClick);
 invalidateDisplayList();
 image.move(2,0);
 }
 }
 
 override protected function createBorder():void {
 // thought this might get rid of bottom border
 }
 
 public function delete_onClick(event:MouseEvent):void {
 // do something
 }





Re: [flexcoders] How to Reset ProgressBar?

2008-07-24 Thread gabsaga

Just additional information to make everything clear.

In my ActionScript, I have the following:

private var progressBar:ProgressBar;

public function clickHandler(event:MouseEvent):void
{
image1.source = list.selectedItem.photoUrl;
progressBar = new ProgressBar();
progressBar.indeterminate = false;
progressBar.mode = polled;
progressBar.label = Loaded %3%%;
progressBar.source = image1;
addChild(progressBar);
}

private function completeHandler(event:Event):void 
{
// remove progress bar
removeChild(progressBar);
}


My mxml file has the following:

mx:Image id=image1 width=100% height=100% maintainAspectRatio=true 
complete=completeHandler(event) /


When the image is being loaded, the progress bar shows progress but when
subsequent images are loaded the progress bar stays at the same state it was
when the first image completely loaded.

How do I reset it?



gabsaga wrote:
 
 I have tried progressBar.setProgress(0, 100) but it looks like it doesn't
 have any effect. Is it because the mode in my progress bar is set to
 polled ? When I change the mode to manual, I don't see any progress. It
 says at 0 all the time.
 
 
 
 
 Adnan Doric wrote:
 
 progressBar.setProgress( 0, 100 );
 
 --- In flexcoders@yahoogroups.com, gabsaga [EMAIL PROTECTED] wrote:

 
 I have an application that when you click on a button, it loads an
 image in a
 panel. There is a progress bar that shows progress on the image being
 loaded. The progress bar works fine when I load the first image but
 when I
 load subsequent images, it still shows the last status of the first
 progress
 bar. Is there a way to reset a progress bar so that it starts from 0
 each
 time a new image is loaded?
 
 Thanks.
 
 Gabsaga
 -- 
 View this message in context:
 http://www.nabble.com/How-to-Reset-ProgressBar--tp18634463p18634463.html
 Sent from the FlexCoders mailing list archive at Nabble.com.

 
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-Reset-ProgressBar--tp18634463p18638873.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: Alternating colors for AdvancedDataGrid

2008-07-24 Thread Everson Alves da Silva
--- In flexcoders@yahoogroups.com, Everson Alves [EMAIL PROTECTED] wrote:

 Hi,
 
 I need to use alternate colors for items within a ADG. 
alternatingItemColors
 is not what i'm looking for because I need that child objects have 
the same
 color as their parent. So the only alternating colors is depth 1. 
Thanks.
 -- 
 Jhonny Everson


any ideas?



[flexcoders] alert button order

2008-07-24 Thread joshua gatcke
Anyone know if it is possible to control the order of buttons in an  
alert? According to the docs adobe has predetermined the button order  
for us.

Currently the alert's buttons read [yes] [no], however our entire app  
has all our controls in reverse order [no] [yes]. This design decision  
is reflected in 100's of places through out our app and for  
consistence sake, we need to make alerts the same way. IMHO it seems  
extremely far fetched that we would have to go to such extremes as re- 
writing the alert class to put out buttons in a specific order.

Is there something in the docs I am missing? Has anyone else  
discovered this shortcoming? Any suggestions?

Thanks in advance for your help and advice. 


[flexcoders] how to handle pausing or selecting an item on datagrid with a wait

2008-07-24 Thread Jason B
I'm trying to have action script handle selecting an item on the
datagrid then loading a httpservice already defined.
The code works in terms of selecting the item on the grid but only works
on a second call ...it's almost like i need a pause in between the
selectedIndex and the http service call.

I also tried selecteditem but that doesnt work at all, at least i have
it working on a second call but just wondering how to handle the call on
the first try.



 stations_info_request.send();  //this sends off the http service
 station_searchgrid.selectedIndex=0; //this selects the item in the
grid
 stationsearchgrid_click.send(); //this sends off the http service
which gets a primary key from the selected item on the grid FAILS HERE !





[flexcoders] Re: Trees, DataProviders and dynamic screen updates

2008-07-24 Thread Eric Cooper
Thanks, Tracy.

What I meant was that I was adding Objects like { object:myObject } to 
ArrayCollection - 
where myObject was an instance of a proxy class - and whose properties were 
getting 
changed. 

I have now gone to a slightly different scheme, adding Objects like { 
object:mpObject, 
value:myObject.value } - and when 'value' property changes, I iterate through 
ArrayCollection, looking for match on 'object' - and, when I find that, I set 
'value' to new 
myObject.value. This seems to trigger necessary dispatch and Tree's rendering 
updates.

Thanks again for your help.
=Eric

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

 ...when the items referenced by the ArrayCollection change...  How is
 that happening?  The items... change?
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Eric Cooper
 Sent: Wednesday, July 23, 2008 6:24 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Trees, DataProviders and dynamic screen
 updates
 
  
 
 I am adding to and removing from ArrayCollection - and when I do that,
 the Tree items 
 refresh and are current. But when the items referenced by the
 ArrayCollection change, I 
 am doing nothing.
 
 Is there a way to touch the ArrayCollection so as to prompt Tree to
 reload (or reevaluate) 
 its dataProvider and call labelFunction to generate updated rendering?
 
 Or is the preferred way to step walk through ArrayCollection and modify
 (in place) the 
 changed objects?
 
 Thanks.
 =Eric
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  If you use the ArrayCollection API to make the updates to the
  dataProvider, the changes should automatically reflect in the UI.
  
  
  
  How are you updating the ArrayCollection items?
  
  
  
  Tracy
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of Eric Cooper
  Sent: Wednesday, July 23, 2008 3:53 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Trees, DataProviders and dynamic screen updates
  
  
  
  Hi,
  I am trying to display changes in state for proxy objects (where
 real
  state exists on a 
  server). I have defined a Tree and set its dataProvider to be an
  ArrayCollection. I have tried 
  having this be an array of references to actual proxy object and also
 as
  array of dynamically 
  created Objects (of form {name:foo.toString(), object:foo}
  
  Server-side events result in client being notified that properties in
  proxy object have 
  changed. I would like these changes in proxy object properties to
  propagate through the 
  Tree's items.
  
  I have searched docs and this forum, but not found anything that
  addresses this issue. At the 
  same time, I suspect that this is something that has been discussed -
  and may simply involve 
  setting some flag on the Tree or the DataProvider...
  
  Thanks for any help!
  =Eric
 






[flexcoders] Re: Why is my swf so big?

2008-07-24 Thread whatabrain
Thanks. My swf is now down to 65.7K (probably about 110KB with ADG). 
Still seems large, but it's much more manageable.

How do you do a link report?


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

 ADG also brings in the largest classes in the Flex framework. I 
just did a
 link report on one of my projects and here are some of the results 
for the
 ADG-related classes (I stopped at classes under 1k cause who really 
cares).
 This is the output of a link report on a non-optimized swf (so the 
#s are
 probably not accurate to what you would see in a production swf).
 
 AdvancedDataGrid - 103.1 k
 AdvancedListBase - 93.2 k
 AdvancedDataGridBaseEx - 87.6 k
 AdvancedDataGridBase - 28.2 k
 AdvancedDataGridColumn - 12.8 k
 AdvancedDataGridHeaderRenderer - 10.5 k
 AdvancedDataGridSortItemRenderer - 6.4 k
 AdvancedDataGridDragProxy - 3.6 k
 AdvancedListBaseContentHolder - 2.7 k
 AdvancedDataGridColumnGroup - 2.5 k
 AdvancedDataGridEvent - 2.4 k
 AdvancedDataGridHeaderHorizontalSeparator - 1.5 k
 AdvancedDataGridHeaderInfo - 1.3 k
 AdvancedDataGridBaseSelectionPending - 1.3 k
 AdvancedDataGridListData - 1.2 k
 AdvancedDataGridBaseSelectionData - 1 k
 IAdvancedDataGridRendererProvider - 1 k
 
 Then there are the hierarchical collection classes:
 
 HierarchicalCollectionView - 17.7 k
 HierarchicalCollectionViewCursor - 12 k
 HierarchicalData - 2.7 k
 IHierarchicalCollectionView - 2.7 k
 IHierarchicalData - 1,1 k
 
 So yeah, AdvancedDataGrid is 8,433 lines of code. If you add up the 
top 4
 classes in the list above (AdvancedDataGrid, AdvancedListBase,
 AdvancedDataGridEx, and AdvancedDataGridBase) you get a whopping 
total of
 26,521 lines of code. It makes me cry.
 
 So be aware.
 
 Doug
 
 On Tue, Jul 22, 2008 at 3:54 PM, Alex Harui [EMAIL PROTECTED] wrote:
 
 If you turn on the shared RSL, it will shrink the swf 
significantly.
 
 
 
  Frameworks tend to be heavy, especially if the focus is on RAD.  
Just look
  at any MFC app.  DG brings in the collections subsystem, ADG 
brings in
  hierarchical collections.
 
 
 
  The framework is not included in the Flash 9 runtime.  It has to 
be
  downloaded by some app into that user's browser, then other apps 
can use it.
 
  -Alex
 
 
   --
 
  *From:* flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] *On
  Behalf Of *whatabrain
  *Sent:* Tuesday, July 22, 2008 2:09 PM
  *To:* flexcoders@yahoogroups.com
  *Subject:* [flexcoders] Why is my swf so big?
 
 
 
  Probably an old question, but I didn't find anything useful by
  searching the group.
 
  I'm using the trial version of Flex Builder 3 Standard. I create 
a new
  Flex project, and, without writing any code, export a release 
build.
  The swf file size is 147KB. Then I create a project that contains
  nothing but an empty DataGrid. The file size grows to 242KB! 
Throw in
  an AdvancedDataGrid, and it's up to 300KB.
 
  Is there anything I can do to reduce the size? Even 147KB seems 
huge
  for an empty app. And why does DataGrid pump it up so much? I 
heard
  that the Flex framework was included in the Flash 9 runtime. If 
that's
  true, adding a DataGrid should have no effect on output size.
 
   
 





[flexcoders] Re: how to handle pausing or selecting an item on datagrid with a wait

2008-07-24 Thread Jason B
FYI

it works on the second call to the function im using but not the first
call?



[flexcoders] Re: ColorPicker.selectedColor to #hex

2008-07-24 Thread Doug Lowder
Check out Number.toString().  You can pass it a radix parameter of 16 
to convert the output to hex.

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

 I don't mean for this to be a cross-post, I sent it to Flashcoders
 accidentally.
 This must have been done many times before.  How can I translate the
 ColorPicker.selectedValue to a 6 digit hex number? i.e. if the color
 selected is, 66, if I trace ColorPicker.selectedColor, traces 
102. I
 tried gooling for an Actionscript hex converter, but didn't come up 
with
 anything. This is in order to display the selected hex# to the user 
as
 #006699, not to manipulate the number.  
 
 Thanks.
 
  
 
 Jason Merrill
 Bank of America 
 Enterprise Technology  Global Risk LLD
 Instructional Technology  Media 
 
 Join the Bank of America Flash Platform Developer Community
 
blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default.
as
 px  
 
 Are you a Bank of America associate interested in innovative 
learning
 ideas and technologies?
 Check out our internal  GTO Innovative Learning Blog
 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/defaul
t.
 aspx   subscribe
 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layou
ts
 /SubNew.aspx?List=\{41BD3FC9-BB07-4763-B3AB-A6C7C99C5B8D\}
Source=http:/
 /sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/Posts/Archive.
aspx
  .





RE: [flexcoders] alert button order

2008-07-24 Thread Alex Harui
I suppose you could switch the labels Alert uses for Yes and No and
handle the click events appropriately.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of joshua gatcke
Sent: Thursday, July 24, 2008 12:43 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] alert button order

 

Anyone know if it is possible to control the order of buttons in an 
alert? According to the docs adobe has predetermined the button order 
for us.

Currently the alert's buttons read [yes] [no], however our entire app 
has all our controls in reverse order [no] [yes]. This design decision 
is reflected in 100's of places through out our app and for 
consistence sake, we need to make alerts the same way. IMHO it seems 
extremely far fetched that we would have to go to such extremes as re- 
writing the alert class to put out buttons in a specific order.

Is there something in the docs I am missing? Has anyone else 
discovered this shortcoming? Any suggestions?

Thanks in advance for your help and advice. 

 



RE: [flexcoders] Re: how to handle pausing or selecting an item on datagrid with a wait

2008-07-24 Thread Alex Harui
Maybe a call to validateNow will help.

 

Note that send() is asynchronous so the list won't have items to select
until the result event.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jason B
Sent: Thursday, July 24, 2008 1:22 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: how to handle pausing or selecting an item on
datagrid with a wait

 

FYI

it works on the second call to the function im using but not the first
call?

 



RE: [flexcoders] how to handle pausing or selecting an item on datagrid with a wait

2008-07-24 Thread Tracy Spratt
You understand that all data service calls are asynchronous?

 

I assume the code you posted is just excerpted lines?  If that is really
the way it is written, then that is the problem, and you do NOT
understand that data service calls are asynchronous!

 

Post a little more code, specifically the change hendler on the DG.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jason B
Sent: Thursday, July 24, 2008 4:02 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] how to handle pausing or selecting an item on
datagrid with a wait

 

I'm trying to have action script handle selecting an item on the
datagrid then loading a httpservice already defined.
The code works in terms of selecting the item on the grid but only works
on a second call ...it's almost like i need a pause in between the
selectedIndex and the http service call.

I also tried selecteditem but that doesnt work at all, at least i have
it working on a second call but just wondering how to handle the call on
the first try.

stations_info_request.send(); //this sends off the http service
station_searchgrid.selectedIndex=0; //this selects the item in the
grid
stationsearchgrid_click.send(); //this sends off the http service
which gets a primary key from the selected item on the grid FAILS HERE !

 



RE: [flexcoders] Re: Trees, DataProviders and dynamic screen updates

2008-07-24 Thread Tracy Spratt
That sounds like unnecessary work.

 

Again, when you say and whose properties were getting changed, how are
they getting changed?  By simple assignment?

 

If so, then you can call the ArrayCollection.itemUpdated() method.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Eric Cooper
Sent: Thursday, July 24, 2008 4:14 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Trees, DataProviders and dynamic screen
updates

 

Thanks, Tracy.

What I meant was that I was adding Objects like { object:myObject } to
ArrayCollection - 
where myObject was an instance of a proxy class - and whose properties
were getting 
changed. 

I have now gone to a slightly different scheme, adding Objects like {
object:mpObject, 
value:myObject.value } - and when 'value' property changes, I iterate
through 
ArrayCollection, looking for match on 'object' - and, when I find that,
I set 'value' to new 
myObject.value. This seems to trigger necessary dispatch and Tree's
rendering updates.

Thanks again for your help.
=Eric

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

 ...when the items referenced by the ArrayCollection change... How is
 that happening? The items... change?
 
 Tracy
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Eric Cooper
 Sent: Wednesday, July 23, 2008 6:24 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Trees, DataProviders and dynamic screen
 updates
 
 
 
 I am adding to and removing from ArrayCollection - and when I do that,
 the Tree items 
 refresh and are current. But when the items referenced by the
 ArrayCollection change, I 
 am doing nothing.
 
 Is there a way to touch the ArrayCollection so as to prompt Tree to
 reload (or reevaluate) 
 its dataProvider and call labelFunction to generate updated rendering?
 
 Or is the preferred way to step walk through ArrayCollection and
modify
 (in place) the 
 changed objects?
 
 Thanks.
 =Eric
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  If you use the ArrayCollection API to make the updates to the
  dataProvider, the changes should automatically reflect in the UI.
  
  
  
  How are you updating the ArrayCollection items?
  
  
  
  Tracy
  
  
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of Eric Cooper
  Sent: Wednesday, July 23, 2008 3:53 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Trees, DataProviders and dynamic screen
updates
  
  
  
  Hi,
  I am trying to display changes in state for proxy objects (where
 real
  state exists on a 
  server). I have defined a Tree and set its dataProvider to be an
  ArrayCollection. I have tried 
  having this be an array of references to actual proxy object and
also
 as
  array of dynamically 
  created Objects (of form {name:foo.toString(), object:foo}
  
  Server-side events result in client being notified that properties
in
  proxy object have 
  changed. I would like these changes in proxy object properties to
  propagate through the 
  Tree's items.
  
  I have searched docs and this forum, but not found anything that
  addresses this issue. At the 
  same time, I suspect that this is something that has been discussed
-
  and may simply involve 
  setting some flag on the Tree or the DataProvider...
  
  Thanks for any help!
  =Eric
 


 



[flexcoders] Re: ColorPicker.selectedColor to #hex

2008-07-24 Thread Merrill, Jason
Thanks guys, here was my solution:

public static function decimalToHexidecimal(number:Number, 
upperCase:Boolean=false, addPound:Boolean=false, addOx:Boolean=false ):String
{
var hexString:String = Number(number).toString(16);
while (hexString.length  6) hexString = 0 + hexString;
if (addPound) hexString = # + hexString;
if (addOx) hexString = 0x + hexString;
if (upperCase) hexString = hexString.toUpperCase();
return hexString;
}

Jason Merrill 
Bank of America 
Enterprise Technology  Global Risk LLD 
Instructional Technology  Media

Join the Bank of America Flash Platform Developer Community  
blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default.aspx 

Are you a Bank of America associate interested in innovative learning ideas and 
technologies?
Check out our internal  GTO Innovative Learning Blog 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/default.aspx  
 subscribe 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layouts/SubNew.aspx?List=\{41BD3FC9-BB07-4763-B3AB-A6C7C99C5B8D\}Source=http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/Posts/Archive.aspx
 . 




Re: [flexcoders] Re: new Component() ?

2008-07-24 Thread Josh McDonald
Quick test:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
creationComplete=cc()

mx:Script
![CDATA[
import flash.utils.getDefinitionByName;
import flash.utils.describeType;
import flash.utils.getQualifiedClassName;

private function cc():void
{

trace(component == );
trace(getQualifiedClassName(component));

trace();

trace(component.newInstance() == );
trace(getQualifiedClassName(component.newInstance()));

trace();

//Check for runtime exception
try
{
getDefinitionByName(NewComponent);
trace(getDefinitionByName success);
}
catch (e:*)
{
trace(getDefinitionByName fail);
}

}

]]
/mx:Script

mx:Component id=component className=NewComponent
mx:Canvas
mx:Button id=button1 label=Button 1!/
/mx:Canvas
/mx:Component

/mx:Application

Yields:

component ==
mx.core::ClassFactory

component.newInstance() ==
NewComponent

getDefinitionByName success


Also looked at describeType for newInstance() - it seems it's creating a
proper subclass of Canvas, in the global namespace.

The MXMLC compiler is smart enough to resolve and compile the following:

var t:NewComponent = new NewComponent();

But Builder's not smart enough to ctrl-click to the mx:component
definition.

-Josh

On Fri, Jul 25, 2008 at 3:52 AM, Alex Harui [EMAIL PROTECTED] wrote:

  Yes, I think you can specify the name of the class as you did.  Not sure
 if it gets further decorated or what happens if you have a collision of
 names.


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Josh McDonald
 *Sent:* Wednesday, July 23, 2008 11:52 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Re: new Component() ?



 If you have:

 mx:Component id=inlineEditor className=MyClass
   mx:Canvas/
 /mx:Component

 You get a subclass of Canvas named MyClass, and a local public scoped
 instance of an IFactory called inlineEditor, right?

 -Josh

  On Thu, Jul 24, 2008 at 3:36 PM, Alex Harui [EMAIL PROTECTED] wrote:

 If you've defined a component via mx:Component, the name is
 auto-generated as Josh says, but it generates an IFactory, so you can use
 the factory to get new instances



 mx:List id=myList

 mx:itemRenderer

 mx:Component

 mx:Canvas

 ..





 From AS:



  myList.itemRenderer.newInstance()


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *rafaelrfc00
 *Sent:* Wednesday, July 23, 2008 9:53 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Re: new Component() ?



 Text was just an example.

 It can be date, text, textarea, some other customcomponents. I was
 just curious how i would create item renderes without creating a file.

 I thought if you are able to use mx:component you would be able to
 create it from actionscript as well.

 guess i was wrong. Flex didn't think about everything, do they? :P

 raf

 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  Well no, you can't do what you're asking :)
 
  When you use:
 
  mx:component
  canvas
  ...
  /canvas
  /mx:component
 
  It's creating a new subclass of Canvas with a generated name, and
 you can't
  create new classes at run-time without bytecode manipulation (which
 isn't
  really an option in Flex yet unfortunately).
 
  But what exactly are you trying to achieve? If you're just
 displaying text,
  but it needs to be different to the field data, what you need is a
  labelFunction, not an itemRenderer.
 
  -Josh
 
  On Thu, Jul 24, 2008 at 10:34 AM, Rafael Faria [EMAIL PROTECTED]
  wrote:
 
   Hi Pedro,
  
   How do you mean about putting some getters? Can you give me an
 example?
  
   Thanks
   Raf
  
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Pedro Sena sena.pedro@ wrote:
   
Hi Rafael,
   
What do u think of put some getters in your object instead of create
   various
item renderers that just have little funcionality ?
   
Just my 2 cents
   
  
  
   
  
   --
   Flexcoders Mailing List
   FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
   Search Archives:
   http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
   Links
  
  
  
  
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 




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

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]

 





[flexcoders] Re: ColorPicker.selectedColor to #hex

2008-07-24 Thread Doug Lowder
Cool.  Here are a couple other ways to pad the 0's, for anyone with 
an aversion to loops:

hexString = 00.substr(0, 6 - hexString.length) + hexString;

or:

var pads: Array = [00, 0, , 000, 00, 0, ];
hexString = pads[hexString.length] + hexString;

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

 Thanks guys, here was my solution:
 
 public static function decimalToHexidecimal(number:Number, 
upperCase:Boolean=false, addPound:Boolean=false, 
addOx:Boolean=false ):String
 {
   var hexString:String = Number(number).toString(16);
   while (hexString.length  6) hexString = 0 + hexString;
   if (addPound) hexString = # + hexString;
   if (addOx) hexString = 0x + hexString;
   if (upperCase) hexString = hexString.toUpperCase();
   return hexString;
 }
 
 Jason Merrill 
 Bank of America 
 Enterprise Technology  Global Risk LLD 
 Instructional Technology  Media
 
 Join the Bank of America Flash Platform Developer Community  
blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default.
aspx 
 
 Are you a Bank of America associate interested in innovative 
learning ideas and technologies?
 Check out our internal  GTO Innovative Learning Blog 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/defaul
t.aspx   subscribe 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layou
ts/SubNew.aspx?List=\{41BD3FC9-BB07-4763-B3AB-A6C7C99C5B8D\}
Source=http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/Po
sts/Archive.aspx .





[flexcoders] Web-based Sync data - Flex/Air VS.NET

2008-07-24 Thread itdanny2002
I need to build a web-based Application which 
has data in Client  Server, sync is required.

AIR 
---
Support SQLite in client side - It's ok but we 
want web-based so that installation is not 
required. Go to anywhere, just a click to see 
data.

FLEX

It can't have database operation such as SQLite 
in client. I don't think cookie is a solution due 
to large volume of data.

I need to defence and stay in Flex faction in 
my company. Any good point(s) that make me won't 
in camp of VS.Net ?





[flexcoders] lightweight eclipse

2008-07-24 Thread Sherif Abdou
Is there a lightweight Eclipse IDE or a lightweight notepad for Flex Builder 
that does not consume as much memory as eclipse. I need at least 
autocompletion, Starting Eclipse almost takes 250,000K of ram and
debugging/running sometimes shots it up to 350,000K. I am running Vista
with 2GB and by the end of the day 95% of my ram is gone.  Anyone
having that problem?


  

[flexcoders] Re: new Component() ?

2008-07-24 Thread Rafael Faria
Amy,
and how would you add elements to the canvas?! or to the itemrender
itself? because the myRenderer wont have addChild so i can add new
elements. And how do you change the properties of the Canvas? You
adding the Class but you aint adding the whole component i was talking
about. 

Suppose that i want to create for instance

mx:itemRenderer
mx:Component
   mx:Canvas backgroundColor=#000 
  mx:Image
source=@Embed('../assets/images/icons/clear_green_button.png') /  
  mx:TextInput text={data.firstname} alpha=0.5
click={test()} /
   /mx:Canvas
/mx:Component
/mx:itemRenderer

How i would create this on the fly and add to the itemrenderer?

this is just to ilustrate what i want. I will need to create different
components according to the parameters of my variables that's the
reason i'm struggling to do it dynamically.

If i only knew how to do this from AS3 it would help me a lot.

Thanks


 This makes it sound like the equivalent to new Component() in AS 
 might be
 
 myRenderer:ClassFactory = new ClassFactory(mx.containers.Canvas);
 
 Presumably from there you can add stuff to myRenderer before using it 
 as your rubber stamp, but I've never personally used ClassFactory 
 for anything other than setting global properties on a class I 
 created in AS3 or MXML.
 
 Is this a correct interpretation of how AS3 works?
 
 Thanks;
 
 Amy






[flexcoders] Centering Bar Chart labels vertically

2008-07-24 Thread Amy
Hi, all;

Is there any way to center a bar chart's labels vertically?  The 
labelAlign style only changes the horizontal alignment.

Thanks;

Amy



Re: [flexcoders] Only last row shown from dataservice result (Hibernate+LCDS)

2008-07-24 Thread Yohanes Iwan Sugiarto
Thank you Jeff,
Yes, I'm using combination of 3 properties (String - Long - Long) as an
identity,
Also I'd like to confirm that toString() does the trick. Thanks


On 7/24/08, Jeff Vroom [EMAIL PROTECTED] wrote:

It sounds like you have a complex identity object – i.e. not a set of
 primitive properties.   Try adding a toString() method in your identity
 class which returns a unique string for each instance.   I think that we
 fixed this in 2.6 so that is not necessary (now available on our web site).




 Jeff

  CUT

   Recent Activity

-  68
New 
 Membershttp://groups.yahoo.com/group/flexcoders/members;_ylc=X3oDMTJnNnAyZjRxBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDdnRsBHNsawN2bWJycwRzdGltZQMxMjE2ODc5NjA3

 Visit Your Group
 http://groups.yahoo.com/group/flexcoders;_ylc=X3oDMTJmM3FnZnA2BF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDdnRsBHNsawN2Z2hwBHN0aW1lAzEyMTY4Nzk2MDc-
  Yahoo! Finance

 It's Now 
 Personalhttp://us.ard.yahoo.com/SIG=13o6aap4d/M=493064.12016257.12445664.8674578/D=groups/S=1705007207:NC/Y=YAHOO/EXP=1216886807/L=/B=ib3JAULaX.c-/J=1216879607401164/A=4507179/R=0/SIG=12de4rskk/*http://us.rd.yahoo.com/evt=50284/*http://finance.yahoo.com/personal-finance

 Guides, news,

 advice  more.
  Search Ads

 Get new 
 customers.http://us.ard.yahoo.com/SIG=13oanfmut/M=493064.12016308.12445700.8674578/D=groups/S=1705007207:NC/Y=YAHOO/EXP=1216886807/L=/B=ir3JAULaX.c-/J=1216879607401164/A=3848641/R=0/SIG=1312g85fq/*http://searchmarketing.yahoo.com/arp/srchv2.php?o=US2003cmp=Yahooctv=Groups2s=Ys2=s3=b=50

 List your web site

 in Yahoo! Search.
  Yahoo! Groups

 Everyday Wellness 
 Zonehttp://us.ard.yahoo.com/SIG=13oh6a468/M=493064.12662708.12980600.8674578/D=groups/S=1705007207:NC/Y=YAHOO/EXP=1216886807/L=/B=i73JAULaX.c-/J=1216879607401164/A=5349275/R=0/SIG=11nhsqmjq/*http://advision.webevents.yahoo.com/EverydayWellness/

 Check out featured

 healthy living groups.
 .

 




-- 
/ i w a n


[flexcoders] Re: new Component() ?

2008-07-24 Thread Rafael Faria
I found this class

package modules.renderers
{
import mx.core.ClassFactory;

import org.osflash.thunderbolt.Logger;

public class InitFactory extends ClassFactory
{
private var initObject:Object;

public function InitFactory(generator:Class, initObject:Object)
{
super(generator);
this.initObject = initObject;
}

public override function newInstance():*
{
var result:* = super.newInstance();

for(var propertyName:String in initObject)
{
try
{
result[propertyName] = 
initObject[propertyName];
}catch (e:Error)
{
trace(e.message);
}
}
return result;
}
}
}


and i'm able to add a new class on the fly doing


dgc.itemRenderer = new InitFactory(TextInput, {text:'Value inside the
text input'});


now i'm struggling to make the textinput, to get values from the
data variable coming from the dataProvider. You know, when inside
the itemrender you can use {data.firstname + ' ' + data.lastname}
like: mx:TextInput text={data.firstname + ' ' + data.lastname} /

With the example i gave above, how i would do that?

Raf



Any idea how i would pass this data to the checkbox label 




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

 You can't add to the class definition of the Canvas at runtime.
 ClassFactory has a properties bag where you can have properties slapped
 on the new instance, but that's not really a new class definition.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Amy
 Sent: Thursday, July 24, 2008 7:36 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: new Component() ?
 
  
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Alex Harui aharui@ wrote:
 
  If you've defined a component via mx:Component, the name is
  auto-generated as Josh says, but it generates an IFactory, so you 
 can
  use the factory to get new instances
  
  
  
  mx:List id=myList
  
  mx:itemRenderer
  
  mx:Component
  
  mx:Canvas
  
  ..
  
  
  
  
  
  From AS:
  
  
  
  myList.itemRenderer.newInstance()
 
 This makes it sound like the equivalent to new Component() in AS 
 might be
 
 myRenderer:ClassFactory = new ClassFactory(mx.containers.Canvas);
 
 Presumably from there you can add stuff to myRenderer before using it 
 as your rubber stamp, but I've never personally used ClassFactory 
 for anything other than setting global properties on a class I 
 created in AS3 or MXML.
 
 Is this a correct interpretation of how AS3 works?
 
 Thanks;
 
 Amy





[flexcoders] HttpService Request Parmeters

2008-07-24 Thread ron_mori
Coders,

Think: HttpService used for REST service calls.  On a POST method I
would like to supply a user/password set of parameters in the
following XML format.

?xml version='1.0' encoding='UTF-8'?
login xmlns=http://mydomain.com/project;
xmlns:foo=http://mydomain.com/parms; 
userfoo/user
passwordbar/password
/login

Unfortunately the REST services are not subject to change, hence the
need to follow their format.

My research tells me that I'm asking too much of the httpService
'request'.  Only the simpliest xml generation or form encoding is
available.

Any suggestions or ideas?

thanks in advance.



Re: [flexcoders] HttpService Request Parmeters

2008-07-24 Thread Josh McDonald
You can POST arbitrary xml data to HttpService. What you can't do is
anything other than GET or POST which makes interacting with most (true)
REST services difficult or impossible.

-Josh

On Fri, Jul 25, 2008 at 10:23 AM, ron_mori [EMAIL PROTECTED] wrote:

 Coders,

 Think: HttpService used for REST service calls.  On a POST method I
 would like to supply a user/password set of parameters in the
 following XML format.

 ?xml version='1.0' encoding='UTF-8'?
 login xmlns=http://mydomain.com/project;
 xmlns:foo=http://mydomain.com/parms; 
 userfoo/user
 passwordbar/password
 /login

 Unfortunately the REST services are not subject to change, hence the
 need to follow their format.

 My research tells me that I'm asking too much of the httpService
 'request'.  Only the simpliest xml generation or form encoding is
 available.

 Any suggestions or ideas?

 thanks in advance.


 

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






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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] Web-based Sync data - Flex/Air VS.NET

2008-07-24 Thread Josh McDonald
Anything that lives in a browser is not going to be able to have a local
database, going to microsoft won't change that.

On Fri, Jul 25, 2008 at 11:03 AM, itdanny2002 [EMAIL PROTECTED] wrote:

 I need to build a web-based Application which
 has data in Client  Server, sync is required.

 AIR
 ---
 Support SQLite in client side - It's ok but we
 want web-based so that installation is not
 required. Go to anywhere, just a click to see
 data.

 FLEX
 
 It can't have database operation such as SQLite
 in client. I don't think cookie is a solution due
 to large volume of data.

 I need to defence and stay in Flex faction in
 my company. Any good point(s) that make me won't
 in camp of VS.Net ?




 

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






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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


[flexcoders] Re: new Component() ?

2008-07-24 Thread Amy
See my comments inline

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

 I found this class
 
 package modules.renderers
 {
   import mx.core.ClassFactory;
   
   import org.osflash.thunderbolt.Logger;
 
   public class InitFactory extends ClassFactory
   {
   private var initObject:Object;
   
   public function InitFactory(generator:Class, 
initObject:Object)
   {
   super(generator);
   this.initObject = initObject;
   }
   
   public override function newInstance():*
   {
   var result:* = super.newInstance();
   
   for(var propertyName:String in initObject)
   {
   try
   {
   result[propertyName] = 
initObject[propertyName];
   }catch (e:Error)
   {
   trace(e.message);
   }
   }
   return result;
   }
   }
 }
 
 
 and i'm able to add a new class on the fly doing
 
 
 dgc.itemRenderer = new InitFactory(TextInput, {text:'Value inside 
the
 text input'});

You're probably better off just using 

dgc.itemRenderer=new ClassFactory(TextInput)

 now i'm struggling to make the textinput, to get values from the
 data variable coming from the dataProvider. You know, when inside
 the itemrender you can use {data.firstname + ' ' + data.lastname}
 like: mx:TextInput text={data.firstname + ' ' + data.lastname} /
 
 With the example i gave above, how i would do that?

TextInput already implements IDropInListItemRenderer, so it can 
probably set the text through pfm.  When you set the properties in 
the second argument of ClassFactory, that sets it for ALL instances 
of the Factory.  That's what ClassFactories are for :-).  
IDropInListItemRenderer is the interface that lets components know 
how to pick up datagrid data without custom methods.

HTH;

Amy



[flexcoders] Re: alert button order

2008-07-24 Thread lampei
I guess you could use the PopUpManager class to create your own alert
style box.  You could then mimic all of the Alert functionality, but
have your own Alert box that could do whatever you want to with it. 
You could even add an OK/Yes button if you wanted :)

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

 Anyone know if it is possible to control the order of buttons in an  
 alert? According to the docs adobe has predetermined the button order  
 for us.
 
 Currently the alert's buttons read [yes] [no], however our entire app  
 has all our controls in reverse order [no] [yes]. This design decision  
 is reflected in 100's of places through out our app and for  
 consistence sake, we need to make alerts the same way. IMHO it seems  
 extremely far fetched that we would have to go to such extremes as re- 
 writing the alert class to put out buttons in a specific order.
 
 Is there something in the docs I am missing? Has anyone else  
 discovered this shortcoming? Any suggestions?
 
 Thanks in advance for your help and advice.





Re: [flexcoders] Re: new Component() ?

2008-07-24 Thread Josh McDonald
You can't really do what you want, without creating custom item renderer
components or custom IFactories. You could possibly create one base
component, and pass in a callback function as one of the parameters in
initObject for an InitFactory, but that's a terrible idea for any number of
reasons, chiefly your code will be unreadable and unmaintainable.

Honestly if you'd just tell us what and why you're actually trying to
achieve for the end user (and why you just can't use regular renderer
classes or labelfunctions) then we'd be able to give you alternatives that
make sense for your use case.

-Josh

On Fri, Jul 25, 2008 at 10:14 AM, Rafael Faria [EMAIL PROTECTED]
wrote:

 I found this class

 package modules.renderers
 {
import mx.core.ClassFactory;

import org.osflash.thunderbolt.Logger;

public class InitFactory extends ClassFactory
{
private var initObject:Object;

public function InitFactory(generator:Class,
 initObject:Object)
{
super(generator);
this.initObject = initObject;
}

public override function newInstance():*
{
var result:* = super.newInstance();

for(var propertyName:String in initObject)
{
try
{
result[propertyName] =
 initObject[propertyName];
}catch (e:Error)
{
trace(e.message);
}
}
return result;
}
}
 }


 and i'm able to add a new class on the fly doing


 dgc.itemRenderer = new InitFactory(TextInput, {text:'Value inside the
 text input'});


 now i'm struggling to make the textinput, to get values from the
 data variable coming from the dataProvider. You know, when inside
 the itemrender you can use {data.firstname + ' ' + data.lastname}
 like: mx:TextInput text={data.firstname + ' ' + data.lastname} /

 With the example i gave above, how i would do that?

 Raf



 Any idea how i would pass this data to the checkbox label




 --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:
 
  You can't add to the class definition of the Canvas at runtime.
  ClassFactory has a properties bag where you can have properties slapped
  on the new instance, but that's not really a new class definition.
 
 
 
  
 
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
  Behalf Of Amy
  Sent: Thursday, July 24, 2008 7:36 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: new Component() ?
 
 
 
  --- In flexcoders@yahoogroups.com 
  mailto:flexcoders%40yahoogroups.comflexcoders%2540yahoogroups.com
 
  , Alex Harui aharui@ wrote:
  
   If you've defined a component via mx:Component, the name is
   auto-generated as Josh says, but it generates an IFactory, so you
  can
   use the factory to get new instances
  
  
  
   mx:List id=myList
  
   mx:itemRenderer
  
   mx:Component
  
   mx:Canvas
  
   ..
  
  
  
  
  
   From AS:
  
  
  
   myList.itemRenderer.newInstance()
 
  This makes it sound like the equivalent to new Component() in AS
  might be
 
  myRenderer:ClassFactory = new ClassFactory(mx.containers.Canvas);
 
  Presumably from there you can add stuff to myRenderer before using it
  as your rubber stamp, but I've never personally used ClassFactory
  for anything other than setting global properties on a class I
  created in AS3 or MXML.
 
  Is this a correct interpretation of how AS3 works?
 
  Thanks;
 
  Amy
 



 

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






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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


RE: [flexcoders] Re: ColorPicker.selectedColor to #hex

2008-07-24 Thread Alex Harui
Both of which will be significantly more memory efficient than the loop.
The array of constants is probably most efficient

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Doug Lowder
Sent: Thursday, July 24, 2008 4:06 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ColorPicker.selectedColor to #hex

 

Cool. Here are a couple other ways to pad the 0's, for anyone with 
an aversion to loops:

hexString = 00.substr(0, 6 - hexString.length) + hexString;

or:

var pads: Array = [00, 0, , 000, 00, 0, ];
hexString = pads[hexString.length] + hexString;

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

 Thanks guys, here was my solution:
 
 public static function decimalToHexidecimal(number:Number, 
upperCase:Boolean=false, addPound:Boolean=false, 
addOx:Boolean=false ):String
 {
 var hexString:String = Number(number).toString(16);
 while (hexString.length  6) hexString = 0 + hexString;
 if (addPound) hexString = # + hexString;
 if (addOx) hexString = 0x + hexString;
 if (upperCase) hexString = hexString.toUpperCase();
 return hexString;
 }
 
 Jason Merrill 
 Bank of America 
 Enterprise Technology  Global Risk LLD 
 Instructional Technology  Media
 
 Join the Bank of America Flash Platform Developer Community 
blocked::http://sharepoint.bankofamerica.com/sites/tlc/flash/default.
aspx 
 
 Are you a Bank of America associate interested in innovative 
learning ideas and technologies?
 Check out our internal GTO Innovative Learning Blog 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/defaul
t.aspx  subscribe 
blocked::http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/_layou
ts/SubNew.aspx?List=\{41BD3FC9-BB07-4763-B3AB-A6C7C99C5B8D\}
Source=http://sharepoint.bankofamerica.com/sites/ddc/rd/blog/Lists/Po
sts/Archive.aspx .


 



RE: [flexcoders] Drag and drop steals all mouse events

2008-07-24 Thread Mike Pearce
DragOver.. Have no idea how I missed it!

 

Thanks Kenneth =)



[flexcoders] highlightAlphas style lost when rotate panel for 90 degree

2008-07-24 Thread jjchiu
Hi, I have some highlightAlphas style setting for my panel header, 
however, if I rotate the panel between 0~90 degree, I notice that the 
highlight style on the titlebar is lost. (If I rotate anywhere 
between 91+ to 360 degree, it looks fine)

I also have highlightAlphas for a button in the panel, the button 
doesn't lost the hightlight style.

Any suggestion?

Thanks

Button {
highlightAlphas: 1, 0.3;
}

Panel
{
headerColors: #cc, #ff;
highlightAlphas: 1, 0.3;
}

mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
mx:Style source=test.css/

mx:Script
![CDATA[
[Bindable]
public var angle:int=0;

private function rotatePanel():void {
rotate.end();
angle += 90;
rotate.play();
}
  ]]
/mx:Script

mx:Rotate originX=9 originY=9 id=rotate angleFrom={angle-
90} angleTo={angle} target={myPanel}/
mx:HDividedBox width=30% height=30% y=500
mx:Panel id=myPanel title=Rotate Effect Example 
horizontalAlign=center 
width=200 height=200 layout=horizontal
paddingTop=5 paddingLeft=10 paddingRight=10 
paddingBottom=5
mx:ControlBar
mx:Button label=Rotate 45 Degrees click=rotatePanel
();/
/mx:ControlBar
/mx:Panel
/mx:HDividedBox
/mx:Application




Re: [flexcoders] Re: alert button order

2008-07-24 Thread Josh McDonald
I often mimic Alert with a mxml component based on tileWindow, and just add
a static show method that calls out to PopupManager.createPopup() and
centrePopup(), it's easy as pie.

-Josh

On Fri, Jul 25, 2008 at 11:36 AM, lampei [EMAIL PROTECTED] wrote:

 I guess you could use the PopUpManager class to create your own alert
 style box.  You could then mimic all of the Alert functionality, but
 have your own Alert box that could do whatever you want to with it.
 You could even add an OK/Yes button if you wanted :)

 --- In flexcoders@yahoogroups.com, joshua gatcke [EMAIL PROTECTED] wrote:
 
  Anyone know if it is possible to control the order of buttons in an
  alert? According to the docs adobe has predetermined the button order
  for us.
 
  Currently the alert's buttons read [yes] [no], however our entire app
  has all our controls in reverse order [no] [yes]. This design decision
  is reflected in 100's of places through out our app and for
  consistence sake, we need to make alerts the same way. IMHO it seems
  extremely far fetched that we would have to go to such extremes as re-
  writing the alert class to put out buttons in a specific order.
 
  Is there something in the docs I am missing? Has anyone else
  discovered this shortcoming? Any suggestions?
 
  Thanks in advance for your help and advice.
 



 

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






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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] event listeners on Sprites - performance problem

2008-07-24 Thread Rick Winscot
Are all 10-15 markers visible at one time? If not, you might want to
consider the 'recycle' method that is employed with item renderers.
Either that... or have a single MEGA WONKA sprite where each marker is
drawn at the appropriate location.

Rick Winscot


On Wed, Jul 23, 2008 at 12:42 PM, Alex Harui [EMAIL PROTECTED] wrote:
 10 to 15 shouldn't be a problem.  Make sure it is only that many (and you
 didn't create more and stack them on top of the others).



 Are you saying the addEventLIstener calls are affecting the cpu load?



 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of ibo
 Sent: Wednesday, July 23, 2008 8:05 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] event listeners on Sprites - performance problem



 MIME-Version: 1.0
 Content-Type: multipart/alternative;
 boundary=0-617774704-1216825475=:34053

 --0-617774704-1216825475=:34053
 Content-Type: text/plain; charset=us-ascii

 I created a component what I call bookmark bar where there are markers that
 you can click
 to jump/scroll to a particular portion of a list (given the index). Similar
 to Eclipse/Flexbuilder when you have
 errors and there are markers on the right side pane that lets you jump to
 the erroneous line. I am using
 this for a datagrid using Canvas as parent component.

 var uiComponent:UIComponent = new UIComponent();
 addChild(uiComponent);

 for (var i:int=0; i_dataProvider.length; i++) {
 var bm:Bookmark = _dataProvider[i] as Bookmark;
 
 sprite = new MySprite(); // extends Sprite. Creates an instance Sprite for
 each marker
 sprite.graphics.lineStyle(3, bm.color, 1, false, LineScaleMode.NORMAL,
 CapsStyle.SQUARE);
 sprite.graphics.moveTo(x, y);
 sprite.graphics.lineTo(x + xOffset, y);
 ...
 sprite.addEventListener(MouseEvent.CLICK, scrollToLine);
 sprite.buttonMode = true;
 ...
 uiComponent.addChild(sprite);
 }

 It works as expected but I noticed it is heavy on CPU and affects the
 responsiveness of the
 UI. CPU spikes at 55% to 60% even if I only have a few markers (10 to 15).
 The lag is very noticeable because just hovering the mouse pointer over the
 list,
 the item highlighter, delay in rendering the display is very evident.
 It doesnt happen on my app when I turn it off.

 Am I doing this right? any workaround?

 Regards,
 Stephen

 --0-617774704-1216825475=:34053
 Content-Type: text/html; charset=us-ascii

 htmlheadstyle type=text/css!-- DIV {margin:0px;}
 --/style/headbodydiv style=font-family:times new roman, new york,
 times, serif;font-size:12ptdivI created a component what I call bookmark
 bar where there are markers that you can clickbrto jump/scroll to a
 particular portion of a list (given the index). Similar to
 Eclipse/Flexbuilder when you havebrerrors and there are markers on the
 right side pane that lets you jump to the erroneous line. I am using
 brthis for a datagrid using Canvas as parent
 component.brbrnbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; var uiComponent:UIComponent = new
 UIComponent();nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; brnbsp;! nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 addChild(uiComponent);brbrnbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; for (var
 i:int=0; ilt;_dataProvider.length; i++)
 {brnbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; var bm:Bookmark = _dataProvider[i] as
 Bookmark;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; brnbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 brnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
 sprite = new MySprite();nbsp;nbsp; // extends Sprite. Creates an instance
 Sprite f! or each markerbrnbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; sprite.graphics.lineStyle(3, bm.color, 1, false,
 LineScaleMode.NORMAL, CapsStyle.SQUARE);nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; brnbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; sprite.graphics.moveTo(x,nbsp; y);brnbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; sprite.graphics.lineTo(x + xOffset,
 y);brnbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; ... nbsp;nbsp;
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; brnbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 sprite.addEventListener(MouseEvent.CLICK, scrollToLine);br!
 gt;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; sprite.buttonMode =
 true;brnbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; ...brnbsp;nbsp;nbsp;
 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;
 uiComponent.addChild(sprite);nbsp;nbsp;nbsp;
 

[flexcoders] Specifying pie chart fill based on data set

2008-07-24 Thread ozziegt
Is there any way to override how the fill color is determined for a
PieSeries? I would like to use specific colors based on the data. For
example, I have a series of data like this

monday, 30
tuesday, 20
wednesday, 20
thursday, 20
monday, 10
sunday, 5

I would like to make sure both items with the label monday have the
same color. I don't want them grouped together; I need to maintain the
proper order of the data. Any suggestions?

Thanks



RE: [flexcoders] Re: new Component() ?

2008-07-24 Thread Alex Harui
Well, let's be fair.  You can't create new class defs at runtime, and it
would help to have a better definition of the problem so we aren't
taking stabs in the dark.

 

However, to take one last stab, let's assume that Rafael is trying to
have declarative or runtime data-schema mapping to a renderer.  The list
classes allow one field to be mapped via labelField and multiple fields
to be mapped via labelFunction, but if you use labelFunction you lose
the reverse mapping which a custom editor might want.  IOW, if your
labelFunction merges firstName and lastName, and you want an editor to
parse apart what goes back into firstName and what goes back into
lastName, you need to identify those fields to the editor, and if you
want to re-purpose the same editor to work on  some other pair
(managerFirstName, managerLastName), that should be possible as well.

 

A subclass of TextInput might have field1 and field2 properties that are
strings, and an overridden commitProperties that takes the data and
pulls the two fields from it.  It might have an onFocusOut handler that
writes back the parsed string into those two fields.

 

You can just use the standard properties bag on ClassFactory to set
those fields or just set them in the mx:Component declaration

 

mx:Component

comp:MultiFieldTextInput field1=firstName
field2=lastName /

/mx:Component

 

-Alex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Thursday, July 24, 2008 7:37 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: new Component() ?

 

You can't really do what you want, without creating custom item renderer
components or custom IFactories. You could possibly create one base
component, and pass in a callback function as one of the parameters in
initObject for an InitFactory, but that's a terrible idea for any number
of reasons, chiefly your code will be unreadable and unmaintainable.

Honestly if you'd just tell us what and why you're actually trying to
achieve for the end user (and why you just can't use regular renderer
classes or labelfunctions) then we'd be able to give you alternatives
that make sense for your use case.

-Josh 

On Fri, Jul 25, 2008 at 10:14 AM, Rafael Faria
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
wrote:

I found this class

package modules.renderers
{
   import mx.core.ClassFactory;

   import org.osflash.thunderbolt.Logger;

   public class InitFactory extends ClassFactory
   {
   private var initObject:Object;

   public function InitFactory(generator:Class,
initObject:Object)
   {
   super(generator);
   this.initObject = initObject;
   }

   public override function newInstance():*
   {
   var result:* = super.newInstance();

   for(var propertyName:String in initObject)
   {
   try
   {
   result[propertyName] =
initObject[propertyName];
   }catch (e:Error)
   {
   trace(e.message);
   }
   }
   return result;
   }
   }
}


and i'm able to add a new class on the fly doing


dgc.itemRenderer = new InitFactory(TextInput, {text:'Value inside the
text input'});


now i'm struggling to make the textinput, to get values from the
data variable coming from the dataProvider. You know, when inside
the itemrender you can use {data.firstname + ' ' + data.lastname}
like: mx:TextInput text={data.firstname + ' ' + data.lastname} /

With the example i gave above, how i would do that?

Raf



Any idea how i would pass this data to the checkbox label





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

 You can't add to the class definition of the Canvas at runtime.
 ClassFactory has a properties bag where you can have properties
slapped
 on the new instance, but that's not really a new class definition.



 

 From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ]
On
 Behalf Of Amy
 Sent: Thursday, July 24, 2008 7:36 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
 Subject: [flexcoders] Re: new Component() ?




 --- In flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%2540yahoogroups.com 

 , Alex Harui aharui@ wrote:
 
  If you've defined a component via mx:Component, the name is
  auto-generated as Josh says, but it generates an IFactory, so you
 can
  use the factory to get new instances
 
 
 
  mx:List id=myList
 
  

[flexcoders] Re: can not connect jms service between two application

2008-07-24 Thread xieyf0413
who can help me ?

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

 I'm trying to connect to our JMS service (Apache ActiveMQ), if I 
 add my jms service to my app application  , everything goes well ,  
 flex can consumer the jms message ; but if  my app application is an 
 application ,and jms service is another application ,my flex client can 
 not receive jms message ,why ? my web server is tomcat 5.5 .
 who can help me ,thanks very much.





[flexcoders] Re: Web-based Sync data - Flex/Air VS.NET

2008-07-24 Thread itdanny2002
But if the only to do the sync is to 
install a program in desktop. Then, 
any benefit of AIR is better than 
Microsoft'stuf ? Sorry, it is a management
question so that we can sell our management
while our other development is on MS platform.
Inshort, any good point in AIR which is better ?

Thanks

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

 Anything that lives in a browser is not going to be able to have a 
local
 database, going to microsoft won't change that.
 
 On Fri, Jul 25, 2008 at 11:03 AM, itdanny2002 [EMAIL PROTECTED] 
wrote:
 
  I need to build a web-based Application which
  has data in Client  Server, sync is required.
 
  AIR
  ---
  Support SQLite in client side - It's ok but we
  want web-based so that installation is not
  required. Go to anywhere, just a click to see
  data.
 
  FLEX
  
  It can't have database operation such as SQLite
  in client. I don't think cookie is a solution due
  to large volume of data.
 
  I need to defence and stay in Flex faction in
  my company. Any good point(s) that make me won't
  in camp of VS.Net ?
 
 
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups
  Links
 
 
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for 
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





Re: [flexcoders] Re: Web-based Sync data - Flex/Air VS.NET

2008-07-24 Thread Josh McDonald
Well the benefits (assuming silverlight as the other option) become:

* Cross platform
* Much more traction and an established user base
* Standard (client-side) libraries are allegedly a lot broader in Flex than
Silverlight. Just repeating what I've heard here though, I don't know for
sure.
* Not evil - IMHO of course, but this _is_ a Flex list ;-)
* Don't quote me on this, but probably substantially cheaper (for a
commercial license) unless you already have VS

I don't know what capabilities the Silverlight equivalent of AIR has. But
AIR apps will run on Mac Win and Linux, whereas Silverlight is Mac / Win
(client plugin) only, development is Win only. Also the AIR equivalent may
even be windows-clients only. Personally I avoid anything that means I'm
stuck with any one platform. I like choice, what if the next Windows / OS X
is awful?

-Josh

On Fri, Jul 25, 2008 at 2:00 PM, itdanny2002 [EMAIL PROTECTED] wrote:

 But if the only to do the sync is to
 install a program in desktop. Then,
 any benefit of AIR is better than
 Microsoft'stuf ? Sorry, it is a management
 question so that we can sell our management
 while our other development is on MS platform.
 Inshort, any good point in AIR which is better ?

 Thanks

 --- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:
 
  Anything that lives in a browser is not going to be able to have a
 local
  database, going to microsoft won't change that.
 
  On Fri, Jul 25, 2008 at 11:03 AM, itdanny2002 [EMAIL PROTECTED]
 wrote:
 
   I need to build a web-based Application which
   has data in Client  Server, sync is required.
  
   AIR
   ---
   Support SQLite in client side - It's ok but we
   want web-based so that installation is not
   required. Go to anywhere, just a click to see
   data.
  
   FLEX
   
   It can't have database operation such as SQLite
   in client. I don't think cookie is a solution due
   to large volume of data.
  
   I need to defence and stay in Flex faction in
   my company. Any good point(s) that make me won't
   in camp of VS.Net ?
  
  
  
  
   
  
   --
   Flexcoders Mailing List
   FAQ:
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
   Search Archives:
   http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!
 Groups
   Links
  
  
  
  
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 



 

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






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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


[flexcoders] Re: Web-based Sync data - Flex/Air VS.NET

2008-07-24 Thread itdanny2002
Cross Platform - depends on application. Our siutation - don't mind
Cheaper - we bought VS.net already. 

This one sounds good:-
Standard (client-side) libraries are allegedly 
a lot broader in Flex than Silverlight.

Anyone has examples which related to database application ?



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

 Well the benefits (assuming silverlight as the other option) become:
 
 * Cross platform
 * Much more traction and an established user base
 * Standard (client-side) libraries are allegedly a lot broader in 
Flex than
 Silverlight. Just repeating what I've heard here though, I don't 
know for
 sure.
 * Not evil - IMHO of course, but this _is_ a Flex list ;-)
 * Don't quote me on this, but probably substantially cheaper (for a
 commercial license) unless you already have VS
 
 I don't know what capabilities the Silverlight equivalent of AIR 
has. But
 AIR apps will run on Mac Win and Linux, whereas Silverlight is 
Mac / Win
 (client plugin) only, development is Win only. Also the AIR 
equivalent may
 even be windows-clients only. Personally I avoid anything that 
means I'm
 stuck with any one platform. I like choice, what if the next 
Windows / OS X
 is awful?
 
 -Josh
 
 On Fri, Jul 25, 2008 at 2:00 PM, itdanny2002 [EMAIL PROTECTED] wrote:
 
  But if the only to do the sync is to
  install a program in desktop. Then,
  any benefit of AIR is better than
  Microsoft'stuf ? Sorry, it is a management
  question so that we can sell our management
  while our other development is on MS platform.
  Inshort, any good point in AIR which is better ?
 
  Thanks
 
  --- In flexcoders@yahoogroups.com, Josh McDonald dznuts@ 
wrote:
  
   Anything that lives in a browser is not going to be able to 
have a
  local
   database, going to microsoft won't change that.
  
   On Fri, Jul 25, 2008 at 11:03 AM, itdanny2002 Chow.Danny@
  wrote:
  
I need to build a web-based Application which
has data in Client  Server, sync is required.
   
AIR
---
Support SQLite in client side - It's ok but we
want web-based so that installation is not
required. Go to anywhere, just a click to see
data.
   
FLEX

It can't have database operation such as SQLite
in client. I don't think cookie is a solution due
to large volume of data.
   
I need to defence and stay in Flex faction in
my company. Any good point(s) that make me won't
in camp of VS.Net ?
   
   
   
   

   
--
Flexcoders Mailing List
FAQ:
  http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!
  Groups
Links
   
   
   
   
  
  
   --
   Therefore, send not to know For whom the bell tolls. It tolls 
for
  thee.
  
   :: Josh 'G-Funk' McDonald
   :: 0437 221 380 :: josh@
  
 
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups
  Links
 
 
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for 
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





Re: [flexcoders] Re: Web-based Sync data - Flex/Air VS.NET

2008-07-24 Thread Sid Maskit
It sounds like this won't matter in your case, but there is the often important 
point that flex and air applications run not only on Windows, but also on OS X, 
and maybe even on Linux as well.

I don't know enough about .net to address this question, but I do wonder 
whether it provides for a desktop database, assuming that not all of your users 
have something like Access installed.

The truth is that you could probably use SQLite along with .net, but I'm not 
sure how easy or difficult that would be. Adobe has done a pretty nice job of 
integrating Air with SQLite.

There is also the question of whether you already have a bunch of programmers 
who are experts in .net, or have a bunch of folks who are experts in 
ActionScript. In my experience, programmers tend to be way more effective in an 
environment that they are already for Millie or with, as opposed to trying to 
learn a whole new environment on the fly.



- Original Message 
From: itdanny2002 [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 24, 2008 9:00:50 PM
Subject: [flexcoders] Re: Web-based Sync data - Flex/Air  VS.NET


But if the only to do the sync is to 
install a program in desktop. Then, 
any benefit of AIR is better than 
Microsoft'stuf ? Sorry, it is a management
question so that we can sell our management
while our other development is on MS platform.
Inshort, any good point in AIR which is better ?

Thanks

--- In [EMAIL PROTECTED] ups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 Anything that lives in a browser is not going to be able to have a 
local
 database, going to microsoft won't change that.
 
 On Fri, Jul 25, 2008 at 11:03 AM, itdanny2002 Chow.Danny@ ... 
wrote:
 
  I need to build a web-based Application which
  has data in Client  Server, sync is required.
 
  AIR
  ---
  Support SQLite in client side - It's ok but we
  want web-based so that installation is not
  required. Go to anywhere, just a click to see
  data.
 
  FLEX
  
  It can't have database operation such as SQLite
  in client. I don't think cookie is a solution due
  to large volume of data.
 
  I need to defence and stay in Flex faction in
  my company. Any good point(s) that make me won't
  in camp of VS.Net ?
 
 
 
 
   - - --
 
  --
  Flexcoders Mailing List
  FAQ: 
http://groups. yahoo.com/ group/flexcoders /files/flexcoder sFAQ.txt
  Search Archives:
  http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo! 
Groups
  Links
 
 
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for 
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]





  

Re: [flexcoders] Re: Web-based Sync data - Flex/Air VS.NET

2008-07-24 Thread Josh McDonald
We know plenty about AIR, but you're in the wrong place to ask about
Silverlight I think.

-Josh

On Fri, Jul 25, 2008 at 2:45 PM, itdanny2002 [EMAIL PROTECTED] wrote:

 Cross Platform - depends on application. Our siutation - don't mind
 Cheaper - we bought VS.net already.

 This one sounds good:-
 Standard (client-side) libraries are allegedly
 a lot broader in Flex than Silverlight.

 Anyone has examples which related to database application ?



 --- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:
 
  Well the benefits (assuming silverlight as the other option) become:
 
  * Cross platform
  * Much more traction and an established user base
  * Standard (client-side) libraries are allegedly a lot broader in
 Flex than
  Silverlight. Just repeating what I've heard here though, I don't
 know for
  sure.
  * Not evil - IMHO of course, but this _is_ a Flex list ;-)
  * Don't quote me on this, but probably substantially cheaper (for a
  commercial license) unless you already have VS
 
  I don't know what capabilities the Silverlight equivalent of AIR
 has. But
  AIR apps will run on Mac Win and Linux, whereas Silverlight is
 Mac / Win
  (client plugin) only, development is Win only. Also the AIR
 equivalent may
  even be windows-clients only. Personally I avoid anything that
 means I'm
  stuck with any one platform. I like choice, what if the next
 Windows / OS X
  is awful?
 
  -Josh
 
  On Fri, Jul 25, 2008 at 2:00 PM, itdanny2002 [EMAIL PROTECTED] wrote:
 
   But if the only to do the sync is to
   install a program in desktop. Then,
   any benefit of AIR is better than
   Microsoft'stuf ? Sorry, it is a management
   question so that we can sell our management
   while our other development is on MS platform.
   Inshort, any good point in AIR which is better ?
  
   Thanks
  
   --- In flexcoders@yahoogroups.com, Josh McDonald dznuts@
 wrote:
   
Anything that lives in a browser is not going to be able to
 have a
   local
database, going to microsoft won't change that.
   
On Fri, Jul 25, 2008 at 11:03 AM, itdanny2002 Chow.Danny@
   wrote:
   
 I need to build a web-based Application which
 has data in Client  Server, sync is required.

 AIR
 ---
 Support SQLite in client side - It's ok but we
 want web-based so that installation is not
 required. Go to anywhere, just a click to see
 data.

 FLEX
 
 It can't have database operation such as SQLite
 in client. I don't think cookie is a solution due
 to large volume of data.

 I need to defence and stay in Flex faction in
 my company. Any good point(s) that make me won't
 in camp of VS.Net ?




 

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




   
   
--
Therefore, send not to know For whom the bell tolls. It tolls
 for
   thee.
   
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: josh@
   
  
  
  
   
  
   --
   Flexcoders Mailing List
   FAQ:
 http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
   Search Archives:
   http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!
 Groups
   Links
  
  
  
  
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 



 

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






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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] Re: Web-based Sync data - Flex/Air VS.NE

2008-07-24 Thread Josh McDonald
Speech-to-text again?

I've been ready for Millie for weeks, but she just doesn't return my calls
:)

On Fri, Jul 25, 2008 at 2:53 PM, Sid Maskit [EMAIL PROTECTED] wrote:

  It sounds like this won't matter in your case, but there is the often
 important point that flex and air applications run not only on Windows, but
 also on OS X, and maybe even on Linux as well.

 I don't know enough about .net to address this question, but I do wonder
 whether it provides for a desktop database, assuming that not all of your
 users have something like Access installed.

 The truth is that you could probably use SQLite along with .net, but I'm
 not sure how easy or difficult that would be. Adobe has done a pretty nice
 job of integrating Air with SQLite.

 There is also the question of whether you already have a bunch of
 programmers who are experts in .net, or have a bunch of folks who are
 experts in ActionScript. In my experience, programmers tend to be way more
 effective in an environment that they are already for Millie or with, as
 opposed to trying to learn a whole new environment on the fly.

 - Original Message 
 From: itdanny2002 [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Thursday, July 24, 2008 9:00:50 PM
 Subject: [flexcoders] Re: Web-based Sync data - Flex/Air  VS.NET

  But if the only to do the sync is to
 install a program in desktop. Then,
 any benefit of AIR is better than
 Microsoft'stuf ? Sorry, it is a management
 question so that we can sell our management
 while our other development is on MS platform.
 Inshort, any good point in AIR which is better ?

 Thanks

 --- In [EMAIL PROTECTED] ups.com flexcoders%40yahoogroups.com, Josh
 McDonald [EMAIL PROTECTED] wrote:
 
  Anything that lives in a browser is not going to be able to have a
 local
  database, going to microsoft won't change that.
 
  On Fri, Jul 25, 2008 at 11:03 AM, itdanny2002 Chow.Danny@ ...
 wrote:
 
   I need to build a web-based Application which
   has data in Client  Server, sync is required.
  
   AIR
   ---
   Support SQLite in client side - It's ok but we
   want web-based so that installation is not
   required. Go to anywhere, just a click to see
   data.
  
   FLEX
   
   It can't have database operation such as SQLite
   in client. I don't think cookie is a solution due
   to large volume of data.
  
   I need to defence and stay in Flex faction in
   my company. Any good point(s) that make me won't
   in camp of VS.Net ?
  
  
  
  
    - - --
  
   --
   Flexcoders Mailing List
   FAQ:
 http://groups. yahoo.com/ group/flexcoders /files/flexcoder 
 sFAQ.txthttp://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
   Search Archives:
   http://www.mail- archive.com/ flexcoders% 40yahoogroups. 
   comYahoohttp://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!

 Groups
   Links
  
  
  
  
 
 
  --
  Therefore, send not to know For whom the bell tolls. It tolls for
 thee.
 
  :: Josh 'G-Funk' McDonald
  :: 0437 221 380 :: [EMAIL PROTECTED]
 


 




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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


[flexcoders] Re: Loading style sheets at run time

2008-07-24 Thread kaushal_bshah
Alex,

Thanks for quick response. Following are the answers to your questions.

1. Yes I have embed each fonts in .swf, and use following css
@font-face {
src: url(adlib_embed.swf);
fontFamily: Ad Lib;
}

2. Sorry I have no idea on selectors. Is it the thing which I am missing? 

3. MyTextArea is a mxml file, and root tag of this component is TextArea

4. The code which loads CSS SWF is in the module but again in Card
component. (main app  module  card (custom component)load CSS SWF)


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

 Are you embedding fonts?  Or just setting the font family?
 
  
 
 What kinds of selectors are you using to tell MyTextArea about its font?
 
  
 
 What does MyTextArea extend?
 
  
 
 Is the code that loads the CSS SWF in the module or main app?
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of kaushal_bshah
 Sent: Thursday, July 24, 2008 3:06 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Loading style sheets at run time
 
  
 
 I have created few fonts css and compiled them into swf to load them
 at run time.
 
 There is one custom component Card, is placed into a Module and this
 Module is loaded by main application.
 
 The Card component contains TextArea, MyTextArea(custom component) and
 ComboBox (which display font list).
 
 Now when user select any font from ComboBox, Card component load css
 and when it get loaded, it updates fontFamily of TextArea and
 MyTextArea. But only TextArea updated with new fonts while MyTextArea
 is not getting update anytime.
 
 Can anyone help me to figure out this.
 
 I am using following code to load css run time.
 
 var myEvent:IEventDispatcher =
 StyleManager.loadStyleDeclarations(fontSource[0].src,true,false,Applicat
 ionDomain.currentDomain);
 myEvent.addEventListener(StyleEvent.COMPLETE,fontComplete);
 myEvent.addEventListener(StyleEvent.ERROR,fontError);
 
 Any help is appreciated, Thanks





Re: [flexcoders] Re: Web-based Sync data - Flex/Air VS.NE

2008-07-24 Thread Sid Maskit
Yeah, she doesn't return my calls either.

My favorite signature is from somebody on the speechcoders mailing group. It 
goes like this: This message written using speech recognition software. It 
makes mistakes. I correct some of them.

I do most of my message writing using speech recognition, and I try to 
proofread it, but it is obviously an imperfect process. (I'm really hoping this 
message has no glaring errors in it.)



- Original Message 
From: Josh McDonald [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 24, 2008 10:12:50 PM
Subject: Re: [flexcoders] Re: Web-based Sync data - Flex/Air  VS.NE


Speech-to-text again?

I've been ready for Millie for weeks, but she just doesn't return my calls :)


On Fri, Jul 25, 2008 at 2:53 PM, Sid Maskit [EMAIL PROTECTED] com wrote:

It sounds like this won't matter in your case, but there is the often important 
point that flex and air applications run not only on Windows, but also on OS X, 
and maybe even on Linux as well.

I don't know enough about .net to address this question, but I do wonder 
whether it provides for a desktop database, assuming that not all of your users 
have something like Access installed.

The truth is that you could probably use SQLite along with .net, but I'm not 
sure how easy or difficult that would be. Adobe has done a pretty nice job of 
integrating Air with SQLite.

There is also the question of whether you already have a bunch of programmers 
who are experts in .net, or have a bunch of folks who are experts in 
ActionScript. In my experience, programmers tend to be way more effective in an 
environment that they are already for Millie or with, as opposed to trying to 
learn a whole new environment on the fly.



- Original Message 
From: itdanny2002 [EMAIL PROTECTED] com
To: [EMAIL PROTECTED] ups.com
Sent: Thursday, July 24, 2008 9:00:50 PM
Subject: [flexcoders] Re: Web-based Sync data - Flex/Air  VS.NET


But if the only to do the sync is to 
install a program in desktop. Then, 
any benefit of AIR is better than 
Microsoft'stuf ? Sorry, it is a management
question so that we can sell our management
while our other development is on MS platform.
Inshort, any good point in AIR which is better ?

Thanks

--- In [EMAIL PROTECTED] ups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 Anything that lives in a browser is not going to be able to have a 
local
 database, going to microsoft won't change that.
 
 On Fri, Jul 25, 2008 at 11:03 AM, itdanny2002 Chow.Danny@ ... 
wrote:
 
  I need to build a web-based Application which
  has data in Client  Server, sync is required.
 
  AIR
  ---
  Support SQLite in client side - It's ok but we
  want web-based so that installation is not
  required. Go to anywhere, just a click to see
  data.
 
  FLEX
  
  It can't have database operation such as SQLite
  in client. I don't think cookie is a solution due
  to large volume of data.
 
  I need to defence and stay in Flex faction in
  my company. Any good point(s) that make me won't
  in camp of VS.Net ?
 
 
 
 
   - - --
 
  --
  Flexcoders Mailing List
  FAQ: 
http://groups. yahoo.com/ group/flexcoders /files/flexcoder sFAQ.txt
  Search Archives:
  http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo! 
Groups
  Links
 
 
 
 
 
 
 -- 
 Therefore, send not to know For whom the bell tolls. It tolls for 
thee.
 
 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED]



 


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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] com