[Zope-dev] Re: ZClassNG and ProductNG proposal

2007-04-26 Thread Max M

Andreas Jung skrev:


He's trying to reinvent wheels? Reads a bit like GrokNG :-)


And reinventing the wheel is bad?

I believe that pirelli or firestone has a larger market than Zope. And 
they do nothing but.


Besides, my car would suck with stone wheels at 100MPH. Well probably 
allready at 1MPH.


Reinventing the wheel as something bad, is only bad as a metaphor

;-)

--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: ZClasses Maintenance and Upgrade

2007-04-18 Thread Max M

Jonathan skrev:


- Original Message - From: Christopher Lozinski 


Well I have finally reached the stage where I am pushing the limits of 
ZClasses and would love an upgrade.  Guess I need to do it myself.


I know this is a serious PITA... I just spent 3 months replacing 
ZClasses with a custom product in a client's web site because they did 
not want to get stuck in an old version of Zope.



Come on now.

I wrote this 5 message years ago:

http://mail.zope.org/pipermail/zope/2002-May/115427.html

ZClasses have not changed since. It cannot be a surprise.

:-)


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Future of ZClasses

2006-09-27 Thread Max M

Andreas Jung skrev:



--On 27. September 2006 13:47:26 -0400 Jonathan [EMAIL PROTECTED] wrote:

... i don't suppose anyone has an 'automagical' utility that instantly
transforms zclasses to python classes, and then changes all dtml/external
method usage do they?   ...didn't think so ;-)


Also I don't think so. Just my personal opinion: ZClasses were the biggest
mistake in the history of Zope :-)



Only the implementation.

The idea of interactively creating objects through the web is a 
brilliant idea.




___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: I'm starting to get bored of people complaining about Zope

2006-09-06 Thread Max M

Sidnei da Silva wrote:

Regarding: I'm starting to get bored of people complaining about Zope

Being a full time active Zope developer (as in developing with zope) for 
at least 7 year, having contributed code, libraries, documentation and 
products, I believe I have earned the right to complain once every 
second year so!


I know that if I have problems developing in Zope, so does many more people.

And yes Zope 3 is the future, and will make everything so easy for 
developers. But in the meantime we don't have to scare people of with a 
difficult development process.


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: I am starting to hate Zope/Plone development and its bl**dy lack of refresh.

2006-09-05 Thread Max M

Max M wrote:


I am not sure what is causing the problems. I am mostly a developer of
end user tools. Not a core Zope/Plone developer. And I am not really
interested in becoming one either. There must be a niche for developers 
like me that focus on end users.



Well ok. I have researched a bit more. All the speedup suggestions gave 
at maximum 5-10 seconds. Not nearly enough. (Didn't try to buy a new 
computer though. Will do that next week ;-)


I also tried to run Zope as a zeo client from a usb flash disk.

As expected the initial compilation to byte code was slw. I then 
expected it to run fast after that. It didn't!

*clever* configuration clearly wasn't clever enough for me.


So I made a site with a standard Zope tool:

class simple_tool(UniqueObject, PropertyManager,
   SimpleItem.SimpleItem, ActionProviderBase):


And I added a simple Plone skin.

Now refresh worked like a charm. Both when changing the code in the tool 
and the page templates in the skin.


So the problem only exists for me in Archetype based products. Anytime I 
do a change in any AT content type I need to restart the site.


Can anybody confirm this behavior?


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: I'm starting to get bored of people complaining about Zope

2006-09-05 Thread Max M

Sidnei da Silva wrote:

On Tue, Sep 05, 2006 at 03:39:14PM +0200, Max M wrote:
| So the problem only exists for me in Archetype based products. Anytime I 
| do a change in any AT content type I need to restart the site.
| 
| Can anybody confirm this behavior?


That's a known-(at least to me)-issue. 


   When you refresh an Archetypes-based product you need to refresh
   Archetypes as well. You can do this by marking the product as
   dependent on Archetypes and then refresh Archetypes (which will
   refresh it's dependencies, refreshing your product).


I have tried that. It doesn't work.


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] I am starting to hate Zope/Plone development and its bl**dy lack of refresh.

2006-09-04 Thread Max M

Back in the olden days Zope developments was tiresome. You did a change
in your source file, and you needed to restart Zope to see the change.

Then a 'refresh' option was made, and products would get automatically
refreshed when a change was made. Sweet times.

But doing development in Plone has become increasingly tiring since Zope
2.8 and up.

Refresh no longer works, and the old debug, correct, restart cycle is
back.

Only this time a software stack the size a skyscrapers has to be loaded.
Making it even slower than in the old Zope days.

I am developing on a 1.2 GHz Athlon machine with 1 GB of ram. A slow
machine by modern standards, I know. But it has been fast enough for
everything so far. Just not for modern Plone development!

A restart of Plone 2.5 - (Zope 2.8.6-final, python 2.3.5, win32) takes
46 seconds on this machine. For every little change. And it is driving
me crazy.

If I install zeo I can cut it down to 40 seconds :-s


I am not sure what is causing the problems. I am mostly a developer of
end user tools. Not a core Zope/Plone developer. And I am not really
interested in becoming one either. There must be a niche for developers 
like me that focus on end users.



I love Python because development/testing is so fast. Recompiling code
in Java etc. to see a little chance, is a bad idea to me. But The
Zope/Plone has developed into exactly this. I know that it technically
is two different processes. But for me the end result is the same.

I could try running a zeo client from a usb drive to get a faster 
restart, but it takes 20 minute to copy all the files to it.


Does anybody have a clue as to where the problem is? And why aren't 
there any more people complaining about it? Is it because I develop on 
Windows and am the only one doing so?



What do I have to do to get the sweet sweet refresh working again?


Frustrated regards Max

--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Unify the Zope 2 and Zope 3 repositories!

2006-06-26 Thread Max M

Chris Withers wrote:

Philipp von Weitershausen wrote:

Jim suggested a different strategy with Zope 5
(http://mail.zope.org/pipermail/zope3-dev/2006-February/018415.html).
The little bits and pieces that make up Zope 3 (the zope.* packages)
would be developed more or less independently of Zope-the-app-server
(which would only be one product called Zope 5 and incorporate ideas
from Zope 2 and 3 and use those bits and pieces).


Well, the sooner better...

...this comes mainly from my desire to see the exponential combination 
of branches problem go away...



Technically speaking, isn't that a squared problem?

--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Time-based releases vs Bugfixing

2006-06-15 Thread Max M

Lennart Regebro wrote:


Zope2 development stood pretty much still for several years. We
are no picking up the slack, and yes, that means loads of rapid
changes. The alternative is stagnation and ultimately death.



Well, I must say that I enjoyed that. Being able to add new 
functionality in peace, instead of fixing already working stuff.


But then again, my interrest is in user functionality. Not in core 
development.


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Time-based releases a good idea?

2006-06-14 Thread Max M

Andreas Jung wrote:

At some point you have to make a cut to get rid of old crap. Fixing the 
zLOG
issue is a straight forward approach with very little risks for the 
programmer and it won't take too much time..I don't see a major problem 
with that.



Except that it hits a sore spot for open source right on the head.

Products are developed for our customers, and they will keep working for 
those customers until they choose to upgrade.


In my case, a single product often starts out as a tool for a single 
customer, that I then make available. Usually I get a lot of 
(unreasonable) change request that I ignore :-s, but no bug fixes at 
all. That is fair enough, as I don't fix many bugs in other peoples 
products.


But the problem is that I don't fix bugs that doesn't exist for my 
customers. So deprecation warnings are ignored, until the product 
sponsor chooses upgrade.


If this is how OSS generally works, as I expect, then deprecations will 
break stuff that just doesn't get fixed. And new user will find it 
impossible to get all the products they need to work together, in the 
latest version.



But the problem is probably not the time based release, just that there 
is to few generations for deprecations.




--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: How to delete an object given a path in Zope

2006-03-15 Thread Max M

Tres Seaver wrote:

Takahashi, Michael wrote:


I've actually tried that.  The problem I run into is that the folder in
my path contains a dash. When I call manage_delObjects on the following:


obj = context.restrictedTraverse('webcasts/courses/2005-2006/temp')


You need to get a reference to the container, and call
'manage_delObject' on it, e.g.:

  container = context.restrictedTraverse('webcasts/courses/2005-2006')
  container.manage_delObject('temp')


I usually just call aq_parent

   obj = context.restrictedTraverse('webcasts/courses/2005-2006/temp')
   container = obj.aq_parent
   container.manage_delObject('temp')

If you are deleting a list of objects in different folders you need to 
do a bit of tapdancing not to delete parents first. Like reverse sorting 
on the length of the physical path.


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: characters allowed in object IDs

2006-03-10 Thread Max M

yuppie wrote:

Hi!


As of Zope 2.8.2 (http://svn.zope.org/?rev=38738view=rev) the '@' 
character is allowed in object IDs.


Zope 3 does not allow object IDs starting with '@' because those names 
are reserved for views.


Five makes Zope 3 style views available in Zope 2, so IDs starting with 
'@' should be disallowed in Zope 2 as well.


If there are no objections I'll fix that in Zope 2.8, 2.9 and trunk.




There are several use cases for using an email as the user id. 
Especially when integrating to legacy systems.


So http://localhost/plone/Members/[EMAIL PROTECTED] should be legal. 
Otherwise it is a pita. (Until it gets ok to it in Plone I have a 
monkeypatch for Plone that allows this, and it's pretty simple.)


If you just want to prohibit id.startswith('@') it is fine by me.
But prohibiting id.find('@') != -1 would suck.

I cannot at the top of my head think of a case where @name is used... 
But if anyone else knows about it. Please speak up.



--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: characters allowed in object IDs

2006-03-10 Thread Max M

yuppie wrote:

Dieter Maurer wrote:


To support WebDAV as widely as possible, I would prefer to
get rid of all id restrictions. I do not like to see
new restrictions emerging...



You just don't like it or do you know a better alternative?

We need a way to make sure that object IDs can't mask browser views and 
resources. The current solution in Zope 3 is to reserve names starting 
with '+' and '@' for resources and views.


Compared to Zope 2.8.1 and earlier this is no new restriction.



But that doesn't mean that the restriction was good in the first place.

Naturally there will be some insane developers out there doing webdav, 
with @ having a special meaning, that will bite us in the ... future.


Leading '_' gave problems. '@' in ids has caused problems. So there is 
no reason to expect that a leading '@' won't at some time.


Only trouble is that it will be a problem in Zope 3 too.

Now that Twisted is put in front of Plone, we can also expect it to be a 
problem when Zope is used as a server for other services.


Eg. mirroring an imap folder structure from exchange. Which I am 
allready having some fun with in mxmImapClient. :-s


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [Zope3-dev] Re: Two visions?

2006-03-04 Thread Max M

Rocky Burt wrote:

On Fri, 2006-03-03 at 09:30 +0100, Max M wrote:


Benji York wrote:

If we want people outside of the zope community to use these components, 
they should not have the word zope anywhere in their name.  If it says 
zope people will *always* assume it is for use only with/inside Zope 
(Zope 2 more often than not).



Would we want people outside the community to do this?



We want as much as the python developer as possible to use pieces of
zope.  This means those pieces of zope will have had greater testing,
more reviewing, and ultimately, more people contributing.



I am *not* against other developers using bits of Zope. So I am sort of 
being the devils advocate here.


But everytime it is mentioned, it is allways mentioned as a purely good 
thing. But it is in fact not without cost.


Eg. conflicting interrests of 'external' and 'internal' users, or code 
that becomes more complex because of different use cases.


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Two visions?

2006-03-03 Thread Max M

Geoff Davis wrote:

No, I think I understood you.  I was being sloppy in my use of language. 
I should have said something more like Zope 3 then becomes an application

server built around the Zed library.


Or Zed is the part of Zope that can be used without Zope.



--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Two visions

2006-03-03 Thread Max M

Stefane Fermigier wrote:

Strange how (most of) the Plone people seem to be so quick in willing to
sacrifice the Zope brand :(



In out world Zope doesn't have a brand. Plone has a it. Most of our 
customers doesn't have a clue as to what Zope is.


As far as I can tell, Zope is a developers brand. No end users 
(customers) starts up with Zope anymore. Rather they go straight to 
Plone/CPS etc.


Splitting up Zope to let people use seperate pieces of Zope aka Zed is 
not a valid reason. Good software practise is a valid reason. But 
catering for those few developers that wants to use just a few pieces is 
probably not worth the effort.



Zope didn't become really popular before Plone/CPS etc. In my case 
customers are calling and asking for Plone solutions. Nobody where ever 
asking for Zope solutions! You had to push hard to make the customer use 
Zope instead of .asp/Java etc.



--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [Zope3-dev] Re: Two visions?

2006-03-03 Thread Max M

Benji York wrote:

Philipp von Weitershausen wrote:


Good point. There's the question: Does this zed thing need a different
name at all? If we want other people to pick it up, then it seems like a
good idea to distinguish it from Zope-the-app-server. Paul seems to
suggest that in his response.

How about zopelib?


If we want people outside of the zope community to use these components, 
they should not have the word zope anywhere in their name.  If it says 
zope people will *always* assume it is for use only with/inside Zope 
(Zope 2 more often than not).



Would we want people outside the community to do this?

Would it ever be an audience bigger than 5-10 developers somewhere who 
would even have different goals than the Zope community.


It is difficult enough right now to herd this flock of cats called Zope 
developers. Why would we want to make it even more difficult by adding 
other communities?


Personally I could not care less if Page Templates are used in 
TurboGears and other frameworks.


Splitting up software into chunks with few dependencies should be done 
because it is good software practice. Not to favour other communities.


We should rather make a cool stack that will include people in Zope. 
Please remember It is *still* the sexiest technology out there!


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Two visions

2006-02-27 Thread Max M

Dario Lopez-Kästen wrote:

Max M said the following on 2006-02-27 17:26:


Jim Fulton wrote:


2) In an alternate vision, Zope 2 evolves to Zope 5.




Zope 2 is complicated! It has too many layers of everything.



read the full sentence that Jim wrote:

  2) In an alternate vision, Zope 2 evolves to Zope 5.
 
...
 
   Note that Zope 5 will leverage Zope 3 technologies to allow a
   variety of configurations, including a Zope 2-like configuration
   with implicit acquisition and through-the-web development, and a
   Zope 3-like configuration that looks a lot like the current Zope
   3 application server.  Maybe, there will be a configuration that
   allows Zope 2 and Zope 3 applications to be combined to a
   significant degree.

In this scenario I cannot see how much of the old ways of zope2 remain 
(unless I have a totally unrealistic view of what Jim proposes). zope 2 
or zop3 become an issue of configuring which components/parts to use.



But he also says:

   - Zope 3 doesn't have to reproduce all Zope 2 features.

Which i fear could mean that the Zope 2 stack will hang in there for ever.

I am pretty shure that is not what he meant meant to imply, I just 
wanted to make my view clear.



--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [RfC] Removal of old stuff in Zope 2.10

2005-12-21 Thread Max M

Andreas Jung wrote:

Hi,



- Gadfly(DA) - do we really need this? We discussed this already. In my
  opinion the purpose of Gadfly is only educational but nothing that one
  really needs or uses for production. It could be removed and made
  available for download on zope.org.



-1

From time to time I teach classes on Zope. Often to people with an sql 
legacy. Most companies don't have a computer lab with similar machines, 
so often the educational software must be installed on the participants 
own machine. Which can be of any platform.


Using Gadfly as an educational tool is *very* practical. Eg. they can 
install Zope, and begin using sql at once.


Having to install postgres etc. just to teach about database connections 
etc. would be really impractical.



If there is another practical way to do it, that would be fine too. I 
don't know about sqllite. But if it's more difficulte than dropping a 
package into a directory it would be bad.


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Problems with PageTemplates on Zope 2.8

2005-06-27 Thread Max M

Morten W. Petersen wrote:

Hi,

I have an application called the Issue Dealer which I'm porting to Zope
2.8.  However, whenever I try to access a PageTemplate which makes use
of a page template macro it just hangs and consumes all available CPU.

Any ideas what could be wrong here, or how I could debug it?



Does the server or the client hang?

--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: BTrees and Persistance

2005-06-01 Thread Max M

Yair Benita wrote:


# I would really really like this to work
T[1].add(6)
T._p_changed = True
get_transaction().commit()


Why not use 'IOSet' in the BTrees package?

--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: brain.getObject and traversal

2005-03-31 Thread Max M
Chris Withers wrote:
Well, in 2.8, new behaviour is expected, right?
I really passionately believe that we should not be returnining None in 
Zope 2.8, and since 2.8 hasn't quite hit beta yet I'm very keen to see 
it fixed asap.

Any objections?
Most of my queries, where I need to wake up objects, has the form::
brains = catalog(portal_type='Document')
objects = []
for brain in brains:
try:
obj = brain.getObject()
if not obj is None:
objects.append(obj)
except:
pass
So it will not break any of my code, and I guess that most do something
similar.

Another thing is that I think that this pattern is so common that the
catalog should have a query method where brains are automatically
converted to objects. Like:
objects = catalog.getObjects(portal_type='Document')
That would be a handy time saver.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Problems with non-zope object attribute access

2005-03-11 Thread Max M
Dario Lopez-Kästen wrote:
but I still get
 The container has no security assertions. Access to 'lname' of 
(Products.pdbapi.person.Person instance at 0x03449DA0) denied. 

errors when I try to access the attributes of a person object in the list.
What about wrapping them with something like?
class AccessWrapper:
__allow_access_to_unprotected_subobjects = 1
def __init__(self, obj):
self._obj = obj
def __getattr__(self, attr):
return getattr(self._obj)
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Problems with non-zope object attribute access

2005-03-11 Thread Max M
Dario Lopez-Kästen wrote:
I have tried the following in my product class:
def _zopify(self, o):
# wrap object o in a an Acquisition.ImplicitAcquisitionWrapper
# add __allow_access_to_unprotected_subobjects = 1
# Return o
o.__allow_access_to_unprotected_subobjects = 1
return Acquisition.ImplicitAcquisitionWrapper(o, self)
and in my product code I do this.
plist = get_non_zope_person_object_list(...)
return [self._zopify(person) for person in plist ]

btw. if setting __allow_access_to_unprotected_subobjects = 1 on the 
object doesn't work, the ImplicitAcquisitionWrapper most likely sets it 
to something else.

have you tried changing the order?
w = Acquisition.ImplicitAcquisitionWrapper(o, self)
w.__allow_access_to_unprotected_subobjects = 1
return w
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: ZCatalog getObject broken

2005-03-11 Thread Max M
Roché Compaan wrote:
The rest of the discussion basically boils down to figure out if the
user is allowed to access C or not.
Hasn't it been raised allready that there is no way of knowing that?
A single method might be public, but the rest of the object is hidden.
What to do then? Just ignore the public method and use the objects 
overall visibility?

--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: ZCatalog getObject broken

2005-03-03 Thread Max M
Roché Compaan wrote:
I'm unsure about the security check in the patch below - I copied the
way restrictedTraverse does it. I read through validate in the default
security policy but it is one of those methods where all the security
implications doesn't fit in your head all at once.
--- CatalogBrains.py~   2004-03-23 22:27:23.0 +0200
+++ CatalogBrains.py2005-03-03 09:43:48.0 +0200
@@ -47,7 +47,11 @@
 (i.e., it was deleted or moved without recataloging), or if the
user is
 not authorized to access an object along the path.
 
-return self.aq_parent.restrictedTraverse(self.getPath(), None)
+obj = self.aq_parent.unrestrictedTraverse(self.getPath(), None)
+if obj and securityManager.validate(obj, obj, None, None):
+return obj
+else:
+return None

There is a method deep down in Zope somewhere called:
self.authenticated_has_access(obj)
I cannot find the definition on my local Windows install, so I assume 
it's defined in some c code somewhere.

Unfortunately there is no docs on the web either. Though there must have 
been at some time, as I would otherwise never have found it.

Hmm... that is odd.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: CatalogBrains since Zope2.7.1b1

2004-06-23 Thread Max M
Eric Brun wrote:
Hi,
I have a problem with 'getObject' method of CatalogBrains class on Zope271b1 : it's 
return None. But with a Zope2.7.0
my object is correctly find and returned. The permissions are right.
Probably an object has been deleted without being uncatalogued. This 
happens often. Either reindex the catalog, or take the None's into 
account in your code. The latter is the safest approach.

--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [ZODB-Dev] Re: BTrees strangeness (was Zope 2.X BIG Session problems - blocker - our site dies - need help of experience Zope developer, please)

2004-05-18 Thread Max M
Andrea Patuzzo wrote:
We are now randomly getting this kind of error:

Note: once the error happens, zope has to be restarted to function again.
Before applying patches we were getting get errors (instead of
__setitem__) and we just had to close browser to get back to work.

That's right. Under Plone 2.0 and Zope 2.7 I had the same kind of 
problem. But when I restarted the browser it would be solved.

That could point in the direction of a session id being somehow involved.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] How To run current Zope 2 3 from CVS on Windows

2004-05-03 Thread Max M
As I said, I would write a How-To in getting Zope 3 up and running on 
Windows, given the binaries that Tim has made.

http://www.mxm.dk/papers/run-z3-cvs-wthout-compiler/

Feel free to comment.

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: Should we require windows users to use tools that honor Unix line endings? (Re: [Zope-dev] Re: [Zope3-dev] ATTENTION! cvs to subversion transitiontomorrow)

2004-04-28 Thread Max M
Jim Fulton wrote:

I think the real answer, the answer that the svn (and arch) developers 
believe
in the heart of hearts is that windows users should be using tools that 
understand,
well, understand and always produce Unix line endings.

Is it practical to require windows users to use tools that understand 
and produce
Unix line endings?


It is not a problem, but it would be odd. Python don't make me do it. 
Why then should the version control system do it?

It's not difficult to find a Windows editor that understands unix line 
endings, but it would be very easy to forget to ocasionally convert dos 
files to unix.

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Demonstration subversion repository created

2004-04-28 Thread Max M
Jim Fulton wrote:
I've done a conversion of a snapshot of the CVS database from yesterday.
This is just to allow people to play with subversion and see what the 
respoitory
might look like when we do cut over.

To browse the respository:

  http://svn.zope.org/


It seems to have some kind of dns problem?

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Demonstration subversion repository created

2004-04-28 Thread Max M
Jim Fulton wrote:

Hm, I can get to it from a machine outside of ZC or Zope.org.

Is anyone else haveing troubles getting to it?
Now it's back up.

C:\ping svn.zope.org

Pinger cvs.zope.org [12.155.117.30] med 32 byte data:

Svar fra 12.155.117.30: byte=32 tid=100ms TTL=53
Svar fra 12.155.117.30: byte=32 tid=100ms TTL=53
Svar fra 12.155.117.30: byte=32 tid=100ms TTL=53
Svar fra 12.155.117.30: byte=32 tid=110ms TTL=53
Ping-statistikker for 12.155.117.30:
Pakker: Sendt = 4, modtaget = 4, tabt = 0 (0% tab),
Gennemsnitlig tid for rundtur i millisekunder:
Mindst = 100ms, størst =  110ms, gennemsnitlig =  102ms
regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Demonstration subversion repository created

2004-04-28 Thread Max M
Max M wrote:

Now it's back up.
And it works fine. Text files are in Unix format. As expected.

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: The bleak Future of Zope?

2004-04-25 Thread Max M
Joachim Werner wrote:

The problem of Zope 2 is - don't kill me for saying that - Plone. Plone 
and its foundations in CMF have created a large momentum around a 
terribly horrible code base. Believe me or not, almost everything gets 
more complicated with CMF/Plone than with plain Zope. Building a 
framework on top of a broken framework on top of an ageing framework 
that is hardly documented isn't a very good idea after all.


You are somewhat right. It's an absolute bitch to write Products for 
Plone. But it does shows what is actually needed for Zope to work as 
intended.

In plain Z2 You could write a lot of products, and they would all work 
fine on your site. But others could not easily download and use/try out 
the products.

What Plone really is a good example of, is the necessity of a practical 
reference implementation that all content types and tools can be tested 
up against.

It the light house that everything is steering towards. I believe that's 
the reason for it's succes.

It's hard to put a finger on exactly why it has become one. But 
obviously it has reached critical mass of being good enough for a lot 
of things. It is also flexible enough to be changed beyond recognition.

So both novice users and developers can use it with a lot of succes.

A short list of things that I think makes it an end user succes (even 
advanced developers are end users of others products):

The skin

Notably main_template.pt  plone.css. It is absolute paramount to have a 
flexible template/styleguide to write up against. It has to be pretty 
enough to be used in production site out of the box, and easy to change.

The CMS' skin apparently wasn't good enough.

A site can be layed ot in umpteen ways, but the Plone guys has said 
this is how we think it should look and function, and put a working 
example out there. Apparently that has been a very succesfull strategy.

There is also several layers at which it can be changed. From 
stylesheets to programming. So it can look completely different. But 
ther reference is allways there as a guide.

Installation

It is easy to install and try out new products, and they all work 
together, and all use the same skin. So if you install a new product it 
automatically has the look and feel of your site. Even though the site 
is heavily skinned.

Development process
---
Quick and non-bureaucratic. The Plone developers are pretty open for 
suggestions, and hang out on irc and maillists.

There is a shared repository (the collective) for 3'rd party products. 
Which gives a good sense of comunity



There is a lot of stuff that could be different in Plone, but on a basic 
level they got the right solution for making it possible to do 
distributed development of products that can still work together.



regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: The bleak Future of Zope?

2004-04-24 Thread Max M
Dieter Maurer wrote:

Lennart Regebro wrote at 2004-4-23 10:57 +0200:

But ah well, what is done is done. Too late to change the past now. :-0
There is no need to change the past.
You can start using CMFCore profitable in the future :-)
I also disliked the cmf concept, until I actually started using it 
seriously.

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Nightly Zope 3 Binary Compiles for WIndows

