I don't know if anyone think this is useful or maybe there's a better way of doing this but I think It would be absolutely awesome to have the possibility of writing subroutines at any given moment, for example soon as adding a button I can type gosub "routine1" and I have possibility to add the code for the subroutine somehow... I mean, its not a big deal to just close the button properties and then F6 to the properties and land at the Actions but still sometimes (and I know it sounds stoner) I just loose track of what I was trying to do in the whole bouncing back and forth specially when there's a bunch of different interactions between the elements of a single page.
I been trying to tidy up the code into my applications and learned that its a lot easier to have it all in one place in most cases so I then organize sort of collections in the subroutine page, thats why I'm pretty much suggesting this... =)
cheers!
Sub routines always present
Moderator: Neosoft Support
Sub routines always present
Last edited by stu on Fri Jul 31, 2015 10:59 am, edited 1 time in total.
-
- Posts: 419
- Joined: Thu Oct 15, 2009 3:43 pm
Re: Sub routines always present
Yeah subroutines should be more accessible from action editor, something like toolbar button and popup window with subs editor, and double-click on GoSub action should open subs editor as well (inside Gosub Properties dialog, or have special button (like in setvar dialog) to open multiline editor for subs).
-
- NeoSoft Team
- Posts: 5628
- Joined: Thu Mar 31, 2005 10:48 pm
- Location: Oregon, USA
- Contact:
Re: Sub routines always present
I think something like that exists already doesn't it? Can't you CALL a function from a text file by that name in the same folder as your executable?stu wrote:I don't know if anyone think this is useful or maybe there's a better way of doing this but I think It would be absolutely awesome to have the possibility of writing subroutines at any given moment,
What would be helpful is to be able to CALL a function from a string variable (containing NB code) that could be written programmatically.
David Payer
Des Moines, Iowa
USA
Des Moines, Iowa
USA
Re: Sub routines always present
David Payer:
2) You could also embed Function files (generated at Design time) in your pub ... and then use ExtractFile at run time before Calling the file.
1) You could do something like ...What would be helpful is to be able to CALL a function from a string variable (containing NB code) that could be written programmatically.
Code: Select all
SetVar "[thisFunction]" "!c:\someFolder\myFunction.txt"
FileWrite "![thisFunction]" "All" "blah, blah, blah"
Call "[thisFunction]" "param1" 'param2"