Friday, May 22, 2020
Understanding Owner vs. Parent in Delphi Applications
Every time you place a panel on a form and a button on that panel you make an invisible connection. The Form becomes the owner of the Button, and the Panel is set to be its parent. Every Delphi component has an Owner property. The Owner takes care of freeing the owned components when it is being freed. Similar, but different, the Parent property indicates the component that contains the child component. Parent Parent refers to the component that another component is contained in, such as TForm, TGroupBox or a TPanel. If one control (parent) contains others, the contained controls are child controls of the parent. Parent determines how the component is displayed. For example, the Left and Top properties are all relative to the Parent. The Parent property can be assigned and changed during run-time. Not all components have the Parent. Many forms do not have a Parent. For example, forms that appear directly on the Windows desktop have Parent set to nil. A components HasParent method returns a boolean value indicating whether or not the component has been assigned a parent. We use the Parent property to get or set the parent of a control. For example, place two panels (Panel1, Panel2) on a form and place one button (Button1) on the first panel (Panel1). This sets Buttons Parent property to Panel1. Button1.Parent : Panel2; If you place the above code in the OnClick event for the second Panel, when you click Panel2 the button jumps from Panel1 to Panel2: Panel1 is no longer the Parent for the Button. When you want to create a TButton at run-time, it is important that we remember to assign a parent - the control that contains the button. For a component to be visible, it must have a parent to display itself within. ParentThis and ParentThat If you select a button at design time and look at the Object Inspector youll notice several Parent-aware properties. The ParentFont, for example, indicates whether the Font used for the Buttons caption is the same as the one used for the Buttons parent (in the previous example: Panel1). If ParentFont is True for all Buttons on a Panel, changing the panelââ¬â¢s Font property to Bold causes all Buttons caption on the Panel to use that (bold) font. Controls Property All components that share the same Parent are available as part of the Controls property of that Parent. For example, Controls may be used to iterate over all the children of the windowed control. The next piece of code can be used to hide all the contained components on Panel1: for ii : 0 to Panel1.ControlCount - 1 do à à Panel1.Controls[ii].Visible : false; Tricking Tricks Windowed controls have three basic characteristics: they can receive the input focus, they use system resources, and they can be parents to other controls. For example, the Button component is a windowed control and cannot be the parent to some other component - you cant place another component on it. The thing is that Delphi hides this feature from us. An example is the hidden possibility for a TStatusBar to have some components like TProgressBar on it. Ownership First, note that a Form is the overall Owner of any components that reside on it (positioned on the form at design-time). This means that when a form is destroyed, all the components on the form are also destroyed. For example, if we have an application with more that one form when we call the Free or Release method for a form object, we do not have to worry about explicitly freeing all of the objects on that formââ¬âbecause the form is the owner of all its components. Every component we create, at design or run time, must be owned by another component. The owner of a componentââ¬âthe value of its Owner propertyââ¬âis determined by a parameter passed to the Create constructor when the component is created. The only other way to re-assign the Owner is using the InsertComponent/RemoveComponent methods during run-time. By default, a form owns all components on it and is in turn owned by the Application. When we use the keyword Self as the parameter for the Create methodââ¬âthe object we are creating is owned by the class that the method is contained inââ¬âwhich is usually a Delphi form. If on the other hand, we make another component (not the form) the owner of the component, then we are making that component responsible for disposing of the object when it is destroyed. As like any other Delphi component, custom made TFindFile component can be created, used and destroyed at run time. To create, use and free a TFindFile component at run, you can use the next code snippet: uses FindFile;...var FFile : TFindFile;procedure TForm1.InitializeData;begin //form (Self) is the Owner of the component à //there is no Parent since this à //is an unvisible component. à FFile : TFindFile.Create(Self) ; à ... end; Note: Since the FFile is created with an owner (Form1), we dont need to do anything to free the componentââ¬âit will be freed when the owner is destroyed. Components Property All components that share the same Owner are available as part of the Components property of that Owner. The following procedure is used to clear all the Edit components that are on the form: procedure ClearEdits(AForm: TForm) ;var à à ii : Integer; begin à à for ii : 0 to AForm.ComponentCount-1 do à à if (AForm.Components[ii] is TEdit) then TEdit(AForm.Components[ii]).Text : ;end; Orphans Some controls (such as ActiveX controls) are contained in non-VCL windows rather than in a parent control. For these controls, the value of Parent is nil and the ParentWindow property specifies the non-VCL parent window. Setting ParentWindow moves the control so that it is contained in the specified window. ParentWindow is set automatically when a control is created using the CreateParented method. The truth is that in most cases you do not need to care about Parents and Owners, but when it comes to OOP and component development or when you want to take Delphi one step forward the statements in this article will help you to take that step faster.
Saturday, May 9, 2020
Essay on Wild Duck - Naturalistic Symbolic - 2205 Words
The Wild Duck one of Ibsens latter plays not only shows his great talent for mimesis writing, with it social depth and distinguished realism it offers a psychologically framed exploration into human nature. Even the plays structure, such as the juxtaposing of the Werles wealthy, over indulgent, powerful status with that of the Ekdals menial, disgraced, impoverished existence. By opening the play in the lavish, `elegant social space belonging to Werle then introducing the space on which the majority of the action ensues, that of the crude, humble communal room in the Ekdals home. The first scenes concern themselves with the structure of social space both in terms of class and family line. The speech in these scenes gives historyâ⬠¦show more contentâ⬠¦Gas lighting allowed a director to adjust the lighting to suit the mood of the play, offering greater variety from `standardised lighting. Ibsen also used practices such as dressing his actors in contemporary clothes in order to i nvolve the audience. The audience were encouraged to react strongly to the action. The stage design, a box set dressed accordingly, realistically and familiarly, was Ibsens preferred setting for The Wild Duck. Its attention to detail meant that it became contemporary and therefore a set in which Ibsens audience could relate to through there own personal experience. It was a mirror not only to nature but also to the audience themselves, they could relate to the characters surroundings as if it were there own. This `fourth wall effect or illusion as named by the practitioner Stanislavski, gave the audience a kind of voyeuristic view upon the dramatic situation unfolding before them. Acting had moved away from the melodramatic flounces of the past. As the practitioner Stanislavski encouraged with his work action on stage should closely follow the `organic actions of every day life. The plays were now not taken as a singular moment in time, action before and after the plays own life spa n was to be considered, a `through line of action needed to be looked at for each character. Actors were not simply beginning to act real life but as Zola proposed, actors were to `live on stage. Devices such as the dialogue within the playShow MoreRelatedpreschool Essay46149 Words à |à 185 Pagesfeeling or mood. Examples Examples â⬠¢ Child communicates, ââ¬Å"I want to make a sun with lots of yellow tissue ââ¬â¢cause itââ¬â¢s a happy day and we can play outside!â⬠â⬠¢ Child presses down firmly with marker, rubbing to create a wild thing after being read Where the Wild Things Are. â⬠¢ After being read Going On a Bear Hunt, child uses dark paint at the easel and says (or commuà nicates), ââ¬Å"Iââ¬â¢m on a bear hunt, and Iââ¬â¢m not afraid.â⬠â⬠¢ Uses heavy jagged, jumbled strokes in a finger paintingRead MoreStephen P. Robbins Timothy A. Judge (2011) Organizational Behaviour 15th Edition New Jersey: Prentice Hall393164 Words à |à 1573 Pageshighly interrelated rolesââ¬âor sets of behaviors.7 As shown in Exhibit 1-1, these ten roles are primarily (1) interpersonal, (2) informational, or (3) decisional. Interpersonal Roles All managers are required to perform duties that are ceremonial and symbolic in nature. For instance, when the president of a college hands out diplomas at commencement or a factory supervisor gives a group of high school students a tour of the plant, he or she is acting in a figurehead role. All managers also have a leadership
Wednesday, May 6, 2020
Legal Aspects of Air Transportation Free Essays
Legal Aspects of Air Transportation Kevinn A. Narvaez Y00285940 AWSC 3200 Air Transportation Prof. Ocasio Table of Contents IntroductionPage 3 Main EssayPage 4 ConclusionPage 6 ReferencesPage 7 Introduction: Air Transportation is one of the fastest growing sectors of the late 20th and early 21st centuries, as such, it is subject to an increasing legal requirements. We will write a custom essay sample on Legal Aspects of Air Transportation or any similar topic only for you Order Now Many legal requirements has to do with the financial side of the air transportation business, specifically financial and documentation matters. These legal requirements are usually decided via yearly ICAO and IATA meetings, but also via special conferences, such as the Chicago Conference and the Havana Conference, where major changes in international air transportation were made. In this project we will look at some of the different legal measures taken to ensure fair competition and standardize business practices in the international air transportation industry. We will also look at some of the international agreements regarding air transportation, and the effects that they have had on the industry. Main Essay: International air transportation is an example of a politically- dependent business. International agreements and disagreements affect were, how, when, and how frequently air carriers fly to international destinations. A clear example of this is the embargo against Cuba, flights from the United States to Cuba are extremely heavily regulated. In many other instances, politics have played an important role in determini ng international air transportation policy, and as such, international air transportation, is in a constant state of flux. A tragic example of a flight that was caught in the bad side of international disputes was Korean Airlines Flight 007, which was shot down over the former Soviet Union during September of 1983, a period during which relationships between East and West were at a straining point. Likewise, many laws affect the citizens of a particular nation, such as the Fly America Act, which obligates United States federal employees and their families to fly primarily on air carriers from the United States. This functions as a trade boon for American air carriers, virtually guaranteeing large revenues on international flights as well as domestic flights. 4 The Fly America Act was not the first legal action placed on international air transportation, we can go as far back the Chicago and Havana Conventions, and find evidence of legal actions imposed on air transportation. These legal actions are numerous, and include the ââ¬Å"Nine Freedoms of the Air,â⬠and the Montreal Convention, which establishes legal boundaries and requirements for law suits involving air carriers and passengers. Of course, the legal effects of air transportation have an effect on the economics of the business, when nations go to war, and declare blockades, airlines have to increase ticket prices to cover operational risks and other factors not planned for. With increased cost comes less reward, and eventually, the airline may have to shut down the route due to excessive costs. 5 Conclusion: The legal aspects of air transportation are numerous, and their effects are not only far-reaching, but powerful in their scope. As such, many airliners are subject to their rule, and have had to adjust their operations to compensate for these legal bindings. As we have seen, the legal affects donââ¬â¢t just encompass laws and trade agreements, but also international politics and disputes. More often than not, air carriers prefer to not operate in areas that have been involved in international conflicts, for the sake of the passengers and the aircrew. The future of air transportation law is highly unpredictable, with nations making and breaking agreements every day. However, this does not exclude the airline industry from adapting to the changing legal climate as it has done in the past. Hopefully, in the future more agreements like the ââ¬Å"Open Skiesâ⬠act and the ââ¬Å"Nine Freedoms of the Airâ⬠will cause the airline industry to flourish. 6 References: Air Transportation; Xunta de Galicia. Retrieved on 27/Nov/2009http://www. bygalicia. eu/en/keys_to_internationalisation/logistics_and_distribution/transport/air_transport/ International Civil Aviation, various, Retrieved on 27/Nov/2009 http://www. centennialofflight. gov/essay/Government_Role/Intl_Civil/POL19. htm Air Transport Law and Policy in the 1990ââ¬â¢s: Controlling the Boom, Aberson, Emile; Mendes de Leon, Pablo. Kluwer Academic Publishers. 1991 http://books. google. com. pr/books? id=yEvwGJnaZ-YCpg=PA157lpg=PA157dq=legal+aspects+air+transportsource=blots=QDO9UM67k4sig=GjFZpfrImlsDED3UvuGuDUKHVZEhl=enei=0nAWS4ecEs2ztgfMraj7BAsa=Xoi=book_resultct=resultresnum=3ved=0CBIQ6AEwAjgy#v=onepageq=legal%20aspects%20air%20transportf=false Korean Air Lines Flight 007, various, retrieved on 27/Nov/2009 http://en. wikipedia. org/wiki/Korean_Air_Lines_Flight_007 Montreal Conference, ICAO. Retrieved on 28/Nov/2009 28/Nov. 2009http://www. jus. uio. no/lm/air. carriage. unification. convention. montreal. 1999/ 7 How to cite Legal Aspects of Air Transportation, Essay examples
Subscribe to:
Posts (Atom)