Forum OpenACS Q&A: Re: Learning to use XOTcl

Collapse
7: Re: Learning to use XOTcl (response to 1)
Posted by Dave Bauer on
I am not sure I understand the question.

I don't recommend trying to change the object type of an object once created. There has to be a better way.

I don't see any inherent reason why xowiki could not access any acs_object in the system, so I am not sure what you are trying to accomplish.

Most likely what you want is an xowiki::Image type that subtypes image. This should allow you to extend it with any behavior specific to xowiki that you might need.

Collapse
8: Re: Learning to use XOTcl (response to 7)
Posted by Richard Hamilton on
In order for objects to be visible to xowiki, I thought they would have to subtype a ::xowiki::CrClass so that they have the necessary characteristics to be accessible.

What I think we want to do is have a means of uploading image files to a folder within xowiki (as a bulk upload in a tar or zip file eventually) and have the CR recognise them as images and apply the specified resizing according to a parameter set either in the xowiki instance or passed in the includelet declaration.

I am not clear at this stage how that should best be done.

(I wasn't actually proposing changing the object type as any kind of solution, I was just playing around to try to understand how objects in the CR might be made accessible to xowiki. Trying the learn by trial and error really. More error than trial I guess! The oo stuff is new to me so I am not able to think oo clearly yet 😊 ).