Author |
Topic: Nested PROC (Read 3598 times) |
|
ScriptBasic
Guest
|
 |
Re: Nested PROC
« Reply #11 on: Jan 19th, 2014, 10:04pm » |
|
Sorry!
Have removed the off topic content.
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Nested PROC
« Reply #12 on: Jan 19th, 2014, 10:20pm » |
|
on Jan 19th, 2014, 10:04pm, ScriptBasic wrote:| Have removed the off topic content. |
|
It wasn't all off topic, and I concede that it's impossible to discuss the merits of a 'portable' interface without mentioning the existence of other platforms!
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.
Now, if there was a native Linux version of BBC BASIC, which was substantially compatible with BB4W (apart from the OS-specific features like SYS), then that would put things in an entirely different light. Then IUP could be the solution for genuine cross-platform GUI-based applications written in BBC BASIC.
But, as far as I'm aware, that is currently a distant prospect and it needs somebody other than me to take an interest in it to make it happen.
Richard.
|
|
Logged
|
|
|
|
ScriptBasic
Guest
|
 |
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.
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
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.
|
|
Logged
|
|
|
|
ScriptBasic
Guest
|
 |
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 -- |
|
|
|
Logged
|
|
|
|
ScriptBasic
Guest
|
 |
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 » |
Logged
|
|
|
|
|