[flexcoders] Re: Select row in Advanced Data Gridprogrammatically for unit test

2009-02-24 Thread bobignacio
Try this...

Given:

1. The grid's dataProvider is bound to a bindable var named "dp"
[Bindable] private var dp:ArrayCollection;

2. A DataGrid with an id="grid"...
 -1) {
 grid.dispatchEvent(new ListEvent(ListEvent.ITEM_CLICK));
}

// Ensure that the row is highlighted and displayed
grid.verticalScrollPosition = grid.selectedIndex;

Hope this helps...

Bob I.


--- In flexcoders@yahoogroups.com, "menapole" 
wrote:
>
> Can someone tell me if it is possible to select a row in an advanced
> data grid programmatically such that not only is the row selected but
> the click that would have been dispatched had I done a real click via
> the UI is also dispatched?
>




[flexcoders] Re: Looking for ideas

2008-04-15 Thread bobignacio
Why not use 2 list boxes side by side and drag and drop between the 2?
One being the total list of tasks and the other the sequence to
create/follow. The user can then make modifications visually with both
lists.

Bob I.

--- In flexcoders@yahoogroups.com, "markgoldin_2000"
<[EMAIL PROTECTED]> wrote:
>
> I need to come up with a solution for the following problem:
> I am going to have a list of tasks, about 15 to 20. The user has to 
> decide what order he wants to complete these tasks by entering a number 
> into a task record. Using dataGrid with a column that would have a 
> numeric spinner seems to be ok. The problem I am foreseeing is what to 
> do when the user would enter same number for multiple tasks: simply 
> disallow that or somehow reset all tasks to new numbers? 
> 
> Thanks for ideas.
>




[flexcoders] Re: How the hell do you debug a 1009 error from SOAP?

2008-04-14 Thread bobignacio
You can always use the following in your mxml file...
Just after the first "Application" tag, type the following:



This will give you everything that is going across the wire from your
flex app and if anything comes back to your flex app as well.

Hope this helps,

Bob I.



[flexcoders] Re: What hosting compagny are you using for Flex + (Blaze || LCDS)

2008-04-14 Thread bobignacio
I've set up BlazeDS on my eapps server.
The samples run fine. I do notice a bit of lag some of the time with
the Dashboard app.

I yet to figure out how to set up a proxy service via BlazeDS...even
following examples...still having some issues.

Bob I.


--- In flexcoders@yahoogroups.com, "Richard Rodseth" <[EMAIL PROTECTED]> wrote:
>
> I'm not deploying BlazeDS apps there yet, but check out eapps.
> 




[flexcoders] Re: RichTextEditor - format preservation

2008-01-30 Thread bobignacio
Have you read up on the Cairngorm Microarchitecture?
You may want to consider using this framework cuz
what you are describing will handle that use case...
updating multiple views when your data model changes.
Here is the main page...there is also information in Adobe Labs as
well. We've used Cairngorm and have found it to have a
learning curve. It also may not be suitable for small applications.

www.cairngormdocs.org/

Bob I.

--- In flexcoders@yahoogroups.com, "Richard Rodseth" <[EMAIL PROTECTED]> wrote:
>
> Bob,
> 
> The point is to separate the model and view and automatically update
> the view(s) when the model changes (perhaps in response to a server
> call). Hence the binding. The bindable variable would be in a separate
> ActionScript  class. In the bug report, I just made it a local
> variable for simplicity.
> 
> Feel free to vote for the bug, anyone.
> 




[flexcoders] Re: RichTextEditor - format preservation

2008-01-29 Thread bobignacio
Hi there,

Snippet of your code...

[Bindable]
public var contents:String = "";

private function handleChange(event:Event): void {

 contents = editor.htmlText;

 // My Debug
 trace("Change Fired and Caught");
 trace("Contents: " + contents);
 trace("Editor Updated: " + editor.htmlText + "\n");
}

Change the following:



to this:



This resolves your issue that you mention.
If you follow the debug with your original code for the editor,
you will find that since you have the "htmlText" attribute in the
editor set to your Bindable variable "contents" you are unnecessarily
updating the editor's "htmlText." This is causing your issue.

