Re: iTools Layout - Some help for once :-) [message #48159 is a reply to message #47823] |
Thu, 30 March 2006 17:47  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
Antonio Santiago wrote:
> Thanks for the tip James.
>
> I just take a look at DoSetProperty, and I saw it uses the SET_PROPERTY
> service that is nothing mora than an operation (IDLitopSetProperty) and
> , also it uses de CommandBuffer to bring redo/undo options.
>
> I have a problem with this (the undo/redo) method because in my program
> I don't want to offer this possibility, and also I dont want to use
> extra space storing the previous value of a property or an image. If you
> know some tips to avoid the command buffer I will appreciate to you a lot.
You can bypass doSetProperty by using setProperty directly on the object
whose properties you want to modify. Remember that doSetProperty is a
method of the tool object which takes an argument that is the identifier
of the component whose properties you are changing. This would be like:
status = oTool->doSetProperty(id, 'COLOR', [255, 0, 0])
If you want to use setProperty directly, then use getByIdentifier method
of the tool like:
oComponent = otool->getByIdentifier(id)
oComponent->setProperty, COLOR=[255, 0, 0]
to get the object reference of the component. This bypasses the
undo/redo system.
-Mike
|
|
|