Menu

#7 swapping with observable arrays

open-fixed
Database (1)
5
2004-07-02
2004-06-30
Hans Fugal
No

This useful idiom doesn't work with recipe.ingredients:
ary[a], ary[b] = ary[b], ary[a]

I've tried working around it but it's a hairy mess. I
think the problem is in the observer that recipe puts
on ingredients, which deletes an ingredient from the
database if it's deleted from the array. I propose we
allow recipe_id in ingredient to be null, and hopefully
that will fix the problem. That probably means a few
other minor changes though...

Discussion

  • Jacob Fugal

    Jacob Fugal - 2004-07-02
    • status: open --> open-fixed
     
  • Jacob Fugal

    Jacob Fugal - 2004-07-02

    Logged In: YES
    user_id=912237

    Fixed and committed (see CVS log comment). I wasn't able to
    thoroughly test (yet). Hans will be looking at that and I'll
    take a second look when I get to a more amenable environment.

     

Log in to post a comment.