With every keystroke, the editor is already updating
its htmlText automatically so the Bindable "contents" is
probably clobbering your editor's automated update.

Hope this helps,

Bob I.


--- In flexcoders@yahoogroups.com, "Richard Rodseth" <[EMAIL PROTECTED]> wrote:
>
> I have a RichTextEditor with htmlText bound to a property in a model. I
> update the model property on change events.
> The problem is that if I type to replace text, the formatting is not
> preserved. i.e. set font to 48, start typing, and the first
character is in
> 48, the next one isn't. Or if I have 48 point text selected and type to
> replace, the new text is not in 48pt.
> 
> Any ideas?
>




[flexcoders] Re: Web Hosting

2008-01-26 Thread bobignacio
Thanks for all the input...signed up with eapps.com.
Got my flex test application up and running :)

Bob I.


--- In flexcoders@yahoogroups.com, "Richard Rodseth" <[EMAIL PROTECTED]> wrote:
>
> Rimu, JaguarPC, kgbinternet are some that others have mentioned to me.
> Googling "servlet hosting" would yield more.
> 




[flexcoders] Re: Web Hosting

2008-01-25 Thread bobignacio
I read up on eapps.com hosting. The user guides they provide are the
most detailed I've seen so far from any provider. In addition to their
control panel for administration, they also give you root access. Have
you seen any other web site with this type of support for java hosting?



[flexcoders] Re: internet explorer problem

2008-01-24 Thread bobignacio
Hi there,

I see 2 possibilities...

First...

Take a look at Photoshow.mxml. I don't see where your pictures array
is initialized as in "pictures = new Array();" When the swf is loaded
into the browser, your pictures array is still null. It is possible
that IE just has a problem with that while the others don't.

  //all the pictures
  private var pictures:Array;

  //this changes the set of pictures
  public function set dataProvider(value:Array):void {
   pictures = value;
   currentIndex = 0;
   updateCurrentPicture();
  }


Second...I feel better about this possibility...

Try the edits below in your XMLPhotoshow.mxml:

// Set pictures as Bindable
[Bindable] public var pictures:Array;

public function set xmlSource(xml:XML):void {

  var index:int = 0;
  pictures = new Array();

  //var pictures:Array = new Array();

  for each( var image:XML in xml..image ) {
   pictures[index] = new PhotoshowImage();
   pictures[index].name = image.itemName;
   pictures[index].caption = image.itemCaption;
   pictures[index].width = image.itemWidth;
   pictures[index].height = image.itemHeight;
   index++; 
  }

  // photoshowContainer.dataProvider = pictures;
}

]]>







Hope this helps,

Bob I.


// - Original Code below...Expand messages to
// hopefully retain formatting.

// public setter for xmlSource.
// Typically called by xmlReceived when the xml file
// has been loaded, but it can be used to set the xml directly
public function set xmlSource(xml:XML):void{
var index:int = 0;
var pictures:Array = new Array();

for each( var image:XML in xml..image ) {
pictures[index] = new PhotoshowImage();
pictures[index].name = image.itemName;
pictures[index].caption = image.itemCaption;
pictures[index].width = image.itemWidth;
pictures[index].height = image.itemHeight;
index++;

}
photoshowContainer.dataProvider = pictures;
}

]]>






[flexcoders] Web Hosting

2008-01-24 Thread bobignacio
Hello All,

It isn't that easy in deciding which web hosting service to use. What
web hosting service are you using for your flex applications? And as
for application servers, I use tomcat at work...any thoughts on JBoss,
etc?

Thanks,

Bob I.



[flexcoders] Re: Error 1009 When Calling a WebService

2007-11-18 Thread bobignacio
Hey Jay,

When looking at the WSDL from weather.gov:

 http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl

These are the following sections of the WSDL which is posted which you
are attempting to use:


 
 
 
 
 



 


In your flex application, reexamine that the method name is spelled
correctly (NDFDgenByDay),  all of your arguments are spelled correctly
(latitude, longitude, etc.) and check the case of your spelling as
well. Also double check that what you are sending are not null.

Posting a snippet of your code may help as well.

Hope this gives you some more clues...

Bob I.

--- In flexcoders@yahoogroups.com, "jaywood58" <[EMAIL PROTECTED]> wrote:
>
> Thanks Bob... that's a very helpful tag that I didn't know about. 
> 
> The trace shows I'm getting as far as "encoding soap request body" 
> before the error crops up - seems to suggest something wrong with my 
> input args?? 



[flexcoders] Re: Error 1009 When Calling a WebService

2007-11-15 Thread bobignacio
Set the following on the line right after the "

Run your application in debug mode. This will allow you to see all the
network traffic going across the wire. See if you actually get a
response from the NDFD web service.

Hope this helps,

Bob I.


--- In flexcoders@yahoogroups.com, "jaywood58" <[EMAIL PROTECTED]> wrote:
>
> 
> I am having a problem getting data from the National Weather Service's
> "National Digital Forecast Database"  XML Web Service...
> http://www.weather.gov/xml/  .  I',m using
> Flex Builder 2.0.1.
> 
> The service provides 9 functions for accessing the NWS' vast database of
> weather forecasts and statistics. I am able to use the simplest one,
> "latLonByZipCode" with no trouble... I pass it a valid US zipcode, it
> returns a string containing the corresponding latitude and longitude.  I
> pass it a bad zipcode, it returns a nice, informative error message.
> 
> When I try one of the other functions (NDFDgenByDay), I keep getting the
> following: "TypeError: Error #1009: Cannot access a property or method
> of a null object reference", triggered by the webservice call.  The
> errorID i s 0, the fault code is "Encoding Error", and the message is
> null.
> 
> The only difference I can see between these 2 function calls is the list
> of input parameters -- latLonByZipCode (the one that's working) takes a
> single string argument;  NDFDgenByDay takes a mix of decimal, date,
> integer, and string arguments.  Could an ill-formed argument list cause
> this error? (and if so, what do I need to do to fix it). Any help would
> be greatly appreciated!
>




[flexcoders] Re: Saving text with RichTextEditor . . . how?

2007-05-22 Thread bobignacio
Take a look at the following thread:

 Message #66109

Hope this helps,

Bob I.

--- In flexcoders@yahoogroups.com, "crumpelfungus" <[EMAIL PROTECTED]>
wrote:
>
> OK, so I've tried out a few things with Flex's RichTextEditor, and I can
> get it to work quite well for my purposes.
> 
> However, does anyone know whether it's possible to save text straight to
> the web server (say, into a specific client directory) as RTF or any
> other format (such as DOC) that would maintain the formatting?
> 
> My server-side back-end is a SQL Server database, but I don't really
> want to save the text in the database for this purpose. We use C#.Net
> (and some Classic ASP), and I'm just not sure if (or how) I could use
> Flex to handle all this.
> 
> Does anyone have any RichTextEditor samples that do any kind of Save?
> Something that might steer me into the right direction?
> 
> 
> Any help would be greatly appreciated!
>




[flexcoders] Re: events not being called: HTTPService

2007-05-14 Thread bobignacio

> You can also put  at the beginning of the source
> code right after the  tag. This will spew out the
> entire request which is being sent out onto the wire...it may give you
> some clues.

P.S. If you are writing it in pure AS3...check this out...

http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=1535.html

traceTarget.filters = ["*"];






[flexcoders] Re: events not being called: HTTPService

2007-05-14 Thread bobignacio
For the following line:

public var xmlLocation:String = "./questionaire.xml";

A few simple questions...

Is "questionaire.xml" spelled correctly?
Is this file found in the same directory as the Main.mxml?
Where is this file located?

You can also put  at the beginning of the source
code right after the  tag. This will spew out the
entire request which is being sent out onto the wire...it may give you
some clues.

Hope this helps,

Bob I.

--- In flexcoders@yahoogroups.com, "barry.beattie" <[EMAIL PROTECTED]>
wrote:
>
> 
> > Why are you setting:
> > xmlRequest.contentType = "Application/xml";
> 
> simply due to a lack of clear examples. just about everything else
> uses the mx:HTTPService as an tag.
> 
> sadly, leaving it out didn't help. same problem.
> 
> is there anything obvious wrong with the code?
> can the listeners be debugged by trace and stepping thru the code?
> 
> has anyone got a working example pulling in an external xml file but
> *not* using the MXML tag to do so (just the AS3 code)?
> 
> thanx
> b
>




[flexcoders] Re: Barchart display issue with ArrayCollection and filterfunction

2007-05-14 Thread bobignacio
Have you tried to "refresh()" the ArrayCollection after you used the
filterFunction?

myArrayCollection.refresh();

And how about posting your source code...


--- In flexcoders@yahoogroups.com, "haiqing7" <[EMAIL PROTECTED]> wrote:
>
> 
> In my barchart project, when I use filterfunction to filter my Chart's
> dataprovidor--An ArrayCollection through ComboBox, if there is only one
> object left in that AC, the first element of the object won't be shown
> in my chart. when I try to debug it, I do see the correct filter result.
> even more, if there are more than one objects left in AC, all data
> display correctly. could anyone help out?
> 
> thanks,
> hq.
>




[flexcoders] Re: Flex Course ?

2007-04-25 Thread bobignacio
Total Training has 2 DVDs which are available:

Adobe Flex 2 Rich Internet Applications

I found this to be an excellent tutorial and still refer to it every
now and then.

Adobe Flex 2 Advanced Visual Programming

This one offers more tutorials with Visual Effects, however, it isn't
as fast paced as the first and I found myself falling asleep more
often than not.

Also, www.lynda.com has online tutorials as well.

If Adobe has an office in your preferred location, they may offer courses.

Hope this helps,

Bob I.


--- In flexcoders@yahoogroups.com, "Oliver Merk" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> New Toronto Group offers remote courses via Adobe Connect:
www.newyyz.com
> 
> Best regards,
> Oliver Merk
> Principal Consultant
> New Toronto Group
> 
> 
> --- In flexcoders@yahoogroups.com, "Arleston Lueders"
>  wrote:
> >
> > Hello everybody,
> > 
> > Is there any Flex, ColdFusion or Flash Courses in Idaho or Salt Lake
> City?
> > Anybody know?
> > 
> > Thanks,
> > Arleston
> >
>




[flexcoders] Can Cartesian Chart DataTips be set to always be showing once the chart appears?

2007-04-20 Thread bobignacio
Hi All,

I haven't had any trouble formatting the datatips in a PlotChart using
the dataTipFunction but it is a requirement for me to have them
showing all the time without mousing over them. The mouseSensitivity
can be set to a large number, however, the mouse is still the trigger.
Is there any thing like a label such as in the PieChart for Cartesian
Charts?

Thanks,

Bob I.



[flexcoders] Re: Converting string to base64Binary

2007-03-09 Thread bobignacio
Here is one of my posts which may help...

 http://tech.groups.yahoo.com/group/flexcoders/message/66247

Bob I.


--- In flexcoders@yahoogroups.com, "Brian Holmes" <[EMAIL PROTECTED]> wrote:
>
> Does anybody have an example of how I can do this? Everything I've tried
> blows up.
>  
> Thanks,
>  
> b..
> 
> 
> ***
> The information in this e-mail is confidential and intended solely
for the individual or entity to whom it is addressed.  If you have
received this e-mail in error please notify the sender by return
e-mail delete this e-mail and refrain from any disclosure or action
based on the information.
> ***
>




[flexcoders] Re: new to webservices in flex - need help! :)

2007-03-08 Thread bobignacio
Try this...

The property:

 click="myService.getProjects()"

should be:

 click="myService.getProjects().send()"

Hope this helps,

Bob I.

--- In flexcoders@yahoogroups.com, "captnjay_mobile" <[EMAIL PROTECTED]> 
wrote:
>
> [RPC Fault faultString="HTTP request error"
> faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent
> type="ioError" bubbles=false cancelable=false eventPhase=2 
text="Error
> #2032: Stream Error. URL: http://localhost/HelloWorld.cfc";]. URL:
> http://localhost/HelloWorld.cfc";]
>  at
> 
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::fa
ul\
> tHandler()
>  at mx.rpc::Responder/fault()
>  at mx.rpc::AsyncRequest/fault()
>  at ::DirectHTTPMessageResponder/errorHandler()
>  at
> 
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv
en\
> tFunction()
>  at flash.events::EventDispatcher/dispatchEvent()
>  at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()
> 
> Code:
>   wsdl="http://localhost/HelloWorld.cfc?WSDL"; useProxy="false">
>
>   
> 
> 
> *I can hit the http://localhost/HelloWorld.cfc?WSDL URL so I know 
that
> path is correct.
> 
> I'm calling it via button..
>  y="199"/>
> 
> 
> Then I'm trying to populate the results to a data grid
>  width="668" height="376" x="20" y="240">
> 
> I have an array of structures coming back from the HelloWorld 
cfc... 
> arrProjects
> 
> Thanks in advance!
>




[flexcoders] Re: Filterfunction on a XMLListCollection is misbehaving

2007-02-27 Thread bobignacio
Any chance you can post your source code?


--- In flexcoders@yahoogroups.com, "iko_knyphausen" <[EMAIL PROTECTED]> wrote:
>
> 
> Here is the deal... I have an XMLListCollection as a dataProvider for a
> dataGrid, so that I can use custom sort and filterfunctions. My
> application provides for editing selected items (=rows)  in the Grid,
> and when an edit is done, I update the Grid, by setting values of the
> selectedItem, e.g.
> 
> myGrid.selectedItem.dataField = newValue;
> 
> This works fine, if I have no filterFunction defined for the
> XMLListCollection. The updates happen inplace, the Grid is updated and
> the selectedItem (=row) is still highlighted, i.e. selected.
> 
> The moment, I specify a filterFunction (one that returns "true" for all
> records, mind you), any update to a field in the current "selectedItem"
> will resort the Grid (no sort object specified, and the dataGrid column
> sort is set to false), and the item is always sorted second last in the
> grid. At the same time the selectedItem property is lost (set to null).
> 
> I know how to disable and enableAutoUpdate (to avoid loosing the
> selectedItem), but it still does not explain, why the grid data gets
> resorted
> 
> Any insight from the pros?
> 
> Thanks
> 
> Iko
>




[flexcoders] Re: WS call sucessful with resultFormat="e4x", fails otherwise

2007-02-27 Thread bobignacio
Have you tried the "TraceTarget" tag in mxml?
This allows you to see everything being sent across the wire and
everything coming back.

Under your  tag, set the following:

 

And then run the debugger.

Hope this gives you some clues.

Bob I.

--- In flexcoders@yahoogroups.com, "ben.clinkinbeard"
<[EMAIL PROTECTED]> wrote:
>
> Hello, we are seeing some weird behavior when calling an RPC encoded
> .NET web service. Unless we set resultFormat to e4x, we receive the
> following error:
> 
> fault: [FaultEvent fault=[RPC Fault faultString="Error #1009: Cannot
> access a property or method of a null object reference."
> faultCode="DecodingError" faultDetail="null"]
> messageId="BCCBBAB0-1457-00EA-5329-FE83F9158923" type="fault"
> bubbles=false cancelable=true eventPhase=2]
> 
> ServiceCapture shows that the call does return successfully, and the
> response contains data. A faultCode of "DecodingError" leads me to
> believe Flex is having trouble deserializing the response into
> objects, but I am not sure why that would be. Are there certain SOAP
> structures Flex is known to have problems with?
> 
> Thanks,
> Ben
>




[flexcoders] Re: Storing / retrieving rich text

2007-02-27 Thread bobignacio
I originally posted this on Adobe's web site back in Nov/06...

Title: Sending a ByteArray of rich text to a Java Web Service via
WebService component.

Topic: Keeping the rich text (HTML formatted string) intact

I was able to send and receive rich text (HTML formatted txt) intact
via a Java web service using Weblogic 9.2. Creating a web service in
Weblogic 8.1 is more difficult so I opted for this route. Regardless
what back end implementation you are using, in order to keep rich text
intact is to send it via a ByteArray in flex. And with the web service
(possibly using Coldfusion), be sure that the input parameter and
return types that the WSDL creates are "base64Binary."

Creating a web service in Weblogic 9.2 is pretty easy. If you are
using this app server then the 9.2 docs on Web Services is how I
created my back end. My web service simply accepts a byte[] as a
parameter and returns it.

public class HelloWorldImpl {

 public byte[] getBytes(byte[] bAry) {
  return bAry;
 }
}

In flex:

[Bindable] private var bAryObj:ByteArray = new ByteArray();
[Bindable] private var txtResult:String;

public function sendingBytes(event:Event) {

 // inputTxt is a HTML formatted string a.k.a rich text
 bAryObj.writeUTF(inputTxt);

 // call webService
 wsData.getBytes.send();
}

public function webSvcHandler(event:ResultEvent) {

 var b:ByteArray = new ByteArray();
 b.position = 0; // make sure you read the array from the beginning

 // use binding of txtResult in some component as {txtResult}
 txtResult = b.readUTF() as String;
}

mxml - be sure mxml parameter names match exactly the web service
parameter names:



{bAryObj}




I used a Button component to call sendingBytes() via the click event.

Hope I didn't forget anything...and hope this helps.

Bob I.




--- In flexcoders@yahoogroups.com, "pdflibpilot" <[EMAIL PROTECTED]> wrote:
>
> I am trying to develop a method to allow web administrators to be able
> to edit text in their Flex application directly in the UI (without
> Flex). This text gets saved to mySQL when they close the rich text
> editor.  
> 
> The data is stored correctly in mySQL however when its retrieved it
> gets formated as an XML object when extracted from the event.result.
> 
> While this makes it easy to populate the various labels and text
> objects with the rich text data. The problem is that the rich text
> data gets formatted as XML with new lines and indents. Like in this
> dmup
> 
> 
>   
> 
>KERNING="0">
> This is 
> 
>   
> live content
>   
> 
>   
> 
>   
> 
> 
> How can I force it to treat it as raw text just like its stored in
> mySQL without the formatting ?
>



[flexcoders] Re: Getting XML from an item in an ArrayCollection

2007-02-27 Thread bobignacio
Can you post your syntax for the HTTPService call? And what datatype
is "stockData" in the following?

 stockData = ArrayCollection(stockDetailCollection.getItemAt(0).RATES);

Thanks,

Bob I.

--- In flexcoders@yahoogroups.com, "gekkemus" <[EMAIL PROTECTED]> wrote:
>
> I have a simple HTTPService that gets an XML document. The XML
> document is structured like this:
> 
> 
>  .
>  
>
>   GOOG
>   Google Corporation
>   
>  123,12
>  123,13
>  
>   
>
>
>   ...
>
>  
> 
> 
> I have a resulthandler on the HTTPService, that handles the
> ResultEvent. It basically makes an ArrayCollection:
> stockDetailCollection = event.result.STOCK_EXCHANGE.STOCK_HISTORY.STOCK;
> 
> So when done my ArrayCollection contains a collection of stocks. Now I
> want to filter my collection to select just one specific stock, so I
> added a filterFunction, which filters the stockDetailCollection to
> show only the specific stock by using the SYMBOL:
> 
> private function stockDetailCollectionFilter(item:Object):Boolean {
>   return item.SYMBOL == stockDetailSymbol;
> }
> 
> In this function stockDetailSymbol is a bindable that gets set in a
> pulldown or whatever. After applying the filter function, I call
> stockDetailCollection.refresh() to filter.
> 
> The problem I have is that now I have 1 item in the ArrayCollection.
> From this item I want to use the RATES elements to create a new
> collection that I can use as a datasource for a line-chart. If I try
> something like: 
> 
> stockDetailCollection.filterFunction=stockDetailCollectionFilter;
> stockDetailCollection.refresh();
> stockData = ArrayCollection(stockDetailCollection.getItemAt(0).RATES);
> 
> It fails with the message:
> 
> TypeError: Error #1034: Type Coercion failed: cannot convert
> mx.utils::[EMAIL PROTECTED] to mx.collections.ArrayCollection.
> 
> I hope it's clear what I'm trying to achieve. Can someone point me in
> the right direction? This is my first Flex application, and I'm
> struggling a bit ;-)
> 
> TIA,
> Bastiaan
>




