RE: [Zope] with a variable
// I want to get some properties for a zclass instance after being // passed its // id in a variable. In these tests I have been defining the varible in the // code, in the final case it will be passed through the url. // // Using the id directly as above works fine, it writes the // attribute to the // page. // // Thanks for any help, // // Josh On Hi Josh, I'm kinda new to this stuff, but I think I am doing something similar to what you need. I have a DTML method that grabs a ZCLass object's id from the query string and uses it to gain access to that ZCLass object. It looks like I'm generating the id's the same way you are (not that that matters...) I do it like this: The URLs look something like this: addUserToEvent?977952867 where 977952867 is the id of the ZClass object I want to work with and the "addUserToEvent" method has this in it: ...Do stuff with the ZClass reference here... I hope that helps. Eric. ___ 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] with a variable
josh on writes: > This interprets "979226100" as a name! > > > > This doesn't: > This interprets "979226100" as an integer. You could use Dieter ___ 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] with a variable
I got it to work thanks for the help! it was the cobination of no quotes around the the userid AND setting the variable as a string not an integer! arrrggghh... thank godness, now I can have lunch. josh on ___ 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] with a variable
thanks Steve and Rick, Unfortunately both your solutions brought up this error: Error Type: SystemError Error Value: bad argument to internal function > > > > > or > > > This works: > > > > > > I want to get some properties for a zclass instance after being passed its id in a variable. In these tests I have been defining the varible in the code, in the final case it will be passed through the url. Using the id directly as above works fine, it writes the attribute to the page. Thanks for any help, Josh On ___ 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] with a variable
I want to read an zclass instances' properties. I want to make some dtml that can be passed the instances' id then give me the properties that I request. I was trying and it worked when I plugged the id striaght into it, but when I tried substituting that with a dynamic varible I couldn't get it to work. I have been trying some other approaches that maybe someone could tell me if I am on the right track or if there is some cumentaion that could help me out. I have been going through the list archives for hours! here is a my latest failed attempt! I know that I could use the Catalog, but it seems crazy to have to track everyvariable property of an object that I want to access. I am sure that this is a basic problem and would love some help with it. josh on ___ 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] with a variable
How about this: or -steve > > Hi, > > a small problem!, > > This works: > > > > > This doesn't: > > > > > > Nor this: > > > > > > Nor this: > > > > > > What I want to do is have a varible passed to the page which says what > zclass instance to get the properties of. > > any help appreciated. > > josh on > > > === > write: [EMAIL PROTECTED] > read: www.futurefarmers.com > read: www.crd.rca.ac.co.uk/~josh > interrupt (i love it): (415) 552 2124 > = > > > ___ > 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 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 )