leiting (1) [Avatar] Offline
#1
Hi,I'm reading the book Flexible Rails,and I met some problems at Page
199 'Creating a task from Flex'.After I created a new task, the new task is
created in database(I checked),but it didn't show up in the tasks
DataGrid.I'm sure svcTasksList.send() was called after the new task
created,but rails couldn't receive the HTTPservice send whose method was
get.The DebugPanel shows that
>
[Tue Jan 13 15:21:00 GMT+0800 2009] TaskCreateBox#handleTaskCreateResult:
> <task>
> <completed type="boolean">false</completed>
> <created_at type="datetime">2009-01-13T15:21:00+08:00</created_at>
> <id type="integer">9</id>
> <location_id type="integer" nil="true"/>
> <name>eat</name>
> <next_action type="boolean">false</next_action>
> <notes>eat</notes>
> <project_id type="integer" nil="true"/>
> <updated_at type="datetime">2009-01-13T15:21:00+08:00</updated_at>
> <user_id type="integer">3</user_id>
> </task>
> [Tue Jan 13 15:21:00 GMT+0800 2009] MainBox#handleTasksListResult:
> <task>
> <completed type="boolean">false</completed>
> <created_at type="datetime">2009-01-13T15:21:00+08:00</created_at>
> <id type="integer">9</id>
<location_id type="integer" nil="true"/>
> <name>eat</name>
> <next_action type="boolean">false</next_action>
> <notes>eat</notes>
> <project_id type="integer" nil="true"/>
> <updated_at type="datetime">2009-01-13T15:21:00+08:00</updated_at>
> <user_id type="integer">3</user_id>
> </task>


when I added a debugger before svcTasksList.send() in function listTasks() and run the project in debugging perspective, everything
works well. The debugPanel shows that

> [Tue Jan 13 15:27:15 GMT+0800 2009] TaskCreateBox#handleTaskCreateResult:
> <task>
> <completed type="boolean">false</completed>
> <created_at type="datetime">2009-01-13T15:27:15+08:00</created_at>
> <id type="integer">10</id>
> <location_id type="integer" nil="true"/>
> <name>go to bed</name>
> <next_action type="boolean">false</next_action>
> <notes>go to bed</notes>
> <project_id type="integer" nil="true"/>
> <updated_at type="datetime">2009-01-13T15:27:15+08:00</updated_at>
> <user_id type="integer">3</user_id>
> </task>
[Tue Jan 13 15:27:20 GMT+0800 2009] MainBox#handleTasksListResult:
> <tasks type="array">
> <task>
> <completed type="boolean">true</completed>
> <created_at type="datetime">2009-01-13T14:49:55+08:00</created_at>
> <id type="integer">1</id>
> <location_id type="integer">1</location_id>
> ....
> <task>
> <completed type="boolean">false</completed>
> <created_at type="datetime">2009-01-13T15:21:00+08:00</created_at>
> <id type="integer">9</id>
> <location_id type="integer" nil="true"/>
> <name>eat</name>
> <next_action type="boolean">false</next_action>
> <notes>eat</notes>
> <project_id type="integer" nil="true"/>
> <updated_at type="datetime">2009-01-13T15:21:00+08:00</updated_at>
> <user_id type="integer">3</user_id>
> </task>
> <task>
> <completed type="boolean">false</completed>
> <created_at type="datetime">2009-01-13T15:27:15+08:00</created_at>
> <id type="integer">10</id>
> <location_id type="integer" nil="true"/>
> <name>go to bed</name>
> <next_action type="boolean">false</next_action>
> <notes>go to bed</notes>
> <next_action type="boolean">false</next_action>
> <notes>go to bed</notes>
> <project_id type="integer" nil="true"/>
> <updated_at type="datetime">2009-01-13T15:27:15+08:00</updated_at>
> <user_id type="integer">3</user_id>
> </task>
> </tasks>

this issue happend as well as new project and location

Message was edited by:
leiting

Message was edited by:
leiting