[flexcoders] Re: Need help seaching and comparing in an ArrayCollection

2007-02-27 Thread bobignacio
flex 2 provides a more efficient way of manipulating an
ArrayCollection using a "filterFunction" from the IViewCollection
Interface. This also provides the use of a cursor which you can use to
manipulate the collection as well. Sorting is first required if you
want to use a cursor. Filtering can be done in a 1 line conditional
stmt which eliminates any need to loop through the entire
ArrayCollection. Look in Chap 7., pg 161 of the Developer's Guide with
a very good example on pg. 178 and 185.

Hope this helps,

Bob I.


--- In flexcoders@yahoogroups.com, "e_baggg" <[EMAIL PROTECTED]> wrote:
>
> That is exactly what you need to do. Create a "for" loop and get a
> handle on each object in the loop. 
> 
> Then, set up a method that returns a Boolean if it needs to be
> flagged. This method will check the dates. if true, then inside your
> For loop, flag the data object.
> 
> Note: You can do the conditionals inside the for loop, it's just
> better for readability to extract that logic out to another method
> within the same class.




[flexcoders] Re: ArrayCollection.filterFunction assigned but returns null

2007-02-27 Thread bobignacio
I just recently dealt with the filterFunction and had a struggle with
it as well. Let's say for example:

/*
 * Filter for a first name
 *
 * @param collectionObj the entire ArrayCollection/XMLListCollection
 */
