Old Examples gone.. Glue 4.a?

2 views
Skip to first unread message

Jonathan

unread,
Jun 3, 2009, 9:48:52 AM6/3/09
to Glue Framework
I am wondering what happened to the old examples? If they no longer
work in Glue 4.a whats different?

Sean Clark Hess

unread,
Jun 3, 2009, 10:01:16 AM6/3/09
to Glue Framework
Yeah, I changed the recommended approach again, and rather than
confuse people I took them down until I could change it. I'll update
the examples and write about the change later this morning.

Jonathan

unread,
Jun 3, 2009, 10:12:35 AM6/3/09
to Glue Framework
Thanks Sean... Looking at the Cafe Townsend App and I really like what
I see. I know there are little bugs all over the app, but I cannot
seem to see why the back button saves the employee.

Sean Clark Hess

unread,
Jun 3, 2009, 11:03:12 AM6/3/09
to Glue Framework
Shoot, taking longer than I thought. I'll just fill you in. Basically
three things have changed. First, the idea of creating a fake instance
of the view in the glue map is being completely thrown out the window.
You now use a normal selector. So, <Glue><view:MyView/></Glue> becomes
<Glue match="MyView"/>.

Second, you can no longer target children of a view. So you need to
encapsulate them by creating public properties that glue can set.

Third, The approach changed to copy Mate. I couldn't think of any
better way to do it. So, now you have managers, like mate, and call
services using the new command and action tags. See the two existing
examples for info :). I have updated the tag documentation with some
extra help, and I'll have the examples finished sometime soon.



On Jun 3, 7:48 am, Jonathan <two...@gmail.com> wrote:

Sean Clark Hess

unread,
Jun 3, 2009, 1:05:56 PM6/3/09
to glue-fr...@googlegroups.com
Huh... it shouldn't. I'll check it out

Jonathan

unread,
Jun 3, 2009, 9:33:26 PM6/3/09
to Glue Framework
Sean,

I do not have git but I wanted to share my cafe townsend finds..

I updated the route tag in MainGlue.mxml for employee detail's back
event and sent it to a backButton command. Just like deleteEmployee I
deselected the employee. This fixes the back button issue. The
employee was never saved, the VO was never updated back to its
original state after clicking the back button.

<Command id="backButton">
<Action call="navManager.goBack()"/>
<Action call="employeeManager.selectEmployee(null)"/>
</Command>

I also commented out the following on lines 61/62 of the
EmployeeManager.as to solve the problem of entering a newEmployee but
then hitting the back button and getting an empty user.

//saveEmployee(employee);
//selectEmployee(employee);

Lemme know if this solves the issue correctly or if the framework
should have solved it another way.

Jonathan

Sean Clark Hess

unread,
Jun 3, 2009, 11:56:19 PM6/3/09
to glue-fr...@googlegroups.com
Hey Jonathan, 

I also commented out the following on lines 61/62 of the
EmployeeManager.as to solve the problem of entering a newEmployee but
then hitting the back button and getting an empty user.

Works like a charm, that's perfect.  

I updated the route tag in MainGlue.mxml for employee detail's back event and sent it to a backButton command. Just like deleteEmployee I deselected the employee. This fixes the back button issue. The employee was never saved, the VO was never updated back to its original state after clicking the back button.

Weird, I could never reproduce the bug. It doesn't save for me when I go back with the old code. That said, your approach is dead-on. If you need to work with multiple managers you do it in a command. Nice work!

I'll be committing both changes to the repository in a few minutes. I'll try to get the other examples working again too (that stupid Library example I made is screwy and hard to maintain). 

~sean 
Reply all
Reply to author
Forward
0 new messages