BBC BASIC for Windows
« Nested PROC »

Welcome Guest. Please Login or Register.
Apr 6th, 2018, 12:22am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1 2  Notify Send Topic Print
 hotthread  Author  Topic: Nested PROC  (Read 3599 times)
ScriptBasic
Guest
xx Re: Nested PROC
« Reply #13 on: Jan 19th, 2014, 10:28pm »

Quote:
But looked at from the perspective of this forum, IUP would need to offer benefits other than portability to attract BB4W users, and indeed its other benefits would have to be substantial to outweigh the disadvantage of distributing the IUP DLLs with every application.


When installing VB takes over a GB, adding a few IUP DLLs to your project seems moot. I was thinking of enhancing the BBC BASIC for Windows SQLite3 Address book example and make it GUI based on IUP. How much work would it be to do the same with the GUI tools currently available to BBC4W users? From the GUI demos I've briefly looked at, it seems GUI is a Windows API/SDK style effort.

User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Nested PROC
« Reply #14 on: Jan 19th, 2014, 11:22pm »

on Jan 19th, 2014, 10:28pm, ScriptBasic wrote:
When installing VB takes over a GB, adding a few IUP DLLs to your project seems moot.

We're not talking about VB, we're talking about BB4W, and compiled GUI applications can easily be only 100 Kbytes or so. How much might that increase if the IUP DLLs need to be bundled?

I don't buy the argument that as memory and disk sizes increase it doesn't matter if applications run to several megabytes. There are two main reasons: firstly, CPU Level 1 caches are still moderately small, and if you can fit most of your application in the cache there can be significant speed benefits. Secondly, downloading via the internet is still (for most people) sufficiently slow that running applications 'from the cloud' is much more practical if they are small.

Quote:
I was thinking of enhancing the BBC BASIC for Windows SQLite3 Address book example and make it GUI based on IUP. How much work would it be to do the same with the GUI tools currently available to BBC4W users?

Not very much, I would expect. As a practical comparison between IUP and the existing BB4W libraries here is a simple button demo using both methods:

IUP version
Code:
      INSTALL @lib$+"CALLBACK_cdecl"
      INSTALL @lib$+"IUP"

      PROCIupOpen
      win% = FNIupDialog
      but% = FNIupButton("Click Me")
      PROCIupAppend(win%, but%)
      cbaddr% = FN_callback(FNButtonClick(), 6)
      PROCIupSetCallback(but%, "BUTTON_CB", cbaddr%)
      PROCIupShow(win%)
      PROCIupMainLoop
      PROCIupClose
      END

      DEF FNButtonClick(ih%, button%, pressed%, x%, y%, status%)
      IF pressed%=0 PRINT "Mouse Button "; CHR$(button%) " clicked"
      = -2 


WINLIB version
Code:
      INSTALL @lib$+"WINLIB2"
      INSTALL @lib$+"WINLIB5"

      win% = FN_newdialog("", 100, 100, 100, 40, 4, 1000)
      but% = FN_setproc(PROCButtonClick())
      PROC_pushbutton(win%, "Click Me", but%, 0, 0, 40, 16, 0)
      PROC_showdialog(win%)
      REPEAT
        WAIT 1
      UNTIL FALSE

      DEF PROCButtonClick(wparam%, lparam%)
      PRINT "Mouse Button "; &FFFF-wparam% " clicked"
      ENDPROC 

If anything I would say the version using the existing libraries is a little simpler.

Richard.
User IP Logged

ScriptBasic
Guest
xx Re: Nested PROC
« Reply #15 on: Jan 19th, 2014, 11:55pm »

That looks great! A victim of not RTFM.

Once again thanks for all the help getting up to speed with BBC4W using a non-supported platform and external tools.

Quote:
What gets us into trouble isn't what we don't know; it's what we know for sure that just ain't so!

-- Mark Twain --


User IP Logged

ScriptBasic
Guest
xx Re: Nested PROC
« Reply #16 on: Jan 20th, 2014, 6:56pm »

Is there a FN/PROC list anywhere of the Windows GUI API for BBC4W's 13 library files? All I could find in the documentation is a section E. that seems like an introduction more than the libraries user guide. Would the BBC4W wiki be a better place to look?

Update: I found what I was looking for in the library documentation.

« Last Edit: Jan 20th, 2014, 7:02pm by ScriptBasic » User IP Logged

Pages: 1 2  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls