[flexcoders] Installation on multiple machines (was: Flex Builder 3 on Mac and Win at same time?)

2009-01-09 Thread Blair Cox
Installation on multiple machines

If you own, or are the primary user of a single-user Adobe product that is
installed on a computer at work, you can also install and use the software
on one secondary computer of the same platform at home or on a portable
computer. However, you may not run the software simultaneously on both the
primary and secondary computers.

Okay, that is great, but the only reason I need to do this is because the
version for the Windows platform does something the Mac version does not? I
just want to make sure I don¹t mess up my primary copy, which is on the Mac.
I don¹t need to run two instances of FB3 at the same time.

Or Does anyone know how to connect to an ASP.net server from the Mac
version of FB3?

Thanks, 


-- 
Blair 





From: cox.blair blair@luminultra.com
Reply-To: flexcoders@yahoogroups.com
Date: Fri, 09 Jan 2009 14:21:38 -
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Builder 3 on Mac and Win at same time?

 
 

Hi folks,

Bit of an issue here. We have a project that requires us to begin
working with an ASP.net server. I'm currently using the Mac version of
FB3 and so far I haven't been able to determine how to continue using
the Mac version while creating a new project tailored to ASP?

When we purchased FB3, I downloaded both the Mac version and the PC
version. I have Parallels installed on my Mac, so I'm running
WindowsXP as well, can I install FB3 on the WinXP side without causing
any issues? Technically, it is the same as installing the program
twice on two machines, but how else can I get around this?

Am I missing a way to continue using the Mac version and to connect to
a remote ASP server without causing problems? Haven't figured it out yet.

Thanks,

 




Re: [flexcoders] Re: Installation on multiple machines (was: Flex Builder 3 on Mac and Win at same time?)

2009-01-09 Thread Blair Cox
I only thought I required the Windows version because when you start a new
project and select ASP.net as the server, it requires the dev server or IIS
to be local. I would like to stay away from third-party add-ins for
communicating with the ASP server. I have to follow the rules of the
client¹s IT department. Minimal boat rocking here.

How about WSDL?

-- 
Blair 





From: valdhor valdhorli...@embarqmail.com
Reply-To: flexcoders@yahoogroups.com
Date: Fri, 09 Jan 2009 15:43:55 -
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Installation on multiple machines (was: Flex
Builder 3 on Mac and Win at same time?)

 
 

You can use the Mac version of Flex Builder to build a SWF that
connects to ASP.NET using WebORB.

Why do you need the Windows version of Flex Builder?




Re: [flexcoders] Re: Installation on multiple machines (was: Flex Builder 3 on Mac and Win at same time?)

2009-01-09 Thread Blair Cox
No idea, new territory for me. I¹m just going on what I¹ve found in the
documentation and the options shown when creating a new project.

Lets switch the topic slightly: How would you go about creating an
application where the server data is handled by someone else and you have
very little to no control of it. You pretty much have to deal with what they
provide. It¹s an ASP.net server with a preference to delivering XML data.
There is a slight chance we could use SOAP/web services. We¹re talking an
industrial setting as well. If you have IT experience in this area you¹ll
understand.

I just read a blog on setting up WSDL, anyone have any experience here or
some suggestions?

http://www.flexlive.net/?p=79

-- 
Blair 





From: Sam Lai samuel@gmail.com
Reply-To: flexcoders@yahoogroups.com
Date: Sat, 10 Jan 2009 02:58:02 +1100
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Installation on multiple machines (was: Flex
Builder 3 on Mac and Win at same time?)

 
 

There's no problem with running both versions technically - they are
completely seperate from the app's perspective.

What's the error? And out of curiosity - what does telling FB3 what
server tech you use get you anyway?




Re: [flexcoders] Textarea, why the blue border?

2008-12-15 Thread Blair Cox
Well there you go, I was using the wrong component. Thanks!

-- 
Blair 





From: Alex Harui aha...@adobe.com
Reply-To: flexcoders@yahoogroups.com
Date: Mon, 15 Dec 2008 11:45:56 -0800
To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com
Conversation: [flexcoders] Textarea, why the blue border?
Subject: RE: [flexcoders] Textarea, why the blue border?

 
 

Because.
 
Our design/usability folks think that is ³best².
 
You should use Text, not TextArea for non-editable text.
 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of cox.blair
Sent: Monday, December 15, 2008 11:41 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Textarea, why the blue border?
 

Everyone,

Why is there a blue border shown when using a textarea and it has been
clicked on? To show it is in focus? Great, but why?

How can this be removed? No, switching to Gumbo is not an option.

How would you display a few paragraphs of text within you
applications? Dis the designers of Flex believe it would never be used
to show more than a couple lines of type?

Thanks.

 
 




Re: [flexcoders] How to: Select range in Datagrid to set range in Chart?

2008-11-13 Thread Blair Cox
What would be really nice is to simply select the range directly from the
initial chart, since when first loading the dataprovider, the entire range
is loaded. Every time I try to implement filtering before retrieving the
data, I get a null reference error.