2004-04-24 Thread Max M
Chris Withers wrote:

Jim Fulton wrote:

FYI, there's a similar zip file now containing the same kind of thing 
for a
current Zope3 checkout (s/Zope2/Zope3/ in the URL).
If this is good enough for people trying to work from CVS on Windows, 
let me
know and I'll update them from time to time, and maybe move them to a 
saner location.

I'd be happy to set up a nightly (or weekly, let me know which would be 
better) scheduled task (see, it's Widnows, there is no Cron, although 
Schedules Tasks do have a much nicer UI ;-) ) that checked out he latest 
HEAD of Zope 3, compiled it and PUT it up to my Zope.org member area


I think that a nightly windows build would have a strong psychological 
effect.

I *did* manage to get Z3 compiled under Cygwin.

I had downloaded it to my Cygwin home directory with my TortoisCVS (win 
client). TortoiseCVS converts newlines to Windows newlines.

This, together with an apparent bug in PageTemplates or somesuch, gave 
me an error when I tried to go to a page in Plone. Are we missing a 
testcase here ;-)

It compiled fine, and all, but just couldn't show any pages.

When I downoaded it from CVS with the Cygwin command line client, it ran 
just as it should. I didn't need to do anything special.

I am writing an extensive How-To on this in any case. It's nice infor to 
have out there.

