I read through the articles, they are GREAT!

To whoever's in charge of the midgard website (Armand? ) :
1. We should have a links section in the docs for this. Also, maybe just 
a chapter in the manual on extending classes and then a link to the page.
2. I just noticed the apps part of the references page. I have been 
using midgard for some time, and the manual quite heavy but just now 
noticed it. Maybe also a link to the docs there?

Tarjei

Pascal Van Hecke wrote:

>>>And how do I load the contents of a saved midgard
>>>article (such as the one with this id 1636)  into
>>>
>>an
>>
>>>instance of my inherited class test_article?
>>>
>>in the constructor, call mgd_get_<whatever>($id)
>>
>
>Duh...
>
>I found out not being the first one to think in that
>way...  Tonight I remembered having read something in
>the past about a MidgardArticle, but then forgot
>because I didn't really understand what the purpose
>was.
>However, I found back some stuff that Torben Nehmer
>wrote:
>
>http://www.nathan-syntronics.de/midgard/oop/extending.html
>, with
>http://www.nathan-syntronics.de/midgard/oop/baseclasses/CArticle.html
>as an example.  It turns out that in order to load the
>data, it has to be manually copied from a dummy result
>of mgd_getXXXXX.
>
>But then again, (maybe this is already far off topic
>for this list), I tried:
>
>//Torben's CArticle
>$test_variable = new Carticle(1636);
>
>$test_variable->title = "hoho";
>
>if ($test_variable->update())
>{echo " update ok <br>";}
>else
>{echo " update not ok for ".mgd_errstr()."<br>";}
>
>//the normal stuff
>$test_variable = mgd_get_article(1636);
>
>$test_variable->title = "haha";
>
>if ($test_variable->update())
>{echo " update ok <br>";}
>else
>{echo " update not ok for ".mgd_errstr()."<br>";}
>
>This gave (on a page with the proper authentication):
>
>update not ok for MGD_ERR_INVALID_OBJECT
>update ok 
>
>So does this mean that you cannot simply use the
>inherited object functions such as update() (and the
>rest)?
>And that you have to override them with your own
>implementations, using a dummy article you copy first
>your data to and then perform the update() on?
>
>Did you pursue on the effort you started at
>http://www.nathan-syntronics.de/midgard/oop/extending.html,
>Torben?
>
>Pascal
>
>__________________________________________________
>Do You Yahoo!?
>Send FREE video emails in Yahoo! Mail!
>http://promo.yahoo.com/videomail/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to