Create extension for Small Basic in Small Basic
It's possible to create extensions for Small Basic in any DotNet language. This includes Visual Basic .NET and C#. But this also includes Small Basic itself.
http://cid-201f3835d49587fe.skydrive.live.com/self.aspx/Public/Small%20Basic/SmallBasicExtensionCompiler.zip
Creating an extension in Small Basic is very simple : Just create your program and compile it with this special compiler. You'll get two new files : <File>.dll and <File>.pdg. Copy those files in C:\Microsoft\Small Basic\lib\ and launch Small Basic. It's all you need !
To create sub/variables that are not accessible for other apps, start their name by an underscore '_'.
Sample (Test.sb) :MyField = "(No value)"
_MyPrivateField = "Value of MyField : "Sub TestSub
TextWindow.Write(_MyPrivateField)
TextWindow.WriteLine(MyField)
EndSub
Application using Test.sbTest.Testsub()
Test.Myfield = 5
Test.Testsub()
' Few remarks :
' ===========
' * Test._MyPrviateField isn't accessible, because it begins by a '_'
' * All sub/variable names are capitalized to Mmmm... (M: MAJ, m: min)
' * Your program (Extension) is run just before the first time you use the extension object
Fremy - Developer in VB.NET, C# and JScript ... - Feel free to try my extension- Edited byFremyCompanyAnswererFriday, August 21, 2009 4:22 PMAdding link
- Edited byFremyCompanyAnswererFriday, August 21, 2009 4:25 PM
All Replies
- How do you include the test,dll in your code? I think you missed a line? This is a great help though!
How do you include the test,dll in your code? I think you missed a line? This is a great help though!
Are you trying to use this with Small Basic v0.7? If so, it will not work. It will only work with v0.6. Fremy will have to update this program, as well as his other extension before they will work with v0.7.- I'll perform an update soon. Please keep updated...
Fremy - Developer in VB.NET, C# and JScript ... - Feel free to try my extension I'll try to perform the update tomorrow. If everyting goes right, it should be done for monday morning.
If I face problems, I'll try to fix these before Wednesday.
Keep updated,
Fremy
Fremy - Developer in VB.NET, C# and JScript ... - Feel free to try my extension- Just to find out, have you made this to work for v0.7 yet?
31337 - everything can be solved... the impossible just takes longer.


