Programming Tools
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Remember me

Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Add This Thread To:   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
Unread Dev Articles Community Forums Sponsor:
Old December 18th, 2002, 09:37 AM
LabDev LabDev is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
Join Date: Dec 2002
Posts: 1 LabDev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question == Toolbar Algorithm? ==

Hi guys!

Need someone to help me on this subject...

>> Task: Menu/Toolbar system (JScript).
I've already built a JS/CSS Toolbar Menu system, for my app.
It suports multiple menus, each filled with "n" buttons;
My goal here is to integrate in an app. a menu system like IE, or Word...

>> Capabilities: Show/Hide Menu; Parse Button's State.
So far, my menu sys. supports show/hide Menus & inside each menu, the buttons can assume 2 states : enabled or disabled.
i'm "parsing" button state by paasing an array to a function, something like this:

(assume that PassedArray = "0,0,1,1,0,1,0,0,1")
// 0 = Disabled; 1= Enabled;
function objHandleButtons(MenuID, PasssedArray)
//-- something like:
for (var i=0;i<=PassedArray.lentgh -1;i++)
if (PassedArray(i) == 0)
objButton(i).disabled = true;
objButton(i).disabled = false;

HandleExceptions(MenuID, PassedArray(i));

>> Nothing new, he?!

I've used this for my project and it works fine, but...
now i got 5 distinct menus, with button ranges from 4 to 11!
Imagine the huge quantity of arrays i'm supossed to manage!
For each button clicked i must have an array, to control wich other buttons are enabled or not, and not counting the exceptions handling...

For Menu 1, button 5 clicked: disable bts. 1,3,4,6; Enable all others.
Exception: if Filter = true, enable but. 3

Got the picture?

>> Main Goal: Menu/Button Manager.
My goal here is trying to understand how "professional" software handles this kind of operations...
I mean: imagine a software like MS Word -- im sure they got some king of algorithm to handle the (huge!) button clicks, states (on/off/multi), actions, etc. otherwise it would be a "pain-in-the-ass" trying to manage menus, right?

Any ideias???

Reply With Quote

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > == Toolbar Algorithm? ==

Developer Shed Advertisers and Affiliates

Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap