[flexcoders] Re: IoC framework for Action Script

2007-03-27 Thread jwp2k_uva
I have to agree with you, Carlos.  It would be nice have a package
like "SpringAS" or something of the sort in Cairngorm or else where. 

- Jae 

--- In flexcoders@yahoogroups.com, "Carlos Rovira" <[EMAIL PROTECTED]>
wrote:
>
> An IoC flex solution would really useful. The possibilities to
inyect code
> at runtime and configure your application by xml joined with the code
> reduction acomplised with reflexion would be the next step...maybe
the next
> iteration for frameworks like Cairngorm?. Hope so ;).
> 
> 27 Mar 2007 10:00:54 -0700, Matt Chotin <[EMAIL PROTECTED]>:
> >
> >Not that I'm aware of.
> >
> > Matt
> >
> >  --
> > *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
> > Behalf Of *jwp2k_uva
> > *Sent:* Tuesday, March 27, 2007 12:46 AM
> > *To:* flexcoders@yahoogroups.com
> > *Subject:* [flexcoders] Re: IoC framework for Action Script
> >
> >  Matt, Adobe, et al.
> >
> > Has there been any progress in the area of IoC for ActionScript?
> >
> > - Jae
> >
> >
> > --- In flexcoders@yahoogroups.com , Matt
> > Chotin  wrote:
> > >
> > > For those unfamiliar with the terms IoC and Dependency Injection
(like
> > > myself) Martin Fowler writes it up here:
> > > http://www.martinfowler.com/articles/injection.html
> > > <http://www.martinfowler.com/articles/injection.html> .
> > >
> > >
> > >
> > > I don't know of a framework in AS right now that does anything like
> > this.
> > > Cairngorm does provide the concept of a ServiceLocator and I think
> > would be
> > > the right place to add this kind of framework as well.
> > >
> > >
> > >
> > > If you're interested in contributing this sort of thing you
should let
> > > Steven and the rest of the advisory board know :-)
> > >
> > >
> > >
> > > Matt
> > >
> > >
> > >
> > > _
> > >
> > > From: David Solis [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, February 23, 2005 9:06 AM
> > > To: flexcoders@yahoogroups.com 
> > > Subject: [flexcoders] IoC framework
> > >
> > >
> > >
> > >
> > > Is there an IoC (aka Dependency Injection) framework for
ActionScript?
> > >
> > > Regards
> > >
> > > D.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > _
> > >
> > > Yahoo! Groups Links
> > >
> > > * To visit your group on the web, go to:
> > > http://groups.yahoo.com/group/flexcoders/
> > > <http://groups.yahoo.com/group/flexcoders/>
> > >
> > > * To unsubscribe from this group, send an email to:
> > >
[EMAIL PROTECTED]
> > >
<mailto:[EMAIL 
PROTECTED]?subject=Unsubscribe>
> >
> > >
> > > * Your use of Yahoo! Groups is subject to the Yahoo!
> > > <http://docs.yahoo.com/info/terms/> Terms of Service.
> > >
> >
> >  
> >
> 
> 
> 
> -- 
> ::| Carlos Rovira
> ::| http://www.carlosrovira.com
> ::| http://www.madeinflex.com
>




[flexcoders] Re: FDS/Hibernate/MySql data update question

2007-03-27 Thread jwp2k_uva
Robert, 

Thanks for the design input.  I guess there is no helping it if I want
MySql database to have heterogeneous accessors.  My preliminary search
indicates that Oracle my be the only db that supports change event. 

By the way, nice work with SearchCoders.com/felx app.  It looks awesome.

- Jae


--- In flexcoders@yahoogroups.com, Robert Cadena <[EMAIL PROTECTED]> wrote:
>
> Jae,
> glad to help.  I doubt there is a change event support in the jdbc 
> connector, but I may be wrong.
> 
> One way you'd be able to notify your fds webapp that a change occurred 
> is to expose an internal facing service (webservice,restful, jms?) to 
> your other app.
> 
> For example, our searchcoders.com/flex app runs a couple of shell 
> scripts to perform maintenance and email retrieval at periodic 
> intervals.  I wanted to keep track of when new messages were downloaded 
> from the group and indexed in a simple flex-based admin console.  so, 
> when the batch script finishes dling and indexing stuff it makes a curl 
> request to an internal-facing server running fds, which sends an update 
> event over a transaction, just as i described in my reply.  then my 
> admin client, which is already connected to the internal server fds 
> instance, receives a push update.  Of course, i could have simply had 
> the shell script send me an email, but, we're testing out how to work 
> and integrate fds and wanted to see this sort of notification strategy 
> in action.
> 
> /r
> http://www.searchcoders.com/flex/?dataservicetransaction+php+net
> 
> 
> 
> jwp2k_uva wrote:
> > Robert,
> > 
> > Thanks a million for pointing out DataServiceTransaction ;)  This is
> > awesome.  
> > 
> > I wonder now whether there is a db change event support in MySql/JDBC
> > connector that allows a java object to call DataServiceTranaction
> > functions as you described below whenever the database of interest is
> > changed regardless of who (.NET, PHP, etc.) changed it. 
> > 
> > You've been a great help.  Thanks, again.
> > 
> > - Jae 
> > 
> > 
> > --- In flexcoders@yahoogroups.com, "robert_cadena"  wrote:
> >> Hi,
> >>
> >> if i understand you correctly you want to tell a flex client that a
> >> change in a db row occurred, yet the change was not initiated by that
> >> client and/or you're not in the middle of an assembler operation?
 For
