Ah yes. If you define a method _set_*fieldname*, it wel get called by
you object on the moment you set it.
So I wanted to do indeed:
keywords = 'k1,k2'

But I found my problem. I tried:
>>> Photo(filename="bla.jpg",keywords="k1,k2")
I did not know I needed to instantiate the Photo first, before adding
RelatedJoins.
So now I changed the way I create inputs, and it does work like this:
>>> p = Photo(filename='yyy.jpg')
>>> p.keywords = 'k1, k2'

Al the time I was thinking I could do it in one line. Quite stupid I
did not posted that code. The mistake would probably have been clear
to you immediately...

Thanks for your help though. It made me check my code again and again
until I found the solution.


> I named this method set_keyword because I thought you wanted to call it
> from your own code outside the Photo class code ... (and since _ denotes
> a private method I removed it...)
>
> It is not a mistake but done on purpose. But the problem is I think that
> you did not tell us precisely what you wanted to achieve.
> [...]
> and that your _set_keyword() method is called automatically ??? Is that
> what you want to do ?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to