Thursday, February 27, 2020
Business Essay Example | Topics and Well Written Essays - 250 words - 13
Business - Essay Example The movie profiles the cases of seven employees who have acquired injuries in the course of their employment. One of the victims is Marcos Lopez. He has worked in the company since high school. Marcos suffers serious back injuries from working form long hours sometimes up to sixteen hours in a day. The company Tyler pipe has a record of violating the safety rules. A former engineer with the company, Ron Howard describes the companyââ¬â¢s policies that safety is sacrificed to increase productivity and make profits at the expense of humans. In a scene on the movie, a man dies when moving iron parts. The corporation responds by saying that he was a good man who made a very big mistake. Other actors featured are Kennedy Valve and Frank Wagner. They are ordered to dispose of toxic paint into an incinerator. Frank Wagner dies from an explosion in the oven. The company also does not provide adequate training for the job. Mc Wane Company also requires employees to sign a contract that they should never sue it and therefore benefiting from the compensation. The movie also features a single director for the entire plant known as Clyde Doran. The director does not have authority to stop production. He is also ordered to withhold information from officials. After the death of Frank Wagner, criminal charges were forwarded against the company. They were charged with criminal negligence. Consequently, Mc Wane threatened a massive loss of jobs if forced to change its policies. Other late discoveries were made. Delaware River had an eight-mile oil stick that came from a Mc Wane pipe plants holding tank. The companies holding tanks were not big enough for toxic waste that the company produced. In response, Mc Wane defended itself by saying that with competition from all over the world mainly China and Latin America, it is hard to maintain the environmental
Tuesday, February 11, 2020
Managing Employee Relations Essay Example | Topics and Well Written Essays - 3000 words
Managing Employee Relations - Essay Example The advantages and disadvantages of partnership are discussed and the situation existing in the current tensions between the UK government and the Fire Brigade Union is elaborated. Finally, the Strategy, tactics and models relating to HRM in managing Employment relations are discussed. The Main actor on the behalf of the government in consideration of relevant employee relation includes the Trade Unions. The provisions of the Employment Relations Act 1999 relating to compulsory trade union recognition for collective bargaining purposes came into force in the UK on 6 June 2000. The 1999 Act inserts a new schedule A1 into the Trade Union and Labor Relations (Consolidation) Act 1992 and this schedule contains the detail of the procedure for trade union recognition. The main elements of trade union recognition include: The first period is the period of ten working days after the request for recognition is made. If during the first period the parties agree the identity of the Bargaining Unit (BU) and that the union is to be recognized as entitled to conduct collective bargaining, the union is recognized. The second period is the period of 20 working days after the end of the first period or such longer period as the parties agree. If the employer indicates during the first period that it is willing to negotiate with the union, negotiations are to take place during the second period. The parties may request the assistance of ACAS in such negotiations. If agreement is reached during the second period the union will be recognized. Secret ballot The Central Arbitration Committee (CAC) must arrange a secret ballot if one of three conditions is satisfied:- The CAC is satisfied that a ballot should be held in the interests of good industrial relations; or a significant number of trade union members within the BU inform the CAC that they do not want the union toconduct collective bargaining on theirbehalf; or the CAC doubts whether a significant number of trade union members within the BU want the union to conduct collective bargaining on their behalf. The ballot must be conducted by an independent qualified person appointed by the CAC. The Recognition and De recognition Ballots (Qualified Persons) Order 2000 (SI 1306/2000) specifies the conditions which must be satisfied in order for an individual or partnership to be a qualified person. The ballot must be conducted within twenty working days of the appointment of an independent qualified person.. Schedule A1 sets out detailed provisions for the conduct of the ballot. There is also a Code of Practice on Access to Workers during Recognition and De recognition Ballots which came into effect on 6 June 2000. If the result of the ballot is that the trade union is supported by a majority of the workers voting and at least 40% of the workers constituting the BU, the CAC must issue a declaration that the trade union is recognized to conduct collective bargaining on behalf of the BU. Caroline Carr, Employment Law Consultancy - Trade Union recognition, August 2000. http://www.bto.co.uk/articles/elc_articles_3.htm Examination of the interests of Trade Unions and their importance 1. It can act as a
Friday, January 31, 2020
Sir Gawain and the Green Knight Essay Example for Free
Sir Gawain and the Green Knight Essay Charles Darwin once said that, ââ¬Å"A man who dares to waste one hour of time has not discovered the value of life.â⬠In Sir Gawain and the Green Knight, Sir Gawain is an honest and chivalrous knight, as seen in his pentangle, ââ¬Å"The fifth five I find the famous man practiced Were ââ¬â Liberality and Lovingkindness leading the rest; Then his Continence and Courtesy, which were never corrupted; And Piety, the surpassing virtueâ⬠(Gawain, 651-654). Sir Gawainââ¬â¢s chivalrous character seems superficial and wasted to some individuals because it means he cannot live a fulfilled life. In the words of Darwin, this would mean that Sir Gawain does not understand what the value of life is. Certain green objects, such as the green girdle, the Green Knightââ¬â¢s accoutrement, and the Green Chapel, represent the quest of truth in Gawainââ¬â¢s character and the understanding of the value of life, which is the ability to learn from mistakes and continuously grow as life goes on. The story of Sir Gawain and the Green Knight begins with a mythical creature, the Green Knight, interrupting a New Yearââ¬â¢s feast in King Arthurââ¬â¢s court. We can see that this green knight is the symbol for corruption and dangerousness, in comparison to the symbolism of Arthurââ¬â¢s court, including Sir Gawain, being orderliness and safety. He is clothed in all green garments, ââ¬Å"And garments of green girt the fellow aboutââ¬âA two-third length tunic, tight at the waistâ⬠(Gawain, 151-152). The green in his appearance is the symbol for evil because he becomes the adversary of Sir Gawain, the one who challenges Gawainââ¬â¢s morality. The Green Knightââ¬â¢s weapons are also decorated in green, ââ¬Å"The head of that axe was an ell-rod long. Of green hammered gold and steel was the socket, And the blade was burnished bright, with a broad edgeâ⬠(Gawain, 211-212). The abundance of the color of green is important because it represents Gawainââ¬â¢s instability and uncertainty. The Green Knight uses the weapons to take three blows at Sir Gawain, but Gawain flinches before he is able to strike him. The creature leaves a scar Gawainââ¬â¢s neck when they finally clash; the wound is symbolic for the deterioration of Gawainââ¬â¢s knighthood. Sir Gawain was a person full of virtue and believed in the goodness of the world, as the poet describes him as ââ¬Å"like gold well refined, He was devoid of all villainy, every virtue displaying In the fieldâ⬠(Gawain 633-635). He is called up to fight thisà Green Knight. Before he starts his quest to encounter the knight, he is welcomed as a guest at Lord Bertilakââ¬â¢s castle to stay and rest easily for a couple of days. As a knight of King Arthurââ¬â¢s court, the Lord expects Gawain to be courteous and do whatever action the Lady performs on Gawain to the Lord himself. While the Lord is out hunting deer, boars, and foxes in the forest, the Lady sneaks into Gawainââ¬â¢s bedroom, closes the door shut, and attempts to seduce him like how her husband is hunting the animals. Following the code of the knights, Gawain tries to politely push the Lady away by dancing around the conversation and letting her down easy as he says, ââ¬Å"ââ¬ËIndeed, dear lady, you did better,ââ¬â¢ said the knight, And solemnly as your servant say you are my sovereign. May Christ requite it you: I have become your knightââ¬â¢Ã¢â¬ (Gawain, 1276-1278). The knightliness forbids Gawain from growing as a person because chivalry is all he follows. When the Lady doesnââ¬â¢t get what she wants, she decides to takes another approach and challenges Gawainââ¬â¢s knighthood with a gift of the green girdle that contains magical powers such as immortality. Gawain finally commits an error by taking this gift from the Lady; the green girdle gives a hint at Gawainââ¬â¢s instability and uncertainty to be an honest knight. He is supposed to do what the Lady does to him back to the Lord, which means that Gawain is expected to give this girdle back to the Lord. Instead, Gawain ends up not doing so and tries to avoid telling the Lord what happened while he was out hunting animals. By sinning, Gawain loses all his virtues as a knight and finally begins to learn the value of life. The other prominent green object in Sir Gawain and the Green Knight is the green chapel, where Sir Gawain and the Green Knight were supposed to meet for battle. His guide warns Gawain that no one has successfully defeated the mythical creature before. This doesnââ¬â¢t change his decision to fight the green knight. When Gawain finally reaches the Green Chapel, it is described as chaotic just like when the Green Knight interrupts King Arthurââ¬â¢s court. The poet describes it by saying, ââ¬Å"It had a hole in each end and on either side, And was overgrown by grass in great patches. All hollow it was within, only an old cavernâ⬠(Gawain, 2180-2184). It outlines the true messiness and disorderliness of the place in great detail. The poet also describes the chapelââ¬â¢s satanic characteristics when he says, ââ¬Å"ââ¬ËO God, is the Chapel Green This mound?ââ¬â¢ said the noble knight. ââ¬ËAt such might Satan be seen Saying matins at midnightââ¬â¢Ã¢â¬ à (Gawain, 2187-2189). These corruptive characteristics of the Green Chapel foreshadow the outcome of the duel between Gawain and the Green Knight. When the two of them finally encounter each other at the Green Chapel, the Green Knight claims that Gawain isnââ¬â¢t acting like himself, ââ¬Å"ââ¬ËYouââ¬â¢re not Gawain,ââ¬â¢ said the gallant, ââ¬Ëwhose greatness is such That by hill or hollow no army ever frightened him; For now you flinch for fear before you feel harmâ⬠(Gawain, 2270-2272). With his unique weapons, the Green Knight strikes three blows at Gawain, but only one of them has any impact on him. This scar on his neck is an example of Memento Mori, a keepsake that helps Gawain remember his mortality and ability to commit human error. Sir Gawain learns the true value of life through a convoluted process. He is no longer the chivalrous knight that he originally was because he makes the mistake of not telling Lord Bertilak, who turns out to be the corrupted Green Knight in disguise, about the gift of the magical green girdle. The Lord eventually finds out because he is actually testing Gawainââ¬â¢s ability to be a true knight. As a consequence of his lie, Gawain ultimately loses his perfectness and virtues. In the denouement of the poem, Gawain continues to wear the green girdle in Arthurââ¬â¢s court also as a Memento Mori, as a reminder of his mistake of lying, which signifies that he is finally learning from it and progressing altogether as a person.
Thursday, January 23, 2020
George Orwells Coming Up for Air Essays -- George Orwell Coming Air E
George Orwell's Coming Up for Air George Orwellââ¬â¢s novel, Coming Up for Air, portrays England at two different times. The story is based around George Bowling in 1939 and his life in the suburbs of London on Ellesmere Road, where all the houses are the same. He is very cynical of the world around him and dreams of his times as a child in Lower Binfield when things were not perfect, but not yet ruined by the Great War. The vision of 1900 England versus England in 1939 creates a sharp contrast in life for George Bowling. In 1939 England is on the verge of another war, and life is impersonal, harsh, and industrial. The reality of 1939 is only accentuated by Georgeââ¬â¢s trip to his childhood home of Lower Binfield, where nothing is the same as he left before the Great War. George Bowlingââ¬â¢s first glimpse of Lower Binfield in 1939 leaves him baffled. He does not even recognize his childhood home. The small town of two thousand has turned into a city of twenty five thousand. Upon seeing his old home he exclaims, ââ¬Å"But where was Lower Binfield? Where was the town I used to know? It might have been anywhere. All I knew it was buried somewhere in the middle of that sea of bricks.â⬠The town is fundamentally different then when George left it. The old brewery is gone and the main manufacturing in the city was bombs for the RAF. People in the streets are preparing for impending war with Germany. They are practicing for air raids and bombers are constantly flying overhead. The marketplace where all the shops were during his childhood is now called the ââ¬Å"Old Marketâ⬠. George could not even find his way around town because of all the new streets. He recognized many of the shops but they all had different names and owners. This differenc e startles George but also shows an important difference between England in 1900 and 1939 England. Towns were becoming cities, the war had industrialized the entire nation very quickly, and a small town like Lower Binfield quickly became a manufacturing center. The city no longer housed the smaller family owned businesses that had once dominated Lower Binfield. These smaller shops had been bought out by national businesses that were expanding across England closing smaller shops in all the towns. Shopkeepers like Georgeââ¬â¢s dad who refused to innovate and carry different merchandise were left to slowly die as stores like Sarazins, ââ¬Å"big retail ... ...o have conversations with strangers. The development of England and the industrialization brought with the war has made life even more impersonal. Georgeââ¬â¢s post war euphoria of getting a great job and becoming very successful was shattered by the reality that England did not have jobs for everyone and Englandââ¬â¢s familiar face had changed. Coming Up for Air illustrates the changes in England during the twentieth century. George Bowling is George Orwellââ¬â¢s tragic character trying to hold on to Englandââ¬â¢s fading past. What he ultimately realizes is that England has changed forever. The Great War has demolished the old simple way of life that Lower Binfield held for George when he was a child. The new England is one with cars, suburbs, trash dumps, assembly lines, and war. The quiet serenity George found when he was fishing is not available to him in 1939. He is stuck with his job, his false teeth, his nickname ââ¬Å"fattyâ⬠, family, his house on Ellesmere Road, the impending war with Germany, and the post-war period. The reality that George lives in is the harsh, impersonal England of 1939. Bibliography Orwell, George. Coming Up for Air. New York: Harcourt Brace and Company, 1950.
Tuesday, January 14, 2020
Gender Communication Essay
Women are continually hammering against a glass ceiling and also their advancement is usually hindered by a promotion bottleneck in the middle management and a sticky floor. According to a recent research on an analysis of careers from a number of employees, it was found out that the rates of promotion for men from the start of their careers to senior management was higher as compared to women who started at the same level. Majority of men were promoted as compared to women who had equivalent experience and education. This has adversely affected gender communication by way of intimidation whereby the women are left feeling inferior (Ivy, 28). I picked this topic so that I can comprehend deeply on the effects of glass ceiling and sticky floors approach to communication, and how it is related to gender communication. Knowledge about this topic would adequately prepare me for the world since I would be knowledgeable on how to handle various aspects of my life which include my workplace and my relationships. I came to discover that the glass ceiling and sticky floors issues had only been studied at a high level especially at the top of the management. Women are only promoted to very top positions only if they have successfully made it through at the middle management level (Wood, 157). From my conclusive research I discovered that there is usually a floor that is men dominated by the men in regards to promotions. Unfortunately for women, it is extremely difficult to penetrate through this floor due to the fact that there is a lot biases towards women promotions. Men are easily promoted whereas for women, they have to demonstrate capabilities beyond reasonable doubt that they deserve a promotion. I learnt that there is also the challenge of a mid- level bottleneck towards women which ideally favored men. This concept ensured that few women were promoted from the mid-level management to senior management. This meant that a lot of women were stuck at the mid-level management and they did not progress further from this level. However, this was not same case with men who had similar credentials to the women regardless of both sexes having similar qualifications academically andà experience (Krolokke and Ann, 58). I was deeply surprised by the aforementioned findings and I had to ask myself various questions about the topic. I still have not understood where there should be that prejudice towards women yet there is an affirmative action regarding women. I am yet to establish effective solutions to the link between challenges of gender communication in relation to the glass ceiling and sticky floors approach to communication. A number of areas need to be researched thoroughly so that the relation of the two aspects are understood and practice to the letter. Challenges that face the two aspects should be dealt with through consensus so that there can be a win- win solution where both parties, that is the male and female live and work in harmony (Wood, 159). In conclusion, I wish to strongly suggest that the gender equality aspect should be practiced and women should effectively be given equal opportunities like their male counterparts. Gender communication needs to be a two way traffic and both the male and female should have equal opportunities to express themselves. The barriers that create the glass ceiling and sticky floors approach to communication should be eradicated. Everyone should be given equal opportunities for harmony between both sexes to prevail. Works Citied Ivy, Diana K. Genderspeak: Personal Effectiveness in Gender Communication. Boston: Pearson Education, 2012. Print. Krolà ¸kke, Charlotte, and Ann S. Sà ¸rensen. Gender Communication Theories & Analyses: From Silence to Performance. Thousand Oaks, Calif. [u.a.: SAGE, 2006. Print. Wood, Julia T. Gendered Lives: Communication, Gender, and Culture. Belmont, CA: Thompson/Wadsworth, 2008. Print. Wood, Julia T. Gendered Lives: Communication, Gender, and Culture. Boston, MA: Wadsworth/Cengage, 2013. Print.
Monday, January 6, 2020
The Influence of Alcohol and Drugs in Edgar Allen Poe Life...
The influence of alcohol and drugs in Edgar Allan Poeââ¬â¢s life ââ¬Å"Deep into that darkness peering, long I stood there, wondering, fearing, Doubting, dreaming dreams no mortal ever dreamed beforeâ⬠(Edgar Allan Poe). Darkness and sadness are strong characteristics of Edgar Allan Poeââ¬â¢s writing. The tragedies during his life, such as the death of his biological and adoptive moms, followed by the death of his young wife Virginia were important factors which formed his gothic style. Poe is known for his drinking problems and use of drugs. Those habits had a big influence in his life and in his works. Family members, classmates, depression and disasters influenced Poe to use alcohol. The possibilities of Poe been an alcoholic increasedâ⬠¦show more contentâ⬠¦1). Poe went so far that he got into a point that he drank absinthe and brandy which is a really dangerous mixture (Poe, Drugs and Alcohol 27). Between the many possible causes of Edgar Allan Poeââ¬â¢s de ath, his problem with alcohol is really considerable as one important reason of his early death (Scharf, Douglas 1). Even though Poe was completely addicted to alcohol, many times, he tried very hard to fight against his alcoholism. Right after his first long drinking experience, during college, he tried to stay away from it (Black, Jamee A. 3). His drinking times were intermittent and he stayed abstain from alcohol for months in some of those periods (Poe, Drugs and Alcohol 8). Promises were made and repeatedly times he said that would never drink again. As one side of Poe tells him that he should stop with alcohol, the other side tells that he should drink to relief his emotional pains and usually he followed this last side once is a lot easier to deal with it (Black, Jamee A. 6). In 1847, Poeââ¬â¢s get extremely hard into drinking, one of the worse times during his whole life, after the death of his young wife Virginia (Hennelly, Mark M. 1). After this event he could stop dr inking alcohol anymore (Poe, Drugs and Alcohol 14). Other important characteristic of his life is the use of drugs. Some evidences show that Poe really used drugs but for medical benefits in which the doctors gave to him as a medicineShow MoreRelatedEssay about The Genius that Was Edgar Allan Poe1799 Words à |à 8 Pagesare not recognized for their effect on society until well after their lives have ended. One of the individuals in particular goes by the name of Edgar Allan Poe. Most people when asked what they know of the man conjure up images of horror and darkness that they have learned to associate with the man. Many thought of him as a tortured alcoholic and drug addict, but so much more is to be said of the man who single handedly created so much literary success, though he did not reap many benefits fromRead MoreProposition to Reface Mount Rushmore2204 Words à |à 9 PagesMount Rushmore possesses faces that are very important and worthy, they are no longer relevant in tod ayââ¬â¢s society. The proposition I have for the re-facing of Mount Rushmore is sure to be relevant and inspiring to Americans for centuries to come. Edgar Allen Poe was an American poet and short story composer whose writings have influenced literature for a century and a half. Calvin Coolidge was a strong leader who was appointed to presidential office in the 1920s. He also had a very awesome last name.Read MoreEssay on Edgar Allen Poes Fall of House of Usher1733 Words à |à 7 PagesBipolar disorder affects many people today as well as in the time of Edgar Allen Poe when it was then called melancholia. Poe was diagnosed with this disorder and it plays an integral role in his story, ââ¬Å"The Fall of the House of Usherâ⬠(1839). This story is heavily influenced by this disorder or its presently associated symptoms and also describes one way that bipolar disorder can genetically affect an entire family. To fully understand a story involving this disorder, it is cardinal to know theRead MoreEssay Edgar Allan Poe3220 Words à |à 13 PagesEdgar Allan Poe The boundaries which divide Life and Death are at best shadowy and vague. Who shall say where one ends, and where the other begins? Edgar Allan Poe, The Premature Burial (Bartlett, 642). To venture into the world of Edgar Allan Poe is to embark on a journey to a land filled with perversities of the mind, soul, and body. The joyless existence carved out by his writings is one of lost love, mental anguish, and the premature withering of his subjects. Poe wrote in a style thatRead MoreAttachment Is Defined As The Bond Between An Infant And A Primary Caregiver And The Reaction Essay1925 Words à |à 8 PagesSamuel Staton Attachment is defined as the bond that is formed between an infant and a primary caregiver and the reaction an infant has during separation when reuniting with his/her primary caregiver (Lee, 2003). Since parents, biology, and culture influence attachment, children will experience different effects and results based on how attachment develops. In 1964, Rudolph Schaffer and Peggy Emerson conducted a study in which they studied babies and developed a sequential progression of attachmentRead MoreThe Opioid Crisis And Communities Nationwide3993 Words à |à 16 Pageswhile he was on life support is something I will never forget. I had never been through something like this and never hope to again. This great loss was tragic but at the same time motivated me to want to make a difference. I knew I didnââ¬â¢t want anyone to have to go through what his family and I did. Unfortunately, many have been in that same excruciating place. Going through this experience is what made me want to combat the issue of drugs. In this paper, I will be creating my own drug treatment programRead MoreResearch Assignment . 15. Alyssa Swartz. May 2, 2017. Criminal3997 Words à |à 16 Pageswhile he was on life support is something I will never forget. I had never been through anything like this and never hope to again. This great loss was tragic, but at the same time motivated me to want to make a difference. I knew I didnââ¬â¢t want anyone to have to go through what his family and I did. Unfortunately, many have been in that same excruciating place. Going through this experience is what made me want to combat the issue of drugs. In this paper, I will be creating my own drug treatment programRead MoreFundamentals of Hrm263904 Words à |à 1056 PagesSkills 25 Case 1: Work/Life Balance at Baxter 25 Working with a Team: Understanding Diversity Issues 25 Learning an HRM Skill: Guidelines for Acting Ethically 26 Enhancing Your Communication Skills 26 ETHICAL ISSUES IN HRM: Invasion of Privacy? 9 WORKPLACE ISSUES: We Are Now Entering the Blogosphere 10 Workforce Diversity 10 The Workforce Today 10 DID YOU KNOW?: Chief Diversity Officer 11 How Diversity Affects HRM 11 WORKPLACE ISSUES: Diversity Awareness 12 What Is a Work/Life Balance? 12 DID YOU
Sunday, December 29, 2019
How to Manipulate INI files from Delphi
INI files are text-based files used for storing an applications configuration data. Even though Windows recommends using the Windows Registry to store application-specific configuration data, in many cases, youll find that INI files provide a quicker way for the program to access its settings. Windows itself even uses INI files;à desktop.inià and boot.inià being just two examples. One simple use of INI filesà as a status saving mechanism would be to save the size and location of a form if you want a form to reappear at its previous position. Instead of searching through a whole database of information to find the size or location, an INI file is used instead. The INI File Format Initialization or Configuration Settings file (.INI) is a text file with a 64 KB limit divided into sections, each containing zero or more keys. Each key contains zero or more values. Heres an example: [SectionName] keyname1value ;comment keyname2value Section names are enclosed in square brackets and must begin at the beginning of a line. Section and key names are case-insensitive (the case doesnt matter), and cannot contain spacing characters. The key name is followed by an equal sign (), optionally surrounded by spacing characters, which are ignored. If the same section appears more than once in the same file, or if the same key appears more than once in the same section, then the last occurrence prevails. A key can contain string, integer, or boolean value.ââ¬â¹ Delphi IDE uses the INI file format in many cases. For example, .DSK files (desktop settings) utilize the INI format. TIniFile Class Delphi provides the TIniFile class, declared in the inifiles.pas unit, with methods to store and retrieve values from INI files. Prior to working with the TIniFile methods, you need to create an instance of the class: uses inifiles; ... var à à IniFile : TIniFile; begin à à IniFile : TIniFile.Create(myapp.ini) ; The above code creates an IniFile object and assigns myapp.ini to the only property of the class ââ¬â the FileName property ââ¬â used to specify the name of the INI file you are to use. The code as written above looksà for the myapp.ini file in the \Windows directory. A better way to store application data is in the applications folder - just specify the full pathname of the file for the Create method: // place the INI in the application folder, // let it have the application name // and ini for extension: iniFile : TIniFile.Create(ChangeFileExt(Application.ExeName,.ini)) ; Reading From INI The TIniFile class has several read methods. The ReadString reads a string value from a key, ReadInteger. ReadFloat and similar are used to read a number from a key. All read methods have a default value that can be used if the entry does not exist. For example, the ReadString is declared as: function ReadString(const Section, Ident, Default: String): String; override; Write to INI The TIniFile has a corresponding write method for each read method. They are WriteString, WriteBool, WriteInteger, etc. For example, if we want a program to remember the name of the last person who used it, when it was, and what the main form coordinates were, we might establish a section called Users, a keyword called Last, Dateà to track the information, and a section called Placementà with keys Top,à Left,à Width, and Height. project1.ini à [User] à LastZarko Gajic à Date01/29/2009 à [Placement] à Top20 à Left35 à Width500 à Height340 Note that the key named Last holds a string value, Date holds a TDateTime value, and all keys in the Placement section hold an integer value. The OnCreate event of the main form is the perfect place to store the code needed to access the values in the applications initialization file: procedure TMainForm.FormCreate(Sender: TObject) ; var à à appINI : TIniFile; à à LastUser : string; à à LastDate : TDateTime; begin à à appINI : TIniFile.Create(ChangeFileExt(Application.ExeName,.ini)) ; à à try à à à à //if no last user return an empty string à à à à LastUser : appINI.ReadString(User,Last,) ; à à à à //if no last date return todays date à à à à LastDate : appINI.ReadDate(User, Date, Date) ; à à à à //show the message à à à à ShowMessage(This program was previously used by LastUser on DateToStr(LastDate)); à à à à Top : appINI.ReadInteger(Placement,Top, Top) ; à à à à Left : appINI.ReadInteger(Placement,Left, Left); à à à à Width : appINI.ReadInteger(Placement,Width, Width); à à à à Height : appINI.ReadInteger(Placement,Height, Height); à à finally à à à à appINI.Free; à à end; end; The main forms OnClose event is ideal for the Save INI part of the project. procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction) ; var à à appINI : TIniFile; begin à à appINI : TIniFile.Create(ChangeFileExt(Application.ExeName,.ini)) ; try à à à à appINI.WriteString(User,Last,Zarko Gajic) ; à à à à appINI.WriteDate(User, Date, Date) ; à à à à with appINI, MainForm do à à à à begin à à à à à à WriteInteger(Placement,Top, Top) ; à à à à à à WriteInteger(Placement,Left, Left) ; à à à à à à WriteInteger(Placement,Width, Width) ; à à à à à à WriteInteger(Placement,Height, Height) ; à à à à end; à à finally à à à à appIni.Free; à à end; end; INI Sections The EraseSection erases an entire section of an INI file. ReadSection and ReadSections fillà a TStringList object with the names of all sections (and key names) in the INI file. INI Limitations Downsides The TIniFile class uses the Windows APIà which imposes a limit of 64 KB on INI files. If you need to store more than 64 KB of data, you should use the TMemIniFile. Another problem might arise if you have a section with more than 8 K value. One way to solve the problem is to write your own version of the ReadSection method.
Subscribe to:
Posts (Atom)