But I would rather run it from my normal Python under Windows. It would 
be easier in the long run I think.

I wouldn't mind writing a how-to for how to get that up and running  either.

I actually like writing technical documentation. Go figure.

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Nightly Zope 3 Binary Compiles for WIndows

2004-04-24 Thread Max M
Tim Peters wrote:

[Chris Withers]

Saw my name mentioned earlier but not sure whether Tim has solved the
problem...
Can't say -- I put up .pyds for current Zope 2 and Zope 3 HEAD, but haven't
heard whether anyone tried them.
I will. Early next week. Something came up friday.


I expect that would be helpful, and also helpful for the Zope 2 HEAD, but
it's not clear what you would upload.  For example, just the .pyds, or the
entire codebase, or...?
CVS clients are easy enough to get a hold on on Windows. The best 
solution would be if it was possible to get the Python sources from CVS 
and the compiled binaries from somewhere else.

The problem is the compilation part, for somebody like me that don't 
normally develop in c. I guess that many Zope developers are like me, 
but I don't know offcourse.

But it would also make it possible for most Zope users, to download and 
try out this Zope 3 thing, and get a feel for how it develops.

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: The bleak Future of Zope?!

2004-04-22 Thread Max M
Chris Withers wrote:

Andre Meyer wrote:

With respect to CMS, Plone archetypes are too simplistic for complex 
data/document types and customisation takes too much effort.
totally agree...
I have the same experience.

They keep refactoring how a single small (and relatively uninterresting) 
subset of problems can be solved. In the meantime all the products 
depending on the framework are in a perpetual state of broke.

Furthermore they keep forking the codebase and giving it new names.

I have a few Plone Products, and while it takes a bit to get the 
skeleton set up correctly, it is never that part of the product 
development that takes the most time.

After the setup I can then enjoy that I don't have to fight the 
constraints of a framework.

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: The bleak Future of Zope?

