Page 1 of 1

edit/duplicate macro - change type param not clear the *

Posted: Tue Jun 28, 2016 11:24 am
by Rudi
hi guys
sorry for this,
think have found a small bug, that had annoyed me in the past.
Now I could catch him at last: here you go:

create a macro with a string as parameter, do not check on the Make local copy
so we get an type T8*
step1.png
create now from this macro a duplicate and change the parameter to a byte ( u8 )
step2.png
create now a new macro from scratch with a byte ( u8 ) as parameter
step3.png

now export all three macros and have a look to this lines:


string Parameter Macro without a local copy

Code: Select all

<param name='Test1' type='T8*' description='' isconst='0' isinit='0' usrinit='""' setinit='' >
duplicated macro from this , change param to a byte

Code: Select all

<param name='Test1' type='u8*' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
new created macro with byte as param

Code: Select all

<param name='Test1' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />

the bug is:

if we duplicate a macro from a macro with string as parameter that do not make a local copy ( type T8*)
and we change the param then to a byte ( u8 ) the pointer char ( * ) is not deleted then

edit:
and yes:
if you have created the first step, and do a edit on this macro, to edit the parameter from string ( without local copy T8* ) to a byte (u8 )
the ( * ) is not clear too.

Code: Select all


<param name='Test1' type='u8*' description='' isconst='0' isinit='0' usrinit='0' setinit='' />

so this bug is in
duplicate & edit a string param macro ( without local copy ) to a byte parameter macro



to do:
clear the *

workaround if you edit a string parameter makro (without local copy)
create a new makro from scratch and delete the old
we can not change the type T8* to the u8 by this edit.

workaround2:
export the makro, edit the type from T8* to u8 / u8* to u8
delete the makro in the flowchart, and import the new edit version


txs!
best wishes
rudi ;-)