> >> example, if some other non-flex related entity changed a db row you
> >> want to notify the flex client.  
> >>
> >> If this is the case have a look at the "DataServiceTransaction" class
> >> in the FDS javadocs.  You create a new transaction using that class'
> >> "begin" static method.  Here's some pseudocode:
> >>
> >> tx = DataServiceTransaction.begin();
> >> tx.updateItem("destination_name", newVersion, prevVersion,
changesList);
> >> tx.commit();
> >>
> >> This bit of code will send an update event to the clients subscribed
> >> to destination.
> >>
> >> Keep in mind you have to be within the same webapp as the FDS.  
> >>
> >> Hope that helps.
> >>
> >> /r
> >> http://www.searchcoders.com/flex/?dataservicetransaction
> >>
> >>
> >>
> >> --- In flexcoders@yahoogroups.com, "jwp2k_uva"  wrote:
> >>> Dear Flexcoders,
> >>>
> >>> In a FDS/Hibernate/MySql setup, what happens if a data row is
directly
> >>> updated in the MySql database?  Is there a simple way to update the
> >>> flex application with the updated data row?
> >>>
> >>> Thanks a million.
> >>>
> > 
> > 
> > 
> > 
> > --
> > 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
> > 
> > 
> > 
> >
>




[flexcoders] Re: FDS/Hibernate/MySql data update question

2007-03-27 Thread jwp2k_uva
Robert,

Thanks a million for pointing out DataServiceTransaction ;)  This is
awesome.  

I wonder now whether there is a db change event support in MySql/JDBC
connector that allows a java object to call DataServiceTranaction
functions as you described below whenever the database of interest is
changed regardless of who (.NET, PHP, etc.) changed it. 

You've been a great help.  Thanks, again.

- Jae 


--- In flexcoders@yahoogroups.com, "robert_cadena" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> if i understand you correctly you want to tell a flex client that a
> change in a db row occurred, yet the change was not initiated by that
> client and/or you're not in the middle of an assembler operation?  For
> example, if some other non-flex related entity changed a db row you
> want to notify the flex client.  
> 
> If this is the case have a look at the "DataServiceTransaction" class
> in the FDS javadocs.  You create a new transaction using that class'
> "begin" static method.  Here's some pseudocode:
> 
> tx = DataServiceTransaction.begin();
> tx.updateItem("destination_name", newVersion, prevVersion, changesList);
> tx.commit();
> 
> This bit of code will send an update event to the clients subscribed
> to destination.
> 
> Keep in mind you have to be within the same webapp as the FDS.  
> 
> Hope that helps.
> 
> /r
> http://www.searchcoders.com/flex/?dataservicetransaction
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "jwp2k_uva"  wrote:
> >
> > Dear Flexcoders,
> > 
> > In a FDS/Hibernate/MySql setup, what happens if a data row is directly
> > updated in the MySql database?  Is there a simple way to update the
> > flex application with the updated data row?
> > 
> > Thanks a million.
> >
>




