Categories > Coding > C# >
Execute script form tabs
Posted
So if i select the current tab with the avalon text editor (im going to add monaco) and i have some code: WeAreDevsLibrary.SendLuaScript(text);
TabItem selectedTab = tabDynamic.SelectedItem as TabItem;
TextEditor textEditor = selectedTab.Content as TextEditor;
string text = textEditor.Text;
The code of wearedevslibrary.sendluascript(text) then the local variable gives a error this is the error (cannot use local variable before it is declared) Can someone help me out?
Hello there.
Replied
put
WeAreDevsLibrary.SendLuaScript(text);
after you declare text
!!!!!marcus__!!!!!#8611
https://cdn.discordapp.com/attachments/1066053366758780978/1078052772567597127/image.png
Replied
so you mean text = WeAreDevsLibrary.SendLuaScript(); you mean that?
Hello there.
Replied
no lmao
TabItem selectedTab = tabDynamic.SelectedItem as TabItem;
TextEditor textEditor = selectedTab.Content as TextEditor;
string text = textEditor.Text;
WeAreDevsLibrary.SendLuaScript(text);
!!!!!marcus__!!!!!#8611
https://cdn.discordapp.com/attachments/1066053366758780978/1078052772567597127/image.png
Replied
I haven't been coding a long time ago. So declare it before or whatever i forgot alot of things.
Hello there.
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )