Quantcast

nested function has to moved outside prior of the main function

classic Classic list List threaded Threaded
3 messages Options
Erhy Erhy
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

nested function has to moved outside prior of the main function

Hello!
I tried the example in Help with Version 6.0.0
of datatipSetDisplay.
It works only after modification of the inserted nested function
outside of the function.
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: nested function has to moved outside prior of the main function

Hello,

Le 26/03/2017 à 16:20, Erhy a écrit :
> Hello!
> I tried the example in Help with Version 6.0.0 of datatipSetDisplay.
Which one? There are 2 examples.

> It works only after modification of the inserted nested function
> outside of the function.

Could you be a bit more explicit?
Thanks

Samuel

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Erhy Erhy
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: nested function has to moved outside prior of the main function

This post has NOT been accepted by the mailing list yet.
it goes in Version 5, but not in 6.0.0

In V 6.0.0 the nested function ShowTip_byTag() has to be before of the name function

code example:
function TipIx= ShowTips()
x1=linspace(0,1,32)';
y1=sinc(10*x1);
TipIx = round( length(y1) ./ 2 );
clf();
plot2d(x1,y1,);
e=gce();
p=e.children(1);
t=datatipCreate(p, TipIx);
t.tag = "my DataTip not shown in V6.0.0";
function str=ShowTip_byTag(h)
str = h.tag;
endfunction
datatipSetDisplay(t,"ShowTip_byTag")
endfunction
Loading...