Re: [flexcoders]How do I know if a class is on the Application?

2009-01-14 Thread dorkie dork from dorktown
I mean like this:

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

managers:MyBadPracticesClass /

/mx:Application

If it was a display object all the suggestions would work but it extends
EventDispatcher and manages states, etc. The problem was that the id was not
getting set. It also was not enumerated when I looped through the
application. What I had to do was implement the IMXMLObject interface. This
notified the application to call an initialized function that passed in a
reference to the document (application) and id of the instance both of which
are not present when you extend EventDispatcher or Object. I did this so
that I could make it behave like a singleton. But it's all working now in
bad practices land. :P

Paul, this is a reincarnation of the other question (posted before it was
solved).

On Mon, Jan 12, 2009 at 12:52 AM, Haykel BEN JEMIA hayke...@gmail.comwrote:

   I have to ask again: What do you mean with on the application?
 I you mean added to some display list, then it must be a subclass of
 DisplayObject.
 Or perhaps you can tell what you want to do exactly.

 Haykel Ben Jemia

 Allmas
 Web  RIA Development
 http://www.allmas-tn.com




 On Sun, Jan 11, 2009 at 5:42 AM, dorkie dork from dorktown 
 dorkiedorkfromdorkt...@gmail.com wrote:

   It's a manager class that extends EventDispatcher.

 On Sat, Jan 10, 2009 at 12:17 AM, Haykel BEN JEMIA hayke...@gmail.comwrote:

   What do you mean with on the application?
 If you mean added to the stage, then you can't find this out in the
 constructor. Make sure your class is a subclass of DisplayObject and listen
 to the added or addedToStage events.


 Haykel Ben Jemia

 Allmas
 Web  RIA Development
 http://www.allmas-tn.com





 On Sat, Jan 10, 2009 at 7:06 AM, dorkie dork from dorktown 
 dorkiedorkfromdorkt...@gmail.com wrote:

   I have a class on the application like this:

 managers:MyClass /

 How do I find out inside that class in the constructor if that class is
 on the Application?

 dorkie dork from dorktown™




  



[flexcoders]Change state without dispatching events

2009-01-14 Thread dorkie dork from dorktown
Is there a way to change states without generating an event?


[flexcoders]Count the number of arguments on a function

2009-01-14 Thread dorkie dork from dorktown
Is there a way to count how many arguments there are on a function from
outside that function? For example,

Class1:
// myFunction has one parameter of type string
myFunction(myParam:String) {

}

Class2:
someFunction() {
// for example,
// i want to get a count of arguments of myFunction, name, if they are
required and their type
var argumentLength = class1.myFunction.arguments.length;
var argumentName = class1.myFunction.arguments[0].name;
var argumentClass = class1.myFunction.arguments[0].class;
var argumentRequired = class1.myFunction.arguments[0].required;
}


Re: [flexcoders]Change state without dispatching events

2009-01-14 Thread p...@vin Uttarwar
Hi,
Yes you can do it  using databinding,
by keeping one of the variable which is aceessible from
anywhere throughout the application [inside static class like ModelLocator]
and according to
its change you can change the state.

2009/1/14 dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com

   Is there a way to change states without generating an event?
  



[flexcoders] flex playerProductInstall.swf

2009-01-14 Thread Kenneth Sutherland
If the user doesn't have then required version of flash player then they
see the playerProductInstall.swf that comes with flexbuilder and if they
select yes to the install then everything is great. But what if they say
'no', then they get nothing.  Is there any way to get the result back
from the player install swf so inside the javascript it can display some
alternative content.

 

How does anybody else handle it if the user declines the update which
means that they can't view the greatness of your latest app J

 

Cheers.

 



realise

.


Kenneth Sutherland

Technical Developer

Realise Ltd
Quay House, 142 Commercial Street, Leith, Edinburgh EH6 6LB
Tel 0131 476 7432
www.realise.com http://www.realise.com/ 

Check out some of our recent flex work:
* Focus on funds UK http://www.focusonfunds.co.uk/ 
* Focus on funds Europe
http://europe.standardlifeinvestments.com/distributor/products_and_serv
ices/going_further_focus_on_funds/index.html 
* Fund selector
http://uk.standardlifeinvestments.com/ifa/adviser_support/index.html 

* Video view
http://uk.standardlifeinvestments.com/ifa/market_views/video_view_and_m
p3s/index.html 
Realise are sponsors of the Marketing Society Scotland.
Realise Limited is registered in Scotland, SC172507.

 

 

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] Datagrid and sorting

2009-01-14 Thread Jason Crummack
Hi,

I'm currently working with a fairly large dataset within a grid and i'd 
like to change the mouse cursor/display informational text when the user 
clicks on the column headers to sort the grid, now i can get the start 
point of the sort using the headerRelease event but is there a way to 
know when the sort has completed so that i can set the status text / 
turn off the wait cursor?

Thanks

Jason Crummack
Easysoft Limited


Re: [flexcoders] Data Grid with dynamic columns ignoring % width or right style.

2009-01-14 Thread Wesley Acheson
On Mon, Jan 12, 2009 at 10:49 PM, Wesley Acheson
wesley.ache...@gmail.com wrote:


 On Mon, Jan 12, 2009 at 7:45 PM, Manish Jethani manish.jeth...@gmail.com 
 wrote:

 On Sun, Jan 11, 2009 at 3:51 AM, wesley.acheson
 wesley.ache...@gmail.com wrote:

  I've a problem with the DataGrid ignoring the % width, while using
  Canvas as the parent.  When I dynamically create columns it stretches
  to beyond the origional area.  This behaviour has been reported as a
  bug. http://bugs.adobe.com/jira/browse/SDK-14390.  The workarround
  described in the bug setting the width to 0 works for me in a simple
  test case but doesn't appear to work within my main application.

 [...]

  I would like to extend datagrid with a version that doesn't have this
  issue if I can figure out why a fixed width doesn't work.

 I've left a reply on the bug:

 http://bugs.adobe.com/jira/browse/SDK-14390

 Basically your DataGrid's minWidth is too large for the Panel. You can
 set the minWidth property to reduce it. By default the measured value
 for minWidth is always going to be large enough to accommodate all the
 columns.

 Manish

 Okay sorry If I wasn't clear enough about it basically the data grid 
 stretches, but not enough to accomidate all columns. Nor even enough to fill 
 the container.  Setting a width of 0 makes the datagrid remember its 
 constraint layout.  Some other intresting factors in my test case if I leave 
 on column not dynamically created specified in the mxml, and replace it with 
 the dynamic columns then it works correctly.

 The other point is that it still occurs even if horizontal scroll policy is 
 set to on.  (Which is actually the way I want it to work).  Again I got this 
 reply when I was at home so it will have to wait until tomorrow if I produce 
 a test case.

 My test case was simply adding a data grid to an application and either 
 giving it a right constraint or a percentage width.  The I created a loop and 
 created an array of DataGridColumn headers.  Then I set this array as the 
 datagrid column array.

 Anyway thanks for your time Manis.

 Wesley



Okay he're is a simple test case. I notice that setting the data
before setting the columns works correctly.  I'm not quite sure whats
going on.  Also if you remove the temp rows from the mxml creating
the columns causes the stretching behaviour.

Obviously this isnt' my real app but it does work in the same way as
my real app.

In the real app when the data is added to to collection that the app
is bound to it creates a column.  Theres more logic to creating a
column however so thats why I need to have a dynamic column.

anyway example below.

Is there anything I can override to fix this behaviour?

Regards,

Wesley Acheson

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute
mx:Script
![CDATA[
import 
mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
import mx.collections.ArrayCollection;
import mx.core.IInvalidating;
import mx.controls.dataGridClasses.DataGridColumn;
private var columns:Array = new Array();
[Bindable]
private var gridData:ArrayCollection = new 
ArrayCollection();

private function createColumns():void {
for (var i:Number=0; i60; i++) {
var col:DataGridColumn = new 
DataGridColumn(column  + i);
col.width = 250;
columns.push(col);
}
grid1.columns = columns;
grid2.columns = columns;
grid3.columns = columns;
grid4.columns = columns;
}

private function createData():void {
gridData.removeAll();
var obj:Object;
for (var i:Number = 0; i500; i++) {
obj = new Object();
for (var j:Number=0; j60; j++) {
obj[column  + j] = 
col+j+:item+i;
gridData.addItem(obj);
}
}
}
]]
/mx:Script

mx:Button click=createColumns() label=Create Columns now /
mx:Button click=createData() label=Create Data now  x=149/

mx:DataGrid id=grid1 width=20% y=30 x=10 height=100
dataProvider={gridData} /
mx:DataGrid id=grid2 left=10 right=400 top=148 

[flexcoders] Passing a function reference to an item renderer

2009-01-14 Thread simonjpalmer
I have an item renderer for a list control and I want to delegate the
editing of the object that the item renderer is showing to its
containing control - in fact to the custom control that contains the
list that the item renderer belongs to.

I have set up the item renderer inline something like this (embedded in
my custom control)[snipped for brevity]

mx:List id=lst_Opportunities dataProvider={_opps}
 mx:itemRenderer
 mx:Component
 ns1:my_Renderer/
 /mx:Component
 /mx:itemRenderer
/mx:List
snip...
script
private function handleEdit(o:Object):void
{
}
/script

What I then did was add a public function variable, doEdit, to
my_Renderer and a handler for the double-click event which looked for
the doEdit function and called it passing the object associated with the
renderer...

(embedded in my_Renderer, which is just a canvas)
public var onEdit:function = null;
private function onDoubleClick():void
{
 if (onEdit != null) onEdit(this.data);
}

This is a pattern that I tend to use a lot in other contexts as it gives
me a great deal of flexibility in re-using code.

The trouble is that I cannot give the item renderer the function pointer
in the declaration, so this code gives a compiler error...

mx:List id=lst_Opportunities dataProvider={_opps}
 mx:itemRenderer
 mx:Component
 ns1:my_Renderer onEdit={handleEdit}/
 /mx:Component
 /mx:itemRenderer
/mx:List

The error is access of undefined property handleEdit.

I'm guessing that the Component tag somehow alters the scope, but I am
wondering how to go about this.

FlexBuilder 2 - although I don't think it should matter.

TIA




[flexcoders] BlazeDS server environment configuration

2009-01-14 Thread grg_blls
Hi all,

I have a generic question. 

I am using Flex plug-in to Eclipse, developing the client side of an 
application. I also use Tomcat and BlazeDS on the server side. 
The development installation was done without any hassles and works 
fine. Also I don't have any problems with my development work, or the 
documentation available. 
The configuration I have is using Remote Object Component on the 
server side to get data from the database. For this I still use the 
database installed by the turn-key installer of BlazeDS (Hsqldb 
database supplied with samples in turn-key installer, though I use my 
own schema and done my Java classes for the purpose).
 
I have to change now from Hsqldb to MySQL and also adapt/change the 
server installation environment to this end, i.e: still be using 
Tomcat and BlazeDS but with MySQL instead of Hsqldb. To this end I 
need more complete guidance info than what's in the BlazeDS Developer 
Guide.

Is there any complete book/documentation suitable to the purpose? Any 
cookbook? 
Any help on this is greatly appreciated

thank you all in advance for helping me
George



Re: [flexcoders] Passing a function reference to an item renderer

2009-01-14 Thread Paul Andrews
Check out outerDocument:

The mx:Component tag defines a new scope within an MXML file, where the 
local scope of the item renderer or item editor is defined by the MXML code 
block delimited by the mx:Component and /mx:Component tags. To access 
elements outside of the local scope of the item renderer or item editor, you 
prefix the element name with the outerDocument keyword.

Paul

- Original Message - 
From: simonjpalmer simonjpal...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Wednesday, January 14, 2009 10:59 AM
Subject: [flexcoders] Passing a function reference to an item renderer


I have an item renderer for a list control and I want to delegate the
 editing of the object that the item renderer is showing to its
 containing control - in fact to the custom control that contains the
 list that the item renderer belongs to.

 I have set up the item renderer inline something like this (embedded in
 my custom control)[snipped for brevity]

 mx:List id=lst_Opportunities dataProvider={_opps}
 mx:itemRenderer
 mx:Component
 ns1:my_Renderer/
 /mx:Component
 /mx:itemRenderer
 /mx:List
 snip...
 script
 private function handleEdit(o:Object):void
 {
 }
 /script

 What I then did was add a public function variable, doEdit, to
 my_Renderer and a handler for the double-click event which looked for
 the doEdit function and called it passing the object associated with the
 renderer...

 (embedded in my_Renderer, which is just a canvas)
 public var onEdit:function = null;
 private function onDoubleClick():void
 {
 if (onEdit != null) onEdit(this.data);
 }

 This is a pattern that I tend to use a lot in other contexts as it gives
 me a great deal of flexibility in re-using code.

 The trouble is that I cannot give the item renderer the function pointer
 in the declaration, so this code gives a compiler error...

 mx:List id=lst_Opportunities dataProvider={_opps}
 mx:itemRenderer
 mx:Component
 ns1:my_Renderer onEdit={handleEdit}/
 /mx:Component
 /mx:itemRenderer
 /mx:List

 The error is access of undefined property handleEdit.

 I'm guessing that the Component tag somehow alters the scope, but I am
 wondering how to go about this.

 FlexBuilder 2 - although I don't think it should matter.

 TIA



 

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






[flexcoders] [Resolved] Passing a function reference to an item renderer

2009-01-14 Thread simonjpalmer
that did it!  thanks very much.

I never stop finding out little mysterious helpful tricks with Flex. 
It is very cool, but also quite frustrating.  If you were at the beach
today I would probably never have found this out.  Or maybe you are at
the beach on your iPhone... anyway +1 for FlexCoders, yet again.

