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 / bluegui and menus

Author
Message
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 27th May 2008 07:31 Edited at: 27th May 2008 07:42
I'm trying to make a toggle-able menu item. This is what I have. The ID and "handle menu" are correct. I don't get why this isn't working.



I've tried also:



And:



And it still won't toggle that menu item. (And yes, True and False are constants I set up that do of course work

Any ideas?


Hurray for teh logd!
Thebeely
20
Years of Service
User Offline
Joined: 4th May 2005
Location: Croatia
Posted: 27th May 2008 10:18
If you created a menu in a function, maybe you forgot to set the "menuMapping" variable to global. Or a "menu" var.
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 27th May 2008 18:19
Nope, the variables are definately set properly, the issue lies in:

IF EVENTSOURCE()=menu AND EVENTDATA() = 14

I'm not sure how to check for a click on the menu bar...


Hurray for teh logd!
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 30th May 2008 22:34
Any ideas on this?


Hurray for teh logd!
Thebeely
20
Years of Service
User Offline
Joined: 4th May 2005
Location: Croatia
Posted: 31st May 2008 16:26
Did you use "getevent"?
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 31st May 2008 23:22
Yep, check the code snippet boxes up above. The loop there works for other parts of my gui, buttons and whatnot. But I can't figure out the menu bars.


Hurray for teh logd!
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 1st Jun 2008 08:05
blueGUI really is a nasty bugger.
it takes all you've learned about your own unique coding style and organization, and dumps it to trash. next thing you know, your relearning how to set code up for it to work properly, and you'll have tons of little bugs here and there that take you days to find out, and eventually it's just some hidden command you didnt know of or parameter you were using wrong, or just a stupid little mistake in variables or what not.

aside from that, it's a beautiful and very useful plugin!


the trick is to do tons of debugging. tons of it. not just spacing things around, but adding stuff, and taking stuff away, reordering it, etc.

add 'end' above this line.

if you clicked on the right menu and the program ended, then your safe knowing that theres no problem with event data and menu clicking. then it all lies in the little 'itemChecked' block of code

3.11 We do not tolerate posts made for the purpose of putting down another forum member, group of members, religion, our company, our staff or any of our moderators, past or present.
cjb2006
18
Years of Service
User Offline
Joined: 20th May 2006
Location:
Posted: 1st Jun 2008 13:55
Look at Rob K's sample application "Paddy" in your Projects=>BlueGUI Examples=>Sample Programs folder. He shows a nice tight structure for detecting menu and toolbar activity.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 1st Jun 2008 19:14 Edited at: 1st Jun 2008 19:14
Think you where looking for menu_click for an eventsource not just menu.



Dark Physics makes any hot drink go cold.

Login to post a reply

Server time is: 2025-05-11 12:45:56
Your offset time is: 2025-05-11 12:45:56