[Zope] Programmatically adding my product

rra42 rra42@yahoo.co.uk
Thu, 22 Aug 2002 14:35:12 +0100


--------------020404050203030301050604
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Problem solved. see http://www.zope.org/Members/tazzzzz/addZClasses

Best wishes,
Rob


Trevor Toenjes wrote:

>I may be simplifying the problem...but
>Have you tried the built in constructor methods and factory that instantiate
>with all zClasses?
>There are several generic methods that are included with all zClasses.
>
>To programatically create zClasses look at...
>    yourZClass_add (yourZClass constructor)
>    yourZClass (yourZClass constructor input form)
>
>-Trevor
>
>>-----Original Message-----
>>From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of rra42
>>Sent: Thursday, August 22, 2002 8:37 AM
>>To: zope@zope.org
>>Subject: Re: [Zope] Programmatically adding my product
>>
>>
>>Yes, it was helpful, in that up to now, I had not been able to
>>programmatically add anything. Now can add OFS products and I'm sure
>>anything else supplied with the distro.
>>
>>The problem is that the recipe in the cookbook did not work for my own
>>ZClass based product and the reason I believe is that the ZClass derived
>>product does not have a method of the form manage_addXXXX(id='yyyy').
>>Always reports an attribute error. Investigating using type() and dir()
>>help somewhat, but I'm no further on.
>>
>>
>>
>>Tim Hicks wrote:
>>
>>>>I have the same problem as Damon. I have a product based on a ZClass.
>>>>I have followed the example of the cookbook, and can easily get OFS
>>>>products to add because they seem to have a
>>>>manage_addXXXXXX(id='yyyy') attribute.
>>>>
>>>>However, my product based on the ZClass has no such attribute,
>>>>
>>hence the
>>
>>>>attribute error. The only attributes it appears to have are '_product'
>>>>and '_d' and none of those appear to have an attributed
>>>>'manage_addXXXXXX(id='yyyy').
>>>>
>>>>Any further help greatly appreciated.
>>>>
>>>Did Oliver's link not help??
>>>
>>>tim
>>>
>>>>>please see
>>>>>http://www.zopelabs.com/cookbook/1012279676
>>>>>
>>>>>for an explanation how to do that.
>>>>>
>>>>>
>>>>>cheers,
>>>>>oliver
>>>>>
>>>
>>>_______________________________________________
>>>Zope maillist  -  Zope@zope.org
>>>http://lists.zope.org/mailman/listinfo/zope
>>>**   No cross posts or HTML encoding!  **
>>>(Related lists -
>>>http://lists.zope.org/mailman/listinfo/zope-announce
>>>http://lists.zope.org/mailman/listinfo/zope-dev )
>>>
>>
>>________________________________________________________________________
>>Want to sell your car? advertise on Yahoo Autos Classifieds. It's Free!!
>>       visit http://in.autos.yahoo.com
>>
>>_______________________________________________
>>Zope maillist  -  Zope@zope.org
>>http://lists.zope.org/mailman/listinfo/zope
>>**   No cross posts or HTML encoding!  **
>>(Related lists -
>> http://lists.zope.org/mailman/listinfo/zope-announce
>> http://lists.zope.org/mailman/listinfo/zope-dev )
>>
>


--------------020404050203030301050604
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<html>
<head>
</head>
<body>
Problem solved. see <a class="moz-txt-link-freetext" href="http://www.zope.org/Members/tazzzzz/addZClasses">http://www.zope.org/Members/tazzzzz/addZClasses</a><br>
<br>
Best wishes,<br>
Rob<br>
<br>
<br>
Trevor Toenjes wrote:<br>
<blockquote type="cite" cite="mid:NEBBLDPBKLOKNHPAEECGOEFHFCAA.zope@toenjes.com">
  <pre wrap="">I may be simplifying the problem...but<br>Have you tried the built in constructor methods and factory that instantiate<br>with all zClasses?<br>There are several generic methods that are included with all zClasses.<br><br>To programatically create zClasses look at...<br>    yourZClass_add (yourZClass constructor)<br>    yourZClass (yourZClass constructor input form)<br><br>-Trevor<br><br></pre>
  <blockquote type="cite">
    <pre wrap="">-----Original Message-----<br>From: <a class="moz-txt-link-abbreviated" href="mailto:zope-admin@zope.org">zope-admin@zope.org</a> [<a class="moz-txt-link-freetext" href="mailto:zope-admin@zope.org">mailto:zope-admin@zope.org</a>]On Behalf Of rra42<br>Sent: Thursday, August 22, 2002 8:37 AM<br>To: <a class="moz-txt-link-abbreviated" href="mailto:zope@zope.org">zope@zope.org</a><br>Subject: Re: [Zope] Programmatically adding my product<br><br><br>Yes, it was helpful, in that up to now, I had not been able to<br>programmatically add anything. Now can add OFS products and I'm sure<br>anything else supplied with the distro.<br><br>The problem is that the recipe in the cookbook did not work for my own<br>ZClass based product and the reason I believe is that the ZClass derived<br>product does not have a method of the form manage_addXXXX(id='yyyy').<br>Always reports an attribute error. Investigating using type() and dir()<br>help somewhat, but I'm no further on.<br
><br><br><br>Tim Hicks wrote:<br><br></pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">I have the same problem as Damon. I have a product based on a ZClass.<br>I have followed the example of the cookbook, and can easily get OFS<br>products to add because they seem to have a<br>manage_addXXXXXX(id='yyyy') attribute.<br><br>However, my product based on the ZClass has no such attribute,<br></pre>
        </blockquote>
        </blockquote>
        <pre wrap="">hence the<br></pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="">attribute error. The only attributes it appears to have are '_product'<br>and '_d' and none of those appear to have an attributed<br>'manage_addXXXXXX(id='yyyy').<br><br>Any further help greatly appreciated.<br><br></pre>
            </blockquote>
            <pre wrap="">Did Oliver's link not help??<br><br>tim<br><br></pre>
            <blockquote type="cite">
              <blockquote type="cite">
                <pre wrap="">please see<br><a class="moz-txt-link-freetext" href="http://www.zopelabs.com/cookbook/1012279676">http://www.zopelabs.com/cookbook/1012279676</a><br><br>for an explanation how to do that.<br><br><br>cheers,<br>oliver<br><br></pre>
                </blockquote>
                </blockquote>
                <pre wrap=""><br>_______________________________________________<br>Zope maillist  -  <a class="moz-txt-link-abbreviated" href="mailto:Zope@zope.org">Zope@zope.org</a><br><a class="moz-txt-link-freetext" href="http://lists.zope.org/mailman/listinfo/zope">http://lists.zope.org/mailman/listinfo/zope</a><br>**   No cross posts or HTML encoding!  **<br>(Related lists -<br><a class="moz-txt-link-freetext" href="http://lists.zope.org/mailman/listinfo/zope-announce">http://lists.zope.org/mailman/listinfo/zope-announce</a><br><a class="moz-txt-link-freetext" href="http://lists.zope.org/mailman/listinfo/zope-dev">http://lists.zope.org/mailman/listinfo/zope-dev</a> )<br><br></pre>
                </blockquote>
                <pre wrap=""><br>________________________________________________________________________<br>Want to sell your car? advertise on Yahoo Autos Classifieds. It's Free!!<br>       visit <a class="moz-txt-link-freetext" href="http://in.autos.yahoo.com">http://in.autos.yahoo.com</a><br><br>_______________________________________________<br>Zope maillist  -  <a class="moz-txt-link-abbreviated" href="mailto:Zope@zope.org">Zope@zope.org</a><br><a class="moz-txt-link-freetext" href="http://lists.zope.org/mailman/listinfo/zope">http://lists.zope.org/mailman/listinfo/zope</a><br>**   No cross posts or HTML encoding!  **<br>(Related lists -<br> <a class="moz-txt-link-freetext" href="http://lists.zope.org/mailman/listinfo/zope-announce">http://lists.zope.org/mailman/listinfo/zope-announce</a><br> <a class="moz-txt-link-freetext" href="http://lists.zope.org/mailman/listinfo/zope-dev">http://lists.zope.org/mailman/listinfo/zope-dev</a> )<br></pre>
                </blockquote>
                <pre wrap=""><!----><br></pre>
                </blockquote>
                <br>
                </body>
                </html>

--------------020404050203030301050604--

________________________________________________________________________
Want to sell your car? advertise on Yahoo Autos Classifieds. It's Free!!
       visit http://in.autos.yahoo.com