--- In flexcoders@yahoogroups.com, Paul Andrews p...@... wrote:

 Check out outerDocument:
 
 The mx:Component tag defines a new scope within an MXML file,
where the 
 local scope of the item renderer or item editor is defined by the
MXML code 
 block delimited by the mx:Component and /mx:Component tags. To
access 
 elements outside of the local scope of the item renderer or item
editor, you 
 prefix the element name with the outerDocument keyword.
 
 Paul
 
 - Original Message - 
 From: simonjpalmer simonjpal...@...
 To: flexcoders@yahoogroups.com
 Sent: Wednesday, January 14, 2009 10:59 AM
 Subject: [flexcoders] Passing a function reference to an item renderer
 
 
 I have an item renderer for a list control and I want to delegate the
  editing of the object that the item renderer is showing to its
  containing control - in fact to the custom control that contains the
  list that the item renderer belongs to.
 
  I have set up the item renderer inline something like this
(embedded in
  my custom control)[snipped for brevity]
 
  mx:List id=lst_Opportunities dataProvider={_opps}
  mx:itemRenderer
  mx:Component
  ns1:my_Renderer/
  /mx:Component
  /mx:itemRenderer
  /mx:List
  snip...
  script
  private function handleEdit(o:Object):void
  {
  }
  /script
 
  What I then did was add a public function variable, doEdit, to
  my_Renderer and a handler for the double-click event which looked for
  the doEdit function and called it passing the object associated
with the
  renderer...
 
  (embedded in my_Renderer, which is just a canvas)
  public var onEdit:function = null;
  private function onDoubleClick():void
  {
  if (onEdit != null) onEdit(this.data);
  }
 
  This is a pattern that I tend to use a lot in other contexts as it
gives
  me a great deal of flexibility in re-using code.
 
  The trouble is that I cannot give the item renderer the function
pointer
  in the declaration, so this code gives a compiler error...
 
  mx:List id=lst_Opportunities dataProvider={_opps}
  mx:itemRenderer
  mx:Component
  ns1:my_Renderer onEdit={handleEdit}/
  /mx:Component
  /mx:itemRenderer
  /mx:List
 
  The error is access of undefined property handleEdit.
 
  I'm guessing that the Component tag somehow alters the scope, but I am
  wondering how to go about this.
 
  FlexBuilder 2 - although I don't think it should matter.
 
  TIA
 
 
 
  
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Alternative FAQ location: 
 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
  Search Archives: 
  http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups 
  Links
 
 
 





Re: [flexcoders] BlazeDS server environment configuration

2009-01-14 Thread Wesley Acheson
Really thats more of a java question then a flex one. for using mysql
and tomcat try

http://www.opensourcetutorials.com/tutorials/Databases/MySQL/tomcat-and-mysql/page2.html


[flexcoders] Chart - Horizontal Labels tiny!

2009-01-14 Thread jamiebadman
Hi,

Wonder if you guys can help!

