[PD] Tcl error for [knob] and [mknob]

Antoine Rousseau antoine at metalu.net
Thu Sep 22 17:56:46 CEST 2016


Thanks a lot ! I think I get it. I'll do it asap.

2016-09-22 17:06 GMT+02:00 IOhannes m zmoelnig <zmoelnig at iem.at>:

> On 2016-09-22 12:21, Antoine Rousseau wrote:
> > 2016-09-22 11:03 GMT+02:00 IOhannes m zmoelnig <zmoelnig at iem.at>:
> >
> >> On 2016-09-22 08:37, Antoine Rousseau wrote:
> >>> you need
> >>> to be aware of the version at compilation time, and have to use this
> >>> version at runtime. So I don't think you can build an external that
> would
> >>> be compatible for both versions.
> >>
> >> why?
> >>
> >
> > Because interfaces changed :
> >
> > -void iemgui_save(t_iemgui *iemgui, t_symbol **srl, int *bflcol)
> > +void iemgui_save(t_iemgui *iemgui, t_symbol **srl, t_symbol**bflcol)
> [...]
> >
> > so how could I build a binary that would switch the interface of
> iemgui_save
> > at runtime, following the version of the running Pd ?
> >
> >
>
>
> in pseudo code:
> if(pd<0.47)
>   iemgui_save(x, srl, i_color);
> else
>   iemgui_save(x, srl, s_color);
>
> this will give you some compiler warnings, but you can do:
>
> typedef void(t_iemgui_save_old*)(t_iemgui *iemgui, t_symbol **srl, int
> *bflcol);
> typedef void(t_iemgui_save_new*)(t_iemgui *iemgui, t_symbol **srl,
> t_symbol **bflcol);
>
> if(pd<0.47) {
>     t_iemgui_save_old isave=(t_iemgui_save_old)iemgui_save;
>     isave(x, srl, i_color);
> } else {
>     t_iemgui_save_old isave=(t_iemgui_save_new)iemgui_save;
>     isave(x, srl, s_color);
> }
>
> fgmsdr
> IOhannes
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/
> listinfo/pd-list
>
>


-- 
Antoine Rousseau
  http://www.metalu.net <http://metalu.net> __
http://www.metaluachahuter.com/
<http://www.metaluachahuter.com/compagnies/al1-ant1/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160922/c997f0c8/attachment.html>


More information about the Pd-list mailing list