2004-04-22 Thread Max M
Tim Peters wrote:

[Max M]

Or perhaps an automated nightly Windows build.
[Stephan Richter]

We have talked about it many times before, but simply lack the
bandwidth. Maybe you could provide this for Cygwin?
[Max M]

Argh ... that wasn't fair.

Ok I will try and find some time to look into it.
A problem is that every platform has its own unique bag of miserable quirks.
Well, yeah. I installed cygwin and all the devolpment tools. About 800 
Megs. I could have sorted it, but I wouldn't risk missing libraries, 
tools etc. and harddisk is cheap.

Python compiled fine, both with and without ./configure --with-threads 
Z3 also compiled without a hickup.

But when I tried to go to http://localhost:8080; or 
http://localhost:8080/manage; I just got a  A system error occurred. 
message, and a the following log entry:

2004-04-22T08:47:13 ERROR root PageTemplateFile: Error in template: 
Compilation failed
exceptions.SyntaxError: invalid syntax (string, line 1)

Which is sort of non-helpfull.


Maybe this is (still) relevant to building Zope under Cygwin, maybe not:
http://www.zope.org/Members/dgeorgieff/howto_zope_cvs_on_cygwin/index_html
I didn't need to do all of that to get it build.


What exactly is needed?  I routinely compile Zope2 and Zope3 HEAD on
Windows, using MSVC 6.  I can't make time to set up a fancy snapshot
procedure, but if all people want is (e.g.) a zip file containing the .pyd
files, uploading those once a week wouldn't be a significant time sink.
AS far as I can see that should be enough. If the compiled files, in 
their directory structure, could just be dropped on top of the python 
structure from cvs/subversion I expect that would be enough?

As far as I can see from a quick manual scan of the directory structure 
that's how the code is structured now?

The compiled files are not under version control, and so would not be 
overwritten by updating from cvs/subversion.

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: The bleak Future of Zope?!

2004-04-21 Thread Max M
 that you cannot change to your liking. But 
it's a complex beast for flexible solutions. (That is why it is good for 
us consultants ;-) )


Maybe I'm simply sick of moving along within web
browsers and the file system without a sensible IDE
and documentation.
That might be it ;-)

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: The bleak Future of Zope?

2004-04-21 Thread Max M
Stephan Richter wrote:
Hi,

As stated before, I think that can be changed, if enough interest is shown in 
the community. But I think the Zope community lacks strong leaders; too many 
people are only interested in making money with it without realizing that 
their future depends on the general success and development of Zope.


That is not nessecarily mutually exclusive. But taking leadership is 
only possible if it is easy.

I doubt that Plone would have been a succes if it had followed the Zope 
release schedule ...


And that in itself is the problem. Making money is most important, securing 
the future is second. People don't care about the latter. :-(
Offcourse we do.

But we need to focus on a few areas. We cannot all develop frameworks.

Personally I serve my customers, and write content types for Plone. That 
is a full-time job right there.

I do take pride in making them well tested, and properly documented. I 
don't really see how I can do any more than that.


- The zope.org community site is a mess. Lots of outstanding problems are
not fixed, the performance
   of the site is more than poor (it takes ages to login, it takes ages to
load pages),
Stuff like performance is probably better off left to zc. It is very 
hardware specific, so on-site developers has a clear advantage.


   usability (e.g. when you perform a software release) is bad.
Yes!


Nobody is willing to contribute. ZC agreed to change zope.org to Plone so more 
community members can contribute. 
Well. The switch wasn't very well made. It has become more difficult to 
use. (Why do we need the default state to be private? Or perhaps trusted 
Members could get the reviewer role locally so that it would be easier 
to use.)

 But noone has stepped up; that's very sad.

Stepped up to do what? How do you step up? To me it seems like you will 
get the ability to have endless comitee meetings about how it should 
work. Not the power to just change stuff. Even if it breaks sometimes.

I have enough of that kind of work from my customers thank you ;-)

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: The bleak Future of Zope?

2004-04-21 Thread Max M
Stephan Richter wrote:


Concerning the release schedule, ZC has little to do with that for Zope 3. In 
fact, I have been release manager since this summer and I am responsible for 
the release schedule and packages. However, I decided not to release often, 
since again we do not have bandwidth to support the milestones. Since the CVS 
is as stable as any milestone release (we have tests for everything), 
releases are less important and it is much easier and less time consuming to 
support the current HEAD, which you can just download via the Web.
My only problem is that it is difficult to be an occasional developer 
in Z3 on Windows.

I normally don't develop in c. So I don't have Visual Studion installed.

I have downloaded the milestones and tried them out. But then I read 
about this and that *geddon, and think well guess I should wait for 
another version before I try it again.

I quickly feel out of sync in Z3.

If there was some way to have a Binary core that didn't change very 
often, and a Python only part that I could upload from cvs/subversion to 
be up to date, it would be much easier to use a few hours here and there 
to try out stuff in Z3.

Or perhaps an automated nightly Windows build.

I believe that Chris Withers is testing Z3 nightly on Windows. Right?

Would it be difficult to have that available as a download somewhere? It 
seems that zipping and uploading the test directory is enough.

Being able to grab the builds seems more important than the releases.


However, 
we are getting the first alpha out by the end of the month. Hopefully, by end 
of May we will have finished the X3.0 to-do list and will release the beta. 
At this point the API will freeze and application developers are encouraged 
to have look at it.
Great.

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Proposal: Move to subversion for source code control of

2004-04-11 Thread Max M
Jim Fulton wrote:

 I propose to move from CVS to subversion for the Zope and ZODB projects;

   http://dev.zope.org/Zope3/MovingSCMToSubversion
Not adding to the repository my voice should not carry much weight, but 
I absolutely love subversion here on Windows.

--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] How to create a product with all_meta_types and the

2004-03-12 Thread Max M
Garito wrote:

Hi Chris!

Want I want exactly is to create a product's object by his name
programmatically not by the construction form
Is this posible?


You cannot know the name of the constructor function, unless you read 
the source.

The constructors added to Zope during the product initialisation can be 
both forms and actual function methods. There is no way of knowing 
which. And there can be more than two.

So you would need to write a factory function based on the info you can 
get from the source. Ie. in an external method. Something like::

def portal_factory(self, parent, portal_type, id='', title='',):

Adds the content. A factory function.

# generate a general id
if id == '':
id = self.ZopeTime().strftime(portal_type + '_%Y%m%d_%H%M%S')
zope_factory = parent.manage_addProduct

# add the content
if 'Document' == portal_type:
zope_factory['Document'].manage_addDocumentAction(id)
elif 'Some Type' == portal_type:
zope_factory['Some Type'].manage_addSomeTypeAction(id)
else:
raise 'Error adding portal_type'
# get the newly added content
obj = getattr(parent, id)
# Add the title
obj.title = title
return obj

--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] How to create a product with all_meta_types and the

2004-03-12 Thread Max M
Garito wrote:

Hi Max
I understand what you explain but what about if I install a new product?
Rewrite the factory?
I think is not a good solution don't you think?
No, but I don't see any way around it. I could be wrong, though I don't 
think so.

--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Order of Form Keys in REQUEST

2004-03-10 Thread Max M
Sandra Chong wrote:

 How does Zope's REQUEST object decide what order to store the form keys?
 I've got a form with fields in order a, b, c, d - but in REQUEST.form,
 they're stored out of order.

 This is causing quite a big problem, as I'd like to dynamically 