private function firstNameFilter(collectionObj:Object):Boolean {
 return obj.id == 'Bob';
}

In my case, I remember having a fairly complicated return condition
where it actually didn't return a Boolean but an Object by accident.
The "collectionObj" is actually the entire ArrayCollection which is
compared to your return statement and if an element qualifies, it will
return true for each element in the List. However, if the condition is
not returning a Boolean but an Object, you may just get a null. And
even if the filterFunction returns null, the dataProvider in your
datagrid may just be displaying the data cuz the condition was never
returning a Boolean in the first place which may be what is happening.

I ended up putting a trace statment inside the filterFunction to
actually examine the collectionObj and I found that I was returning an
Object and not a Boolean value.

Hope this helps...

Bob I.

--- In flexcoders@yahoogroups.com, "ben.clinkinbeard"
<[EMAIL PROTECTED]> wrote:
>
> Unfortunately no. The problematic code is part of a fairly complex
> application where the filtering is configured and assigned in a
> component that simply receives a reference to a DataGrid and applies
> filters to the dataProvider based on UI selections.
> 
> I was unable to reproduce the issue in a simple test project, which
> implies the issue lies elsewhere, but I just don't understand how I
> could be seeing the values and results I am and still have null be
> returned.
> 
> Thanks,
> Ben
> 
> 
> --- In flexcoders@yahoogroups.com, "bobignacio"  wrote:
> >
> > Any chance to post your source code?
> > 
> > 
> > --- In flexcoders@yahoogroups.com, "ben.clinkinbeard"
> >  wrote:
> > >
> > > Anyone?
> > > 
> > > 
> > > --- In flexcoders@yahoogroups.com, "ben.clinkinbeard"
> > >  wrote:
> > > >
> > > > I've got a filterFunction assigned, the DataGrid that is bound
> to the
> > > > ArrayCollection shows the correctly filtered list, and debugging
> shows
> > > > that the source Array has 10 items while the collection only
has 3.
> > > > However, myCollection.filterFunction returns null.
> > > > 
> > > > Anyone have an idea of what could be going on here?
> > > > 
> > > > TIA,
> > > > Ben
> > > >
> > >
> >
>



