RE: [Zope] Problem with adding items to ZClass instance (semi-solved)

2000-06-20 Thread Ron Bickers

Thanks a lot for your help on this weird one!

Now that I know what to look into, I'll do that.

___

Ron Bickers
Logic Etc, Inc.
[EMAIL PROTECTED]


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Rik
> Hoekstra
> Sent: Tuesday, June 20, 2000 4:53 AM
> To: Ron Bickers
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Zope] Problem with adding items to ZClass instance

> OK, I downloaded it and I think I found your problem (not wure how to
> remediate this, though). If you look in the source of the management
> screen
> http://localhost///manage_main, the
> dropdown list for adding Product looks like this:
> 
>   http://localhost///"
> METHOD="GET">
>ONCHANGE="location.href='http://localhost/testhier/blup/'+this.opt
> ions[this.selectedIndex].value">
> Available Objects
>   DTML Document
>   DTML Method
>   Mail
> Host
>   TinyTable
>   User
> Folder
>   Z MySQL Database
> Connection
> 
>   
>   
> 
> As you see, most of the items have a manage_addProducts/ as a start.
> Not so with TinyTables and MySQLConnection. They call the
> add_TinyTableForm and manage_addZMySQLConnection form. They do not
> switch the namespace to manage_addProduct (not in the form). Why this is
> a problem, I can't tell, but this _is_ the problem.
> 
> I'm not quite sure about the solution. Probably it's best to make a
> custom manage_main form that does the right incantations for adding
> products and then map this to your Contents View in the ZCLass
> definition.
> 
> As a side I'd like to remark that all products should comply with the
> same manage_addProduct interface, because the current situation leads to
> nasty problems.
> 
> Rik


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Problem with adding items to ZClass instance

2000-06-20 Thread Rik Hoekstra

> 
> I don't think there's anything "special" about my ZClass.  It's derived from
> Catalog Aware and ObjectManager.  I believe I reproduced it without the
> Catalog Aware and got the same results.
> 
> I'm using Andy Dustman's version of the MySQLDA and TinyTable v0.8.2.  They
> both work just fine once I get the objects in the right place.  Maybe the
> problem just happens to be with these two products, but I have no clue.
> 
> You're welcome to fetch the product at
> ftp://ftp.logicetc.com/pub/Zope/IssueTracker.zexp if you want to give it a
> look.  It's a one day throw-together port of the issue tracking system used
> by the PHP project with modifications for my own needs.
> 


OK, I downloaded it and I think I found your problem (not wure how to
remediate this, though). If you look in the source of the management
screen
http://localhost///manage_main, the
dropdown list for adding Product looks like this:

  http://localhost///"
METHOD="GET">
  http://localhost/testhier/blup/'+this.options[this.selectedIndex].value">
Available Objects
  DTML Document
  DTML Method
  Mail
Host
  TinyTable
  User
Folder
  Z MySQL Database
Connection

  
  

As you see, most of the items have a manage_addProducts/ as a start.
Not so with TinyTables and MySQLConnection. They call the
add_TinyTableForm and manage_addZMySQLConnection form. They do not
switch the namespace to manage_addProduct (not in the form). Why this is
a problem, I can't tell, but this _is_ the problem.

I'm not quite sure about the solution. Probably it's best to make a
custom manage_main form that does the right incantations for adding
products and then map this to your Contents View in the ZCLass
definition.

As a side I'd like to remark that all products should comply with the
same manage_addProduct interface, because the current situation leads to
nasty problems.

Rik

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




RE: [Zope] Problem with adding items to ZClass instance

2000-06-19 Thread Ron Bickers

> -Original Message-
> From: Rik Hoekstra [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 19, 2000 4:13 PM
> To: Ron Bickers
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Zope] Problem with adding items to ZClass instance

> I looked at it, and found it fishy. The strange thing is, I tried to
> reproduce it, but I can't. To be sure I added a tiny table plus to an
> instance not a straight tiny table and a ZODBC adapter, but I
> doubt whether
> this would make a difference. Anyway, they both work straight
> away. This is
> getting very strange indeed. It seems strange things are happening to your
> namespace.
>
> I can think of some things that may cause problems, but this is all
> speculation.
>
> This may be a bug, but then it's a special one. Anything special
> about your
> ZClass - what does it derive from (just objectmanager? anything else that
> might cause strange behaviour?).
> Is there a subobjects tab in it's definition? Are the products in there?

I don't think there's anything "special" about my ZClass.  It's derived from
Catalog Aware and ObjectManager.  I believe I reproduced it without the
Catalog Aware and got the same results.

I'm using Andy Dustman's version of the MySQLDA and TinyTable v0.8.2.  They
both work just fine once I get the objects in the right place.  Maybe the
problem just happens to be with these two products, but I have no clue.

You're welcome to fetch the product at
ftp://ftp.logicetc.com/pub/Zope/IssueTracker.zexp if you want to give it a
look.  It's a one day throw-together port of the issue tracking system used
by the PHP project with modifications for my own needs.

Thanks!
___

Ron Bickers
Logic Etc, Inc.
[EMAIL PROTECTED]


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Problem with adding items to ZClass instance

2000-06-19 Thread Rik Hoekstra


>> Hm, this is getting hard to answer. Adding normal instances of ZCLasses
>> to other ZClasses should work. Are you adding everything straight from
>> the management interface or programmatically from DTML?
>> If from the management interface, are you sure you always add TinyTable
>> etc from within the instance?
>> If programmatically, could you send the code?
>>
>> Perhaps you could try and adding one of the problem products in another
>> way (from a dtml method instead of the management interface or the other
>> way around).
>
>The items I'm adding aren't other ZClasses, but rather from python
products.
>I haven't come up with an exhaustive list of which items cause the problem
>and which don't, but I know at least the TinyTable and ZMySQL DB Connection
>do, and the DTML Methods/Documents, MailHost and UserFolders don't.
>
>Everything is being added via the interface.  I haven't tried adding them
>via DTML.  I've never done that because I haven't had a use for it, so I'm
>not sure I know how.
>
>I setup a series of screen shots to demonstrate exactly what's happening.
>Take a look at http://www.logicetc.com/Test/zclass_problem if you're
>interested.


I looked at it, and found it fishy. The strange thing is, I tried to
reproduce it, but I can't. To be sure I added a tiny table plus to an
instance not a straight tiny table and a ZODBC adapter, but I doubt whether
this would make a difference. Anyway, they both work straight away. This is
getting very strange indeed. It seems strange things are happening to your
namespace.

I can think of some things that may cause problems, but this is all
speculation.

This may be a bug, but then it's a special one. Anything special about your
ZClass - what does it derive from (just objectmanager? anything else that
might cause strange behaviour?).
Is there a subobjects tab in it's definition? Are the products in there?

Rik



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




RE: [Zope] Problem with adding items to ZClass instance

2000-06-19 Thread Ron Bickers

> -Original Message-
> From: Rik Hoekstra [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 19, 2000 6:23 AM
> To: Ron Bickers
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Zope] Problem with adding items to ZClass instance

> Hm, this is getting hard to answer. Adding normal instances of ZCLasses
> to other ZClasses should work. Are you adding everything straight from
> the management interface or programmatically from DTML?
> If from the management interface, are you sure you always add TinyTable
> etc from within the instance?
> If programmatically, could you send the code?
>
> Perhaps you could try and adding one of the problem products in another
> way (from a dtml method instead of the management interface or the other
> way around).

The items I'm adding aren't other ZClasses, but rather from python products.
I haven't come up with an exhaustive list of which items cause the problem
and which don't, but I know at least the TinyTable and ZMySQL DB Connection
do, and the DTML Methods/Documents, MailHost and UserFolders don't.

Everything is being added via the interface.  I haven't tried adding them
via DTML.  I've never done that because I haven't had a use for it, so I'm
not sure I know how.

I setup a series of screen shots to demonstrate exactly what's happening.
Take a look at http://www.logicetc.com/Test/zclass_problem if you're
interested.

Thanks!
___

Ron Bickers
Logic Etc, Inc.
[EMAIL PROTECTED]


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Problem with adding items to ZClass instance

2000-06-19 Thread Rik Hoekstra



