Considering I had to look that up, probably not. :) The docs say -optimize
is true by default, or are you talking about something besides the compiler
arg?

I'll have to try again tonight, as for some reason the SWF isn't connecting
to the debugger - my other projects connect without issue, so I'll try it on
my home computer, where I'm doing active development on this project.

On Tue, Mar 11, 2008 at 12:59 AM, Alex Harui <[EMAIL PROTECTED]> wrote:

>    Is your project set to optimize?  We should be seeing line numbers for
> the ListCollectionView classes as well, which is what I want to know.
>
>
>  ------------------------------
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Ken Dunnington
> *Sent:* Monday, March 10, 2008 7:27 PM
> *To:* [email protected]
> *Subject:* Re: [flexcoders] IViewCursor.findAny on a typed object?
>
>
>
> Sure thing:
>
> TypeError: Error #1009: Cannot access a property or method of a null
> object reference.
>     at
> mx.collections::ListCollectionView/http://www.adobe.com/2006/flex/mx/internal::findItem
> ()
>     at ListCollectionViewCursor/findAny()
>     at com.rpmchallenge.view.PlayerParts::Transport/updateSong
> ()[/Users/ken/dev/Jukebox/src/com/rpmchallenge/view/PlayerParts/Transport.mxml:211]
>     at mx.binding.utils::ChangeWatcher/wrapHandler()
>     at flash.events::EventDispatcher/dispatchEventFunction()
>     at flash.events::EventDispatcher/dispatchEvent()
>     at 
> com.rpmchallenge.model::ModelLocator/setselectedTrack()[/Users/ken/dev/Jukebox/src/com/rpmchallenge/model/ModelLocator.as:25]
>     at com.rpmchallenge.view::Main/updateSelectedTrack
> ()[/Users/ken/dev/Jukebox/src/com/rpmchallenge/view/Main.mxml:68]
>     at flash.events::EventDispatcher/dispatchEventFunction()
>     at flash.events::EventDispatcher/dispatchEvent()
>     at mx.core::UIComponent/dispatchEvent()
>     at mx.controls.listClasses::ListBase/mouseDoubleClickHandler()
>
> As you can see, I'm using a ChangeWatcher to dispatch a
> PropertyChangeEvent on my model. Currently, there is only 1 view from which
> I'm creating my IViewCursor, but in the finished app, there will be many.
> The object being watched on the model is an instance variable of the model,
> so I'm not sure if it equals the same object in memory as the selected
> object in the view.
>
> On Mon, Mar 10, 2008 at 2:33 AM, Alex Harui <[EMAIL PROTECTED]> wrote:
>
> Use a debug build and post the entire stack trace with line numbers.
>
>
>  ------------------------------
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Ken Dunnington
> *Sent:* Sunday, March 09, 2008 8:28 PM
> *To:* [email protected]
>
>
> *Subject:* [flexcoders] IViewCursor.findAny on a typed object?
>
>
>
> I'm having trouble getting the findAny() method to work on a simple typed
> object. I've applied a single-field sort on my ListCollectionView, and the
> object I'm trying to find is in the view, but findAny() always returns an
> error of: TypeError: Error #1009: Cannot access a property or method of a
> null object reference. This error is thrown by the
> ListCollectionView.findItem() method. I haven't dug out the source yet,
> but I'm hoping someone can shed some light on how this method is supposed to
> work. Here is the code I'm trying:
>
>             private function updateSong(e:PropertyChangeEvent):void {
>                 var _track:PlaylistItem = e.newValue as PlaylistItem;
>                 // Look for the track in the playlist
>                 if (playlistCursor.findAny(_track)) {
>                     track = playlistCursor.current as PlaylistItem;
>                     play();
>                 }
>             }
>
> I've also tried looping over the view, using simple comparison (==) and I
> can get the item's index, but I don't know how to update the cursor's
> position without using the findxxx() methods!
>
> --
> The American Republic will endure until the day Congress discovers that it
> can bribe the public with the public's money.
> -- Alexis de Tocqueville
>
>
>
>
> --
> The American Republic will endure until the day Congress discovers that it
> can bribe the public with the public's money.
> -- Alexis de Tocqueville
>   
>



-- 
The American Republic will endure until the day Congress discovers that it
can bribe the public with the public's money.
-- Alexis de Tocqueville

Reply via email to