private function processFilter(item:Object):Boolean { return
item.Date_Collected =
dfconv.format(linechart1.selectedChartItems.xValue.caretItem).toString() 
item.Date_Collected =
dfconv.format(linechart1.selectedChartItems.anchorItem).toString();

If I could simply define the first and last item selected in a chart
multiple selection, it would do what I need. Any suggestions?

-- 
Blair 





From: cox.blair [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 13 Nov 2008 17:15:39 -
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to: Select range in Datagrid to set range in
Chart?

 
 

Okay, I'll do my best to explain what I'm trying to do and see if
anyone can point me in the direction of a good url and sample -

What I would like to do is select a range of data within a Datagrid,
so lets say 10 items out of the list 20.

Than whatever is selected in the Datagrid, appears in chart. It is
merely a graphical way of filtering a date range of data. Currently in
my example, I select the beginning and ending dates. So all I would
require to modify this is to be able to pass along the the first and
last entry selected and define which column will be used.

Any ideas? Cheers.




Re: [flexcoders] my first flex website

2008-11-04 Thread Blair Cox
Hi, sorry doesn¹t fit on my screen and I cannot scroll down. Mac OSX 10.4,
Firefox 3.03 17² screen, 1440x960 res. Looks good at the top ;)

-- 
Blair 





From: Gustavo Duenas [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Tue, 4 Nov 2008 14:06:12 -0500
To: flexcoders@yahoogroups.com
Subject: [flexcoders] my first flex website

 
 

HI, finally I've done my first flex web siteit is done, or at least is
that what I think...maybe tomorrow I'll add something else.

please check it at:

http://leftandrightsolutions.com/lrsad/bin/lrsad.html

please don't be so hard in critics, is ok to be criticized but don't be
offensive.

I hope you like, is not the big deal, but is something that did by myself, I
thank in advance to all of you who help me out 
with your advices.

regards,

Gustavo



Gustavo A. Duenas
Creative Director
LEFT AND RIGHT SOLUTIONS
904.  265 0330 - 904. 386 7958
www.leftandrightsolutions.com
Jacksonville - Florida




Re: [flexcoders] Flex 3 Style Explorer is available

2008-10-28 Thread Blair Cox
Has there been a change? I¹ve been trying this on and off for months now and
I find there are parts that do not work ­ at least with Firefox on a Mac.

Namely, Navigation - Accordion. When I attempt to alter the colours, or
pretty well any of the settings, nothing happens in the sandbox. If I apply
the CSS settings in my application, the same occurs, nothing. The only
colour change that works is the background. Not much good however.

I must obviously be missing something here. Yes?

-- 
Blair 





From: Tracy Spratt [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Fri, 24 Oct 2008 16:41:02 -0400
To: flexcoders@yahoogroups.com
Conversation: Flex 3 Style Explorer is available
Subject: [flexcoders] Flex 3 Style Explorer is available

 
 

In case you missed it.

http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer.
html# 
http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer
.html 

Tracy
 




Re: [flexcoders] Flex 3 Style Explorer is available

2008-10-28 Thread Blair Cox
Yes, it's the current version, debug build. I'll try with Safari later, but
really, if the CSS formatting doesn't work in my application running in
Firefox, then...

-- 
Blair 




 From: Tom Chiverton [EMAIL PROTECTED]
 Reply-To: flexcoders@yahoogroups.com
 Date: Tue, 28 Oct 2008 13:36:33 +
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Flex 3 Style Explorer is available
 
 On Tuesday 28 Oct 2008, Blair Cox wrote:
 and I find there are parts that do not work - at least with Firefox on a
 Mac.
 
 FireFox on 'nix seems OK, in particular 
 
 Namely, Navigation - Accordion. When I attempt to alter the colours, or
 pretty well any of the settings, nothing happens in the sandbox.
 
 ... that is fine here.
 What Flash player version ? Is it the debug build ?
 
 -- 
 Tom Chiverton
 Helping to administratively reinvent fine-grained eye-catching segments
 




Re: [flexcoders] Re: Help: filterFunction and Dates

2008-10-27 Thread Blair Cox
Tim, thanks again for you help. I¹m still learning to use AMFPHP and
understand what you are saying. My application is rather simple in terms of
showing/hiding certain elements from the user at defined times.

However this appears to work perfectly!

return item.Date_Collected == dfconv.format(getdate.text).toString();

The getdate.text is the text string returned from the DateField and includes
the formatting. Works as required, so I¹ll take it.

Cheers,

-- 
Blair 





From: Tim Hoff [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Sat, 25 Oct 2008 01:28:37 -
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Help: filterFunction and Dates

 
 


See how messy this gets; when dates are represented as strings.  Look
into AMFPHP serialization/deserialization.  If you get back a date,
instead of a sting, you don't have to jump through these hoops.   I only
say this because the amount of time it takes to setup the integration is
sometimes less than the time it takes to hack the application into
submission. :)

Glad that you have a working solution.

-TH




[flexcoders] filterFunction and selecting a Date Range

2008-10-27 Thread Blair Cox
Hi everyone, just thought I would run this by you.

With the help of others on this list, we were able to find a way to sort
dates returned from a database in a hacked sort of way. What I need to now
is to be able to select a range, so  this date and  this date. Perhaps I¹m
over simplifying this, but I can¹t get modifications of the below to
function:

...
 private function processFilter(item:Object):Boolean {return
item.Date_Collected  dfconv.format(getdate.text).toString();
item.Date_Collected  dfconv.format(getdateEnd.text).toString();
}

It¹s not throwing an error and only half works because it is stopping at the
first part. Any date  ... Works. I can¹t seem to define the  however.

Any hints greatly welcomed. Thanks,

-- 
Blair 





From: Tim Hoff [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Sat, 25 Oct 2008 01:28:37 -
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Help: filterFunction and Dates

 
 


See how messy this gets; when dates are represented as strings.  Look
into AMFPHP serialization/deserialization.  If you get back a date,
instead of a sting, you don't have to jump through these hoops.   I only
say this because the amount of time it takes to setup the integration is
sometimes less than the time it takes to hack the application into
submission. :)

Glad that you have a working solution.

-TH



Re: [flexcoders] filterFunction and selecting a Date Range

2008-10-27 Thread Blair Cox
Yup, that was a totally newbie question...

 private function processFilter(item:Object):Boolean {return
item.Date_Collected  dfconv.format(getdate.text).toString() 
item.Date_Collected  dfconv.format(getdateEnd.text).toString();
}

For future newbie¹s :)

-- 
Blair 





From: Blair Cox [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Mon, 27 Oct 2008 10:58:54 -0300
To: flexcoders@yahoogroups.com
Conversation: filterFunction and selecting a Date Range
Subject: [flexcoders] filterFunction and selecting a Date Range

 
 

Hi everyone, just thought I would run this by you.

With the help of others on this list, we were able to find a way to sort
dates returned from a database in a hacked sort of way. What I need to now
is to be able to select a range, so  this date and  this date. Perhaps I¹m
over simplifying this, but I can¹t get modifications of the below to
function:

...
 private function processFilter(item:Object):Boolean {return
item.Date_Collected  dfconv.format(getdate.text).toString();
item.Date_Collected  dfconv.format(getdateEnd.text).toString();
}

It¹s not throwing an error and only half works because it is stopping at the
first part. Any date  ... Works. I can¹t seem to define the  however.

Any hints greatly welcomed. Thanks,

-- 
Blair 




Re: [flexcoders] Re: Help: filterFunction and Dates

2008-10-24 Thread Blair Cox
Okay, I guess here is where I¹m stuck or confused about what to do exactly.
Could you suggest a couple of resources I could refer to? Thanks.

-- 
Blair 





From: Tim Hoff [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 23 Oct 2008 19:30:02 -
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Help: filterFunction and Dates

OK, so what you're saying is that item.Date_Collected is a string
(2008-10-01) and not a date.  This goes back to the original suggestion,
use a Date() type for that variable in the VO.  If you do, then the last
sample should work; using selectedDate.

-TH




Re: [flexcoders] Re: Help: filterFunction and Dates

2008-10-24 Thread Blair Cox
This is how I¹m retrieving data. I¹m not sure how or where to define the
Date() property. What I would like to maintain is a single call to the
required table and have all data returned.

MXML:
mx:RemoteObject id=myservice source=WorkingDemo destination=amfphp
fault=faultHandler(event) showBusyCursor=truemx:method
name=getUsers result=resultHandler(event) fault=faultHandler(event)
/mx:method /mx:RemoteObject

...

 private function faultHandler(event:FaultEvent):void {
Alert.show(event.fault.faultString, event.fault.faultCode.toString());
} private function resultHandler(event:ResultEvent):void {dp=new
ArrayCollection(ArrayUtil.toArray(event.result));}


ServicesConfig.xml:
services-configservicesservice
id=amfphp-flashremoting-service
class=flex.messaging.services.RemotingService
messageTypes=flex.messaging.messages.RemotingMessage
destination id=amfphpchannels
channel ref=my-amfphp//channels
propertiessource*/source
/properties/destination/service/services
channelschannel-definition id=my-amfphp
class=mx.messaging.channels.AMFChannelendpoint
url=/amfphp/gateway.php class=flex.messaging.endpoints.AMFEndpoint/
/channel-definition/channels /services-config

PHP Script:
...
function getUsers() {
# Return a list of all the users
if ([EMAIL PROTECTED]mysqli-query(SELECT * from dbTable)) {
$errno=$this-mysqli-errno;
$this-mysqli-close();
trigger_error(AMFPHP Remoting 'sample' class database SELECT
query error:  . $errno);
}
while ($row = $result-fetch_assoc()) {
$user_array[] = $row;
}
return($user_array);
}

Thanks,

-- 
Blair 





From: Tim Hoff [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 23 Oct 2008 19:30:02 -
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Help: filterFunction and Dates

 
 


OK, so what you're saying is that item.Date_Collected is a string
(2008-10-01) and not a date.  This goes back to the original suggestion,
use a Date() type for that variable in the VO.  If you do, then the last
sample should work; using selectedDate.

-TH



Re: [flexcoders] Re: Help: filterFunction and Dates

2008-10-24 Thread Blair Cox
Many thanks Tim! I dropped the DateField component and tried a simple text
box, plus your suggestion and it works. So even though the database table
field is defined as a Date, the AMFPHP is bringing it in as a string. The
key part to this was .toString()

Okay, so now back to an original dilemma. When using the DateField
component, I get a full UTC date output. I¹ve been able to use labelFunction
and DateFormatter and a couple others to get close to the required format of
-MM-DD, but what I end up with is -MM-D, because apparently 1
through 9 are not represented with a leading zero (01, 02, etc)

If I cannot match the string in the db, it won¹t work, correct? Any hints on
this?

-- 
Blair 





From: Tim Hoff [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Fri, 24 Oct 2008 17:58:19 -
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Help: filterFunction and Dates

 
 

Ideally, in the result function, the dto would be cast to an associated AS
class as a VO; making it strongly typed.  This can be done automatically by
using [RemoteClass(alias=com.myDTO)]  in a VO class; but that's a more
involved topic.  So, let's take this one step at a time.  What is the data
type of item.Date_Collected?  You can find this by inspecting the the object
in debug mode.  If it's a string, try this in your filter function:

return item.Date_Collected ==
dfconv.format(wholeDate.selectedDate).toString();

The key is to compare apples to apples.  If one side is an apple and the
other is an orange, you have to turn the orange into an apple before
comparing.

-TH



Re: [flexcoders] Charts - How to filter dataprovider by date?

2008-10-23 Thread Blair Cox
Hi Maciek,

Still new at this, so I¹ll answer the best I can. The chart is getting it¹s
data from a RemoteObject using amfPHP. I have an arraycollection and result
handler ­ pretty basic stuff. It appears to accomplish what I need it to,
I¹m sure there are more elegant means.

I¹m investigating the filterFunction. Most of the blogs speak of sorting a
datagrid, though a chart should function the same way, yes? I would prefer
to perform the sorting/filtering, whatever the correct term is, within Flex
rather than require a PHP script to pull specific data from the database.
The user will eventually use all the data available in the table, so there
is no reason why it should be available up-front, then simply sorted.

Thanks,

-- 
Blair 





From: Maciek Sakrejda [EMAIL PROTECTED]
Organization: Truviso
Reply-To: flexcoders@yahoogroups.com
Date: Wed, 22 Oct 2008 09:01:00 -0700
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Charts - How to filter dataprovider by date?

 
 

It's not clear how your data is bound to the chart, but it sounds like
you need a filterFunction:
http://livedocs.adobe.com/flex/3/langref/mx/collections/ListCollectionView.h
tml#filterFunction

If you post more about your data flow, maybe we can give you more
details.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com




Re: [flexcoders] Do you use a Mac?

2008-10-23 Thread Blair Cox
I use a Mac, however I¹m also coming from the graphic design / web
development side. I, a long time ago, was a diehard PC user. Actually I was
a technician, skilled in the art of fixing all things WinTel. Then one day,
kicking and screaming, I was introduced to the white computer with the
distinctive bitten apple logo. Reluctantly, over time, I came to the
understanding that I could actually get work accomplished without requiring
an A+ certificate, numerous Microsoft Certs or an on-call IT support team.
The damn thing just worked! Can you believe that? Amazing...

Actually, using the OSX operating system natively allows you to work with
files as they would appear in an Apache server. Being a Unix based OS
(closer relative, not distant cousin like Winx), you can do things that
would require extra software, patches, etc on Windows. Add in virtualization
and you can easily and efficiently run any OS in real time, switching at
will ­ and it doesn¹t break!

Sure Windows has it¹s place... As a virtual OS on my OSX desktop ;)


-- 
Blair 





From: Haykel BEN JEMIA [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 23 Oct 2008 08:49:58 +0200
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Do you use a Mac?

 
 

Hi,

this is probably off topic, but I noticed that most of the screencasts I
watched about Flex are made on Mac OSX. Do most Flex developers work on Mac?
Are most developers in the USA using Macs (as most screencasts I watched are
done by people from the US)? Are their any advantages on using a Mac instead
of a PC for Web/Flex development? I'm just wondering as I never used a Mac
before.

-- 
Haykel Ben Jemia

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


 




Re: [flexcoders] Re: Help: filterFunction and Dates

2008-10-23 Thread Blair Cox
Hi Cato,

Thanks for the hint. I¹m using amfPHP and RemoteObject, I¹ll assume it does
the same thing. I¹ll use this as a starting point, cheers!

-- 
Blair 





From: Cato Paus [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 23 Oct 2008 17:02:27 -
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Help: filterFunction and Dates

 
 

Hi if you use java as backend do you serilaze the object ?

if so you can map the date objec to the date object in actionscript and
back..

here is a datefilter connetced to a arraycollection.

public function chkToDay():void
{
 //Allways set to null first else you get filter inside
the filter!
 myArrayCollection.filterFunction=null;
 myArrayCollection.refresh();
 myArrayCollection.filterFunction=toDayDateFilterFunc;
 /* Refresh the collection view to apply the filter. */
 myArrayCollection.refresh();
}

and the filter function

private function toDayDateFilterFunc(item:Object):Boolean
{
 var toDay:Date = new Date();
 //item.date is if you have a public var named date in your
DTO(Data Transfer Object)
 return item.date== toDay;
}

Cato

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

 Hi everyone,

 With the help of another poster I was pointed in the correct direction
 to solve a problem I have:

 The two links were helpful:


http://livedocs.adobe.com/flex/3/html/help.html?content=controls_12.html


http://blog.flexexamples.com/2008/03/12/using-a-combobox-to-filter-items\
-in-a-datagrid-in-flex/
http://blog.flexexamples.com/2008/03/12/using-a-combobox-to-filter-items-in
-a-datagrid-in-flex/

 Based on the above information, I was able to accomplish all my tasks,
 except being able to sort dates.

 Problem #1 - How to format the date so that it displays as 2008-10-01.
 I have it all the way up to 2008-10-1. Apparently the 'day' is
 represented as a single digit. That won't work - using a MySQL db.

 Problem #2 - I am apparently lacking in my knowledge of ActionScript
 to correctly write the proper script to filter the date. What I can't
 seem to figure out is the correct syntax for working with dates, or
 perhaps simply a string or number containing - dashes?

 Sorry, I'm not providing code you to ponder over, I really only need a
 reference to start with so I can learn as I go. I've been searching
 but have not been able to locate a reference which deals with sorting
 dates?

 Thanks,


 




Re: [flexcoders] Re: Help: filterFunction and Dates

2008-10-23 Thread Blair Cox
Hmm, okay, now I¹m confused.

So this is the working end of my code, totally borrowed from
http://blog.flexexamples.com.

 private function processFilter(item:Object):Boolean {return
(item.Date_Collected) == Number(wholeDate.text);}

??

-- 
Blair 





From: Tim Hoff [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 23 Oct 2008 17:25:41 -
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Help: filterFunction and Dates

 
 


Hey Blair,

For dates, it's important that you use the Date() data type.  Some use
strings instead.  Since you're using AMF, using strongly typed date
objects for the VO's is the cleanest way.  The reason that I say to use
Date(), is because that the Date.time property is stored as the number
of milliseconds since 1970, IIRC.  Because it' numeric, you can easily
perform sorts.  For formatting, you can use a dateFormatter with
-mm-dd as the formatString.  This leaves the underlying date
alone, but displays it in whatever format that is specified.

-TH

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

 Hi Cato,

 Thanks for the hint. I¹m using amfPHP and RemoteObject, I¹ll
assume it does
 the same thing. I¹ll use this as a starting point, cheers!

 --
 Blair





 From: Cato Paus [EMAIL PROTECTED]
 Reply-To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 Date: Thu, 23 Oct 2008 17:02:27 -
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 Subject: [flexcoders] Re: Help: filterFunction and Dates




 Hi if you use java as backend do you serilaze the object ?

 if so you can map the date objec to the date object in actionscript
and
 back..

 here is a datefilter connetced to a arraycollection.

 public function chkToDay():void
 {
 //Allways set to null first else you get filter inside
 the filter!
 myArrayCollection.filterFunction=null;
 myArrayCollection.refresh();
 myArrayCollection.filterFunction=toDayDateFilterFunc;
 /* Refresh the collection view to apply the filter. */
 myArrayCollection.refresh();
 }

 and the filter function

 private function toDayDateFilterFunc(item:Object):Boolean
 {
 var toDay:Date = new Date();
 //item.date is if you have a public var named date in your
 DTO(Data Transfer Object)
 return item.date== toDay;
 }

 Cato

 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
mailto:flexcoders%40yahoogroups.com ,
 cox.blair blair.cox@ wrote:
 
  Hi everyone,
 
  With the help of another poster I was pointed in the correct
direction
  to solve a problem I have:
 
  The two links were helpful:
 
 

http://livedocs.adobe.com/flex/3/html/help.html?content=controls_12.html
 
 

http://blog.flexexamples.com/2008/03/12/using-a-combobox-to-filter-items\
\
 http://blog.flexexamples.com/2008/03/12/using-a-combobox-to-filter-items
 -in-a-datagrid-in-flex/

http://blog.flexexamples.com/2008/03/12/using-a-combobox-to-filter-item\
s-in 
http://blog.flexexamples.com/2008/03/12/using-a-combobox-to-filter-items-in
 
 -a-datagrid-in-flex/
 
  Based on the above information, I was able to accomplish all my
tasks,
  except being able to sort dates.
 
  Problem #1 - How to format the date so that it displays as
2008-10-01.
  I have it all the way up to 2008-10-1. Apparently the 'day' is
  represented as a single digit. That won't work - using a MySQL db.
 
  Problem #2 - I am apparently lacking in my knowledge of ActionScript
  to correctly write the proper script to filter the date. What I
can't
  seem to figure out is the correct syntax for working with dates, or
  perhaps simply a string or number containing - dashes?
 
  Sorry, I'm not providing code you to ponder over, I really only need
a
  reference to start with so I can learn as I go. I've been searching
  but have not been able to locate a reference which deals with
sorting
  dates?
 
  Thanks,
 


 




Re: [flexcoders] Re: Help: filterFunction and Dates

2008-10-23 Thread Blair Cox
Hmm, it doesn¹t actually work. Though I need to try Cato¹s example. See I
discovered this earlier this morning, the .selectedDate actually outputs -
Wed Oct 1 00:00:00 GMT-0300 2008, while I would require 2008-10-01. As I
mentioned, I had it down to 2008-10-1, but choose to manually enter the
variable until I had one part functioning and would come back to the
datefield selection.

Below is my very hacked sample code I¹m testing with. Please excuse the
mess, but I figured I would provide what I was working with in case I¹ve
missed something. Thanks.


?xml version=1.0 encoding=utf-8? mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical
mx:DateFormatter id=dfconv formatString=-MM-DD/ mx:RemoteObject
id=myservice source=WorkingDemo destination=amfphp
fault=faultHandler(event) showBusyCursor=truemx:method
name=getUsers result=resultHandler(event) fault=faultHandler(event)
/mx:method /mx:RemoteObject mx:Script![CDATA[import
amf.amfLink;import mx.utils.ArrayUtil;import
mx.collections.ArrayCollection;import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;import mx.controls.Alert;
import mx.events.CalendarLayoutChangeEvent;
[Bindable]private var dp:ArrayCollection; private function
faultHandler(event:FaultEvent):void {
Alert.show(event.fault.faultString, event.fault.faultCode.toString());
}private function resultHandler(event:ResultEvent):void {
dp=new ArrayCollection(ArrayUtil.toArray(event.result));}
private function toggleFilter():void {if (checkBox.selected)
{dp.filterFunction = processFilter;}
else {dp.filterFunction = null;}
dp.refresh();} //private function
processFilter(item:Object):Boolean {//return
(item.Date_Collected) == Number(wholeDate.text);//}
private function processFilter(item:Object):Boolean { return
(item.Date_Collected) == wholeDate.selectedDate; }
//private function processFilter(item:Object):Boolean {// var
wholeDate:Date = new Date(); //item.date is if you have a public
var named date in your DTO(Data Transfer Object)// return
item.Date_Collected == wholeDate;//}[Bindable]
public var yAxis:ArrayCollection = new ArrayCollection([
{label:UC1},  {label:QGA_VF},
{label:QGA_VuB},  {label:QGA_RLU},
{label:QGA_ATP},  {label:QGA_Micro_Equiv},]);
//private function useDate(eventObj:CalendarLayoutChangeEvent):void {
// Make sure selectedDate is not null.   //if
(eventObj.currentTarget.selectedDate == null) {//return
//} //Access the Date object from the event object.
//day.text=eventObj.currentTarget.selectedDate.getDay();
//date.text=eventObj.currentTarget.selectedDate.getDate();
//month.text=eventObj.currentTarget.selectedDate.getMonth() + 1;
//year.text=eventObj.currentTarget.selectedDate.getFullYear();
//wholeDate.text= (eventObj.currentTarget.selectedDate.getMonth() + 1) +
//- + (eventObj.currentTarget.selectedDate.getDate() +
//   - + eventObj.currentTarget.selectedDate.getFullYear());
//wholeDate.text= (eventObj.currentTarget.selectedDate.getFullYear() +
//- + (eventObj.currentTarget.selectedDate.getMonth() + 1) +
//   - + eventObj.currentTarget.selectedDate.getDate());
private function formatDate(date:Date):String {return
dfconv.format(date);}//public function
chkToDay():void {//Allways set to null first else you get
filter inside the filter!//
myArrayCollection.filterFunction=null;
//myArrayCollection.refresh();//
myArrayCollection.filterFunction=toDayDateFilterFunc; /* Refresh
the collection view to apply the filter. *///
myArrayCollection.refresh(); //}//and the filter
function //private function
toDayDateFilterFunc(item:Object):Boolean{ //var toDay:Date = new
Date(); //item.date is if you have a public var named date in
your DTO(Data Transfer Object) //return item.date == toDay;
//}]] /mx:Scriptmx:Canvas width=100% height=198
mx:Button x=10 y=10 label=Get data
click=myservice.getOperation('getUsers').send()/  mx:DataGrid x=10
y=40 width=100% height=137  dataProvider={dp}
mx:columnsmx:DataGridColumn headerText=Sample_Point
dataField=Sample_Point/mx:DataGridColumn
headerText=Date_Collected dataField=Date_Collected/
mx:DataGridColumn headerText=Time_Collected dataField=Time_Collected/
mx:DataGridColumn headerText=Date_Tested dataField=Date_Tested/
mx:DataGridColumn headerText=Time_Tested dataField=Time_Tested/
mx:DataGridColumn headerText=Analyst dataField=Analyst/
mx:DataGridColumn headerText=Luminometer dataField=Luminometer/

Re: [flexcoders] Re: Help: filterFunction and Dates

2008-10-23 Thread Blair Cox
Woops, that¹s unpleasant looking. Anyone care to share the proper method of
submitting code?

-- 
Blair 





From: Blair Cox [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 23 Oct 2008 16:19:58 -0300
To: flexcoders@yahoogroups.com
Conversation: [flexcoders] Re: Help: filterFunction and Dates
Subject: Re: [flexcoders] Re: Help: filterFunction and Dates

 
 

Hmm, it doesn¹t actually work. Though I need to try Cato¹s example. See I
discovered this earlier this morning, the .selectedDate actually outputs -
Wed Oct 1 00:00:00 GMT-0300 2008, while I would require 2008-10-01. As I
mentioned, I had it down to 2008-10-1, but choose to manually enter the
variable until I had one part functioning and would come back to the
datefield selection.

Below is my very hacked sample code I¹m testing with. Please excuse the
mess, but I figured I would provide what I was working with in case I¹ve
missed something. Thanks.


?xml version=1.0 encoding=utf-8? mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical
mx:DateFormatter id=dfconv formatString=-MM-DD/ mx:RemoteObject
id=myservice source=WorkingDemodestination=amfphp
fault=faultHandler(event) showBusyCursor=truemx:method
name=getUsers result=resultHandler(event) fault=faultHandler(_,___



Re: [flexcoders] Basic Printing: Print what you see?

2008-08-29 Thread Blair Cox
Disregard, got it figured out.

-- 
Blair 



From: cox.blair [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Fri, 29 Aug 2008 11:23:57 -
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Basic Printing: Print what you see?

 
 

Hi all,

Can someone point me in a direction of a url which explains how
configure the app to print in a browser so that what you see fits to a
standard letter size sheet? Current the app prints horizontally and
get cut off, not matter the OS or browser. So it appears I need to
define the dimensions, but I haven't found where this is mentioned.

Cheers!

 




Re: [flexcoders] Combobox to show table columns?

2008-08-26 Thread Blair Cox
Cheers Alex!

-- 
Blair 




From: Alex Harui [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Tue, 26 Aug 2008 12:40:18 -0700
To: flexcoders@yahoogroups.com
Conversation: [flexcoders] Combobox to show table columns?
Subject: RE: [flexcoders] Combobox to show table columns?

 
 

Just walk the children() and pull the name() and add it to an array
 



Re: [flexcoders] Re: Change dataProvider at runtime?

2008-08-22 Thread Blair Cox
Thanks everyone for your replies. I must admit I¹m not yet up to speed on
all things Flex.

Nicholas mentioned combobox.dataProvider = anotherone? At runtime. From my
perspective I figured I could do it like this;

Chartdp = combobox.selectedItem; or linchart1.dataProvider =
combobox.selectedItem

 mx:LineChart id=linechart1  showDataTips=true
dataProvider={chartdp}

The combobox would list all the available arrays. This does not work
however. (I tried selectLabel as well, changing to String and Object in AS)

Tracy mentioned about not binding directly the lastResult and use instance
variables. Yes, I do believe I am doing this correctly;

[Bindable] private var ALCTrending:ArrayCollection = new ArrayCollection();
var ALCgateway:HTTPService = new HTTPService();
ALCgateway.url = Kit_ALC.php?method=FindAll;
ALCgateway.addEventListener(ResultEvent.RESULT, ALCresultHandler);
ALCgateway.send();
private function ALCresultHandler(e:ResultEvent):void{
ALCTrending = e.result.response.data.row;}

So, if the above is correct and I¹m not grossly overlooking something, I
believe the best solution for our specific requirements is to combine all
the tables into one. While perhaps large and not as efficient as it possibly
could be, all the data must be analyzed together anyway. Last night we
calculated it would take at least 3-5 years for a customer to populate the
database to the point where there would be a performance hit. Each customer
will have their own isolated database.

Cheers, thanks again for the help :)

-- 
Blair 



From: Howard Fore [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 21 Aug 2008 22:25:51 -0400
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Change dataProvider at runtime?

 
 

If you're not going to change the column names when you change
dataproviders, a third option might be to create a database view to query
against. Have the view stitch together the appropriate columns from each
table into the view's columns (probably via that Union query), then query
the view to get the data that is filled into the dataprovider. That way you
leave the complexity where it already is, in the the database, you wouldn't
need logic to switch out the dataproviders, etc.



Re: [flexcoders] Re: Change dataProvider at runtime?

2008-08-22 Thread Blair Cox
Okay, try this scenario:

Can you change the dataprovider of a series or chart on demand from within
the program while it is running? So no matter why I¹m doing it, I have say
four completely different dataproviders collecting data from say a static
in-line source, a static XML file source and a couple dynamically generated
by whatever means. 

Then do this, have four primary combobox¹s each related to a series in the
chart. These first combobox¹s will select the dataProvider of each series
(this works when statically set). Then you have an additional four comboboxs
which will set the yAxis of each chart series based on the selected
dataProvider (conditional combobox which changes based on what the first
combobox has been set to).

See what you have now? The ability to analyze different data sets from
different sources within the same chart. The way it works now, the
assumption is that this data can always be lumped into a single array, which
isn¹t always the case especially when dealing with an application designed
for an engineering application. It would just be far simpler to be able to
change dataprovider on the fly and tell the chart to update or reload.

So how could this be done? Reload or recreate the chart based on a click or
change event?

-- 
Blair 




From: Tracy Spratt [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 21 Aug 2008 19:59:07 -0400
To: flexcoders@yahoogroups.com
Conversation: [flexcoders] Re: Change dataProvider at runtime?
Subject: RE: [flexcoders] Re: Change dataProvider at runtime?

 
 

If I understand correctly, the OP has separate calls to get the data for the
four lists.  If so, what is the problem?  Just assign the dataProvider as
needed.
 
You are using result handlers, storing the data in instance variables, and
not trying to bind directly to lastResult, correct?
 
Tracy
 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Amy
Sent: Thursday, August 21, 2008 2:33 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Change dataProvider at runtime?
 

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

 Does anyone have experience with changing a dataprovider at runtime?
 
 Scenerio: a grocery store Database has four tables, one for Produce,
 Dairy, Meat and Other. Each of the tables is a different
 arrayCollection/HTTPService
 
 I want to be able to have four comboboxes, each able to point to any
 of the four arrayCollection's, therefore to change the datasource of
 each series in a chart.
 
 Why? Because it would allow you to compare values of different data
 sets in a single chart. I did not expect this would be such an issue.
 
 If anyone can provide any information at all, it would be a huge help.

Preferred method:

If you have any control over the database, FIX THE DESIGN. If not, use
a UNION query to normalize the data, then use a filter function to
filter on grocery type and refresh the ArrayCollection.

Icky method:
If you have no control over the backend at all, then you can use
something like myChart.dataProvider = nastyArrayCollection

;-)

HTH;

Amy

 




Re: [flexcoders] Re: Change dataProvider at runtime?

2008-08-21 Thread Blair Cox
Hi Amy,

Well, I have complete control over the database. This where we might have a
problem, it seemed at the time that creating a table with around 200 columns
would be unreasonable. A table was created to handle each of the products.
Each product has as many as 20-30 columns and for the most part, do not
relate to each other. I pondered over normalization for over a week. But now
look at the issue...

Hmm, what would be the issue in creating a single arrayCollection from all
sources? How would this differ in any way from loading a single enormous
array directly from the db? Looks like I¹m down to two options, recreate the
db and over half the constructed application to deal with the changes in
code, or figure out a way to combine the tables within the application or
the Union query as you suggested.

-- 
Blair 




From: Amy [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 21 Aug 2008 18:32:56 -
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Change dataProvider at runtime?

 
 

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

 Does anyone have experience with changing a dataprovider at runtime?
 
 Scenerio: a grocery store Database has four tables, one for Produce,
 Dairy, Meat and Other. Each of the tables is a different
 arrayCollection/HTTPService
 
 I want to be able to have four comboboxes, each able to point to any
 of the four arrayCollection's, therefore to change the datasource of
 each series in a chart.
 
 Why? Because it would allow you to compare values of different data
 sets in a single chart. I did not expect this would be such an issue.
 
 If anyone can provide any information at all, it would be a huge help.

Preferred method:

If you have any control over the database, FIX THE DESIGN.  If not, use
a UNION query to normalize the data, then use a filter function to
filter on grocery type and refresh the ArrayCollection.

Icky method:
If you have no control over the backend at all, then you can use
something like myChart.dataProvider = nastyArrayCollection

;-)

HTH;

Amy

 




Re: [flexcoders] PHP vs. Coldfusion 8 for beginner?

2008-08-20 Thread Blair Cox
Thanks Guilherme, we¹ve just come to the same conclusion. Given the cost of
implementing ColdFusion and the limited number features we are currently
interested in using, we simply can¹t justify the switch. PHP appears to be
able to do everything we want to do and it is rooted deeply in our current
website technologies (Apache, MySQL, Joomla, Drupal, etc). I say I¹m a
novice, but I do have a working knowledge of PHP, I can at least sit down
and read through a script and understand what is going on. Best to build on
that knowledge than to switch to another language, again. Overall though, I
do find them all to be very similar, so that hasn¹t been an issue. Biggest
advantage with PHP is the community and resources behind it.

I guess I don¹t find this subject too off-topic because it does seem
important to know how your Flex application actually communicates with the
server and database.

Cheers, great list!

-- 
Blair 




From: Guilherme Blanco [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Wed, 20 Aug 2008 15:53:25 -0300
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] PHP vs. Coldfusion 8 for beginner?

 
 

It's a bit offtopic, but let's go...

I'd suggest you PHP. Why?
Because it's similar to a lot of languages and the learn path to these
others will be minimized. Learning PHP you'll be able to learn C,
Java, ...
Like if you learn a tab-based language (read as ColdFusion) you'll
have some hard times to move to a structured or object oriented
language.

That's my US$0.02

Cheers,

On Wed, Aug 20, 2008 at 3:46 PM, Howard Fore [EMAIL PROTECTED]
mailto:howard.fore%40hofo.com  wrote:
 I think you could probably do well in either. I've worked in both. I think
 that there's a lot to ColdFusion's Java underpinnings that allow you to take
 advantage of Java libraries in the open source world. Since you mention
 reports, you should know that CFReport/ReportBuilder are based on some
 freely available Java libraries (Jasper and iReport I think). Also the
 cfdocument PDF functionality is iText under the covers. I'm biased towards
 CF as I think the syntax is more readable, but languages are just tools.
 It's what you choose to do with them that counts.

 PS: This is a bit off-topic for flexcoders...

 On Wed, Aug 20, 2008 at 1:38 PM, cox.blair [EMAIL PROTECTED]
mailto:blair.cox%40luminultra.com  wrote:

 Okay, so I'm probably going to get a biased response, but which would
 you say would be the best long term strategy for a beginner to learn
 to become proficient with? I'm not looking to learn both, I want to
 pick a combination and stick to it.

 I suspect it is dependant on your background knowledge and what you
 want to do, so, my background is as novice as you get but with
 proficiency to learn. What we are going to do with it is create
 specialized business applications tailored to data analyses and report
 creation.



 --
 Howard Fore, [EMAIL PROTECTED] mailto:howard.fore%40hofo.com
 The universe tends toward maximum irony. Don't push it. - Jeff Atwood
 

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




Re: [flexcoders] Combobox with multiple data sources?

2008-08-19 Thread Blair Cox
Thanks Alex, do you have a url for that one? Couldn¹t locate via search on
your blog.

Cheers,

-- 
Blair 



From: Alex Harui [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Mon, 18 Aug 2008 21:28:36 -0700
To: flexcoders@yahoogroups.com
Conversation: [flexcoders] Combobox with multiple data sources?
Subject: RE: [flexcoders] Combobox with multiple data sources?

 
 

PromptArrayList on my blog?
 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of cox.blair
Sent: Monday, August 18, 2008 12:41 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Combobox with multiple data sources?
 

I've been reading the blogs all afternoon and haven't found an answer
to this (probably because it's really simple), but what I want to do
is populate a combobox from two data sources. One will be from a small
array in the mxml, the other will be from the database and dependant
on what the user has entered, but they must appear in the same combobox.

I've been looking at hierarchical data providers and GroupCollections,
but just can't see how to fit it together for my use.

Thanks,

 




Re: [flexcoders] Combobox with multiple data sources?

2008-08-19 Thread Blair Cox
Perfect, thanks Tracy.

-- 
Blair 




From: Tracy Spratt [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Mon, 18 Aug 2008 16:01:14 -0400
To: flexcoders@yahoogroups.com
Conversation: [flexcoders] Combobox with multiple data sources?
Subject: RE: [flexcoders] Combobox with multiple data sources?

 
 

Just programatically combine the two data sources.  The specifics depend on
the exact data types of the sources.  You can concatenate arrays for
example.
Tracy
 



Re: [flexcoders] Printing and PDF creation

2008-08-18 Thread Blair Cox
Hmm, well I¹m with the fellow here in another post that stated Flex will not
be enterprise ready until it can create reports within the app. This is a
basic business practice and should not be some convoluted, insanely
expensive add-on. If you purchase the Pro version of flex for nearly a
grand, it should be a feature just like creating charts.

Thanks for the links but I was hoping for a solution.

-- 
Blair 



From: Sefi Ninio [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Sat, 16 Aug 2008 21:44:11 +0300
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Printing and PDF creation

 
 

I actually just googled for it.. You could do the same...

http://christophrooms.com/2007/03/23/lc-ds-25-generating-pdf-from-within-a-f
lex-application/

http://blogs.adobe.com/mikepotter/2006/09/create_pdf_from.html

http://flexblog.faratasystems.com/?p=237

HTH 
Sefi


On Sat, Aug 16, 2008 at 8:35 PM, cox.blair [EMAIL PROTECTED] wrote:
  
  
 
 Just wondering if anyone could provide some information on general
 printing concepts and creating PDF reports from an application.
 
 With regards to printing, I really only need to allow the user to
 correctly print what is displayed in their browser - the application
 interface. As a bonus, allowing the user to print a report would be
 even better. I've heard a lot of talk about printing DG's, but how
 about printing charts? If you could pass along some links to read more
 on this, it would be a great help.
 
 PDF creation - Is it possible to create a pdf directly from the
 application within the browser (not AIR)? An example would be within
 Goggle Analytics, you can create a PDF report containing all the data
 and charts displayed online. Nothing complex here, simple plain
 reports full justified, center aligned - the way the business folk
 like it.
 
 Cheers,
 Blair
 
  
 

 




Re: [flexcoders] Re: Using Create App from DB - Saving decimal number 123.123??

2008-08-08 Thread Blair Cox
Ha, too funny ;) I thought it was a simple matter of changing the script. It
is set to Number on the flex side and int of the php. Sorry, did you say to
set it to Œlong¹? (or is that log?) I¹ll look up the options within php, but
I¹m not familiar with this one.

Cheers! Thanks for the assistance.

-- 
Blair 




From: Tim Hoff [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 07 Aug 2008 20:26:02 -
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Using Create App from DB - Saving decimal number
123.123??

 
 


No, you're stuck using just int for the rest of your programming
existence.  Ha, just kidding.  :)  Just change it to a long on the php
side.  And change it to a Number on the flex side.

-TH

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

 I'm using the Create Application from database for testing and I'm
 just wondering on earth it appears to only update whole numbers to the
 table? It will not pass a decimal number to the database? I see in the
 php 'int', can I change this to allow it to store 123.123 instead?

 Really, whole numbers are pretty useless, I must be missing something,
 right?

 Thanks,





Re: [flexcoders] Re: Using Create App from DB - Saving decimal number 123.123??

2008-08-08 Thread Blair Cox
No, you were correct. It also uses float, however long was already in the
code, just not used. I made a couple changes and works like a charm. All I¹m
really doing is passing along the variable from the user end and storing it
in the db, so I don¹t need to perform any calculations along the way.

Cheers,

-- 
Blair




From: Tim Hoff [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Fri, 08 Aug 2008 15:37:49 -
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Using Create App from DB - Saving decimal number
123.123??

 
 

Oh sorry, been in the java world too long.  I beleive that php uses
Float; instead of double or long.

-TH

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

 Ha, too funny ;) I thought it was a simple matter of changing the
script. It
 is set to Number on the flex side and int of the php. Sorry, did
you say to
 set it to Œlong¹? (or is that log?) I¹ll look up the options within
php, but
 I¹m not familiar with this one.
 
 Cheers! Thanks for the assistance.
 
 -- 
 Blair 
 
 
 
 
 From: Tim Hoff [EMAIL PROTECTED]
 Reply-To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Date: Thu, 07 Aug 2008 20:26:02 -
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Using Create App from DB - Saving decimal
number
 123.123??
 
  
  
 
 
 No, you're stuck using just int for the rest of your programming
 existence.  Ha, just kidding.  :)  Just change it to a long on the
php
 side.  And change it to a Number on the flex side.
 
 -TH
 



Re: [flexcoders] Combobox - How to display 'Click to Select...'

2008-08-01 Thread Blair Cox
For the other newbies...

Use the Prompt property.

-- 
Blair 




From: cox.blair [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Fri, 01 Aug 2008 13:39:08 -
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Combobox - How to display 'Click to Select...'

 
 

I have a dynamically populated combobox that I would like to provide
an initial label instead of the first item in the array. It would be
impossible to create an item in the array to show, it would need to
part of the combobox control.

So on initial load of the application, the combobox would display
something like 'Click to Select...'.

Any thoughts?

Thanks,

 


Re: [flexcoders] Combobox - How to display 'Click to Select...'

2008-08-01 Thread Blair Cox
Cheers Ryan! Found the answer only moments before your email came in.

-- 
Blair 




From: Ryan Gravener [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Fri, 1 Aug 2008 10:10:49 -0400
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Combobox - How to display 'Click to Select...'

 
 

Set the prompt property.

On Fri, Aug 1, 2008 at 9:39 AM, cox.blair [EMAIL PROTECTED] wrote:
  



Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Blair Cox
Hi Sid, thanks for the reply. I tried your first solution since I did not
create a custom function and it returns;

1067: Implicit coercion of value of type Number to an unrelated type Class

I have a vague understanding of what is occurring here. Any way around it?
How difficult would it be to modify or create a custom function?

What I have now is simply:

mx:NumberFormatter id=PrepForDisplayprecision=2
rounding=updecimalSeparatorTo=.thousandsSeparatorTo=,
useThousandsSeparator=trueuseNegativeSign=true/

-- 
Blair Cox

http://www.luminultra.com
 

From: Sid Maskit [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to
modify?

 
 

If the format function is a custom function you have written, you could just
have it check whether you like the result it is about to return, and if not,
return something else. If that is not the case, I believe that you should be
able to put tests into your binding statement. 

You could test for NaN with something like this:

mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format( myNumber)
}/

I'm not sure about infinity, but I assume that you can test for this by
looking for the greatest possible value of the number. Assuming that you
have set up the variable maxValue to contain that value, you should be able
to do something like this:

mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format(
myNumber) }/

If you put the two together, it would look something like this:

mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 :
PrepForDispl ay.format( myNumber) }/

 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/




Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Blair Cox
Hi Sid, thanks a lot for your help. I figured it out! Really just need a
starting point for where to look. Cheers!

isNaN(mynumber) ? 0 :


-- 
Blair Cox

http://www.luminultra.com
 





From: Sid Maskit [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to
modify?

 
 

If the format function is a custom function you have written, you could just
have it check whether you like the result it is about to return, and if not,
return something else. If that is not the case, I believe that you should be
able to put tests into your binding statement. 

You could test for NaN with something like this:

mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format( myNumber)
}/

I'm not sure about infinity, but I assume that you can test for this by
looking for the greatest possible value of the number. Assuming that you
have set up the variable maxValue to contain that value, you should be able
to do something like this:

mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format(
myNumber) }/

If you put the two together, it would look something like this:

mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 :
PrepForDispl ay.format( myNumber) }/

 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/


- Original Message 
From: cox.blair [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 6:41:18 AM
Subject: [flexcoders] NaN and Infinity showing in output - How to modify?

 
 

I seem to have trouble explaining myself here, hard when you are just
learning. Perhaps this will be better.

Is it possible to remove, change or hide any label or text output that
displays NaN or Infinity?

I'm performing a very simply calculation where the user enters a
number in a form and it is calculated and displayed. Simple and does
what I need. In some instances, there are more variables required and
until they are provided, the output display NaN or Infinity.

How could I easily adjust these? It could be a default display of
zero, it could be to display nothing, whatever is the easiest and most
straight forward method.

Below is only an example of how I'm taking the user input from the
form and passing the variable on to the Label text output.

mx:Number id=myNumber {Number( userInput. text) * (1 +
Number(otherUserInp ut.text)) * 1 /
Number(otherOtherUs erInput.text) }/mx:Number

The answer is output to:

mx:Label text={PrepForDispl ay.format( myNumber) }/

Thank you, any assistance you can provide would be welcomed.

 
  

 
 




Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Blair Cox
Just one more question. The zero works for me, but I¹m sure I¹ll be asked to
make it blank. Any hints as to how this could be accomplished? Coming from
the Flash side of things, all I would be looking to do is change the alpha
value of the label to zero if the value was 0.


isNaN(mynumber) ? 0 :


-- 
Blair Cox

http://www.luminultra.com
 





From: Sid Maskit [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to
modify?

 
 

If the format function is a custom function you have written, you could just
have it check whether you like the result it is about to return, and if not,
return something else. If that is not the case, I believe that you should be
able to put tests into your binding statement. 

You could test for NaN with something like this:

mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format( myNumber)
}/

I'm not sure about infinity, but I assume that you can test for this by
looking for the greatest possible value of the number. Assuming that you
have set up the variable maxValue to contain that value, you should be able
to do something like this:

mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format(
myNumber) }/

If you put the two together, it would look something like this:

mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 :
PrepForDispl ay.format( myNumber) }/

 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



Re: [flexcoders] NaN to return a string?

2008-07-31 Thread Blair Cox
Turns out showing a zero could be implied that the calculation was a zero.
This is bad, especially if the result is actually zero. Is there any way to
return a string rather than a number?


isNaN(mynumber) ? 0 :


-- 
Blair Cox

http://www.luminultra.com
 





From: Sid Maskit [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to
modify?

 
 

If the format function is a custom function you have written, you could just
have it check whether you like the result it is about to return, and if not,
return something else. If that is not the case, I believe that you should be
able to put tests into your binding statement. 

You could test for NaN with something like this:

mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format( myNumber)
}/

I'm not sure about infinity, but I assume that you can test for this by
looking for the greatest possible value of the number. Assuming that you
have set up the variable maxValue to contain that value, you should be able
to do something like this:

mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format(
myNumber) }/

If you put the two together, it would look something like this:

mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 :
PrepForDispl ay.format( myNumber) }/

 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/



Re: [flexcoders] NaN and Infinity showing in output - How to modify?

2008-07-31 Thread Blair Cox
Hmm, sorry the last post left a part out, it was shown lower down:

mx:Label ... text={isNaN(mynumber) ? 0 : PrepForDisplay.format(mynumber)}
... /

Adding the ³² as you stated, returns an error for mx:Label, ³² or ³/².
The zero is what is display in the application, if I could provide a short
string instead, it would be ideal. Even if the initial default text of the
label was ³whatever² until a calculated value was entered. But there are
many, many of these calculations to perform and I would like to find the
simplest answer. Close though, thanks for the help.

-- 
Blair 




From: Laurent Cozic [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 31 Jul 2008 09:28:51 -0700 (PDT)
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to
modify?

 
 

How about:

sNaN(mynumber) ? 0 : 
 
--
Laurent Cozic

Flash, Flex and Web Application development
http://pogopixels.com


- Original Message 
From: Blair Cox [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, July 31, 2008 5:19:46 PM
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to
modify?

 
 

Just one more question. The zero works for me, but I¹m sure I¹ll be asked to
make it blank. Any hints as to how this could be accomplished? Coming from
the Flash side of things, all I would be looking to do is change the alpha
value of the label to zero if the value was 0.


isNaN(mynumber) ? 0 :


-- 
Blair Cox

http://www.luminult ra.com http://www.luminultra.com
 





From: Sid Maskit [EMAIL PROTECTED] com
Reply-To: [EMAIL PROTECTED] ups.com http://ups.com 
Date: Thu, 31 Jul 2008 07:51:38 -0700 (PDT)
To: [EMAIL PROTECTED] ups.com
Subject: Re: [flexcoders] NaN and Infinity showing in output - How to
modify?

 
 

If the format function is a custom function you have written, you could just
have it check whether you like the result it is about to return, and if not,
return something else. If that is not the case, I believe that you should be
able to put tests into your binding statement.

You could test for NaN with something like this:

mx:Label text={(myNumber is NaN) ? 0 : PrepForDispl ay.format( myNumber)
}/

I'm not sure about infinity, but I assume that you can test for this by
looking for the greatest possible value of the number. Assuming that you
have set up the variable maxValue to contain that value, you should be able
to do something like this:

mx:Label text={(myNumber  maxValue) ? 0 : PrepForDispl ay.format(
myNumber) }/

If you put the two together, it would look something like this:

mx:Label text={(myNumber is NaN) ? 0 : (myNumber  maxValue) ? 0 :
PrepForDispl ay.format( myNumber) }/

 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySp ace.com http://www.CraftySpace.com
blog: http://smaskit. blogspot. com/ http://smaskit.blogspot.com/
 
 


Re: [flexcoders] NaN to return a string?

2008-07-31 Thread Blair Cox
Doh! Only way to get better at this is to keep working at it. Thanks for all
three of your great suggestions. The powers that be want a note, so we¹ll go
with that that. I¹ll find uses for the other options for sure.

Cheers!

-- 
Blair Cox




From: Sid Maskit [EMAIL PROTECTED]
Reply-To: flexcoders@yahoogroups.com
Date: Thu, 31 Jul 2008 09:43:06 -0700 (PDT)
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] NaN to return a string?

 
 

Sure, just replace the 0 with whatever text you want, putting it inside
single quotes since the entire statement is inside of double quotes. Since
you are setting the value of a label, what ever you put in is going to be
cast to a string anyway.
 


Try something like this:

mx:Label id=display text={(isNaN(myNumber as Number)) ? 0 :
PrepForDisplay.format(myNumber)} visible={display.text != '0' amp;amp;
display.text != 'In,fin,ity.00'}/

Note that you need to give the Label component and id, and use that id to
refer to it in your statements within braces.

By the way, as you are no doubt noticing, the larger point here is that
braces are not just for binding, but can contain all sorts of ActionScript.

Finally, the reason that there is amp;amp; instead of   is that we are
inside of MXML, which is to say inside of XML, and we cannot use the 
character there, but must escape it.

 
Sid Maskit
Partner 
CraftySpace
Better Websites for a Better World
http://www.CraftySpace.com
blog: http://smaskit.blogspot.com/