I'm using nativescript vue
I want to run this tooltip.
code like in tutorial is not working:
<Button text="Get Json Data" id="tool" ref="tooltip" @tap="getData" class="btn btn-primary m-t-20"></Button>
I made button like this and in created trying to make it working but
created() {
let tipref = this.$refs.tooltip;
let tippref = this.$refs.page.tooltip;
//new ToolTip(this.nativeView.topmost().tip,{text:"Text"});
//const tip = new ToolTip(this.nativeView.tipref,{text:"Some Text"});
new ToolTip(tipref,{text:"Some Text"});
},
still not working: TypeError: Cannot read property 'tooltip' of undefined
TypeError: Cannot read property 'nativeView' of undefined
Can't figure out how to do it.
The code from the answer How to create a floating help layout? is not working too.
let tippref = this.$refs.page.tooltip;.this.$refs.pagedoesn't seem to exist. Can you try removing that line? - Tiago A.export declare class ToolTip { private builder; private tip; constructor(view: any, config: ToolTipConfig); show(): void; hide(): void; static getResource(type: any, name: any): any; }and in the conctructor ineed to pass view, and do not know what to pass here that what are these let tippref variables trying to achieve pass view - KarolekMasterekthis.$refs.pagedoesn't exist so the function crashes in that line. You are not using the vartipprefanyways. Remove that line, please. - Tiago A.createdtomounted.createdmay execute before the template is ready. - Tiago A.mounted(){ var tipref = this.$refs.tooltip; //new ToolTip(this.nativeView.tipref,{text:"Some Text"}); // not working //new ToolTip(tipref,{text:"Some Text"}); // not working },- KarolekMasterek