We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Small Basic Only Extension
#4
Hi,

Unfortunately it is not posssible I think to do exactly what you want, this is how I would describe how it works.

Small Basic has 3 basic parts:
1] Interface (IDE) that takes your code, compiles and runs it etc.
2] A compiler that takes your SB program and compiles it, mainly this just controls the program logic (For, If, While, Sub keywords etc).
3] A library of objects, methods, properties and events (stuff like GraphicsWindow etc).  Calls to this functionality (in SmallBasicLibrary.dll) are insterted by the compiler.

All these bits are written in .Net language (C# or VB) and runs only on Windows; but has the nice feature that another .Net program can interigate another; get its methods, properties etc and interact with them.  This is how the compiler can run the default library and extension code, by finding the method in its dll and calling it.  It is also how extension code can minipulate the default library like extending GraphicsWindow and fixing some things that fail, e.g. replacing the Flikr API key property with an updated one.

A useful program to interigate .Net is called ILSpy.  It can actually do this to such an extent that is can decompile most .Net code.  This is how we can see so much about how the various bits of Small Basic work.  However, Small Basic IDE does have some bits that prevent the decompiled code from being recompiled easily; this may be why MS can't maintain it, but they have never been clear on this.

So buidling an exact clone is a bit harder than decompile+recompile, and may potentially infringe MS copyright.  However, for example SB-Prime replaces the IDE, and uses the compiler and default library for 100% compatibility.  While vSB replaced all of them using virtually an exact copy of the decompiled code as a starting point, but chosing to also update the compiler and default library, which adds features but loses some compatibility while strangely not fixing the Flikr and network issues I think.

So, the bottom line is that an extension can sort out or provide alternative commands to replace various things in the standard library that don't work, but commands to do this have to be compiled by SB compiler using extension commands.  This requirement to add extension commands to fix things limits our options.  SB-Prime or another IDE clone could add some of the fixes in (probably not those that do actually need a replacemnt command, not just a changed property) without the user knowing (this is how SB-Prime debugging works), but then programs would not be 100% compaitible which is something I want to keep.
[-] The following 1 user Likes litdev's post:
  • z-s
Reply


Messages In This Thread
Small Basic Only Extension - by jrmrhrb00 - 11-02-2023, 06:09 PM
RE: Small Basic Only Extension - by litdev - 11-03-2023, 07:39 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-04-2023, 02:00 PM
RE: Small Basic Only Extension - by litdev - 11-05-2023, 02:49 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-05-2023, 03:42 PM
RE: Small Basic Only Extension - by litdev - 11-05-2023, 08:58 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-06-2023, 01:13 AM
RE: Small Basic Only Extension - by litdev - 11-06-2023, 09:13 AM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-06-2023, 02:04 PM
RE: Small Basic Only Extension - by litdev - 11-06-2023, 03:15 PM
RE: Small Basic Only Extension - by Scout - 11-06-2023, 03:17 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-06-2023, 03:39 PM
RE: Small Basic Only Extension - by litdev - 11-06-2023, 06:32 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-06-2023, 08:21 PM
RE: Small Basic Only Extension - by litdev - 11-06-2023, 09:11 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-06-2023, 09:42 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-07-2023, 02:32 PM
RE: Small Basic Only Extension - by litdev - 11-07-2023, 05:49 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-07-2023, 06:35 PM
RE: Small Basic Only Extension - by litdev - 11-07-2023, 10:32 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-07-2023, 11:00 PM
RE: Small Basic Only Extension - by litdev - 11-08-2023, 12:07 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-08-2023, 03:00 PM
RE: Small Basic Only Extension - by litdev - 11-08-2023, 08:10 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-08-2023, 08:44 PM
RE: Small Basic Only Extension - by WhTurner - 11-09-2023, 01:13 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-10-2023, 04:37 PM
RE: Small Basic Only Extension - by litdev - 11-10-2023, 07:31 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 12-19-2023, 02:46 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)