Questions tagged [components]

A component in the Unified Modeling Language "represents a modular part of a system, that encapsulates its content and whose manifestation is replaceable within its environment. A component defines its behavior in terms of provided and required interfaces". The best example of component can be found in ActionScript- Flash,Flex sdks. There you have UI components like buttons, labels, DataGrids, charts those are reusable, distributable etc.

11658 questions
27
votes
6 answers

Write global functions to use in all components in angular

Note : Its not for global variable but for a global common function to perform a functionality on all components I am working on an angular app where I have around 400 components in different modules, almost all components have one same kind of…
Vikram
  • 3,171
  • 7
  • 37
  • 67
27
votes
9 answers

Get Component's Parent Form

I have a non-visual component which manages other visual controls. I need to have a reference to the form that the component is operating on, but i don't know how to get it. I am unsure of adding a constructor with the parent specified as control,…
Pondidum
  • 11,457
  • 8
  • 50
  • 69
27
votes
3 answers

Install Bower components into two different directories?

When using CSS and JS components, is it possible, or even, does it make sense to install them to different directories? . |-- app |-- scripts |-- components # js components go here |-- backbone-amd |--…
Robb Schiller
  • 1,109
  • 2
  • 9
  • 17
27
votes
4 answers

When to add a Component Class vs User Control?

I have a general idea, and there are some obvious cases, but there are also some gray areas for me - when is it best to use to extend from a component and when is it best to create a user control? This pertains to a specific work problem I am…
alexD
  • 2,368
  • 2
  • 32
  • 43
27
votes
5 answers

Why shouldn't you extend JFrame and other components?

I've seen this come up here a few times, but in the postings I've seen, no one explained it. Why shouldn't I extend JFrame (or any component)? Are there conditions where I should extend a component, or is this a firm rule that you don't?
Thomas Owens
  • 114,398
  • 98
  • 311
  • 431
26
votes
2 answers

Delphi Ownership Confusion

I always thought that the owner is responsible for destroying visual controls and that I can manually control destruction if I pass nil as the owner. Consider the following example: TMyForm = class (TForm) private FButton :…
jpfollenius
  • 16,456
  • 10
  • 90
  • 156
26
votes
2 answers

React component closing tag

I'm new to React and I'm trying to figure out the purpose/use of vs . I can't seem to find information on anything except self-closing tags. I've created a basic tab scroller as a JSFiddle using the…
Chimera.Zen
  • 1,080
  • 1
  • 10
  • 26
26
votes
4 answers

VueJS - Pass slot to child of child component

I have a list and a list_item component that I reuse a lot inside my application. On a simplified form: contact_list.vue