I have a chart I'm plotting and the h-axis labels are so tiny they're
almost 'dots'. So I tried creating a secondary axis, eliminating all
but twelve (it's yearly data) points which have the year/month values
and placing that on the chart - but again, although just twelve points
are shown, these are almost microscopic!

Anyone else had this happen before? Any ideas for a fix?

Cheers,

Jamie.



[flexcoders] How to call MXML from JSP

2009-01-14 Thread sony antony
Hi...

I need to invoke a JSP page from MXML page and from that JSP I should be able 
to run the SWF file.

Could anyone please help me..??

Thanks,

Sony.


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


Re: [flexcoders] How to call MXML from JSP

2009-01-14 Thread Paul Andrews
Just embed the swf in your JSP page and when the browser loads the JSP page, 
the swf should run.

Paul
- Original Message - 
From: sony antony pow_like_me...@yahoo.co.in
To: flexcoders@yahoogroups.com
Sent: Wednesday, January 14, 2009 12:49 PM
Subject: [flexcoders] How to call MXML from JSP


 Hi...

 I need to invoke a JSP page from MXML page and from that JSP I should be 
 able to run the SWF file.

 Could anyone please help me..??

 Thanks,

 Sony.


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

 

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






[flexcoders] Re: BlazeDS server environment configuration

2009-01-14 Thread grg_blls
--- In flexcoders@yahoogroups.com, Wesley Acheson 
wesley.ache...@... wrote:

 Really thats more of a java question then a flex one. for using 
mysql
 and tomcat try
 
 http://www.opensourcetutorials.com/tutorials/Databases/MySQL/tomcat-
and-mysql/page2.html


Thank you Wesley for a quick reply.
But what I am asking has to do with BlazeDS (how to set up its 
environment) in conjunction to the MySql database environment plus 
Tomcat environment. So this is more complicated than that. 

You see I understand what to do with the Java classes needed and that 
I have to set up a Remote Object in mxml, and that I have to 
configure how I connect to the service destination. (I have done that 
already while using the Hsqldb - and work just fine, by following the 
documentation available). Now I have to again with MySql, but I 
missing a clear documentation..

Then BlazeDS has to be set up properly to work with MySql under the 
servlet container (Tomcat). Mainly this connection will serve user 
login procedures, so what will be in that database will be a number 
of users and their login data. (I mean an apriori unknown number of 
users)

Thank you 
George
 
  




[flexcoders] Valid Date Ranges in Flex

2009-01-14 Thread Gregory Kelley
In creating a date filterd report generation system, I was asked to add an 
option for returning all data. Rather than reworking the backend I just added a 
checkbox to the UI that says return all data. If that box is checked then the 
properties return the following constants (randomely created by yours truly as 
I couldn't determine from docs what was valid).

public static const MIN_DATE:Date = new Date(1500,1,1);  
public static const MAX_DATE:Date = new Date(2999,12,31);

Here is the interesting part those dates actually return the following data.
MIN_DATE.toString = Thu Feb 1 00:00:00 GMT-0500 1500
MAX_DATE.toString = Fri Jan 31 00:00:00 GMT-0500 3000

The first evaluation makes sense the second one is a bit more confusing.
I would expect if the date I assign is too big that the date returned would be 
earlier not in the future.

Anyone know what the valid range is?

Thanks for your time,
Greg 


[flexcoders] Ignore Previous Post: Valid Date Ranges in Flex

2009-01-14 Thread Gregory Kelley
In creating a date filterd report generation system, I was asked to add
an option for returning all data. Rather than reworking the backend I
just added a checkbox to the UI that says return all data. If that box
is checked then the properties return the following constants (randomely
created by yours truly as I couldn't determine from docs what was
valid).

public static const MIN_DATE:Date = new Date(1500,1,1);   
public static const MAX_DATE:Date = new Date(2999,12,31);

Here is the interesting part those dates actually return the following
data.
MIN_DATE.toString = Thu Feb 1 00:00:00 GMT-0500 1500
MAX_DATE.toString = Fri Jan 31 00:00:00 GMT-0500 3000

The first evaluation makes sense the second one is a bit more confusing.

I would expect if the date I assign is too big that the date returned
would be earlier not in the future.

Anyone know what the valid range is?

Thanks for your time,
Greg


[flexcoders] Quicktime API

2009-01-14 Thread venkat eswar
I am using a flex videoplayer. This videoplayer plays all movie files. I want 
to know using the Quicktime API is it possible to get the actual framerate of a 
movie. If it is possible , then how i can integrate this Quicktime API in my 
Flex application



  

RE: [flexcoders] Cant empty context menu- previous answers don't work...

2009-01-14 Thread Gregory Kelley
public static const MIN_DATE:Date = new Date(1500,1,1);  

public static const MAX_DATE:Date = new Date(2999,12,31);



[flexcoders] Read xml files in relative path

2009-01-14 Thread narayanaweb
I have a Adobe AIR application that reads XML files. Currently the
path to the files is Hard Coded. I tried adding the XML files to the
application source folder and referencing them, but was unsuccessful.
Please help..

Thanks,
Satya V



[flexcoders] Constraint-Based Layout with ColSpan?

2009-01-14 Thread graham.t...@rocketmail.com
Using constraint-based layout with content sizing, is there an easy 
way to have a child span columns (or rows) without resizing the child?

As an oversimplified example, I have a 2x2 grid:

* In each cell of the first row, I have a child.

* In the second row, I want to center (or otherwise align) a child 
within the span of both columns.

* The sizes of the children vary frequently in response to user input.

Originally, I had thought to try something like this:

mx:MyCenteredChild left=col1:0 right=col2:0 top=row2:0 
width=n/

But, of course, this resizes the child to the width of both columns, 
which I do not want.

I suppose I could have the thing layout without MyCenteredChild, then 
get the column widths it calculated, and then have it lay itself out 
again, this time adding MyCenteredChild with the exact left and right 
offsets that I need.  But this feels overwrought.

I guess I could also center the child in a container that was allowed 
to stretch to fill both columns, but I'd rather not have to add more 
components to get this to work.

For other reasons, I'd prefer not to use the Grid container.

I feel like I'm missing something obvious.  I'd be grateful for any 
help!






[flexcoders] Alternative Rich Text Editor

2009-01-14 Thread norm_2782
Hi all,

Does anybody know if there's an alternative to Flex's Rich Text Editor? I'm 
actually looking for 
something more like TinyMCE or FCKEditor (but in Flex, of course ; ). Flex's 
own RTE is kind 
of limited. Unfortunately Google didn't gave me much to go on...


Cheers!


- Jurriën



Re: [flexcoders] How to call MXML from JSP

2009-01-14 Thread Howard Fore
On Wed, Jan 14, 2009 at 7:49 AM, sony antony pow_like_me...@yahoo.co.inwrote:

 I need to invoke a JSP page from MXML page


Do you mean that you want your SWF to open a new browser window to a
particular URL? Or you want the SWF to call a JSP page and the use the
output of the call to the JSP in its processing? For the former, see
http://blog.flexexamples.com/2007/08/29/launching-new-browser-windows-from-flex/.
For the later, see
http://blog.flexexamples.com/2007/08/16/using-httpservice-tag-to-sendreceive-variables-to-a-server-side-script/


 and from that JSP I should be able to run the SWF file.


JSP pages should be able to run SWFs the same way normal HTML pages do, just
output the right HTML to the browser. Do you have Flex Builder? Look in any
project's html-template directory, at the index.template.html file. That's
what your JSP page should output to the browser. How it gets there can be by
an .htm file, or .asp, or .cfm (that's what I'm doing).



-- 
Howard Fore, howard.f...@hofo.com
The universe tends toward maximum irony. Don't push it. - Jeff Atwood


RE: [flexcoders] Read xml files in relative path

2009-01-14 Thread Gregor Kiddie
You can use app: and app-storge: (I think that's right) to access the
directories where the app is installed and the user specific locations.

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:   01382 564343

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

Registered Number: 1788577

Registered in the UK

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

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



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of narayanaweb
Sent: 14 January 2009 00:48
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Read xml files in relative path

 

I have a Adobe AIR application that reads XML files. Currently the
path to the files is Hard Coded. I tried adding the XML files to the
application source folder and referencing them, but was unsuccessful.
Please help..

Thanks,
Satya V

 



Re: [flexcoders] When to use the include directive?

2009-01-14 Thread Tom Chiverton
On Tuesday 13 Jan 2009, Nate Beck wrote:
 is an include Header.as statement that has 30 include statements within
 it.

Sounds like someone used to programing in C.

 To give a datagrid additional functionality, you give it an
 id=myDataGrid

Eww.

 I just don't see a good use for the include statement anymore. In my
 opinion, it just promotes bad programming practices.

It was handy, up until I came across Code Behind, to separate layout from 
code.

-- 
Tom Chiverton
Helping to completely e-enable granular e-services



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

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners.  We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

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

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

Re: [flexcoders] Using Flex as a Flash IDE

2009-01-14 Thread Kevin Mulvihill
http://gotoandlearn.com/ has a thing or two on this...

A google search will uncover the rest...

Best,
Kevin

On Thu, Jun 12, 2008 at 11:37 AM, thirtyfivemph troy.gilb...@gmail.comwrote:

   So, I've been doing some contract work lately that requires that I use
 Flash instead of Flex (the deliverables have to be FLAs that they can
 hand off the designers to re-skin, publish, etc.). Surprise, surprise,
 I'm finding the Flash IDE to be a little less than ideal.

 Does anyone have any recommendations (or any blog posts to point me
 at) that may describe a pretty functional setup where
 building/publishing is done and Flash but editing of AS3 is done in
 Flex? I wish Adobe would just do a clean integration between the two
 (you know, something like a preference in Flash to designate Flex as
 the IDE instead of its built-in IDE) -- it'd certainly sell more
 copies of the two!

 Troy.

  



[flexcoders] Re: Binding and the Model

2009-01-14 Thread Amy
--- In flexcoders@yahoogroups.com, Ryan Graham ryan.gra...@... 
wrote:

 
 You could take control of the situation by updating the summary 
property
 inside the setter of each property that makes up the summary itself.
 Forgive the quick code, but something along the lines of:

...If you do that, summary could potentially be set by something 
other than your function.  Instead, what you want is to have is a 
getter without a setter, like this:

[Bindable (event=summaryChanged)]
public function get summary():String {
   var sumValue:String;
   if (_repeat.length0){
 sumValue = 'Repeat: ' + _repeat + '\n';
   }
   if (_duration.length0) {
 sumValue = Duration: ' + _duration + '\n';
   }
   ...
}

And you'd change your setters for the applicable variables to look 
like this:

public function set repeat(value:String) {
  if (value != _repeat) {
 _repeat=value;
 //this is the new code!
 dispachEvent(new Event('summaryChanged');
   }
}

Note that I'm assuming you're using an actual model class, not an 
mx:Model.  If you're using an mx.Model, go with the first advice you 
got.

HTH;

Amy



RE: [flexcoders] Re: AIR and SQLLite

2009-01-14 Thread JD Hoover
I've never used the feature but I understand LCDS using data management 
services will auto sync in both directions from the sqlite ( in air ) and an 
online db.

J.D.Hoover
MageWindMedia
http://www.magewindmedia.com
Ph (415) 261-3000

[Moderator note: Could people at least try and trim their replies ?]
--- On Tue, 1/13/09, Tim Rowe tim.r...@carsales.com.au wrote:

 From: Tim Rowe tim.r...@carsales.com.au
 Subject: RE: [flexcoders] Re: AIR and SQLLite
 To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
 Date: Tuesday, January 13, 2009, 7:34 PM
 You also need to consider how you patch your DB when you
 don't want it to be destructive.
 
 I would suggest for this that you have your base version-1
 database, and every change from then on is applied as a
 patch, incrementally.  If you have 60 different database
 structure changes, then that's just an unfortunate
 situation you'll have to deal with.  This solution is
 kinda easier than exporting the data from an old DB (of
 which could be any version) and importing it into a new one.
 
 Yeah, there's other ways around it, but version
 compatibility is always a pain.
 
 The idea of tagging every row with a version is also a good
 one - you could probably achieve this better using a log
 table and triggers though, rather than on the same table. 
 If you really want absolute tracking of every data
 modification, you could do it like say instead of users(id,
 appversion, time, username, password) have users(id,
 username, password), users_log(id, action, username,
 password, appversion, time), and frequently archive/compress
 users_log - 'action' is something like pre-update,
 post-update, pre-delete, post-insert etc.  Just remember
 that by doing this you increase the data stored by about a
 factor of 4.
 
 Just some ideas to think about.
 
 --Tim
 
 
 From: flexcoders@yahoogroups.com
 [mailto:flexcod...@yahoogroups.com] On Behalf Of Kevin Benz
 Sent: Wednesday, 14 January 2009 2:24 PM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Re: AIR and SQLLite
 
 If you don't have to preserve any existing client data,
 then you could simply rip and replace the existing db file.
 Your Air application could drop the file, back it up or
 whatever and then replace it with another copy downloaded
 from a server.
 If you need to preserve some of the data then your problem
 becomes much more daunting. First you need to determine the
 rules by which an update is to occur. Is it at application
 start or part of some predefined schedule? What happens if
 one user leaves their client up for days/weeks/months and
 another restarts hourly? If you base on application start,
 how will you insure that you cover both use cases? How will
 you insure that client A and client B don't have
 different data?
 I would suggest adding timestamps to every server
 synchronized row allowing you to implement some concept of
 knowing what data might be stale.
 K
 From: flexcoders@yahoogroups.com
 [mailto:flexcod...@yahoogroups.com] On Behalf Of bonny_us
 Sent: Tuesday, January 13, 2009 7:02 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: AIR and SQLLite
 
 Hi Kevin,
 
 i want to do synchronize all client sqlite db's from a
 common
 back-end db?
 
 Thanks,
 Bonny
 
 --- In
 flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com,
 Kevin Benz kb...@... wrote:
 
  What are you asking?
 
 
 
  Are you wanting to synchronize all client sqlite
 db's from a common
  back-end db?
 
  Are you wanting to replicate the client data on the
 server?
 
 
 
  Air doesn't provide any facilities to help with
 either although both
  could be accomplished with a non-trivial development
 effort. I know
  there is some discussion on the web of tools to help
 although you need
  to be aware of the fact that Adobe extended SQLite
 with support for AS
  datatypes (like Date for example) so beware of tools
 that may not be
  aware of your whole schema.
 
 
 
  K
 
 
 
  From:
 flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com]
 On
  Behalf Of bonny_us
  Sent: Monday, January 12, 2009 7:57 PM
  To:
 flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] AIR and SQLLite
 
 
 
  Hi All,
 
  Any one have idea of SQLLite and AIR Synchronization.
 I want to create
  one POC using SQLLite. If any one have any example
 regarding this then
  please let me know. it will be very helpful to me.
 
  Thanks,
  Bonny
 


[flexcoders] Re: BlazeDS server environment configuration

2009-01-14 Thread valdhor
Wesley is correct - This is a Java question.

You already have the BlazeDS part set up and working. All you need to
do is change the database access in Java.

I would suggest following the tutorial Wesley provided and then apply
the knowledge gained to your project.

From what I can see this entails adding the driver for the MySQL
connection; removing the flex.samples.ConnectionHelper stuff and
adding the dbHandler handler class from the tutorial.


--- In flexcoders@yahoogroups.com, grg_blls grg_b...@... wrote:

 --- In flexcoders@yahoogroups.com, Wesley Acheson 
 wesley.acheson@ wrote:
 
  Really thats more of a java question then a flex one. for using 
 mysql
  and tomcat try
  
  http://www.opensourcetutorials.com/tutorials/Databases/MySQL/tomcat-
 and-mysql/page2.html
 
 
 Thank you Wesley for a quick reply.
 But what I am asking has to do with BlazeDS (how to set up its 
 environment) in conjunction to the MySql database environment plus 
 Tomcat environment. So this is more complicated than that. 
 
 You see I understand what to do with the Java classes needed and that 
 I have to set up a Remote Object in mxml, and that I have to 
 configure how I connect to the service destination. (I have done that 
 already while using the Hsqldb - and work just fine, by following the 
 documentation available). Now I have to again with MySql, but I 
 missing a clear documentation..
 
 Then BlazeDS has to be set up properly to work with MySql under the 
 servlet container (Tomcat). Mainly this connection will serve user 
 login procedures, so what will be in that database will be a number 
 of users and their login data. (I mean an apriori unknown number of 
 users)
 
 Thank you 
 George





[flexcoders] Re: Alternative Rich Text Editor

2009-01-14 Thread valdhor
The only one I could find on Google was at http://flashtexteditor.com/
with a Flex demo at http://flashtexteditor.com/flexdemo/full/.

It's a bit old (And pricy) but you could try emailing the author.


--- In flexcoders@yahoogroups.com, norm_2782 norm2...@... wrote:

 Hi all,
 
 Does anybody know if there's an alternative to Flex's Rich Text
Editor? I'm actually looking for 
 something more like TinyMCE or FCKEditor (but in Flex, of course ;
). Flex's own RTE is kind 
 of limited. Unfortunately Google didn't gave me much to go on...
 
 
 Cheers!
 
 
 - Jurriën





[flexcoders] String Encoding Issue Over AMF

2009-01-14 Thread Daniel Freiman
I'm transmitting Strings from php to Flex.  The values are correct before I
send them to Flex (I've traced them), but Flex isn't interpreting them
properly (I get that square thing, or two incorrect characters).  I've tried
various encoding/decoding schemes (urlencode, etc) but none of them have
worked.  So far I've only tried alphanumeric characters and the trademark
and registered symbols.  The trademark is the only one that isn't
working.
Anyone have any idea how to fix this?

- Daniel Freiman


[flexcoders] Re: BlazeDS server environment configuration

2009-01-14 Thread grg_blls
Hi again (and thanks for replying)

I didn't say Wesley is not correct..On the contrary...
As I have first to work it out and then see if I get any more 
questions. (Obviously not having done this before, was the reason for 
asking about documentation (or a cookbook) in the first place.

Sofar I 've done a lot working with Flex for the client and the 
business logic of my app, having Hsqldb as a basic database. I also 
feel very satisfied with Flex documentation and on-line help (this 
forum included) that helped me so much sofar.

So I still consider any additional hint towards a good book on 
BlazeDS, covering both some examplary applications as well as 
pointing to differences to say JBOSS for instance. This as I want to 
go a bit deeper into the subject and understand better.. some aspects.

Thank you all
George


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 Wesley is correct - This is a Java question.
 
 You already have the BlazeDS part set up and working. All you need 
to
 do is change the database access in Java.
 
 I would suggest following the tutorial Wesley provided and then 
apply
 the knowledge gained to your project.
 
 From what I can see this entails adding the driver for the MySQL
 connection; removing the flex.samples.ConnectionHelper stuff and
 adding the dbHandler handler class from the tutorial.
 
 
 --- In flexcoders@yahoogroups.com, grg_blls grg_blls@ wrote:
 
  --- In flexcoders@yahoogroups.com, Wesley Acheson 
  wesley.acheson@ wrote:
  
   Really thats more of a java question then a flex one. for using 
  mysql
   and tomcat try
   
   
http://www.opensourcetutorials.com/tutorials/Databases/MySQL/tomcat-
  and-mysql/page2.html
  
  
  Thank you Wesley for a quick reply.
  But what I am asking has to do with BlazeDS (how to set up its 
  environment) in conjunction to the MySql database environment 
plus 
  Tomcat environment. So this is more complicated than that. 
  
  You see I understand what to do with the Java classes needed and 
that 
  I have to set up a Remote Object in mxml, and that I have to 
  configure how I connect to the service destination. (I have done 
that 
  already while using the Hsqldb - and work just fine, by following 
the 
  documentation available). Now I have to again with MySql, but I 
  missing a clear documentation..
  
  Then BlazeDS has to be set up properly to work with MySql under 
the 
  servlet container (Tomcat). Mainly this connection will serve 
user 
  login procedures, so what will be in that database will be a 
number 
  of users and their login data. (I mean an apriori unknown number 
of 
  users)
  
  Thank you 
  George
 





[flexcoders] Re: Valid Date Ranges in Flex

2009-01-14 Thread valdhor
The month ranges from 0 (January) to 11 (December). You asked for day
31 of month 12 of year 2999 so Flex made it day 31 of month 1 of year
3000.



--- In flexcoders@yahoogroups.com, Gregory Kelley gkel...@... wrote:

 In creating a date filterd report generation system, I was asked to
add an option for returning all data. Rather than reworking the
backend I just added a checkbox to the UI that says return all data.
If that box is checked then the properties return the following
constants (randomely created by yours truly as I couldn't determine
from docs what was valid).
 
 public static const MIN_DATE:Date = new Date(1500,1,1);  
 public static const MAX_DATE:Date = new Date(2999,12,31);
 
 Here is the interesting part those dates actually return the
following data.
 MIN_DATE.toString = Thu Feb 1 00:00:00 GMT-0500 1500
 MAX_DATE.toString = Fri Jan 31 00:00:00 GMT-0500 3000
 
 The first evaluation makes sense the second one is a bit more confusing.
 I would expect if the date I assign is too big that the date
returned would be earlier not in the future.
 
 Anyone know what the valid range is?
 
 Thanks for your time,
 Greg





Re: [flexcoders] Re: BlazeDS server environment configuration

2009-01-14 Thread Wesley Acheson
 So I still consider any additional hint towards a good book on
 BlazeDS, covering both some examplary applications as well as
 pointing to differences to say JBOSS for instance. This as I want to
 go a bit deeper into the subject and understand better.. some aspects.


Its pretty much the same on JBoss. I'm using it on jboss, download the
jar file and set that in your default project.

Then Tomcat and JBoss are much the same. (as far as Blaze is concened)


RE: [flexcoders] Re: Valid Date Ranges in Flex

2009-01-14 Thread Gregory Kelley
sheepish grin I knew that at some point in the past. Now that you say
that it is very obvious.
 
In my attempt to determine the earliest/latest date supported I tried
the following but then all the date parts in the object are NaN.
 
public static const MIN_DATE:Date = new Date(-Number.MAX_VALUE);
public static const MAX_DATE:Date = new Date(Number.MAX_VALUE);

Thanks,
Greg



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of valdhor
Sent: Wednesday, January 14, 2009 10:12 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Valid Date Ranges in Flex



The month ranges from 0 (January) to 11 (December). You asked for day
31 of month 12 of year 2999 so Flex made it day 31 of month 1 of year
3000.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Gregory Kelley gkel...@... wrote:

 In creating a date filterd report generation system, I was asked to
add an option for returning all data. Rather than reworking the
backend I just added a checkbox to the UI that says return all data.
If that box is checked then the properties return the following
constants (randomely created by yours truly as I couldn't determine
from docs what was valid).
 
 public static const MIN_DATE:Date = new Date(1500,1,1); 
 public static const MAX_DATE:Date = new Date(2999,12,31);
 
 Here is the interesting part those dates actually return the
following data.
 MIN_DATE.toString = Thu Feb 1 00:00:00 GMT-0500 1500
 MAX_DATE.toString = Fri Jan 31 00:00:00 GMT-0500 3000
 
 The first evaluation makes sense the second one is a bit more
confusing.
 I would expect if the date I assign is too big that the date
returned would be earlier not in the future.
 
 Anyone know what the valid range is?
 
 Thanks for your time,
 Greg




 


Re: [flexcoders]Count the number of arguments on a function

2009-01-14 Thread Amy
--- In flexcoders@yahoogroups.com, dorkie dork from dorktown 
dorkiedorkfromdorkt...@... wrote:

 Is there a way to count how many arguments there are on a function 
from
 outside that function? For example,
 
 Class1:
 // myFunction has one parameter of type string
 myFunction(myParam:String) {
 
 }
 
 Class2:
 someFunction() {
 // for example,
 // i want to get a count of arguments of myFunction, name, if 
they are
 required and their type
 var argumentLength = class1.myFunction.arguments.length;
 var argumentName = class1.myFunction.arguments[0].name;
 var argumentClass = class1.myFunction.arguments[0].class;
 var argumentRequired = class1.myFunction.arguments[0].required;
 }


You may find that describeType (or describeTypeCache if you're 
fanatical about performnce) will help.



Re: [flexcoders] Alternative Rich Text Editor

2009-01-14 Thread Weyert de Boer
You could consider using Flash Player 10 and the new text engine.

The best you can get:
http://labs.adobe.com/technologies/textlayout/


[flexcoders] chart axis titles missing in image capture

2009-01-14 Thread netdeep
I have two sections of code which generate a png file from a UIComponent. Both 
seem 
very similar except that one of them cuts the axis titles off for some reason. 
The actual 
image file is generated in Java, but the encoding happens here in flex.  The 
same code is 
used in both calls to Java, though one is through a servlet (which then calls a 
Java method) 
and the other is through a direct call to the remote Java method.  What is 
going on? 

ImageSnapshot.defaultEncoder = PNGEncoder;  

public function saveAllSnapshots():void {
for (var i:int=0; iflowLayout.getChildren().length; i++) {
var box:VBox = flowLayout.getChildAt(i) as VBox;
var cp:ChartPanel = box.getChildAt(2) as ChartPanel;
this.captureImg(cp, cp.title);
}
}

// creates png ByteArray and sends it to a java remote object for saving 
// This is the method that chops off the axis titles
private function captureImg(comp:UIComponent, name:String):void {
var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(comp);
var imageByteArray:ByteArray = imageSnap.data as ByteArray;
imgSave.saveImage(imageByteArray, name+-img.png);  
}

// handle a click on the save image button
private function imgClickHandler(evt:MouseEvent):void {
var button:Button = evt.target as Button;
for (var i:int=0; iflowLayout.getChildren().length; i++) {
var box:VBox = flowLayout.getChildAt(i) as VBox;
if (button == box.getChildAt(1)) {
saveSnapShot(box.getChildAt(2) as UIComponent);
break;
}
}   
}

// show image in a new window (this works)
private function saveSnapShot(comp:UIComponent):void {
var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(comp);
var imageByteArray:ByteArray = imageSnap.data as ByteArray;

var request:URLRequest = new URLRequest(imgServURL);
request.contentType=text/html;
request.data = imageByteArray;
request.method = URLRequestMethod.POST;
navigateToURL(request, _blank);
}



Re: [flexcoders] Data Grid with dynamic columns ignoring % width or right style.

2009-01-14 Thread Manish Jethani
On Wed, Jan 14, 2009 at 3:40 PM, Wesley Acheson
wesley.ache...@gmail.com wrote:

 Okay sorry If I wasn't clear enough about it basically the data grid 
 stretches, but not enough to accomidate all columns. Nor even enough to fill 
 the container.  Setting a width of 0 makes the datagrid remember its 
 constraint layout.  Some other intresting factors in my test case if I leave 
 on column not dynamically created specified in the mxml, and replace it with 
 the dynamic columns then it works correctly.

[...]

I've told you what your basic problem is: The DatarGrid's minWidth is
greater than the Panel's width. You could come up with any number of
scenarios in which this happens -- it doesn't matter. If you add a 100
columns to the DataGrid, it will compute its minWidth based on how
much space it thinks it needs. The way to override that is to set the
minWidth explicitly. If you try this with the sample you posted,
you'll see that you get the desired behavior.

  DataGrid minWidth=1 ... /

Manish


[flexcoders] Re: [Resolved] Passing a function reference to an item renderer

2009-01-14 Thread Amy
--- In flexcoders@yahoogroups.com, simonjpalmer simonjpal...@... 
wrote:

 that did it!  thanks very much.
 
 I never stop finding out little mysterious helpful tricks with Flex. 
 It is very cool, but also quite frustrating.  If you were at the beach
 today I would probably never have found this out.  Or maybe you are at
 the beach on your iPhone... anyway +1 for FlexCoders, yet again.

Another mysterious and possibly more helpful way to do this is to use a 
ClassFactory for the renderer.  Then you can set properties on it that 
are at the document scope, and the renderer doesn't need to know what 
the name of the function even is, it only needs to know that the name 
of the function will be passed to it and that it can then call the 
function.

Check out question 13:
http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf



Re: [flexcoders] Re: regex

2009-01-14 Thread Manish Jethani
On Wed, Jan 14, 2009 at 2:16 AM, flexaustin flexaus...@yahoo.com wrote:
 Ok, this i killing me. I have down to this:

 \\\name:something\\soemthing\\


 How do I replace \\\ with \\ and all \\ with \.

I'm not sure how you ended up with those backslashes, but here's how
to replace two of those with a single one:

trace(.replace(//g, \\));

Note: You have to escape them in string and regexp literals.

Manish

-- 
Visit me at manishjethani.com


RE: [flexcoders] flex playerProductInstall.swf

2009-01-14 Thread Kenneth Sutherland
For those that are interested, I've resolved the issue.

I had to edit the playerProductInstall.swf (see
http://www.adobe.com/devnet/flash/articles/fp8_detection_06.html ) 

so it now calls an external JavaScript function that gets used for
alternative content if the user selects 'no' after seeing the auto
update choice.  The playerProductInstall includes a install callback
that take the statusValue for the installer and you can then do what you
want with that response.

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Kenneth Sutherland
Sent: 14 January 2009 09:33
To: flexcoders@yahoogroups.com
Subject: [flexcoders] flex playerProductInstall.swf

 

If the user doesn't have then required version of flash player then they
see the playerProductInstall.swf that comes with flexbuilder and if they
select yes to the install then everything is great. But what if they say
'no', then they get nothing.  Is there any way to get the result back
from the player install swf so inside the javascript it can display some
alternative content.

 

How does anybody else handle it if the user declines the update which
means that they can't view the greatness of your latest app J

 

Cheers.

 



realise

.


Kenneth Sutherland

Technical Developer

Realise Ltd
Quay House, 142 Commercial Street, Leith, Edinburgh EH6 6LB
Tel 0131 476 7432
www.realise.com http://www.realise.com/ 

Check out some of our recent flex work:
* Focus on funds UK http://www.focusonfunds.co.uk/ 
* Focus on funds Europe
http://europe.standardlifeinvestments.com/distributor/products_and_serv
ices/going_further_focus_on_funds/index.html 
* Fund selector
http://uk.standardlifeinvestments.com/ifa/adviser_support/index.html 

* Video view
http://uk.standardlifeinvestments.com/ifa/market_views/video_view_and_m
p3s/index.html 
Realise are sponsors of the Marketing Society Scotland.
Realise Limited is registered in Scotland, SC172507.

 

 



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.



 

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] Httpservice proxy?

2009-01-14 Thread Nate Pearson
I built a small stock widget that accesses
http://quote.yahoo.com/d/quotes.csv to get the stock information.  

The app works fine on my desktop but when I upload it to our domain it
doesn't work.

I have no idea what the issue is but I was thinking maybe it was a
proxy issue?  Should this just work?  Maybe it's a security issue at
my company?

Thanks!

Nate



[flexcoders] Re: String Encoding Issue Over AMF

2009-01-14 Thread valdhor
The problem is with PHP and how it handles multi-byte strings.

A good overview can be found at http://www.phpwact.org/php/i18n/charsets

Hopefully PHP 6 will end all this grief.


--- In flexcoders@yahoogroups.com, Daniel Freiman freima...@... wrote:

 I'm transmitting Strings from php to Flex.  The values are correct
before I
 send them to Flex (I've traced them), but Flex isn't interpreting them
 properly (I get that square thing, or two incorrect characters). 
I've tried
 various encoding/decoding schemes (urlencode, etc) but none of them have
 worked.  So far I've only tried alphanumeric characters and the
trademark
 and registered symbols.  The trademark is the only one that isn't
 working.
 Anyone have any idea how to fix this?
 
 - Daniel Freiman





Re: [flexcoders] Httpservice proxy?

2009-01-14 Thread Manish Jethani
On Wed, Jan 14, 2009 at 10:37 PM, Nate Pearson napearso...@yahoo.com wrote:
 I built a small stock widget that accesses
 http://quote.yahoo.com/d/quotes.csv to get the stock information.

 The app works fine on my desktop but when I upload it to our domain it
 doesn't work.

Yes, it looks like they have a crossdomain.xml that won't allow your app.

http://quote.yahoo.com/crossdomain.xml

Manish

-- 
Manish Jethani
mx:Blog source=/dev/random ...
manishjethani.com


[flexcoders] Re: Httpservice proxy?

2009-01-14 Thread Nate Pearson
Ahhh! No way to get around that?

--- In flexcoders@yahoogroups.com, Manish Jethani
manish.jeth...@... wrote:

 On Wed, Jan 14, 2009 at 10:37 PM, Nate Pearson napearso...@... wrote:
  I built a small stock widget that accesses
  http://quote.yahoo.com/d/quotes.csv to get the stock information.
 
  The app works fine on my desktop but when I upload it to our domain it
  doesn't work.
 
 Yes, it looks like they have a crossdomain.xml that won't allow your
app.
 
 http://quote.yahoo.com/crossdomain.xml
 
 Manish
 
 -- 
 Manish Jethani
 mx:Blog source=/dev/random ...
 manishjethani.com





Re: [flexcoders] Re: Httpservice proxy?

2009-01-14 Thread Manish Jethani
On Wed, Jan 14, 2009 at 10:53 PM, Nate Pearson napearso...@yahoo.com wrote:
 Ahhh! No way to get around that?

Proxy the calls through your own web service (hosted on your own domain).

Manish

-- 
Manish Jethani
mx:Blog source=/dev/random ...
manishjethani.com


RE: [flexcoders] Datagrid and sorting

2009-01-14 Thread Alex Harui
Not without a lot of work.  Because Actionscript is single-threaded, you cannot 
update the display while the sort is doing its thing.  You'd have to turn off 
the sort and create a timer or event based sorting scheme so you could show 
progress and update the UI.  You may be able to use the pseudo threading 
example on my blog

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Jason Crummack
Sent: Wednesday, January 14, 2009 1:44 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datagrid and sorting


Hi,

I'm currently working with a fairly large dataset within a grid and i'd
like to change the mouse cursor/display informational text when the user
clicks on the column headers to sort the grid, now i can get the start
point of the sort using the headerRelease event but is there a way to
know when the sort has completed so that i can set the status text /
turn off the wait cursor?

Thanks

Jason Crummack
Easysoft Limited



[flexcoders] warning on 'back' button before closing application?

2009-01-14 Thread Maciek Sakrejda
Is there a way to warn the user that they're about to navigate away from
the app through the browser's back button? This is actually a request
from our users: we don't use BrowserManager (I don't think it would even
make sense for us), but they are used to browser paradigms, and
sometimes hit 'back' inadvertently, navigating away from the
application. Is there a way to issue a warning beforehand?

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com




Re: [flexcoders] Cant empty context menu- previous answers don't work...

2009-01-14 Thread john fisher
Thanks Doug, I'll stop trying to make this work and change the interface
idea.

Flex team: this seems like a collision between proprietary ideas of how
to build a framework and Open Source culture. Obviously a developer
ought to be able to do whatever he likes with right-click events.

John

Doug McCune wrote:
 This is specifically (and has always been) impossible. You cannot ever get
 rid of those context menu items. As in never ever ever. The best you can
 hope for is supressing the context menu and replacing it with your own,
 which is sort of possible with a javascript hack I believe (google stuff
 about javascript flash context menu, I think Dan of polygeek.com was doing
 some tests trying to figure it out).

 Doug

 On Tue, Jan 13, 2009 at 4:51 PM, john fisher j...@jpfisher.net wrote:


   


Re: [flexcoders] Custom mouse cursors including the system cursor?

2009-01-14 Thread Manish Jethani
On Tue, Jan 13, 2009 at 12:46 PM, Josh McDonald dzn...@gmail.com wrote:

 I'm wondering how I create a custom mouse cursor that will include the
 system cursor, the way DragManager does with the halo mouse cursors?

Why not just draw the custom cursor next to the system cursor?
CursorManager does Mouse.hide. If you skipped that, you would end up
with a composite cursor.

Maybe CursorManager should have an option for this.

Manish

-- 
Manish Jethani
mx:Blog source=/dev/random ...
manishjethani.com


RE: [flexcoders] Re: Valid Date Ranges in Flex

2009-01-14 Thread Maciek Sakrejda
You should be able to determine minDate and maxDate by calling new
Date(Number.MIN_VALUE) and new Date(Number.MAX_VALUE).
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Gregory Kelley gkel...@pngmail.com
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Valid Date Ranges in Flex
Date: Wed, 14 Jan 2009 10:30:50 -0500

sheepish grin I knew that at some point in the past. Now that you say
that it is very obvious.
 
In my attempt to determine the earliest/latest date supported I tried
the following but then all the date parts in the object are NaN.
 
public static const MIN_DATE:Date = new Date(-Number.MAX_VALUE);
public static const MAX_DATE:Date = new Date(Number.MAX_VALUE);

Thanks,
Greg



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of valdhor
Sent: Wednesday, January 14, 2009 10:12 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Valid Date Ranges in Flex



The month ranges from 0 (January) to 11 (December). You asked for day
31 of month 12 of year 2999 so Flex made it day 31 of month 1 of year
3000.

--- In flexcoders@yahoogroups.com, Gregory Kelley gkel...@... wrote:

 In creating a date filterd report generation system, I was asked to
add an option for returning all data. Rather than reworking the
backend I just added a checkbox to the UI that says return all data.
If that box is checked then the properties return the following
constants (randomely created by yours truly as I couldn't determine
from docs what was valid).
 
 public static const MIN_DATE:Date = new Date(1500,1,1); 
 public static const MAX_DATE:Date = new Date(2999,12,31);
 
 Here is the interesting part those dates actually return the
following data.
 MIN_DATE.toString = Thu Feb 1 00:00:00 GMT-0500 1500
 MAX_DATE.toString = Fri Jan 31 00:00:00 GMT-0500 3000
 
 The first evaluation makes sense the second one is a bit more
confusing.
 I would expect if the date I assign is too big that the date
returned would be earlier not in the future.
 
 Anyone know what the valid range is?
 
 Thanks for your time,
 Greg





 




[flexcoders] Re: warning on 'back' button before closing application?

2009-01-14 Thread Anthony DeBonis
Yes it is possible but you need some JavaScript

You can create a js include file or put this in your wrapper template 
file.  The idea is to put a event listener on the onbeforeunload  
function.  I have tested this in a few more common browsers  and it 
works. 

window.onbeforeunload = warnOfUnsavedChanges;

function warnOfUnsavedChanges(){
//You can add a boolean to be set using externalInterface IF 
the form/data is dirty in Flex
return 'You have unsaved changes on this page, which will be 
discarded if you leave now. Click Cancel in order to save them 
first.';
}


Simple string return from the onbeforeunload method does the trick.
I would also like to get this working from inside Flex to use the 
externalInterface to inject the needed JS but I did not have luck yet 
with this.



--- In flexcoders@yahoogroups.com, Maciek Sakrejda msakre...@... 
wrote:

 Is there a way to warn the user that they're about to navigate away 
from
 the app through the browser's back button? This is actually a 
request
 from our users: we don't use BrowserManager (I don't think it would 
even
 make sense for us), but they are used to browser paradigms, and
 sometimes hit 'back' inadvertently, navigating away from the
 application. Is there a way to issue a warning beforehand?
 
 -- 
 Maciek Sakrejda
 Truviso, Inc.
 http://www.truviso.com






Re: [flexcoders] Re: String Encoding Issue Over AMF

2009-01-14 Thread Daniel Freiman
Either I'm missing something (which is highly possible) or that information
isn't addressing the problem.  Everything on the php side seems fine.  And
all the tests/functions applied to the string on the php side operate as
expected.  It's not until the string is sent over AMF to Flex that I have a
problem.

On Wed, Jan 14, 2009 at 12:20 PM, valdhor valdhorli...@embarqmail.comwrote:

   The problem is with PHP and how it handles multi-byte strings.

 A good overview can be found at http://www.phpwact.org/php/i18n/charsets

 Hopefully PHP 6 will end all this grief.


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Daniel
 Freiman freima...@... wrote:
 
  I'm transmitting Strings from php to Flex. The values are correct
 before I
  send them to Flex (I've traced them), but Flex isn't interpreting them
  properly (I get that square thing, or two incorrect characters).
 I've tried
  various encoding/decoding schemes (urlencode, etc) but none of them have
  worked. So far I've only tried alphanumeric characters and the
 trademark
  and registered symbols. The trademark is the only one that isn't
  working.
  Anyone have any idea how to fix this?
 
  - Daniel Freiman
 

  



[flexcoders] Re: TourDeFlex in linux

2009-01-14 Thread jlward4th
For me it shows up in the Accessories menu.

You can also launch it from where it installed in /opt

-James


--- In flexcoders@yahoogroups.com, Deniz Davutoglu d...@... wrote:

 Hi I installed air 1.5 for linux an TourDeFlex in ubuntu 8.10 but
 after install I cant find TourDeFlex in any menu does any one knows
 hot to reach to app?
 
 Thanks





[flexcoders] Re: String Encoding Issue Over AMF

2009-01-14 Thread aphexyuri
Have you played around with $gateway-setCharsetHandler() in gateway.php?

--- In flexcoders@yahoogroups.com, Daniel Freiman freima...@... wrote:

 Either I'm missing something (which is highly possible) or that
information
 isn't addressing the problem.  Everything on the php side seems
fine.  And
 all the tests/functions applied to the string on the php side operate as
 expected.  It's not until the string is sent over AMF to Flex that I
have a
 problem.
 
 On Wed, Jan 14, 2009 at 12:20 PM, valdhor valdhorli...@...wrote:
 
The problem is with PHP and how it handles multi-byte strings.
 
  A good overview can be found at
http://www.phpwact.org/php/i18n/charsets
 
  Hopefully PHP 6 will end all this grief.
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Daniel
  Freiman FreimanCQ@ wrote:
  
   I'm transmitting Strings from php to Flex. The values are correct
  before I
   send them to Flex (I've traced them), but Flex isn't
interpreting them
   properly (I get that square thing, or two incorrect characters).
  I've tried
   various encoding/decoding schemes (urlencode, etc) but none of
them have
   worked. So far I've only tried alphanumeric characters and the
  trademark
   and registered symbols. The trademark is the only one that isn't
   working.
   Anyone have any idea how to fix this?
  
   - Daniel Freiman
  
 
   
 





RE: [flexcoders] Re: Valid Date Ranges in Flex

2009-01-14 Thread Gregory Kelley
Actually, just for anyone reading this in the future, Number.MIN_VALUE =
The smallest representable non-negative, non-zero, number
So the actual smallest number is negative Number.MAX_VALUE
 
Greg

 


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Maciek Sakrejda
Sent: Wednesday, January 14, 2009 1:02 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Valid Date Ranges in Flex



You should be able to determine minDate and maxDate by calling new
Date(Number.MIN_VALUE) and new Date(Number.MAX_VALUE).
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com http://www.truviso.com 

-Original Message-
From: Gregory Kelley gkel...@pngmail.com mailto:gkelley%40pngmail.com

Reply-To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
Subject: RE: [flexcoders] Re: Valid Date Ranges in Flex
Date: Wed, 14 Jan 2009 10:30:50 -0500

sheepish grin I knew that at some point in the past. Now that you say
that it is very obvious.

In my attempt to determine the earliest/latest date supported I tried
the following but then all the date parts in the object are NaN.

public static const MIN_DATE:Date = new Date(-Number.MAX_VALUE);
public static const MAX_DATE:Date = new Date(Number.MAX_VALUE);

Thanks,
Greg

__
From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
Behalf Of valdhor
Sent: Wednesday, January 14, 2009 10:12 AM
To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
Subject: [flexcoders] Re: Valid Date Ranges in Flex

The month ranges from 0 (January) to 11 (December). You asked for day
31 of month 12 of year 2999 so Flex made it day 31 of month 1 of year
3000.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Gregory Kelley gkel...@... wrote:

 In creating a date filterd report generation system, I was asked to
add an option for returning all data. Rather than reworking the
backend I just added a checkbox to the UI that says return all data.
If that box is checked then the properties return the following
constants (randomely created by yours truly as I couldn't determine
from docs what was valid).
 
 public static const MIN_DATE:Date = new Date(1500,1,1); 
 public static const MAX_DATE:Date = new Date(2999,12,31);
 
 Here is the interesting part those dates actually return the
following data.
 MIN_DATE.toString = Thu Feb 1 00:00:00 GMT-0500 1500
 MAX_DATE.toString = Fri Jan 31 00:00:00 GMT-0500 3000
 
 The first evaluation makes sense the second one is a bit more
confusing.
 I would expect if the date I assign is too big that the date
returned would be earlier not in the future.
 
 Anyone know what the valid range is?
 
 Thanks for your time,
 Greg




 


[flexcoders] adobe update Flex messed up my apps

2009-01-14 Thread mariovandeneynde
Hi!
I just finished up my update for my adobe products, and one of the 
updates was going from Flex3 to flex 3.2. 
I rebuild my app using flex 3.2 and it worked fine in my browsers 
BUT
I used to load my flexapp in a flash movie and published this movie to 
an EXE. 
What used to work isn't working anymore...
In my flex project I use the popupmanager to popup custom 
dialogsscreens: they work in my browser, but they don't popup up 
anymore when I load the flex app in my flashmovie...
Anyone an idea or is this a bug.
mario.



Re: [flexcoders] Re: String Encoding Issue Over AMF

2009-01-14 Thread Daniel Freiman
I'm using Zend Framework.  I can't find an comparable method.

On Wed, Jan 14, 2009 at 1:58 PM, aphexyuri yuriv...@yahoo.co.uk wrote:

   Have you played around with $gateway-setCharsetHandler() in
 gateway.php?


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Daniel
 Freiman freima...@... wrote:
 
  Either I'm missing something (which is highly possible) or that
 information
  isn't addressing the problem. Everything on the php side seems
 fine. And
  all the tests/functions applied to the string on the php side operate as
  expected. It's not until the string is sent over AMF to Flex that I
 have a
  problem.
 
  On Wed, Jan 14, 2009 at 12:20 PM, valdhor valdhorli...@...wrote:
 
   The problem is with PHP and how it handles multi-byte strings.
  
   A good overview can be found at
 http://www.phpwact.org/php/i18n/charsets
  
   Hopefully PHP 6 will end all this grief.
  
  
   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,
 Daniel
   Freiman FreimanCQ@ wrote:
   
I'm transmitting Strings from php to Flex. The values are correct
   before I
send them to Flex (I've traced them), but Flex isn't
 interpreting them
properly (I get that square thing, or two incorrect characters).
   I've tried
various encoding/decoding schemes (urlencode, etc) but none of
 them have
worked. So far I've only tried alphanumeric characters and the
   trademark
and registered symbols. The trademark is the only one that isn't
working.
Anyone have any idea how to fix this?
   
- Daniel Freiman
   
  
  
  
 

  



[flexcoders] Unreliable Local SharedObject in Flash 10!!!!

2009-01-14 Thread Ilam Mougy
I searched the list for this issue and didn't find anything related. 
I have an app that saves a big file to the local SharedObject, I chunk
it so I can display a progress bar, each chunk is 1M, I have 60 Meg of
data.  This worked flawless in Flash 9 (expected ha!), but with Flash
10, sometimes it doesn't save the data, no particular reason!  I
looked around the Adobe bugbase and there is already a bug
(http://bugs.adobe.com/jira/browse/FP-1258), so I voted and commented
on it.

Well, if you want the local sharedobject to work, please vote!





Re: [flexcoders] Re: regular expression tester says it works, but it doesnt????

2009-01-14 Thread Guy Morton
[^,] means match anything except commas, ie the ^ at the start of the  
[] indicates that rather than match any of these characters it ought  
to not match any of them.


You can't put patterns in the [], it's for defining a list of  
characters (or a range, as in a-z).


Guy

On 14/01/2009, at 8:10 AM, flexaustin wrote:


So for you last version:
var pattern:RegExp = new RegExp('\title\:\([^,\]+)','i');

How would I say everything but a , would it be this?
var pattern:RegExp = new RegExp('\title\:\([^[\,\]]+)','i');

J

--- In flexcoders@yahoogroups.com, Guy Morton g...@... wrote:

 ok. i think you could take a simpler approach then, eg

 var pattern:RegExp = new RegExp('\title\:\([a-zA-Z ]+)','i');
 var str:String = 'title:houses or houses,count:
 47,group:true,connection:39,';
 trace(str.match(pattern)[1]);

 returns

 houses or houses

 ie, the matched string is 'title:houses or houses' and the bit  
that

 matched the parentheses is houses or houses.

 Just add whatever characters are valid for the title into the
 character set [a-zA-Z ]. Or you could let it match everything that's
 not a comma or double-quote buy doing this:

 var pattern:RegExp = new RegExp('\title\:\([^,\]+)','i');
 var str:String = 'title:houses or houses,count:
 47,group:true,connection:39,';
 trace(str.match(pattern)[1]);

 also returns

 houses or houses

 HTH

 Guy


 On 14/01/2009, at 1:55 AM, flexaustin wrote:

  Yeah that works sort of. The issue is that I need to stop before  
or

  right after a , series.
 
  So given this string:
  title:houses,count:47,group:true,connection:39,
 
  I need to stop when I get title:houses, or title:houses  
or
  title:houses or houses. I am trying to extract whatever is  
given

  for title, which in this example is houses.
 
  Thanks
 
  --- In flexcoders@yahoogroups.com, Guy Morton guy@ wrote:
  
   Is your data actually split over multiple lines? Or is it just
   wrapping in the email?
  
   The problem, I think, is in your second set of parentheses. You
  search
   for , followed by 0 or more word characters, then a colon.  
That

   pattern does not appear in your search string.
  
   Also, that .* between your two sets seems a little odd. It will
  match
   everything between your first and second matches. But perhaps  
that's

   what you want.
  
   This successfully matches your string...maybe it will help you?
  
   var pattern:RegExp = new RegExp('(\name\:\).*(\,\[a-zA-Z]*
   \:)','i');
  
   This matches name: and ,id:
  
   Generally speaking, I find the easiest thing to do with  
regexps is

  to
   make them smaller and get the smaller ones working first then  
string

   them together.
  
   regards
  
   Guy
  
   On 13/01/2009, at 6:01 PM, flexaustin wrote:
  
pattern = new RegExp('(?=\name\:\).*(?=\,\\w*:)', 'i');
var resultArr:Array = pattern.exec(data);
   
resultArr ends up equaling null;
   
But if you check this: (?=\name\:\).*(?=\,\\w*:) using
http://gskinner.com/RegExr/ it says it works using this data
   
error:32,count:47,group:true,connection:39,warning:
3
,name
:Workstations
,title:Workstations,model:workstation,ticket:
1,type:TagCategory,id:1
   
So why is it not working in my code? If anyone has any
  suggestions I
would appreciate it. I have been trying to get this to work  
for 10

hours straight.
   
TIA
   
   
   
  
 
 
 








RE: [flexcoders] Re: String Encoding Issue Over AMF

2009-01-14 Thread Randy Martin
Are you using the latest Zend framework? Adobe contributed AMF to Zend, and
there's a Zend_AMF component in V1.7 of the framework. This might solve your
problem.

 

HTH, 

~randy

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Daniel Freiman
Sent: Wednesday, January 14, 2009 1:28 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: String Encoding Issue Over AMF

 

I'm using Zend Framework.  I can't find an comparable method.

On Wed, Jan 14, 2009 at 1:58 PM, aphexyuri yuriv...@yahoo.co.uk wrote:

Have you played around with $gateway-setCharsetHandler() in gateway.php?



--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ,
Daniel Freiman freima...@... wrote:


 Either I'm missing something (which is highly possible) or that
information
 isn't addressing the problem. Everything on the php side seems
fine. And
 all the tests/functions applied to the string on the php side operate as
 expected. It's not until the string is sent over AMF to Flex that I
have a
 problem.
 

 On Wed, Jan 14, 2009 at 12:20 PM, valdhor valdhorli...@...wrote:


 
  The problem is with PHP and how it handles multi-byte strings.
 
  A good overview can be found at
http://www.phpwact.org/php/i18n/charsets
 
  Hopefully PHP 6 will end all this grief.
 
 

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


Daniel
  Freiman FreimanCQ@ wrote:
  
   I'm transmitting Strings from php to Flex. The values are correct
  before I
   send them to Flex (I've traced them), but Flex isn't
interpreting them
   properly (I get that square thing, or two incorrect characters).
  I've tried
   various encoding/decoding schemes (urlencode, etc) but none of
them have
   worked. So far I've only tried alphanumeric characters and the
  trademark
   and registered symbols. The trademark is the only one that isn't
   working.
   Anyone have any idea how to fix this?
  
   - Daniel Freiman
  
 
  
 


 

 



Re: [flexcoders] Re: String Encoding Issue Over AMF

2009-01-14 Thread Daniel Freiman
Yeah, that's what I'm using.  Maybe I'll check the non-release builds.

On Wed, Jan 14, 2009 at 4:16 PM, Randy Martin ra...@mariposa.us wrote:

Are you using the latest Zend framework? Adobe contributed AMF to Zend,
 and there's a Zend_AMF component in V1.7 of the framework. This might solve
 your problem.



 HTH,

 ~randy





 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *Daniel Freiman
 *Sent:* Wednesday, January 14, 2009 1:28 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Re: String Encoding Issue Over AMF



 I'm using Zend Framework.  I can't find an comparable method.

 On Wed, Jan 14, 2009 at 1:58 PM, aphexyuri yuriv...@yahoo.co.uk wrote:

 Have you played around with $gateway-setCharsetHandler() in gateway.php?



 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Daniel
 Freiman freima...@... wrote:
 

  Either I'm missing something (which is highly possible) or that
 information
  isn't addressing the problem. Everything on the php side seems
 fine. And
  all the tests/functions applied to the string on the php side operate as
  expected. It's not until the string is sent over AMF to Flex that I
 have a
  problem.
 

  On Wed, Jan 14, 2009 at 12:20 PM, valdhor valdhorli...@...wrote:


 
   The problem is with PHP and how it handles multi-byte strings.
  
   A good overview can be found at
 http://www.phpwact.org/php/i18n/charsets
  
   Hopefully PHP 6 will end all this grief.
  
  

   --- In flexcoders@yahoogroups.com 
   flexcoders%40yahoogroups.comflexcoders%
 40yahoogroups.com,


 Daniel
   Freiman FreimanCQ@ wrote:
   
I'm transmitting Strings from php to Flex. The values are correct
   before I
send them to Flex (I've traced them), but Flex isn't
 interpreting them
properly (I get that square thing, or two incorrect characters).
   I've tried
various encoding/decoding schemes (urlencode, etc) but none of
 them have
worked. So far I've only tried alphanumeric characters and the
   trademark
and registered symbols. The trademark is the only one that isn't
working.
Anyone have any idea how to fix this?
   
- Daniel Freiman
   
  
  
  
 



   



[flexcoders] Re: chart axis titles missing in image capture

2009-01-14 Thread netdeep

I have an idea that this might be a problem with the asynchronous way methods 
get called 
in Flex. In other words even though code wise, the chart has been created 
before the 
automated image capture is called, somehow internally the chart is not 
complete. That's 
explains why the user triggered event of clicking the button works, but it 
doesn't explain 
why the automated calls to generate the image fail on the second and subsequent 
tries 
(since by then one would assume that the image has been created)

By the way, I am using callLater(saveAllSnapshots) for the automated code.

Could someone please help me with this?  Thanks!


--- In flexcoders@yahoogroups.com, netdeep deep...@... wrote:

 I have two sections of code which generate a png file from a UIComponent. 
 Both seem 
 very similar except that one of them cuts the axis titles off for some 
 reason. The actual 
 image file is generated in Java, but the encoding happens here in flex.  The 
 same code is 
 used in both calls to Java, though one is through a servlet (which then calls 
 a Java 
method) 
 and the other is through a direct call to the remote Java method.  What is 
 going on? 
 
 ImageSnapshot.defaultEncoder = PNGEncoder;
 
 public function saveAllSnapshots():void {
   for (var i:int=0; iflowLayout.getChildren().length; i++) {
   var box:VBox = flowLayout.getChildAt(i) as VBox;
   var cp:ChartPanel = box.getChildAt(2) as ChartPanel;
   this.captureImg(cp, cp.title);
   }
 }
 
 // creates png ByteArray and sends it to a java remote object for saving 
 // This is the method that chops off the axis titles
 private function captureImg(comp:UIComponent, name:String):void {
 var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(comp);
 var imageByteArray:ByteArray = imageSnap.data as ByteArray;
 imgSave.saveImage(imageByteArray, name+-img.png);  
 }
 
 // handle a click on the save image button
 private function imgClickHandler(evt:MouseEvent):void {
   var button:Button = evt.target as Button;
   for (var i:int=0; iflowLayout.getChildren().length; i++) {
   var box:VBox = flowLayout.getChildAt(i) as VBox;
   if (button == box.getChildAt(1)) {
   saveSnapShot(box.getChildAt(2) as UIComponent);
   break;
   }
   }   
 }
 
 // show image in a new window (this works)
 private function saveSnapShot(comp:UIComponent):void {
   var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(comp);
 var imageByteArray:ByteArray = imageSnap.data as ByteArray;
 
   var request:URLRequest = new URLRequest(imgServURL);
   request.contentType=text/html;
   request.data = imageByteArray;
   request.method = URLRequestMethod.POST;
   navigateToURL(request, _blank);
 }






[flexcoders] Re: String Encoding Issue Over AMF

2009-01-14 Thread valdhor
The problem is still PHP's problem with unicode characters.

You can see the trademark character problem in php.net's method listings.

About the only way to do it is to replace the TM character with the
HTML equivalent:

$text = ™Steve;
$text = str_replace(™, #x2122;, $text);

And on the flex end set the htmlText property to the returned string.


--- In flexcoders@yahoogroups.com, Daniel Freiman freima...@... wrote:

 Either I'm missing something (which is highly possible) or that
information
 isn't addressing the problem.  Everything on the php side seems
fine.  And
 all the tests/functions applied to the string on the php side operate as
 expected.  It's not until the string is sent over AMF to Flex that I
have a
 problem.
 
 On Wed, Jan 14, 2009 at 12:20 PM, valdhor valdhorli...@...wrote:
 
The problem is with PHP and how it handles multi-byte strings.
 
  A good overview can be found at
http://www.phpwact.org/php/i18n/charsets
 
  Hopefully PHP 6 will end all this grief.
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Daniel
  Freiman FreimanCQ@ wrote:
  
   I'm transmitting Strings from php to Flex. The values are correct
  before I
   send them to Flex (I've traced them), but Flex isn't
interpreting them
   properly (I get that square thing, or two incorrect characters).
  I've tried
   various encoding/decoding schemes (urlencode, etc) but none of
them have
   worked. So far I've only tried alphanumeric characters and the
  trademark
   and registered symbols. The trademark is the only one that isn't
   working.
   Anyone have any idea how to fix this?
  
   - Daniel Freiman
  
 
   
 





RE: [flexcoders] Re: Valid Date Ranges in Flex

2009-01-14 Thread Maciek Sakrejda
Ah, right. I'd forgotten that MIN and MAX are typically defined that way
for floating point types. And I completely missed that you said you'd
tried that--clearly I need more sleep.


-Original Message-
From: Gregory Kelley gkel...@pngmail.com
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Valid Date Ranges in Flex
Date: Wed, 14 Jan 2009 14:10:41 -0500

Actually, just for anyone reading this in the future, Number.MIN_VALUE =
The smallest representable non-negative, non-zero, number
So the actual smallest number is negative Number.MAX_VALUE
 
Greg

 


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Maciek Sakrejda
Sent: Wednesday, January 14, 2009 1:02 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Valid Date Ranges in Flex



You should be able to determine minDate and maxDate by calling new
Date(Number.MIN_VALUE) and new Date(Number.MAX_VALUE).
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Gregory Kelley gkel...@pngmail.com
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Valid Date Ranges in Flex
Date: Wed, 14 Jan 2009 10:30:50 -0500

sheepish grin I knew that at some point in the past. Now that you say
that it is very obvious.

In my attempt to determine the earliest/latest date supported I tried
the following but then all the date parts in the object are NaN.

public static const MIN_DATE:Date = new Date(-Number.MAX_VALUE);
public static const MAX_DATE:Date = new Date(Number.MAX_VALUE);

Thanks,
Greg

__
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of valdhor
Sent: Wednesday, January 14, 2009 10:12 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Valid Date Ranges in Flex

The month ranges from 0 (January) to 11 (December). You asked for day
31 of month 12 of year 2999 so Flex made it day 31 of month 1 of year
3000.

--- In flexcoders@yahoogroups.com, Gregory Kelley gkel...@... wrote:

 In creating a date filterd report generation system, I was asked to
add an option for returning all data. Rather than reworking the
backend I just added a checkbox to the UI that says return all data.
If that box is checked then the properties return the following
constants (randomely created by yours truly as I couldn't determine
from docs what was valid).
 
 public static const MIN_DATE:Date = new Date(1500,1,1); 
 public static const MAX_DATE:Date = new Date(2999,12,31);
 
 Here is the interesting part those dates actually return the
following data.
 MIN_DATE.toString = Thu Feb 1 00:00:00 GMT-0500 1500
 MAX_DATE.toString = Fri Jan 31 00:00:00 GMT-0500 3000
 
 The first evaluation makes sense the second one is a bit more
confusing.
 I would expect if the date I assign is too big that the date
returned would be earlier not in the future.
 
 Anyone know what the valid range is?
 
 Thanks for your time,
 Greg





 




[flexcoders] CartesianChart axes location

2009-01-14 Thread Chad Callahan
I am wanting the axes for my charts to render in front of the chart
rather than on top of, bottom of, left of or right of.  Is there any way
of doing this?
 
Thanks


[flexcoders] Re: chart axis titles missing in image capture

2009-01-14 Thread netdeep

I've made some progress.  If I add this code:

chartPanel.addEventListener(FlexEvent.CREATION_COMPLETE, imgExport);


// method: imgExport (Event)



public function imgExport(e:Event):void {
var cp:ChartPanel = e.currentTarget as ChartPanel;
captureImg(cp, cp.title);
}

The axis gets drawn, but only on the INITAL rendering of the chart (obviously). 
 The addEventListener(FlexEvent.UPDATE_COMPLETE, imgExport) does not seem to 
register 
properly because the chartPanel doesn't ever get updated, just the data in the 
chart element 
whithin the panel.  How do I get the update to register as an event as well?



[flexcoders] Re: What data type is this? var service = __locator.getService(roService);

2009-01-14 Thread djepyon
use getRemoteObject if you're service is a RemoteObject.

_locator.getRemoteObject(roService);

if it was an HTTPService or a WebService then you would use either

_locator.getHTTPService(httpService);
_locator.getWebService(webService);

respectively.

getService() is still around and returns AbstractWebService - its just
not the preferred usage.


--- In flexcoders@yahoogroups.com, dnk d.k.emailli...@... wrote:

 Warning:
 Id 3604: You should now use one of the strongly typed methods for  
 returning a service.
   
 What to Type it as? I thought remoteObject, but the compiler complains  
 with:
 
 Id 1118: Implicit coercion of a value with static type  
 mx.rpc:AbstractService to a possibly unrelated type
 
 var service = __locator.getService(roService);
 
 
 roService refers to a RemoteObject. And __locator is a ServiceLocator
 
 And when i change it to:
 
 var service: AbstractService = __locator.getService(roService);
 
 I still get the same warning.
 
 The code works, but I just want to be sure t do it all right.
   
 
 d





[flexcoders] Graying out the Tab Selection of the parent App

2009-01-14 Thread anuj181
Hi All
I am trying to disable the canvas in ToggleButtonBar in my parent app,
Actually I am setting the disable property from differnt module of my
app. My disabling is working fine but I like to give it a grayed out
look, so I like to set the blurX or blurY property or give it a color,
The problem here is even if I set the blurX or blurY, it is not
showing the effect and on the other hand it is not accepting color
property, I am not sure how would I give tab in my parent app the
disabled look. Please help if anyone knows how to fix it.

Thanks

Following is my code


/*Parent App MXML Code*/
mx:Canvas id=_parentCanvas 

!-- Content Area--
mx:ViewStack top=53 id=ContentStack resizeToContent=true

mx:Canvas label=Settings id=tab_Config enabled=true
ackgroundAlpha=3/mx:Canvas 
/mx:Canvas
/mx:ViewStack 

!-- Main navigation tab bar. Goes after ContentStack since it uses it
as a dataProvider. --
mx:ToggleButtonBar paddingTop=0 paddingBottom=0 
id=TabBarMain
direction=vertical 
 dataProvider=ContentStack width=95 height=297 
x=274 y=248/
/*Function Call from Module

//Working Fine
private function _Display():void
{
if (_group.selectedValue == 'Disabled')
{
parentApplication.tab_Config.enabled = false;
parentApplication.tab_DashBoard.label=;
//Does Not show Any effect
parentApplication.tab_Config.blurX = 10;
parentApplication.tab_DashBoard.blurY=10;
//Gives Error
parentApplication.tab_DashBoard.color='#ff';
}
}



[flexcoders] Chart axis values clipped

2009-01-14 Thread Richard Rodseth
I have a category chart displayed in a variable-sized container. At smaller
sizes the font used for displaying axis values is scaled, but there is a
point at which the values are clipped. Obviously this won't do. Anyone else
encountered this and have a workaround?


[flexcoders] Image loading indicators do not display in Firefox 2

2009-01-14 Thread Greg Hess
Hi All,

I am using a custom item renderer for a TileList that displays an
image and a label for each item. The image has event listener
functions for Open and Complete events. On the Open event we add a
spinner component to provide a loading indicator and remove it on
Complete. It works fine in IE however in Firefox 2 the spinner never
appears.

In debugging I have noticed the Open and Complete events are being
fired in Firefox however one right after the other and I am thinking
before the actual image is fully loaded. I added some logic in the
Complete listener function to inspect the bytesLoaded against
bytesTotal and they are equal. But why does the image not appear for a
few seconds if fully loaded...

From the archive I see similar issues but in those cases the events
didn't fire, not the same for me. Has anyone seen this issue before?

Any help much appreciated.

Cheers,

Greg


RE: [flexcoders]Count the number of arguments on a function

2009-01-14 Thread Gordon Smith
I think describeType() provides information about method parameters.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of dorkie dork from dorktown
Sent: Wednesday, January 14, 2009 12:39 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders]Count the number of arguments on a function


Is there a way to count how many arguments there are on a function from outside 
that function? For example,

Class1:
// myFunction has one parameter of type string
myFunction(myParam:String) {

}

Class2:
someFunction() {
// for example,
// i want to get a count of arguments of myFunction, name, if they are 
required and their type
var argumentLength = class1.myFunction.arguments.length;
var argumentName = class1.myFunction.arguments[0].name;
var argumentClass = class1.myFunction.arguments[0].class;
var argumentRequired = class1.myFunction.arguments[0].required;
}





[flexcoders] Re: Chart axis values clipped

2009-01-14 Thread Richard Rodseth
To partially answer my own question, I see there is a labelFunction on
LinearAxis, so I can pad the string with a space, but perhaps there is
another more elegant solution.

On Wed, Jan 14, 2009 at 1:46 PM, Richard Rodseth rrods...@gmail.com wrote:

 I have a category chart displayed in a variable-sized container. At smaller
 sizes the font used for displaying axis values is scaled, but there is a
 point at which the values are clipped. Obviously this won't do. Anyone else
 encountered this and have a workaround?



Re: [flexcoders]Count the number of arguments on a function

2009-01-14 Thread dorkie dork from dorktown
Thank you!

On Wed, Jan 14, 2009 at 2:50 PM, Gordon Smith gosm...@adobe.com wrote:

I think describeType() provides information about method parameters.



 Gordon Smith

 Adobe Flex SDK Team



 *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On
 Behalf Of *dorkie dork from dorktown
 *Sent:* Wednesday, January 14, 2009 12:39 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders]Count the number of arguments on a function



 Is there a way to count how many arguments there are on a function from
 outside that function? For example,

 Class1:
 // myFunction has one parameter of type string
 myFunction(myParam:String) {

 }

 Class2:
 someFunction() {
 // for example,
 // i want to get a count of arguments of myFunction, name, if they are
 required and their type
 var argumentLength = class1.myFunction.arguments.length;
 var argumentName = class1.myFunction.arguments[0].name;
 var argumentClass = class1.myFunction.arguments[0].class;
 var argumentRequired = class1.myFunction.arguments[0].required;
 }


 



Re: [flexcoders]Change state without dispatching events

2009-01-14 Thread dorkie dork from dorktown
Do you have a code example you can show me?

When I use this:

Application.application.setCurrentState(stateName);

it always triggers a StateChangeEvent.CURRENT_STATE_CHANGE event.

I want to know if there is a way to not generate that event. None at all.

On Wed, Jan 14, 2009 at 2:11 AM, p...@vin Uttarwar
pravinuttar...@gmail.comwrote:

   Hi,
 Yes you can do it  using databinding,
 by keeping one of the variable which is aceessible from
 anywhere throughout the application [inside static class like ModelLocator]
 and according to
 its change you can change the state.

 2009/1/14 dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com

   Is there a way to change states without generating an event?


  



[flexcoders] Re: warning on 'back' button before closing application?

2009-01-14 Thread jim.abbott45
Your other choice is to have your entire application opened in a new,
separate browser window, but with the browser 'chrome'  history
turned off. In that case, users cannot accidentally navigate away from
the application, because there _is no_ navigation history to begin
with. Of course not everyone likes the idea of opening new browser
windows, so this technique may not be useful everywhere.

Regards,
Jim

--- In flexcoders@yahoogroups.com, Maciek Sakrejda msakre...@... wrote:

 Is there a way to warn the user that they're about to navigate away from
 the app through the browser's back button? This is actually a request
 from our users: we don't use BrowserManager (I don't think it would even
 make sense for us), but they are used to browser paradigms, and
 sometimes hit 'back' inadvertently, navigating away from the
 application. Is there a way to issue a warning beforehand?
 
 -- 
 Maciek Sakrejda
 Truviso, Inc.
 http://www.truviso.com





Re: [flexcoders]Change state without dispatching events

2009-01-14 Thread Paul Andrews
- Original Message - 
  From: dorkie dork from dorktown 
  To: flexcoders@yahoogroups.com 
  Sent: Wednesday, January 14, 2009 10:34 PM
  Subject: Re: [flexcoders]Change state without dispatching events


  Do you have a code example you can show me? 

  When I use this:

  Application.application.setCurrentState(stateName); 

  it always triggers a StateChangeEvent.CURRENT_STATE_CHANGE event. 

  I want to know if there is a way to not generate that event. None at all. 

I'll ask the obvious question. Why don't you want to let components know that 
the state has changed?
Makes me wonder why you are using states if you don't want the event propogated.

  On Wed, Jan 14, 2009 at 2:11 AM, p...@vin Uttarwar pravinuttar...@gmail.com 
wrote:

Hi,
Yes you can do it  using databinding,
by keeping one of the variable which is aceessible from
anywhere throughout the application [inside static class like ModelLocator] 
and according to
its change you can change the state.



2009/1/14 dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com


  Is there a way to change states without generating an event?





   

[flexcoders] Issue with load progress of RSL in custom preloader

2009-01-14 Thread Steve Mathews
I am using framework version 3.1 and I have created a custom preloader for
my application. I want a smooth progress bar during this load so I figured I
would just watch the load of the RSLs as they seem to be the
biggest chunk of data (for now at least). I know this would miss some
loading and the init phase, but I am not worried about that right now. The
problem seems to be that the RSL progress event only fires for one of the
RSLs that loads. So although the event says rslTotal = 2, the rslIndex is
only ever 0. So I get a nice progress for one RSL, then it sits at 100%
while the second one loads. Anyone run into this issue before and have a
workaround?
PS. I switched to the 3.2 framework and things got even stranger. It loaded
the swf RSL, then the swz of the same rsl, then the swf again and didn't
fire the complete event at all. Needless to say, I scrapped that idea and
went back to 3.1.

Steve


Re: [flexcoders]Change state without dispatching events

2009-01-14 Thread dorkie dork from dorktown
I have specific functionality setup in the StateChange event (functionality
type 1). But in another part of the class I have functionality
(functionality type 2) that does some slightly different work.

The code looks like this:

type 1:
// someone sets the state in code (could be anywhere)
// for example,
Application.application.currentState = state 1;

this generates a state change event and the type 1 functionality is handled
in a state change listener i have already setup

type 2:
// i set the state inside the class specifically where i want it to go
// for example,
Application.application.currentState = state 1;

this generates a state change event but i want type 2 functionality to run.
so if i cancel the event then i can run type 2 code directly after this
line.

i thought about using flags like this

useType2Functionality = true;
Application.application.currentState = state 1;
useType2Functionality = false;

and then in the my state change listener i can check for this flag and
either exit or add the code i want in there?

On Wed, Jan 14, 2009 at 3:48 PM, Paul Andrews p...@ipauland.com wrote:

- Original Message -

 *From:* dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com
 *To:* flexcoders@yahoogroups.com
 *Sent:* Wednesday, January 14, 2009 10:34 PM
 *Subject:* Re: [flexcoders]Change state without dispatching events

 Do you have a code example you can show me?

 When I use this:

 Application.application.setCurrentState(stateName);

 it always triggers a StateChangeEvent.CURRENT_STATE_CHANGE event.

 I want to know if there is a way to not generate that event. None at all.


 I'll ask the obvious question. Why don't you want to let components know
 that the state has changed?
 Makes me wonder why you are using states if you don't want the event
 propogated.

 On Wed, Jan 14, 2009 at 2:11 AM, p...@vin Uttarwar pravinuttar...@gmail.com
  wrote:

   Hi,
 Yes you can do it  using databinding,
 by keeping one of the variable which is aceessible from
 anywhere throughout the application [inside static class like
 ModelLocator] and according to
 its change you can change the state.

 2009/1/14 dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com

   Is there a way to change states without generating an event?



   



[flexcoders] Interfaces not working the way I understand anyway

2009-01-14 Thread mmormando
Ok, I've got a module implemented in an mxml file that implements an
interface IMyInterface, so marked with the
implements=com.my.interface.IMyInterface tag in the right place. So,
after dynamically loading the module I try to either cast it to
IMyInterface, or check it with is, and it says that it isn't an
IMyInterface. In straight actionscript it seems to be working fine,
and if I keep the instance as a raw object and try calling any of the
methods that are defined in IMyInterface it works. And if I change
IMyInterface and recompile without changing my mxml file I get the
compiler error that MyInterfaceImplementation.mxml doesn't implement
IMyInterface.
Anyone know what's going on??
tia
Mike




Re: [flexcoders] Custom mouse cursors including the system cursor?

2009-01-14 Thread Josh McDonald
I tried to just follow up with a Mouse.show on next frame, but CursorManager
calls Mouse.hide on every frame. For now I'm simply working around the
problem by switching all my drag cursors to a little grabbing hand :)

I sure do miss mc.startDrag() from Flash MX sometimes...

-Josh

2009/1/15 Manish Jethani manish.jeth...@gmail.com

 On Tue, Jan 13, 2009 at 12:46 PM, Josh McDonald dzn...@gmail.com wrote:

  I'm wondering how I create a custom mouse cursor that will include the
  system cursor, the way DragManager does with the halo mouse cursors?

 Why not just draw the custom cursor next to the system cursor?
 CursorManager does Mouse.hide. If you skipped that, you would end up
 with a composite cursor.

 Maybe CursorManager should have an option for this.

 Manish

 --
 Manish Jethani
 mx:Blog source=/dev/random ...
 manishjethani.com

 

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






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

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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: j...@gfunk007.com
:: http://flex.joshmcdonald.info/
:: http://twitter.com/sophistifunk


Re: [flexcoders] When to use the include directive?

2009-01-14 Thread Josh McDonald
FWIW, I use include *all the time* when I need to implement IEventDispatcher
but I'm extending something that's not an IEventDispatcher (Proxy, I'm
looking at you).

-Josh

2009/1/14 Tom Chiverton tom.chiver...@halliwells.com

  On Tuesday 13 Jan 2009, Nate Beck wrote:
  is an include Header.as statement that has 30 include statements within
  it.

 Sounds like someone used to programing in C.

  To give a datagrid additional functionality, you give it an
  id=myDataGrid

 Eww.

  I just don't see a good use for the include statement anymore. In my
  opinion, it just promotes bad programming practices.

 It was handy, up until I came across Code Behind, to separate layout from
 code.

 --
 Tom Chiverton
 Helping to completely e-enable granular e-services

 

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

 Halliwells LLP is a limited liability partnership registered in England and
 Wales under registered number OC307980 whose registered office address is at
 Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list
 of members is available for inspection at the registered office together
 with a list of those non members who are referred to as partners. We use the
 word ?partner? to refer to a member of the LLP, or an employee or consultant
 with equivalent standing and qualifications. Regulated by the Solicitors
 Regulation Authority.

 CONFIDENTIALITY

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

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




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

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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: j...@gfunk007.com
:: http://flex.joshmcdonald.info/
:: http://twitter.com/sophistifunk


Re: [flexcoders]Change state without dispatching events

2009-01-14 Thread Paul Andrews
Seems to me that you may have two separate states and are really trying to use 
only one state when there should be two. What's the problem with having state 
1 for state 1 functionality and state 2 for state 2 functionality?

Other possible solutions may be changing states then calling a function 
afterwards, or perhaps changing states and issuing an event. Really depends on 
what your special functionality is.

Paul
  - Original Message - 
  From: dorkie dork from dorktown 
  To: flexcoders@yahoogroups.com 
  Sent: Wednesday, January 14, 2009 11:08 PM
  Subject: Re: [flexcoders]Change state without dispatching events


  I have specific functionality setup in the StateChange event (functionality 
type 1). But in another part of the class I have functionality (functionality 
type 2) that does some slightly different work. 

  The code looks like this:

  type 1:
  // someone sets the state in code (could be anywhere)
  // for example,
  Application.application.currentState = state 1;

  this generates a state change event and the type 1 functionality is handled 
in a state change listener i have already setup

  type 2:
  // i set the state inside the class specifically where i want it to go
  // for example,
  Application.application.currentState = state 1;

  this generates a state change event but i want type 2 functionality to run. 
so if i cancel the event then i can run type 2 code directly after this line. 

  i thought about using flags like this

  useType2Functionality = true;
  Application.application.currentState = state 1;
  useType2Functionality = false;

  and then in the my state change listener i can check for this flag and either 
exit or add the code i want in there?


  On Wed, Jan 14, 2009 at 3:48 PM, Paul Andrews p...@ipauland.com wrote:


- Original Message - 
  From: dorkie dork from dorktown 
  To: flexcoders@yahoogroups.com 
  Sent: Wednesday, January 14, 2009 10:34 PM
  Subject: Re: [flexcoders]Change state without dispatching events


  Do you have a code example you can show me? 

  When I use this:

  Application.application.setCurrentState(stateName); 

  it always triggers a StateChangeEvent.CURRENT_STATE_CHANGE event. 

  I want to know if there is a way to not generate that event. None at all. 

I'll ask the obvious question. Why don't you want to let components know 
that the state has changed?
Makes me wonder why you are using states if you don't want the event 
propogated.

  On Wed, Jan 14, 2009 at 2:11 AM, p...@vin Uttarwar 
pravinuttar...@gmail.com wrote:

Hi,
Yes you can do it  using databinding,
by keeping one of the variable which is aceessible from
anywhere throughout the application [inside static class like 
ModelLocator] and according to
its change you can change the state.



2009/1/14 dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com 


  Is there a way to change states without generating an event?







   

Re: [flexcoders] Re: warning on 'back' button before closing application?

2009-01-14 Thread Maciek Sakrejda
Thanks, Jim. I don't think that'll work for us, but it's an interesting
idea. I think one of the other problems is that by default, Firefox
opens new windows in a new *tab*, thwarting the attempt to avoid the
chrome. I think the onbeforeunload idea might work--we're actually
already doing some other cleanup with that handler, so hopefully this
should be straightforward.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: jim.abbott45 jim.abbot...@yahoo.com
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: warning on 'back' button before closing
application?
Date: Wed, 14 Jan 2009 22:52:11 -

Your other choice is to have your entire application opened in a new,
separate browser window, but with the browser 'chrome'  history
turned off. In that case, users cannot accidentally navigate away from
the application, because there _is no_ navigation history to begin
with. Of course not everyone likes the idea of opening new browser
windows, so this technique may not be useful everywhere.

Regards,
Jim

--- In flexcoders@yahoogroups.com, Maciek Sakrejda msakre...@...
wrote:

 Is there a way to warn the user that they're about to navigate away
from
 the app through the browser's back button? This is actually a request
 from our users: we don't use BrowserManager (I don't think it would
even
 make sense for us), but they are used to browser paradigms, and
 sometimes hit 'back' inadvertently, navigating away from the
 application. Is there a way to issue a warning beforehand?
 
 -- 
 Maciek Sakrejda
 Truviso, Inc.
 http://www.truviso.com





 




[flexcoders] Apple Spotlight effect - autocomplete

2009-01-14 Thread jovialrandor
Does anyone know how to go about creating a apple spotlight effect 
using the Adobe autocomplete component?

Any direction is appreciated.





Re: [flexcoders] When to use the include directive?

2009-01-14 Thread Nate Beck
Thanks for the responses everyone.
It's an interesting question that I had posed to myself... and at the time,
I couldn't come up with any particular reason when to use it.

I have seen it used in the framework, and I agree that there is a place for
it.  But I do wish some developers never knew it existed. Especially the
one's who wrote this framework I'm forced to use.

Thanks again everyone!

Cheers,
Nate

On Wed, Jan 14, 2009 at 3:23 PM, Josh McDonald dzn...@gmail.com wrote:

   FWIW, I use include *all the time* when I need to implement
 IEventDispatcher but I'm extending something that's not an IEventDispatcher
 (Proxy, I'm looking at you).

 -Josh

 2009/1/14 Tom Chiverton tom.chiver...@halliwells.com

  On Tuesday 13 Jan 2009, Nate Beck wrote:
  is an include Header.as statement that has 30 include statements
 within
  it.

 Sounds like someone used to programing in C.

  To give a datagrid additional functionality, you give it an
  id=myDataGrid

 Eww.

  I just don't see a good use for the include statement anymore. In my
  opinion, it just promotes bad programming practices.

 It was handy, up until I came across Code Behind, to separate layout from
 code.

 --
 Tom Chiverton
 Helping to completely e-enable granular e-services

 

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

 Halliwells LLP is a limited liability partnership registered in England
 and Wales under registered number OC307980 whose registered office address
 is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.
 A list of members is available for inspection at the registered office
 together with a list of those non members who are referred to as partners.
 We use the word ?partner? to refer to a member of the LLP, or an employee or
 consultant with equivalent standing and qualifications. Regulated by the
 Solicitors Regulation Authority.

 CONFIDENTIALITY

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

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




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

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

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: j...@gfunk007.com
 :: http://flex.joshmcdonald.info/
 :: http://twitter.com/sophistifunk

  



Re: [flexcoders] Interfaces not working the way I understand anyway

2009-01-14 Thread Nate Beck
Post code please.

On Wed, Jan 14, 2009 at 3:08 PM, mmormando m...@mormando.com wrote:

   Ok, I've got a module implemented in an mxml file that implements an
 interface IMyInterface, so marked with the
 implements=com.my.interface.IMyInterface tag in the right place. So,
 after dynamically loading the module I try to either cast it to
 IMyInterface, or check it with is, and it says that it isn't an
 IMyInterface. In straight actionscript it seems to be working fine,
 and if I keep the instance as a raw object and try calling any of the
 methods that are defined in IMyInterface it works. And if I change
 IMyInterface and recompile without changing my mxml file I get the
 compiler error that MyInterfaceImplementation.mxml doesn't implement
 IMyInterface.
 Anyone know what's going on??
 tia
 Mike

  




-- 

Cheers,
Nate

http://blog.natebeck.net


RE: [flexcoders] Interfaces not working the way I understand anyway

2009-01-14 Thread Alex Harui
Sounds like an applicationDomain topology problem.  See the  modules 
presentation on my blog.  Make sure the interface is linked into the main app.

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Nate Beck
Sent: Wednesday, January 14, 2009 8:12 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Interfaces not working the way I understand anyway


Post code please.
On Wed, Jan 14, 2009 at 3:08 PM, mmormando 
m...@mormando.commailto:m...@mormando.com wrote:

Ok, I've got a module implemented in an mxml file that implements an
interface IMyInterface, so marked with the
implements=com.my.interface.IMyInterface tag in the right place. So,
after dynamically loading the module I try to either cast it to
IMyInterface, or check it with is, and it says that it isn't an
IMyInterface. In straight actionscript it seems to be working fine,
and if I keep the instance as a raw object and try calling any of the
methods that are defined in IMyInterface it works. And if I change
IMyInterface and recompile without changing my mxml file I get the
compiler error that MyInterfaceImplementation.mxml doesn't implement
IMyInterface.
Anyone know what's going on??
tia
Mike



--

Cheers,
Nate

http://blog.natebeck.net




[flexcoders] API to get the timezone information?

2009-01-14 Thread akila_ksri
Hi,

Would like to know if there is any direct API available in 
actionscript/C# to get the timezone information, given the city name?

Thanks in advance,
Akila 






Re: [flexcoders] API to get the timezone information?

2009-01-14 Thread Paul Hastings
akila_ksri wrote:
 Would like to know if there is any direct API available in 
 actionscript/C# to get the timezone information, given the city name?

not in AS but you could use one of the geonames.org webservices.

for example:
http://www.sustainablegis.com/projects/tz/tzmap/

code:
http://tzmap.riaforge.org/


[flexcoders] where is the FB Pro 3.0.2 datavisualization source?

2009-01-14 Thread Pan Troglodytes
I upgraded to 3.0.2 and seem to have a bit of an issue.  The last time I've
seen the datavisualization source distributed is in 3.0.0.  Sometimes when I
trace into SDK units (BubbleSeries.as at the moment), you can tell the
debugger is going to a line from a different version of the file.  Crashing
on a line that contains var minItems:Array /* of BubbleSeriesItem */ = [];
is kind of a dead giveaway.

Is there some way to actually get the updated source or are we screwed?

-- 
Jason


[flexcoders] Re: where is the FB Pro 3.0.2 datavisualization source?

2009-01-14 Thread Pan Troglodytes
Hmm, I should also mention that the error I'm getting is:
TypeError: Error #1009: Cannot access a property or method of a null object
reference.
at
mx.charts.series::BubbleSeries/findDataPoints()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\series\BubbleSeries.as:933]
at
mx.charts.chartClasses::ChartBase/findDataPoints()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\ChartBase.as:1974]
at
mx.charts.chartClasses::ChartBase/mouseOverHandler()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\ChartBase.as:4216]

Which is really odd, considering I don't have a C:\work folder.  It looks
like for some reason it's showing the Adobe developer's paths.

On Thu, Jan 15, 2009 at 12:32 AM, Pan Troglodytes chimpathe...@gmail.comwrote:

 I upgraded to 3.0.2 and seem to have a bit of an issue.  The last time I've
 seen the datavisualization source distributed is in 3.0.0.  Sometimes when I
 trace into SDK units (BubbleSeries.as at the moment), you can tell the
 debugger is going to a line from a different version of the file.  Crashing
 on a line that contains var minItems:Array /* of BubbleSeriesItem */ = [];
 is kind of a dead giveaway.

 Is there some way to actually get the updated source or are we screwed?

 --
 Jason




-- 
Jason


Re: [flexcoders] Re: where is the FB Pro 3.0.2 datavisualization source?

2009-01-14 Thread Sam Lai
http://blogs.adobe.com/flexdoc/2008/04/extracting_data_visualization.html

Substitute 3.0.0 for 3.2.0 and you should be right. Took me a while to
find this when I needed it - don't know why they don't just install it
if Flex 3 Pro is detected, but anyway...

2009/1/15 Pan Troglodytes chimpathe...@gmail.com:
 Hmm, I should also mention that the error I'm getting is:
 TypeError: Error #1009: Cannot access a property or method of a null object
 reference.
 at
 mx.charts.series::BubbleSeries/findDataPoints()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\series\BubbleSeries.as:933]
 at
 mx.charts.chartClasses::ChartBase/findDataPoints()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\ChartBase.as:1974]
 at
 mx.charts.chartClasses::ChartBase/mouseOverHandler()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\ChartBase.as:4216]

 Which is really odd, considering I don't have a C:\work folder.  It looks
 like for some reason it's showing the Adobe developer's paths.

 On Thu, Jan 15, 2009 at 12:32 AM, Pan Troglodytes chimpathe...@gmail.com
 wrote:

 I upgraded to 3.0.2 and seem to have a bit of an issue.  The last time
 I've seen the datavisualization source distributed is in 3.0.0.  Sometimes
 when I trace into SDK units (BubbleSeries.as at the moment), you can tell
 the debugger is going to a line from a different version of the file.
 Crashing on a line that contains var minItems:Array /* of BubbleSeriesItem
 */ = []; is kind of a dead giveaway.

 Is there some way to actually get the updated source or are we screwed?

 --
 Jason



 --
 Jason
 


Re: [flexcoders] Re: where is the FB Pro 3.0.2 datavisualization source?

2009-01-14 Thread Pan Troglodytes
Thank you VERY much for the excellent pointer.  I don't know why they don't
install it by default either.  Then again, I also don't know why the
Expressions window can't understand the expression -1!

On Thu, Jan 15, 2009 at 12:44 AM, Sam Lai samuel@gmail.com wrote:


 http://blogs.adobe.com/flexdoc/2008/04/extracting_data_visualization.html

 Substitute 3.0.0 for 3.2.0 and you should be right. Took me a while to
 find this when I needed it - don't know why they don't just install it
 if Flex 3 Pro is detected, but anyway...

 2009/1/15 Pan Troglodytes chimpathe...@gmail.comchimpathetic%40gmail.com
 :

  Hmm, I should also mention that the error I'm getting is:
  TypeError: Error #1009: Cannot access a property or method of a null
 object
  reference.
  at
 
 mx.charts.series::BubbleSeries/findDataPoints()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\series\BubbleSeries.as:933]
  at
 
 mx.charts.chartClasses::ChartBase/findDataPoints()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\ChartBase.as:1974]
  at
 
 mx.charts.chartClasses::ChartBase/mouseOverHandler()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\ChartBase.as:4216]
 
  Which is really odd, considering I don't have a C:\work folder. It looks
  like for some reason it's showing the Adobe developer's paths.
 
  On Thu, Jan 15, 2009 at 12:32 AM, Pan Troglodytes 
 chimpathe...@gmail.com chimpathetic%40gmail.com
  wrote:
 
  I upgraded to 3.0.2 and seem to have a bit of an issue. The last time
  I've seen the datavisualization source distributed is in 3.0.0.
 Sometimes
  when I trace into SDK units (BubbleSeries.as at the moment), you can
 tell
  the debugger is going to a line from a different version of the file.
  Crashing on a line that contains var minItems:Array /* of
 BubbleSeriesItem
  */ = []; is kind of a dead giveaway.
 
  Is there some way to actually get the updated source or are we screwed?
 
  --
  Jason
 
 
 
  --
  Jason
 
  




-- 
Jason


Re: [flexcoders] regular expression tester says it works, but it doesnt????

2009-01-14 Thread Haykel BEN JEMIA
Try this one:
\([^\]+)\:\?([^\,]+)\?

This should match all key-value pairs. Just iterate over them and choose the
ones you need.

Haykel Ben Jemia

Allmas
Web  RIA Development
http://www.allmas-tn.com




On Tue, Jan 13, 2009 at 8:01 AM, flexaustin flexaus...@yahoo.com wrote:

   pattern = new RegExp('(?=\name\:\).*(?=\,\\w*:)', 'i');
 var resultArr:Array = pattern.exec(data);

 resultArr ends up equaling null;

 But if you check this: (?=\name\:\).*(?=\,\\w*:) using
 http://gskinner.com/RegExr/ it says it works using this data


 error:32,count:47,group:true,connection:39,warning:3,name:Workstations,title:Workstations,model:workstation,ticket:1,type:TagCategory,id:1

 So why is it not working in my code? If anyone has any suggestions I
 would appreciate it. I have been trying to get this to work for 10
 hours straight.

 TIA