[flexcoders] Re: IoC framework for Action Script

2007-03-26 Thread jwp2k_uva
Matt, Adobe, et al.

Has there been any progress in the area of IoC for ActionScript?

- Jae 
 

--- In flexcoders@yahoogroups.com, Matt Chotin <[EMAIL PROTECTED]> wrote:
>
> For those unfamiliar with the terms IoC and Dependency Injection (like
> myself) Martin Fowler writes it up here:
> http://www.martinfowler.com/articles/injection.html
>  .
> 
>  
> 
> I don't know of a framework in AS right now that does anything like
this.
> Cairngorm does provide the concept of a ServiceLocator and I think
would be
> the right place to add this kind of framework as well.
> 
>  
> 
> If you're interested in contributing this sort of thing you should let
> Steven and the rest of the advisory board know :-)
> 
>  
> 
> Matt
> 
>  
> 
>   _  
> 
> From: David Solis [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, February 23, 2005 9:06 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] IoC framework
> 
>  
> 
> 
> Is there an IoC (aka Dependency Injection) framework for ActionScript?
> 
> Regards
> 
> D.
> 
> 
> 
> 
> 
> 
> 
>   _  
> 
> Yahoo! Groups Links
> 
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/flexcoders/
>  
>   
> * To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>  
>   
> * Your use of Yahoo! Groups is subject to the Yahoo!
>   Terms of Service.
>




[flexcoders] FDS/Hibernate/MySql data update question

2007-03-26 Thread jwp2k_uva
Dear Flexcoders,

In a FDS/Hibernate/MySql setup, what happens if a data row is directly
updated in the MySql database?  Is there a simple way to update the
flex application with the updated data row?

Thanks a million. 



[flexcoders] Race condition in RichTextEditor

2007-03-08 Thread jwp2k_uva
I'm in the process of extending RichTextEditor component with
"Ctrl-b", "Ctrl-i", and "Ctrl-u" keyboard formatting options. 

Conceptually, it's quite simple.  For example, "Ctrl-b" will dispatch
a mouse click event from the RichTextEditor's boldButton.  However,
the following code will only work if some text is highlighted.  

Additionally, this code in debug mode with a breakpoint will always
work.   

If you know of a way to address this without adding empty cpu cycles
or rewriting RichTextEditor.mxml file, please let me know.

Thanks.

---
note, rte is a RichTextEditor object.

private function InitializeComponent():void 
{
   rte.addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
}  

private function keyDown(event:KeyboardEvent):void
{   
   if ((event.ctrlKey) && (event.charCode == 98)) // "Ctrl-b"
   {  
  rte.boldButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
   }
}

--Ugly workaround-
private function keyDown(event:KeyboardEvent):void
{   
   if ((event.ctrlKey) && (event.charCode == 98)) // "Ctrl-b"
   {
  rte.boldButton.setFocus();
  // Add empty cpu cycles 
  rte.boldButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
   }
}



[flexcoders] How I can get the benefit of both startDrag() and DragManager.doDrag()?

2007-02-22 Thread jwp2k_uva
Hey guys,
  
I'm looking to create objects, i.e. boxes, that I can drag around to
different locations and have the ability to link to each other via
drag and drop operation.  The objective that I'm trying to achieve is
similar to the following example.

http://weblogs.macromedia.com/khoyt/archives/2006/11/flex_associatio.cfm

The above example would have been perfect, except the boxes cannot be
dragged to different locations.  

At this point, I hit a road block in trying to handle mouse events
directly and I would greatly appreciate your elegant approach.

Thanks!

- Jae