[flexcoders] Re: ArrayCollection.filterFunction assigned but returns null

2007-02-27 Thread bobignacio
Any chance to post your source code?


--- In flexcoders@yahoogroups.com, "ben.clinkinbeard"
<[EMAIL PROTECTED]> wrote:
>
> Anyone?
> 
> 
> --- In flexcoders@yahoogroups.com, "ben.clinkinbeard"
>  wrote:
> >
> > I've got a filterFunction assigned, the DataGrid that is bound to the
> > ArrayCollection shows the correctly filtered list, and debugging shows
> > that the source Array has 10 items while the collection only has 3.
> > However, myCollection.filterFunction returns null.
> > 
> > Anyone have an idea of what could be going on here?
> > 
> > TIA,
> > Ben
> >
>



[flexcoders] Re: Return of single object from ColdFusion

2006-11-17 Thread bobignacio
You can always try the following:

 thisPerson = (Employee)(event.result);

However, you may get the error of "cannot convert Object to Employee.
But its worth a try.

Bob I.

--- In flexcoders@yahoogroups.com, "Wally Randall" <[EMAIL PROTECTED]>
wrote:
>
> Problem:
> When I invoke the "get" function in the generated gateway object from 
> the CF Wizard I cannot cast the result to an instance in Flex.
> In debug I can see that the event.result is returning data but when 
> this statement is invoked the result is a NULL thisPerson object in 
> Flex:
> 
> thisPerson=event.result as Employee;
> 
> Any suggestions?
>