output the
 form values in order after the form has been submitted.

Dictionary keys are unordered.

You need to store the order of the keys somewhere else. Ie. to have a 
list in your form with the keys in order, Or to name them alphabetically 
and then sort the keys.

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Order of Form Keys in REQUEST

2004-03-10 Thread Max M
Sandra Chong wrote:
Thank you so much. :D You guys are legends. I will try keeping a separate
ordered list and save it in the session for the form handler to refer to.
Many thanks again. :)


It is easier to save it in a hidden field in the form:

input type=hidden name=sorted_keys value=key1,key1,key3,key4

And then you can get it like (PythonScript):

sorted_keys = REQUEST['sorted_keys'].split(',')

But as far as I remember, a form keps the order of items in it, per the 
spec. So you could probably do:

tal:block tal:repeat=key sorted_keys
input type=hidden name=sorted_keys:list
   tal:attributes=key
/tal:block
Which you can get like (PythonScript):

sorted_keys = REQUEST['sorted_keys']

And I am pretty shure that they are in order. But I could be wrong, so 
the first approach is probably the safest.

Btw. These questions should really be asked on the Zope list, not 
zope-dev. zope-dev is for subjects regarding the development of zope, 
while the zope list is for development with Zope.

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Schizophrenic ObjectManager?

2004-03-04 Thread Max M
Ian Beatty wrote:

Another possibility is to maintain only one collection, but to create the
illusion of two separate collections by having two copies of the contents
('manage_main') page, each modified to display only one kind of child.


Two different views on the same model, like this, is bussiness as usual.

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Custom class: cut,copy,rename?

2004-03-01 Thread Max M
Ian Beatty wrote:

 Am I not inheriting from the proper set of base classes? Is there an 
easier
 way? According to the ZDG (2.4 edition, vs. my Zope 2.7),
 OFS.SimpleItem.Item (subclassed by OFS.SimpleItem.SimpleItem) is 
supposed to
 provide cut-and-paste functionality. So, how might I be breaking it?

The order of the parent classes matters. Ie. Some methods are defined in 
SimpleItem that returns None. Clipped from the source::

# This keeps simple items from acquiring their parents
# objectValues, etc., when used in simple tree tags.
def objectValues(self, spec=None):
return ()
objectIds=objectItems=objectValues
So if SimpleItem is before ObjectManager the traversal order of the 
parent objects will make shure that you get the wrong methods :-( So 
this will *not* work:

class aSimpleItem(
 CatalogAware, PropertyManager,
 SimpleItem.SimpleItem, ObjectManager):
This order works:

class aSimpleItem(
 CatalogAware, PropertyManager, SimpleItem):
class anObjectManager(
 ObjectManager, aSimpleItem):
regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] How to make Zope fail nicely under high load?

2004-02-12 Thread Max M
Bjorn Stabell wrote:

Okay, I'd better explain our situation in more detail, then.

The point is, our template is very dynamic, and our application (a BBS)
is very dynamic as well.  We have done one round of optimization
(basically making things as cacheable as possible) and after testing the
scalability now we're going to do another round of optimization,
tweaking the algorithm and removing as many ZCatalog searches as
possible.


If you are optimising for speed, there is nothing wrong with only making 
1 catalog query, and then format the page from that. If possible.

That is basically what php base boards do anyway.

Also if the page is that dynamic, and you need that much speed, maybe 
you shouldn't use zpt very much. You could generate the most critical 
pages from pure Python.

That would allow for a whole different bag tricks, but still be nicer 
than php.

Like caching a generated view and then replacing it vith a python 
generated board view.

def re_cache(self)
self.layout_cache = self.board_template(self, self.REQUEST)
def index_html(self):
 board_view = self.generate_board_view()
 return self.layout_cache.replace('%%board_view%%', board_view)


regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Bug? Handling of attribute names and default values

2003-11-14 Thread Max M
Tres Seaver wrote:

Can you double check that it is actually the default value, and not a
trailing empty line (I'm guessing that you are posting to 'addTeacher'
from a form with a control like:  'textarea
name=teachers:lines...').


The complete content of the form is below, and it is very simple. I am 
very certain that it is not the problem. I have also checked that it 
isn't an extra checkbox that has been sneaking in there.

I solved the problem by removing the line with the default value in the 
form, and changing the action method to::

def editTeachersAction(self, teachers=None, REQUEST=None):
Code
if not teachers:
teachers = []
Which is a better way to do it anyway. But that still leaves the bug in 
the form handling of Zope.

regards Max M



[a href=editBack/a]br/br/

div class=primary_h1Undervisere tilknyttet uv-forløbet/div
br
form action=editTeachersAction method=post name=form
  tal:define=allTeachers here/users/getAllTeachers
input type=hidden name=teachers:list:default value=

span tal:repeat=teacher 
python:here.uddan_teacher.getSmartList(here, allTeachers)
input type=checkbox name=teachers:list value=path
   tal:attributes=value teacher/path; checked 
teacher/selected
span tal:content=teacher/titletitle/spanbr
/span

br
br
input type=submit value= Gem 
/form










E.g, change the 'teachers:list:default' value to some other string, and
see if that value propagates.
Either way, as a robustness measure I would recommend adding some input
checking to 'addTeacher', e.g.:
def addTeacher( self, teachers ):

 Add one or more teachers.

teachers = filter( None, teachers ) # strip empty lines
# your processing here
Tres.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Bug? Handling of attribute names and default values in forms in 2.61 ??

2003-11-13 Thread Max M
I have a piece of code that looks like below. It has worked for a few 
years now. After upgrading to 2.61 it doesn't any more.

input type=hidden name=teachers:list:default value=

dtml-call REQUEST.set('teacherList', getAllTeachers())
dtml-in teacherList sort=title
input type=checkbox name=teachers:list
   value=dtml-var pathdtml-if selected checked/dtml-if
a href=dtml-var path/manage_maindtml-title;/abr
/dtml-in
I have tracked the problem to the default value always being added to 
the teachers list.

meaning that my action method:

def addTeacher(self, teachers):
print teachers
 ['some/path', '']

Where I would expect:

 ['some/path']

Isn't that a new behaviour? And isn't it a bug?

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Structured text img html tag not working properly in Zope 2.61

2003-11-12 Thread Max M
I have a site with lots of structured text.

There are many img src='/some/image' tags in the texts. But after 
upgrading from Zope 2.51 to Zope 2.61, I get broken images all over the 
place.

Example::

img src='images/kreativ.jpg' align='left'

This tag is turned into::

img src=%3Ccodeimages/kreativ.jpg align='left'gt;

While::

img src=images/kreativ.jpg align=left

is rendered correctly.

It used to work. Does anybody know why it doesn't? What is the easiest 
way to get around this.

It is not supposed to be illegal to put a tag like that into structured 
text, is it?

I think that the most likely culprit is the stx parser seing some part 
of the img tag as inlined code. Unfortunately I have not been able to 
hunt it down myself.

And it is a bit strange as there should be space around inline code.

Does anybody here has a clue what it can be, or in what files I should 
look for the problem?

The most likely files I found was::

\lib\python\StructuredText\ClassicStructuredText.py
\lib\python\StructuredText\DocumentWithImages.py
But the problem could easily be elsewhere.

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Structured text img html tag not working properly

2003-11-12 Thread Max M
Chris McDonough wrote:

 It's not a good idea to mix HTML and STX.. STX (at least using the
 DocumentWithImages class for the document) has its own notation for
 including image, e.g.

 DTML error message indicating that it cannot find a
 variable.:img:7-1:Figures/7-1.png