Ron Bickers wrote:
> 
> On Sun, 18 Jun 2000, Rik Hoekstra wrote:
> 
> > This is not so easy to answer. ZClasses do strange things to adding items.
> > If your ZCLass definition (in the Product) is nested in another ZClass, then
> > it is your ZClass. If the ZClass  definition is defined in the top level of
> > your product. There may be other things going on, including all of the above
> > ;-)
> > You'll need to provide more details to  be able to say more about this.
> 
> I'm not sure what kind of information would help.  Let me know what and
> I'll be happy to provide it.  I'll provide the Product .zexp which
> includes a single top-level ZClass, a couple dozen methods and a single
> property sheet, if that would help.  There's nothing especially complex
> about it.  It uses ZSQLMethods (w/ MySQLDA) and TinyTables, and once I can
> get the stuff in the right place in the instance, everything works just
> fine.

Hm, this is getting hard to answer. Adding normal instances of ZCLasses
to other ZClasses should work. Are you adding everything straight from
the management interface or programmatically from DTML? 
If from the management interface, are you sure you always add TinyTable
etc from within the instance?
If programmatically, could you send the code?

Perhaps you could try and adding one of the problem products in another
way (from a dtml method instead of the management interface or the other
way around).


Rik

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Problem with adding items to ZClass instance

2000-06-18 Thread Ron Bickers

On Sun, 18 Jun 2000, Rik Hoekstra wrote:

> This is not so easy to answer. ZClasses do strange things to adding items.
> If your ZCLass definition (in the Product) is nested in another ZClass, then
> it is your ZClass. If the ZClass  definition is defined in the top level of
> your product. There may be other things going on, including all of the above
> ;-)
> You'll need to provide more details to  be able to say more about this.

I'm not sure what kind of information would help.  Let me know what and
I'll be happy to provide it.  I'll provide the Product .zexp which
includes a single top-level ZClass, a couple dozen methods and a single
property sheet, if that would help.  There's nothing especially complex
about it.  It uses ZSQLMethods (w/ MySQLDA) and TinyTables, and once I can
get the stuff in the right place in the instance, everything works just
fine.

Thanks!

---
Ron


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Problem with adding items to ZClass instance

2000-06-18 Thread Rik Hoekstra


>I discovered something bizarre that happens in my 2.1.4 and 2.2b1
>installations.
>


Bizarre, yes, unusual, no.

>I have a ZClass based on ObjectManager.  In an instance of the ZClass, I
can
>"Add" most of the available objects (DTML Documents, DTML Methods, User
>Folder, MailHost to name a few).  However, for at least two items
(TinyTable
>and ZMySQL DB Connection), when I add them, they show up in the container
>folder, not in the ZClass instance.  Then, if I check it to delete it, it
>gives a "does not exist" error.  Upon refreshing the container folder, the
>item still shows, but then I *can* delete it.  Equally interesting is that
I
>can Copy the item from the container folder and successfully Paste it into
>the ZClass instance.  However, since ZMySQL DB Connections don't support
>Copy/Paste, that won't work.
>
>What's going on?  Is it a problem with my ZClass, the Product manage_add,
or
>Zope?  Or me?
>


This is not so easy to answer. ZClasses do strange things to adding items.
If your ZCLass definition (in the Product) is nested in another ZClass, then
it is your ZClass. If the ZClass  definition is defined in the top level of
your product. There may be other things going on, including all of the above
;-)
You'll need to provide more details to  be able to say more about this.

hth

Rik


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Problem with adding items to ZClass instance

2000-06-16 Thread Ron Bickers

[Doh... I don't read messages without subjects. Here 'tis again. Sorry.]

Howdy all,

I discovered something bizarre that happens in my 2.1.4 and 2.2b1
installations.

I have a ZClass based on ObjectManager.  In an instance of the ZClass, I can
"Add" most of the available objects (DTML Documents, DTML Methods, User
Folder, MailHost to name a few).  However, for at least two items (TinyTable
and ZMySQL DB Connection), when I add them, they show up in the container
folder, not in the ZClass instance.  Then, if I check it to delete it, it
gives a "does not exist" error.  Upon refreshing the container folder, the
item still shows, but then I *can* delete it.  Equally interesting is that I
can Copy the item from the container folder and successfully Paste it into
the ZClass instance.  However, since ZMySQL DB Connections don't support
Copy/Paste, that won't work.

What's going on?  Is it a problem with my ZClass, the Product manage_add, or
Zope?  Or me?

___

Ron Bickers
Logic Etc, Inc.
[EMAIL PROTECTED]


___
Zope maillist  -  [EMAIL PROTECTED]
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 )