Olá,

Estou com problemas para usar classes associativas no Plone.
Ao tentar associar objetos ocorre um erro(trace abaixo) e a associação não
é efetivada.

Utilizei o Poseidon 4.1 para modelar as classes:
- Questao
- Prova
- ConfiguracaoDeQuestao (classe associativa entre Prova e Questao)

Utilizei o AGX 1.5.0 do svn

Como o procedimento é descrito no ArchGenXML Getting Started[1]
imaginei que houvesse algum problema na versão de Plone que estava usando.
Testei então nas versões:

Zope2.8.4 + Plone2.1.2
Zope2.8.4 + Plone2.1.3
Zope2.9.3 + Plone2.5

e o erro persistiu em todas.

O schema da classe Prova parece coerente:

schema = Schema((

          ReferenceField(
              name='Questoes',
              referenceClass=ContentReferenceCreator('ConfiguracaoDeQuestao'),
              widget=ReferenceWidget(
                  label='Questoes',
                  label_msgid='PloneProvas_label_Questoes',
                  i18n_domain='PloneProvas',
              ),
              allowed_types=('Dissertativa', 'MultiplaEscolha', 'Redacao', 'GrupoDeQuestoes'),
              multiValued=1,
              relationship='ConfiguracaoDeQuestao'
        ),
    ),
 )


Alguém tem idéia do que seja?

[1] - http://plone.org/documentation/tutorial/archgenxml-getting-started/relationships

[]s
Daniel Vainsencher

Traceback (innermost last):
  Module ZPublisher.Publish, line 115, in publish
  Module ZPublisher.mapply , line 88, in mapply
  Module ZPublisher.Publish, line 41, in call_object
  Module Products.CMFPlone.FactoryTool, line 369, in __call__
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish , line 41, in call_object
  Module Products.CMFFormController.FSControllerPageTemplate, line 96, in __call__
  Module Products.CMFFormController.BaseControllerPageTemplate, line 39, in _call
  Module Products.CMFFormController.ControllerBase , line 243, in getNext
  Module Products.CMFFormController.Actions.TraverseTo, line 36, in __call__
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 41, in call_object
  Module Products.CMFFormController.FSControllerPythonScript, line 107, in __call__
  Module Products.CMFFormController.Script, line 141, in __call__
  Module Products.CMFCore.FSPythonScript, line 108, in __call__
  Module Shared.DC.Scripts.Bindings, line 311, in __call__
  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  Module Products.CMFCore.FSPythonScript, line 164, in _exec
  Module None, line 1, in content_edit
   - <FSControllerPythonScript at /desenvolvimento/content_edit used for /desenvolvimento/portal_factory/Prova/prova.2006-07-17.2405544765>
   - Line 1
  Module Products.CMFCore.FSPythonScript, line 108, in __call__
  Module Shared.DC.Scripts.Bindings, line 311, in __call__
  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  Module Products.CMFCore.FSPythonScript, line 164, in _exec
  Module None, line 11, in content_edit_impl
   - <FSPythonScript at /desenvolvimento/content_edit_impl used for /desenvolvimento/portal_factory/Prova/prova.2006-07-17.2405544765>
   - Line 11
  Module Products.Archetypes.BaseObject, line 643, in processForm
  Module Products.Archetypes.BaseObject, line 632, in _processForm
   - __traceback_info__: (<Prova at /desenvolvimento/prova.2006-07-17.2405544765>, <Field Questoes(reference:rw)>, <bound method Prova.setQuestoes of <Prova at /desenvolvimento/prova.2006-07-17.2405544765>>)
  Module Products.Archetypes.utils, line 159, in mapply
  Module Products.Archetypes.ClassGen, line 78, in generatedMutator
  Module Products.Archetypes.Field , line 1678, in set
   - __traceback_info__: (<Prova at /desenvolvimento/prova.2006-07-17.2405544765>, 'fa288ab1d942c0ce80bd006a2981b319', ['fa288ab1d942c0ce80bd006a2981b319', ''], [])
  Module Products.Archetypes.ReferenceEngine , line 363, in addReference
  Module Products.Archetypes.ReferenceEngine, line 196, in addHook
  Module Products.CMFCore.TypesTool, line 934, in constructContent
  Module Products.CMFCore.TypesTool, line 345, in constructInstance
  Module Products.CMFCore.TypesTool, line 357, in _finishConstruction
  Module Products.CMFCore.CMFCatalogAware, line 145, in notifyWorkflowCreated
  Module Products.CMFCore.WorkflowTool, line 354, in notifyCreated
  Module Products.CMFCore.WorkflowTool, line 699, in _reindexWorkflowVariables
  Module Products.CMFCore.CMFCatalogAware, line 118, in reindexObjectSecurity
  Module Products.ZCatalog.CatalogBrains, line 52, in _unrestrictedGetObject
  Module OFS.Traversable, line 187, in unrestrictedTraverse
   - __traceback_info__: (['content'], 'e0ae053780b92f8b0a4047f640ae47bb')
  Module Products.Five.traversable, line 115, in __bobo_traverse__
AttributeError: e0ae053780b92f8b0a4047f640ae47bb
__._,_.___

Para enviar uma mensagem: zope-pt@yahoogrupos.com.br
Para desistir envie uma mensagem em branco para: [EMAIL PROTECTED]




Yahoo! Grupos, um serviço oferecido por:
PUBLICIDADE


Links do Yahoo! Grupos

__,_._,___

Responder a