Yes. But I don't think that the image tag is the problem. I tried to 
change the HTML factory in StructuredText.py

from:

def HTML(aStructuredString, level=1, header=1):
st = Basic(aStructuredString)
doc = DocumentImages(st)
return HTMLNGImages(doc,header=header,level=level)
to:

def HTML(aStructuredString, level=1, header=1):
st = Basic(aStructuredString)
doc = Document(st)
return HTMLNG(doc,header=header,level=level)
So that it would use the old class.

But that changed nothing. It still rendered the html image tag as an error.

Also in the DocumentWithImages.py there is the regex:

def doc_img(
self, s,
expr1=re.compile('\([ 
_a-zA-Z0-9*.:/;,\-\n\~]+)\:img:([a-zA-Z0-9\_\-.:/;,\n\~]+)').search,
expr2=re.compile('\([ 
_a-zA-Z0-9*.:/;,\-\n\~]+)\:img:([a-zA-Z0-9\_\-.:/;,\n\~]+):([a-zA-Z0-9_\-.:/;,\n\~]+)').search
):

Suggesting at least that images should have the :img: to be recognised 
as an image tag.

So my second guess was that it is the in the ctag() function at line 335 
in ClassicStructuredText.py that the problem was. But I cannot find any 
problems with the regexs. Also a diff didn't show any significant 
changes in that file from 2.51 to 2.61

I don't understand it. Inline code should 'look like this'.

If there is no space before, it should not render as code.

ie. a tag='like this' should not render as code as there is no 
whitespace before it.

To quote the source:

- Text enclosed single quotes (with white-space to the left of the
  first quote and whitespace or punctuation to the right of the second 
quote) is treated as example code.

 It was only by accident that using HTML tags to place images into STX to
 work for you, unfortunately.
Ay, that sucks. Customers have been using it for 2-3 years now. And they 
have many many documents. I could write a converter, for converting it 
into the new image tag, but that would suck too.



regards Max M



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Renaming a product

2003-06-17 Thread Max M
Morten W. Petersen wrote:

 does anyone know how to rename a product, so that instances of the 
product
 stored in ZODB will work (with the new name) after the rename?

Your question does not compute ...

What part of the product do you want to rename? The meta_type? The 
title? The Id?

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] How (in)secure is Zope?

2003-03-13 Thread Max M
Jamie Heilman wrote:

In this sense Zope is again VERY secure.
   

No it isn't.
 

A statement like that without an argument is worthless in a discussion. 
You need to elaborate as we cannot read your mind and see what lies 
behind the statement.

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] product import question

2003-03-11 Thread Max M
Eric Roby wrote:

I attempted to restrict the meta_types in the class that is represented by
dbFolder to just prodA.  In order to gain access to the prodA add form, I
had to import the prodA module into the prodB module and make the assignment
in the class that is represented by dbFolder.  At this point the single
factory method was exposed in the dbFolder as expected.  Unfortuantely, the
constructor for prodA (action of the prodA add form) could not be found.
With numerous tweakings and source searching I settled on duplicating the
constructor function for prodA in the class that is represented by dbFolder.
Now it works.
You need to import the constructor methods and the assing them to local 
constructor methods.

I use something similar in my simpleProduct where I have a base module 
called mxmSimpleItem which has 2 constructors:

mxmSimpleItem.py

manage_addForm = HTMLFile('manage_addForm', globals())
def manage_addAction(self, id=None, REQUEST=None):
 some code

I then have another module mxmObjectManager which is similar to the 
first. So I also need the constructor in the module. Had they only been 
in the class, it would not have been a problem. But I just import them 
and assign them like:

mxmObjectManager.py

import mxmSimpleItem
manage_addForm = mxmSimpleItem.manage_addForm
manage_addAction = mxmSimpleItem.manage_addAction

Which is the right way to do it.

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Why is it _setObject(), and why is it undocumented

2003-02-01 Thread Max M
Lennart Regebro wrote:

From: maxm [EMAIL PROTECTED]


Usually a private method is used purely as a mean of implementation. And
should never be called from other objects. This is not the case here, as
the method is clearly a part of the api.



Well, no, it isn't really, since it starts with _. However, python do not in
itself enforce privacy, so therefore you *can* call it. But by starting it
with _ it is private by convention. Zope also implements some of this
privacy, so you can't call it from Python scripts and so on.


Sorry but I don't see that. How on earth are you suposed to add an 
object to an objectmanager, if you don't use _setObject() ??

Every time you make an object that subclasses ObjectManager, wich is 
often, you need to use that function. That can hardly be called private.


--

hilsen/regards Max M Rasmussen, Denmark

http://www.futureport.dk/
Fremtiden, videnskab, skeptiscisme og transhumanisme


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Plone/Metadata/FUD

2002-10-03 Thread Max M

Paul Everitt wrote:
 
 ...this.  How can we listen to you if you're not participating?  But to 
 your point: the Zope community does not want, IMO, Zope and CMF merged. 
  Content management is a piece of the Zope pie, not the whole pie.


And sooo right you are. If Zope became the CMF or Plone I would drop it 
in an instance.

There are so many wonderfull things that can be done in Zope, when it is 
as it is now. And many of the things does not fit into the cmf frame of 
mind.

Ie. I have a completely different idea as to how things should be done 
in Zope than how the CMF do it.

When you start making a concrete implementation of something you make 
some decissions in the beginning, and those decissions influence how you 
make the rest of your decissions.

So you get this complex web of layers of decissions that depends on each 
other.

You sort of paint yourself into a corner. An evolutionary dead-end so to 
speak.

If Zope gets forced to go in one different direction, like CMF, it will 
quickly hit an evolutionary dead end.



regards Max M


-- 

The reason I don't reach any higher is that I stand on the shoulders of 
midgets.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] I/O Error

2002-09-09 Thread Max M

Myroslav Opyr wrote:


 When running one of development servers (Zope 2.5.1, Python 
 2.1.3+freebsdPatch) Several times I've got I/O Error exception page 
 when trying to render random ZMI  page. Retrying always succeeds... I 
 was not able to get traceback so far (it is in HTML comments).
 
 Any ideas what that can be?


If you have started Zope without a terminal for it to output it's errors 
and alerts to, it can do that.

On Linux you should start it with a nohup ./start -D ... etc.

regards Max M

 evolve
   


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Future of StructuredText

2002-09-05 Thread Max M

Richard Jones wrote:

One of the big issues is that rest isn't optimised. I don't know what the 
scope is for optimising rest, nor have I got any real benchmark numbers. The 
emphasis so far has been to build it to spec. It's potentially much slower 
than stx because the latter has been around for longer and therefore is 
potentially more tweaked. The ReStructuredText Document works because I 
compile the source text into HTML when it's written. Nice and fast, and works 
well in content management environments. In the above DTML tag usage though, 
you'd want content to be quite small or the performance hit could be large.


Well I have seen the alternative... and it isn't nice!

The users happily paste in 300KB of obscure html from word.

Html that is about 15 KB when run through Tidy that is!

Besides, most of the stx documents I see my users paste in in real life 
is a few KB worth of text. Max... And the advantage is that REST has a 
syntax that is much closer to what ordinary users expect.

In userland indentation is actually a hard problem.


regards Max M



