BBC BASIC for Windows
General >> General Board >> Writing for Linux
http://bb4w.conforums.com/index.cgi?board=general&action=display&num=1286995815

Writing for Linux
Post by Matt on Oct 13th, 2010, 6:50pm

Hi,

I'm writing a program which can be run a Linux machine with WINE. Generally everything is OK except for producing a toolbar. I'm using the WINLIB library, but it hangs. The status bar works fine, but not the toolbar. Is there another way of producing this - perhaps without m/c?

Matt
Re: Writing for Linux
Post by admin on Oct 13th, 2010, 9:50pm

on Oct 13th, 2010, 6:50pm, Matt wrote:
I'm using the WINLIB library, but it hangs.

Where does it hang (use the Module Viewer add-in utility and Trace mode to find out)?

Does GUIDEMO.BBC (in the EXAMPLES\WINDOWS folder) run OK under Wine? I've never had any reports of a problem with the toolbar in that, and I would have expected someone to have mentioned it in nine years!

Quote:
Is there another way of producing this - perhaps without m/c?

I've never succeeded in creating a toolbar without assembler code, but there's no reason at all why that would affect compatibility with Wine.

Richard.

Re: Writing for Linux
Post by Matt on Oct 14th, 2010, 06:21am

I've narrowed it down to two lines.

Set up lines are:
Code:
        nbutts% = 8 : REM toolbar buttons
        DIM button%(nbutts%-1), buttid%(nbutts%-1), buttip$(nbutts%-1)
        button%() =  6,    7,     5,       14,     12,      13,                                      11,    10
        buttid%() =  100,  101,   102,     104,    105,     106,                                     107,   108
        buttip$() = "New","Open","Delete","Print","Search","Search within"+CHR$13+"current listing","Help","Options" 


Lines where it hangs:
Code:
        htool% = FN_createtoolbar(nbutts%,button%(),buttid%())
        PROC_addtooltips(htool%,nbutts%,buttip$(),buttid%()) 


As I say, this works fine on my pc.
Re: Writing for Linux
Post by admin on Oct 14th, 2010, 10:35am

on Oct 14th, 2010, 06:21am, Matt wrote:
As I say, this works fine on my pc.

OK, I think I found the problem. Try this version of WINLIB.BBC (v2.2) and let me know if it helps:

http://groups.yahoo.com/group/bb4w/files/Libraries/WINLIB.BBC

Richard.
Re: Writing for Linux
Post by Matt on Oct 15th, 2010, 05:20am

Tried it. Works fine.

Thanks Richard.