Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 410951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:56:20+00:00 2026-05-12T17:56:20+00:00

Allright, this might be a strange question and maybe I am heading the wrong

  • 0

Allright, this might be a strange question and maybe I am heading the wrong direction, but here is my problem:

I have a SearchForm object which holds a collection of Tag objects. When a Tag object is clicked by the user, it highlights itself and triggers an event. The SearchForm class listens to this event and submits itself. The Tag object has no relation to the SearchForm.

So far, so good.

Now some Tags must activate other Tags when clicked. Each Tag knows what other Tags it must activate. But in order to do so it must KNOW about the whole collection of Tags held by the searchform.

Would it be “bad” if a Tag instance (= collection item) has a reference to the complete list of all other Tags (= collection)?

Of course some something like this would be doable:

Tag is clicked -> SearchForm is notified -> checks if the clicked tag must activate some others -> SearchForm activates the needed Tags itself.

But this seems a bit akward, or not?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T17:56:20+00:00Added an answer on May 12, 2026 at 5:56 pm

    It doesn’t sound like there’s anything wrong with that. If there’s an item in a collection that needs to know about other items in the collection, it’s perfectly reasonable for it to know about the collection as a whole as well.

    Most GUI frameworks, and the DOM itself that presumably you’re working with, have collection items that know about the collection they’re in (in the DOM, on any element, you can call parentElement to get its parent).

    In general, it’s good if objects don’t “know” about more than the minimum they need, in order to reduce coupling. But if an object does need to know about something, giving it a reference to that isn’t unreasonable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I normally use this pattern to iterate over object properties: for(var property in object)
I have a native Visual C++ NT service. When the service is started its
I have been trying to load a text file into a combobox, and then
I have installed the dutch local ( nl_NL utf8 ) on my webserver (when
Is #define LBitmap std::list < CBITMAP *> a good practice? Edit: Allright, what can
I have the following mxml (Omitted some parts for brevity purpose): <fx:Script> [Bindable] private
I have code similar to the following: public class myButton extends JButton() { public
Alright so I am writing a function as part of a lexical analyzer that
I´m writing up a small function giving a combined conditional density and empirical cumulative
after debbuging i am getting following url of my webproject: http://localhost:54594/Home/Home /Home-Controller/Home-Action http://localhost:54594/AboutUs/AboutUs /AboutUs-Controller/AboutUs-Action

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.