Skeptic Effect or the Randi Effect
When a skeptic is near, supernatural effects seem to disappear.
  
evolve
  




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Speaking of Structured Annoyances

2002-09-05 Thread Max M

Jeffrey P Shell wrote:

Um, how does one escape * in STX-NG?  As in - what if one is entering an
equation inline like 2 * 2 * 3 = 12?  Or, does one just fall back on using
x?
  


I don't remember the inline code markup, but isn't it something like:

'2 * 2 * 3 = 12'

Or perhaps backticks?


regards Max M



Skeptic Effect or the Randi Effect
When a skeptic is near, supernatural effects seem to disappear.
  
evolve
  




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Future of StructuredText

2002-09-04 Thread Max M

Andreas Jung wrote:

I would be fine to have reStructuredText inside the Zope core (for 2.7)
and to deprecate the current StructuredText in the long run.


+1

Open points: how to migrate exisiting STX documents to reStructuredText
  


Wouldn't the simplest solution be:

dtml-var content format=rest  ???

Then we could use both interchangably.


regards Max M



Skeptic Effect or the Randi Effect
When a skeptic is near, supernatural effects seem to disappear.
  
evolve
  




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Relations

2002-09-02 Thread Max M

Jens Bjerre wrote:

Can anyone please explain to me, how it's possible to make relations
using ZClasses.
Let's say that i would like to make a product catalog with x numbers of
pictures, and sometimes no pictures. I guess it's something about making
a ZClass wich can contain objects???
  

In that case you can subclass an objectmanager.

But if the pictures should be shared between different products this approach can be a 
problem.

If you want to share images you should put them in their own folder and then store a 
list of paths in your product, to the images you want to relate to an object, or you 
could use the mxmRelations product.



regards Max M



Skeptic Effect or the Randi Effect
When a skeptic is near, supernatural effects seem to disappear.




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Relations

2002-09-02 Thread Max M

Jens Bjerre wrote:

Hi
 
Actually for this project, i would like to just store the pictures
under the product, and then have some kind of DTML-Method to show
the product with the pictures.

Then you should just create a zClass and subclass Objectmanager as the first class. 
You can also choos subbobjects to have the meta_type 'Image' so that only images can 
be put into the folder.

But I would _strongly_ recommend that you use a Python Product instead of a zClass.

See mxm_EasyProduct at:
http://www.zope.org/Members/maxm/HowTo/easyProduct

which is able to do everything you want to from the get-go.


Hav en god dag!


regards Max M

  
evolve
  




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] DTML and REQUEST data changes about to be checkedin

2002-08-13 Thread Max M

Jim Fulton wrote:

 The plan is to release 2.6 as soon as we can. We're really busy with a 
 bunch of
 customer work and haven't had as much time to work on this as we'd like.


Well actually this is more comforting than if you had a lot of time on 
your hands ;-)

regards Max M

-- 

Sorry I would Really Like To Help More On This Project,
But Am To Busy Doing Paid Work On A Tight Deadline
Max M





___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Changes to ZCatalog

2002-06-13 Thread Max M

Casey Duncan wrote:

I made several changes yesterday to ZCatalog that may be of interest to
you if you have a product that subclasses or embeds ZCatalogs/Catalogs.

snip
  


Hmm ... I have subscribed to zope-dev for the longest time now, and as 
far as I remember this is the first time I have seen a simple and 
concise explanation of a change taking place.

I wonder where this information usually is dissiminated. I would imagine 
that zope-dev should be filled with information like this, but it very 
rarely is.

Is information about Zope development only discussed orally at zope.com, 
or is attached as comments in the cvs, or where do you guys keep each 
other up to date about changes taking place?

regards Max M

-- 

Sorry I would Really Like To Help More On This Project,
But Am To Busy Doing Paid Work On A Tight Deadline
Max M






___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Restricting Sub-Objects in Folders DYNAMICALLY?

2002-03-16 Thread Max M

Brian Oliver wrote:

 For example:  I'd like to restrict the number of a certain type of 
 object that may appear in a folder.  The end-user can add up to the 
 limit, and afterwards the object type should NO LONGER APPEAR in the 
 Add List.


If you put this in your product:

def all_meta_types(self):
 What types can you add to this objectManager? 
allowedMetaTypes = ('DTML Document', 'DTML Method')
result = []
for metaType in Products.meta_types:
if metaType['name'] in allowedMetaTypes:
result.append(metaType)
return result

You can probably modify it to your needs.

regards Max M




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Modifying a menu

2002-03-14 Thread Max M

Marcia Perry wrote:

Where in the Zope src is the menu labeled Select type to add... created?

Generally you cannot change this menu. At least not in the standard Zope 
management interface. A Zope with a management interface that was 
handicapped in this way could also be pretty dangerous.

You can however do it in your own products. So if you want your user to 
be able to only add some kind of objetcs in a folder, you create a 
ZClass or a Python products. Then you can decide which products can be 
added to your own folder.

If you create a ZClass you should just subclass ObjectManager, and then 
inside the product there will be a tab called Subobjects where you can 
select possible legal objects that the user can add.

-

If you really want to get dirty. Which I would *strongly* advice 
against, you must look in:

ZOPE\lib\python\OFS\ObjectManager.py

and overwrite all_meta_types(). This functions returns a list of 
tuples, telling which objects to be added to the add * selectbox.

But it WILL bite you later.

For further info google for meta_types and all_meta_types

regards Max M


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Putting a list of objects into the current namespace (or something)

2002-03-12 Thread Max M

I am trying to create a virtual folder.  It should get a list of 
objects from somewhere else ie. a Catalog query and then act as if the 
objects exists in that folder.

If the objects existed in this structure:

/
   Members/
  member1/
 doc1
 doc2
  member2/
 doc3
 doc4

I want to show the objects in a new context, like:

/
   news/
  doc1
  doc3
   articles/
  doc2
  doc4

So an url like /news/doc1 should actually show doc1 from 
/Members/member1/doc1 transparently.

Has anybody got any pointers as to how I could do this best ? My idea is 
either to subclass ObjectManager and overwrite __getitem__(), or to 
find a way to push my objectlist onto the request object.

Any better ideas? Pointers to code that does something similar?

regards Max M


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Putting a list of objects into the current namespace (or something)

2002-03-12 Thread Max M

Leonardo Rochael Almeida wrote:

Look for the PathHandler product on zope.org:
http://www.zope.org/Members/NIP/PathHandler

or the AccessRule symlink recipe in zopelabs.com:
http://www.zopelabs.com/cookbook/1003844578

Also, if you acces an URL that 'walks thru' a PythonScript, say:

http://example.com/path/to/MyPythonScript/some/extra/path

the MyPythonScript PythonScript will be called and will possess a
variable 'traverse_subpath' (depending on what you set on the 'Bindings'
tab) with the list of path segments after it's own name (in this case
['some','extra','path']


Thanks, but I don't think my problem should be solved by manipulating 
paths. Rather I need to push a list of objects into the current namespace.

Here is some sseudocode for how I believe it to be:

def __getattr__(self, name):
# build temp namespace
objList = getObjectsFromAllOverTheSite() # ;-)
for obj in objList:
linkedObjects[obj.getId()] = obj

if linkedObjects.has_key(name):
return linkedObjects[name]
else:
return getattr(self, name)

I am just pretty unshure about this approach though, so I am fishing for 
anything like it. The closest thing I have found was in the Transparent 
Folder product.

regards Max M


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )