[Zope] 'selection' and 'multiple selection' property types

Martijn Pieters mj@antraciet.nl
Thu, 08 Jul 1999 11:00:11 +0200


--=====================_235723242==_
Content-Type: text/plain; charset="us-ascii"; format=flowed

At 08:17 08/07/99 , Alex Rice wrote:
>Cool! You are really good at explaining this stuff, Martijn. I also
>learned a lot from your earlier post about inheriting from Object
>Manager. Thanks...

You're welcome.


>I'm not very experienced with diff and friends, but I can't apply this
>patch. I tried it against 2.0a3 and the latest CVS version... oh,
>properties.dtml hasn't changed recently anyways :-) Am I applying it
>wrong? My properties.dtml is 5169 bytes.
>
>    [alex@monsoon OFS]$  patch --verbose -p0 < properties.dtml.patch
>    Hmm...  Looks like a new-style context diff to me...
>    The text leading up to this was:
>    --------------------------
>    |*** properties.dtml~    Wed Jul  7 15:37:41 1999
>    |--- properties.dtml     Wed Jul  7 16:18:08 1999
>    --------------------------
>    Patching file `properties.dtml' using Plan A...
>    Hunk #1 FAILED at 64.
>    Hunk #2 FAILED at 73.
>    2 out of 2 hunks FAILED -- saving rejects to properties.dtml.rej
>    Hmm...  Ignoring the trailing garbage.
>    done

Ermm..

I could *&*^%$& IRIX diff...

Try the attached file

--=====================_235723242==_
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: attachment; filename="properties.patch"
Content-Transfer-Encoding: quoted-printable

*** properties.dtml     1999/05/24 14:48:06     1.33=0A--- properties.dtml  =
   1999/07/08 08:53:24=0A***************=0A*** 64,90 ****=0A   =
 "getProperty(id)"--><!--#var sequence-item--><!--#if=0A    =
 sequence-end--><!--#else--><!--#var=
 "'\n'"--><!--#/if--><!--#endin--></textarea>=0A    <!--#elif=
 "type=3D=3D'selection'"-->=0A!     <!--#if "_.has_key(select_variable)"-->=
=0A      <select name=3D"<!--#var id-->">=0A!       <!--#in=
 "_[select_variable]"-->=0A           <option=0A            <!--#if=
 "_['sequence-item']=3D=3DgetProperty(id)"-->SELECTED<!--#/if-->=0A         =
   ><!--#var sequence-item--></option>=0A        <!--#/in-->=0A     =
 </select>=0A      <!--#else-->=0A!        No value for <!--#var=
 select_variable-->=0A      <!--#/if-->=0A    <!--#elif "type=3D=3D'multiple=
 selection'"-->=0A!     <!--#if select_variable-->=0A      <select=
 name=3D"<!--#var id-->:list" multiple=0A!       size=3D"<!--#var "_.min(7,=
 _.len(_[select_variable]))"-->">=0A!       <!--#in "_[select_variable]"-->=
=0A           <option<!--#if=0A           "_['sequence-item'] in=
 getProperty(id)"--> SELECTED<!--#endif=0A           -->><!--#var=
 sequence-item--></option>=0A        <!--#/in-->=0A      </select>=0A     =
 <!--#/if-->=0A    <!--#else-->=0A    <em>Unknown property type</em>=0A---=
 64,92 ----=0A    "getProperty(id)"--><!--#var sequence-item--><!--#if=0A   =
  sequence-end--><!--#else--><!--#var=
 "'\n'"--><!--#/if--><!--#endin--></textarea>=0A    <!--#elif=
 "type=3D=3D'selection'"-->=0A!     <!--#if "_.has_key(_[id +=
 '_select_variable'])"-->=0A      <select name=3D"<!--#var id-->">=0A!      =
 <!--#in "_[_[id + '_select_variable']]"-->=0A           <option=0A         =
   <!--#if "_['sequence-item']=3D=3DgetProperty(id)"-->SELECTED<!--#/if-->=
=0A            ><!--#var sequence-item--></option>=0A        <!--#/in-->=0A =
     </select>=0A      <!--#else-->=0A!        No value for <!--#var "_[id +=
 'select_variable']"-->=0A      <!--#/if-->=0A    <!--#elif "type=3D=3D'mult=
iple selection'"-->=0A!     <!--#if "_.has_key(_[id +=
 '_select_variable'])"-->=0A      <select name=3D"<!--#var id-->:list"=
 multiple=0A!       size=3D"<!--#var "_.min(7, _.len(_[_[id +=
 '_select_variable']]))"-->">=0A!       <!--#in "_[_[id +=
 '_select_variable']]"-->=0A           <option<!--#if=0A          =
 "_['sequence-item'] in getProperty(id)"--> SELECTED<!--#endif=0A          =
 -->><!--#var sequence-item--></option>=0A        <!--#/in-->=0A     =
 </select>=0A+     <!--#else-->=0A+        No value for <!--#var "_[id +=
 'select_variable']"-->=0A      <!--#/if-->=0A    <!--#else-->=0A   =
 <em>Unknown property type</em>=0A
--=====================_235723242==_
Content-Type: text/plain; charset="us-ascii"; format=flowed

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------
--=====================_235723242==_--