Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / BBB gui - strange problem

Author
Message
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 10th Nov 2010 02:05
How can i use open dialog outside bbb gui example?

I have tried to use this code


but it does nothing, i have tried this code in the example and it worked, but in my program it doesn't. I have declared all of my buttons and gui related stuff in one function to keep my program simple, and i placed code from above in main do loop.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 10th Nov 2010 11:31
Try just using the function on its own in an empty project. It could be you are not fulfilling all of your "if" statements...

I don't use BBB, just a quick check.

nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 10th Nov 2010 13:28
No, it doesn't work even in empty project,
here is the source code



I also included bbbgui_constants.dba file and still no solution.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 10th Nov 2010 14:55
By empty project I mean:


Does that work? If it does then maybe the fault is not with the plugin.

Brendy boy
21
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 14th Nov 2010 08:20
The problem is this:

ButtonLoadLevel is a variable that hold button handle which is created inside the function, outside the function the variable's value is 0. You have to declare that variable as global if you want to use it outside the function.

Because the variable's value is 0, the statement button clicked(ButtonLoadLevel) always returns 0.

Login to post a reply

Server time is: 2026-07-21 18:58:24
Your offset time is: 2026-07-21 18:58:24