[flexcoders] Re: Accesing complex structures in result from WebServices

2006-10-30 Thread bobignacio
Thanks for the quick response!

Can we set up types like Image, VideoDisplay and RichText within a
complex object and send that to a WebService?

My main fear is that the "source" property will just send over a
String to the web service vs. the actual binary file.

Something along the lines appending to your example:

var args:Object = new Object();
args.foo = new Object();
foo.image = new Image();
foo.image.source = "someDirectory/image.jpg";
foo.video = new VideoDisplay();
foo.video.source = "someDirectory/video.flv";
foo.editor = new RichTextEditor();

foo.editor.htmlText = "HTML Formatted
TextThis
paragraph contains bold, italic, underlined, and
bold italic underlined
text.This a red underlined 14-point arial font
with no alignment set.This a teal bold 12-pt.
Verdana font with alignment set to right.";

Thanks again!

Bob I.

--- In flexcoders@yahoogroups.com, "ben.clinkinbeard"
<[EMAIL PROTECTED]> wrote:
>
> Hi Bob,
> 
> Flex should handle the serialization of your objects into xml, you
> just need to make sure they're named correctly.
> 
> var args:Object = new Object();
> args.foo = new Object();
> foo.bar = "someString";
> foo.count = 10;
> myWsOp.arguments = args;
> myWsOp.send();
> 
> should automagically send
> 
> 
>someString
>10
> 
> 
> to your WebService's operation.
> 
> HTH,
> Ben
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "bobignacio"  wrote:
> >
> > --- In flexcoders@yahoogroups.com, Leo  wrote:
> > 
> > >> When i define this web service in flex and i make the call
> > >> websphere receive this call with the parameters that i sent
> > >> correctly (complex structures included)
> > 
> > Hi Leo,
> > 
> > I have recently been playing with the flex WebService stuff...How did
> > you send a complex structure _from_ flex to your Web Service?
> > 
> > Thanks,
> > 
> > Bob
> >
>




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

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

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

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

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



[flexcoders] Re: Accesing complex structures in result from WebServices

2006-10-30 Thread bobignacio
--- In flexcoders@yahoogroups.com, Leo <[EMAIL PROTECTED]> wrote:

>> When i define this web service in flex and i make the call
>> websphere receive this call with the parameters that i sent
>> correctly (complex structures included)

Hi Leo,

I have recently been playing with the flex WebService stuff...How did
you send a complex structure _from_ flex to your Web Service?

Thanks,

Bob




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

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

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

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

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