Roassal-Woden dynamically change an element height without redrawing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Roassal-Woden dynamically change an element height without redrawing

Lusa Nicolas
Hi folks!

I am working with Roassal-Woden and I want to dynamically change the size of an element already drawn and already added to my view. This could be overcome simply by drawing a new element on top of the current one but works only for bigger elements.
What if I want to take the current one and simply change it?

Here is what I thought would be working but it isn't:

shape height: aValue.
element changed.

Where shape is my RWShape (a RWCube in my case) and element is the shape element (an RWElement).
The curious thing is that this code is actually working for the color:

shape color: aWDColor.
element changed.

Any tips on what is wrong about my code?

Cheers,
Nicolas

Reply | Threaded
Open this post in threaded view
|

Re: Roassal-Woden dynamically change an element height without redrawing

abergel
Hi Lusa,

This was missing. Please update Woden (Core & Roassal) and you can do:
-=-=-=-=-=-=-=-=-=-=-=-=
v := RWView new.

e := RWCube element.

v add: e.

e when: RWMouseButtonDown do: [ :evt |
        evt element shape width: 2.
        evt element shape height: 2.
        evt element shape color: WDColor green.
       
        e changed.
].
^ v
-=-=-=-=-=-=-=-=-=-=-=-=

Let us know how this goes

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



> On May 11, 2015, at 8:19 AM, Lusa Nicolas <[hidden email]> wrote:
>
> Hi folks!
>
> I am working with Roassal-Woden and I want to dynamically change the size of an element already drawn and already added to my view. This could be overcome simply by drawing a new element on top of the current one but works only for bigger elements.
> What if I want to take the current one and simply change it?
>
> Here is what I thought would be working but it isn't:
>
> shape height: aValue.
> element changed.
>
> Where shape is my RWShape (a RWCube in my case) and element is the shape element (an RWElement).
> The curious thing is that this code is actually working for the color:
>
> shape color: aWDColor.
> element changed.
>
> Any tips on what is wrong about my code?
>
> Cheers,
> Nicolas
>


Reply | Threaded
Open this post in threaded view
|

Re: Roassal-Woden dynamically change an element height without redrawing

Lusa Nicolas
Hi,

thank you it works now.

Cheers,
Nicolas


On May 11, 2015, at 5:54 PM, Alexandre Bergel <[hidden email]> wrote:

> Hi Lusa,
>
> This was missing. Please update Woden (Core & Roassal) and you can do:
> -=-=-=-=-=-=-=-=-=-=-=-=
> v := RWView new.
>
> e := RWCube element.
>
> v add: e.
>
> e when: RWMouseButtonDown do: [ :evt |
> evt element shape width: 2.
> evt element shape height: 2.
> evt element shape color: WDColor green.
>
> e changed.
> ].
> ^ v
> -=-=-=-=-=-=-=-=-=-=-=-=
>
> Let us know how this goes
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>> On May 11, 2015, at 8:19 AM, Lusa Nicolas <[hidden email]> wrote:
>>
>> Hi folks!
>>
>> I am working with Roassal-Woden and I want to dynamically change the size of an element already drawn and already added to my view. This could be overcome simply by drawing a new element on top of the current one but works only for bigger elements.
>> What if I want to take the current one and simply change it?
>>
>> Here is what I thought would be working but it isn't:
>>
>> shape height: aValue.
>> element changed.
>>
>> Where shape is my RWShape (a RWCube in my case) and element is the shape element (an RWElement).
>> The curious thing is that this code is actually working for the color:
>>
>> shape color: aWDColor.
>> element changed.
>>
>> Any tips on what is wrong about my code?
>>
>> Cheers,
>> Nicolas
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Roassal-Woden dynamically change an element height without redrawing

abergel
You need to update GT-InspectorExtensions also

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On May 11, 2015, at 11:02 AM, Lusa Nicolas <[hidden email]> wrote:

Hi,

thank you it works now.

Cheers,
Nicolas


On May 11, 2015, at 5:54 PM, Alexandre Bergel <[hidden email]> wrote:

Hi Lusa,

This was missing. Please update Woden (Core & Roassal) and you can do:
-=-=-=-=-=-=-=-=-=-=-=-=
v := RWView new.

e := RWCube element.

v add: e.

e when: RWMouseButtonDown do: [ :evt |
evt element shape width: 2.
evt element shape height: 2.
evt element shape color: WDColor green.

e changed.
].
^ v
-=-=-=-=-=-=-=-=-=-=-=-=

Let us know how this goes

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On May 11, 2015, at 8:19 AM, Lusa Nicolas <[hidden email]> wrote:

Hi folks!

I am working with Roassal-Woden and I want to dynamically change the size of an element already drawn and already added to my view. This could be overcome simply by drawing a new element on top of the current one but works only for bigger elements.
What if I want to take the current one and simply change it?

Here is what I thought would be working but it isn't:

shape height: aValue.
element changed.

Where shape is my RWShape (a RWCube in my case) and element is the shape element (an RWElement).
The curious thing is that this code is actually working for the color:

shape color: aWDColor.
element changed.

Any tips on what is wrong about my code?

Cheers,
Nicolas