RE: Layout by code - a wonderful tool but....

  • From: Katherine Moss <Katherine.Moss@xxxxxxxxxx>
  • To: "programmingblind@xxxxxxxxxxxxx" <programmingblind@xxxxxxxxxxxxx>
  • Date: Sun, 7 Aug 2011 18:18:17 +0000

Thanks for I was a bit curious as well.  

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of black ares
Sent: Sunday, August 07, 2011 2:00 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: Layout by code - a wonderful tool but....

Jamal, can you offer an example of such files?

----- Original Message ----- 
From: "Jamal Mazrui" <empower@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Cc: "Littlefield, Tyler" <tyler@xxxxxxxxxxxxx>
Sent: Sunday, August 07, 2011 6:18 PM
Subject: Re: Layout by code - a wonderful tool but....


> Tyler,
> Evidently, one of your favorite pastimes is hurling insults at people on 
> this list.  For a while it appeared that you had matured from your early 
> years, but there has been major regression lately.  Your lack of people 
> skills will be a serious hindrance to your career, unfortunately.  I guess 
> the destructive fun is more important to you now.
>
> Jamal
>
>
>
> On 8/7/2011 11:04 AM, Littlefield, Tyler wrote:
>> You seem to see all the files that vs uses (not that many actually) as a
>> problem. It just helps keep things organized, and is much much better
>> than cramming 12000 lines into a text file.
>> On 8/7/2011 5:09 AM, Jamal Mazrui wrote:
>>> VS definately generates much code automatically that one does not
>>> need. The same program can be written much more concisely, in far
>>> fewer files, than with VS generated code. This is a typical downside
>>> of an IDE that needs to be balanced against its advantages.
>>>
>>> Jamal
>>>
>>>
>>> On 8/6/2011 4:27 AM, black ares wrote:
>>>> You compare two different things, HTML wysiwyg and IDEs.
>>>> First type of applications generate indeed a lot of crapy code, but the
>>>> problem is not the crapy code generated, but the fact that, a lot of
>>>> code loads very hard in a browser.
>>>> On the other part, IDEs don't create a lot of crapy code, but only the
>>>> code you need.
>>>> If you examine the code generated by the visual studio you will see 
>>>> that
>>>> is the exact code you will gonna write if you know how to write code
>>>> best.
>>>> I didn't see any line there which I could say:
>>>> "I can delete this, I don't need it.
>>>> If you prefeer to loose time by writting a lot of non-sens code that 
>>>> can
>>>> be generated automaticaly, it is your option, but don't promote that as
>>>> the best practice, because it isn't.
>>>> More over, ides have a lot of features and simply saying that they are
>>>> useless because you don't like automatic code generation is a sily
>>>> thing.
>>>> What about code completion, refactoring features and so on.
>>>> Like in eclipse where you can write a class together with getters and
>>>> setters with out writting code.
>>>> You know what?
>>>> I simply hate to write getters and setters becauze they take a lot of
>>>> time and do nothing spectacular.
>>>> So I am very happy when my IDE takes this from me and let me write the
>>>> real code.
>>>> Finally, about layout by code, I can use the visual studio designer and
>>>> use grid layout /table layout and make my windows forms/wpf look great
>>>> in a decent time frame.
>>>> So why I need layout by code?
>>>>
>>>> The aim is to get that piece of software as quickly as I can in the
>>>> budget and quality envisioned?
>>>> Or to loose time by writting code.
>>>> If the goal is to simply write code for the sake of writting code, go
>>>> on.
>>>> But don't expect to be competitive when some one does the same 
>>>> software,
>>>> same quality in less time.
>>>>
>>>>
>>>>
>>>> ----- Original Message ----- From: "Katherine Moss"
>>>> <Katherine.Moss@xxxxxxxxxx>
>>>> To: <programmingblind@xxxxxxxxxxxxx>
>>>> Sent: Saturday, August 06, 2011 12:59 AM
>>>> Subject: RE: Layout by code - a wonderful tool but....
>>>>
>>>>
>>>> I'm just saying that I like having the productivity features of VS, and
>>>> I'm not saying that I wouldn't use the command line compilers for some
>>>> tasks. I just would use both depending on the situation.
>>>>
>>>> -----Original Message-----
>>>> From: programmingblind-bounce@xxxxxxxxxxxxx
>>>> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of 
>>>> Littlefield,
>>>> Tyler
>>>> Sent: Thursday, August 04, 2011 11:49 PM
>>>> To: programmingblind@xxxxxxxxxxxxx
>>>> Subject: Re: Layout by code - a wonderful tool but....
>>>>
>>>> There is something you're not getting though. Someone who can write 
>>>> code
>>>> and understand it, even if it is to understand what the generated code
>>>> does, is going to be a lot better at handling errors than someone who
>>>> says "I can just flick through property dialogs and let vs do this all
>>>> for me," because they don't know what that code does. An IDE is an
>>>> awesome tool, but don't let it become your crutch.
>>>> On 8/4/2011 7:07 PM, Katherine Moss wrote:
>>>>> I guess that since I find the designers and property dialogs of Visual
>>>>> studio relatively accessible, and I have books telling me not to worry
>>>>> about the vs-generated code, I don't worry about it. I think it's
>>>>> quicker to click through a couple of property dialogs than it is to
>>>>> learn all of the code to create all of the gui elements as well, and
>>>>> most of the information you find on the internet, when referring to C#
>>>>> at least, will lead you to tutorials with Visual studio.
>>>>>
>>>>> -----Original Message-----
>>>>> From: programmingblind-bounce@xxxxxxxxxxxxx
>>>>> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Trouble
>>>>> Sent: Thursday, August 04, 2011 9:10 PM
>>>>> To: programmingblind@xxxxxxxxxxxxx
>>>>> Subject: RE: Layout by code - a wonderful tool but....
>>>>>
>>>>> Microsoft office will also load crap in the html.
>>>>> Doing something in a basic editor makes you learn the code not the
>>>>> short cuts to make the code.
>>>>>
>>>>> At 02:00 PM 8/4/2011, you wrote:
>>>>>> Hi,
>>>>>> If you decide not to use an IDE, you get total control over exactly
>>>>>> what code gets dumped into your application. It's difficult to know
>>>>>> what code VS is going to add. Way back a long time ago, I started to
>>>>>> build web pages with FrontPage, and scrapped it, because it filled my
>>>>>> pages with all kinds of bloaty stuff.
>>>>>>
>>>>>> I'm in no way against using an IDE, though, as long as you know what
>>>>>> it's going to do to your stuff. They help with productivity for sure.
>>>>>>
>>>>>> Jim
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: programmingblind-bounce@xxxxxxxxxxxxx
>>>>>> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Katherine
>>>>>> Moss
>>>>>> Sent: Thursday, August 04, 2011 12:47 PM
>>>>>> To: programmingblind@xxxxxxxxxxxxx
>>>>>> Subject: RE: Layout by code - a wonderful tool but....
>>>>>>
>>>>>> Why not? What if one is more comfortable (as am I when doing C# demo
>>>>>> projects), using an IDE?
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: programmingblind-bounce@xxxxxxxxxxxxx
>>>>>> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Homme,
>>>>>> James
>>>>>> Sent: Thursday, August 04, 2011 12:39 PM
>>>>>> To: programmingblind@xxxxxxxxxxxxx
>>>>>> Subject: RE: Layout by code - a wonderful tool but....
>>>>>>
>>>>>> Hi,
>>>>>> This is probably going to be a very silly question. Why are using
>>>>>> VisualStudio at all with LBC?
>>>>>>
>>>>>> Jim
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: programmingblind-bounce@xxxxxxxxxxxxx
>>>>>> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Bue
>>>>>> Vester-Andersen
>>>>>> Sent: Thursday, August 04, 2011 11:40 AM
>>>>>> To: programmingblind@xxxxxxxxxxxxx
>>>>>> Subject: SV: Layout by code - a wonderfull tool but....
>>>>>>
>>>>>> Hi again,
>>>>>>
>>>>>> Further to my problem with Layout by code.
>>>>>> This time I tried the original FruitBasketCS program without
>>>>>> modifications.
>>>>>> When I go into the project properties and set output type to console
>>>>>> application everything runs nicely, except for the anoying fact that
>>>>>> a console window is created for the program which is not used anyway.
>>>>>> When I change the output type to Windows Application the previously
>>>>>> mentioned "invalid cast exception" occurs.
>>>>>> Still, I can step through the program by using f10 and f11.
>>>>>>
>>>>>> In the meantime I also found out that the so-called ParkingWindow
>>>>>> apparently seems to be an invisible window, a kind of clip-board that
>>>>>> is used when you move controls from one window to another. I must
>>>>>> admit that I am getting more and more confused
>>>>>>
>>>>>> I hope someone can help me, please. I still think that using Layout
>>>>>> by Code would be a great way for a blind person to make a user
>>>>>> interface with a decent layout
>>>>>>
>>>>>> Best regards
>>>>>> Bue
>>>>>>
>>>>>>
>>>>>> -----Oprindelig meddelelse-----
>>>>>> Fra: programmingblind-bounce@xxxxxxxxxxxxx
>>>>>> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] På vegne af Bue
>>>>>> Vester-Andersen
>>>>>> Sendt: 2. august 2011 21:09
>>>>>> Til: programmingblind@xxxxxxxxxxxxx
>>>>>> Emne: Layout by code - a wonderfull tool but....
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> First of all a million thanks to Jamal for his great work. LBC is
>>>>>> just about the most fantastic programming tool I have ever stumbled
>>>>>> upon. I am congenitally blind and have always found it next to
>>>>>> imposible to work out a layout that would work at all.
>>>>>>
>>>>>> Now for my problem:
>>>>>> I am trying to make a template for use with Visual Studio 2008
>>>>>> building on the template for a Windows forms application. Everything
>>>>>> compiles fine, but when I run the resulting program I get the
>>>>>> following exception (translated from Danish):
>>>>>>
>>>>>> Invalid cast exception
>>>>>> {"an object of the type
>>>>>> 'Microsoft.VisualStudio.HostingProcess.ParkingWindow'
>>>>>> can not be converted to the type 'Homer.LbcForm'."}
>>>>>>
>>>>>> The exception occurs at the CompleteWindow() call. It looks to me as
>>>>>> if I was referencing the form before it is actually created. The
>>>>>> funny thing is that everything works fine when I step into the code
>>>>>> using f10 and f11. I don't suppose there could be a race condition?
>>>>>> Hope someone can help me.
>>>>>>
>>>>>> Below is the code I am using. As I said, it is built on the Windows
>>>>>> form application template.
>>>>>> I thought that the use of component
>>>>>> initialization might be the cause of my trouble, so I tried to remove
>>>>>> all the designer and component stuff, but it didn't solve anything.
>>>>>>
>>>>>> LbcForm1.cs
>>>>>>
>>>>>> using System;
>>>>>> using System.Collections.Generic;
>>>>>> using System.ComponentModel;
>>>>>> using System.Data;
>>>>>> using System.Drawing;
>>>>>> using System.Linq;
>>>>>> using System.Text;
>>>>>> using System.Windows.Forms;
>>>>>> using Homer;
>>>>>>
>>>>>> namespace LBCFormsApplication1
>>>>>> {
>>>>>> public partial class LbcForm1 : LbcForm
>>>>>> {
>>>>>> public LbcForm1()
>>>>>>
>>>>>>
>>>>>> {
>>>>>> InitializeComponent();
>>>>>> this.Init("LbcForm1", null, null);
>>>>>> this.AddMyControlls();
>>>>>>
>>>>>> }
>>>>>>
>>>>>> Private void AddMyControlls()
>>>>>> {
>>>>>> // Add controlls here.
>>>>>> // AddButton("ok");
>>>>>>
>>>>>> }
>>>>>>
>>>>>> public void OnEvent(string sEvent, Control oSender,
>>>>>> EventArgs oArgs)
>>>>>> {
>>>>>> // Add event code here.
>>>>>>
>>>>>> }
>>>>>>
>>>>>> }
>>>>>> }
>>>>>>
>>>>>> LbcForm1.Designer.cs
>>>>>>
>>>>>> namespace LBCFormsApplication1
>>>>>> {
>>>>>> partial class LbcForm1
>>>>>> {
>>>>>> ///<summary>
>>>>>> /// Required designer variable.
>>>>>> ///</summary>
>>>>>> private System.ComponentModel.IContainer components
>>>>>> = null;
>>>>>>
>>>>>> ///<summary>
>>>>>> /// Clean up any resources being used.
>>>>>> ///</summary>
>>>>>> ///<param
>>>>>> name="disposing">true if managed resources should be disposed;
>>>>>> otherwise, false.</param>
>>>>>> protected override void Dispose(bool disposing)
>>>>>> {
>>>>>> if (disposing&& (components != null))
>>>>>> {
>>>>>> components.Dispose();
>>>>>> }
>>>>>> base.Dispose(disposing);
>>>>>> }
>>>>>>
>>>>>> #region Windows Form Designer generated code
>>>>>>
>>>>>> ///<summary>
>>>>>> /// Required method for Designer support - do not modify
>>>>>> /// the contents of this method with the code editor.
>>>>>> ///</summary>
>>>>>> private void InitializeComponent()
>>>>>> {
>>>>>> this.components = new
>>>>>> System.ComponentModel.Container();
>>>>>> this.AutoScaleMode =
>>>>>> System.Windows.Forms.AutoScaleMode.Font;
>>>>>> }
>>>>>>
>>>>>> #endregion
>>>>>> }
>>>>>> }
>>>>>>
>>>>>>
>>>>>> Program.cs
>>>>>>
>>>>>> using System;
>>>>>> using System.Collections.Generic;
>>>>>> using System.Linq;
>>>>>> using System.Windows.Forms;
>>>>>>
>>>>>> namespace LBCFormsApplication1
>>>>>> {
>>>>>> static class Program
>>>>>> {
>>>>>> ///<summary>
>>>>>> /// The main entry point for the application.
>>>>>> ///</summary>
>>>>>> [STAThread]
>>>>>> static void Main()
>>>>>> {
>>>>>> Application.EnableVisualStyles();
>>>>>>
>>>>>> Application.SetCompatibleTextRenderingDefault(false);
>>>>>> LbcForm1 oLbcForm = new LbcForm1();
>>>>>>
>>>>>> // Add further initialization here.
>>>>>>
>>>>>> // Uncomment to run as window.
>>>>>> oLbcForm.CompleteWindow();
>>>>>>
>>>>>> // Uncomment to run as dialog.
>>>>>> // oLbcForm.CompleteDialog();
>>>>>>
>>>>>> }
>>>>>>
>>>>>> }
>>>>>> }
>>>>>>
>>>>>>
>>>>>> Best regards
>>>>>> Bue
>>>>>>
>>>>>> __________
>>>>>> View the list's information and change your settings at
>>>>>> //www.freelists.org/list/programmingblind
>>>>>>
>>>>>>
>>>>>> __________
>>>>>> View the list's information and change your settings at
>>>>>> //www.freelists.org/list/programmingblind
>>>>>>
>>>>>>
>>>>>> This e-mail and any attachments to it are confidential and are
>>>>>> intended solely for use of the individual or entity to whom they are
>>>>>> addressed.
>>>>>> If you have received this e-mail in error, please notify the sender
>>>>>> immediately and then delete it. If you are not the intended
>>>>>> recipient, you must not keep, use, disclose, copy or distribute this
>>>>>> e-mail without the author's prior permission. The views expressed in
>>>>>> this e-mail message do not necessarily represent the views of
>>>>>> Highmark Inc., its subsidiaries, or affiliates.
>>>>>> __________
>>>>>> View the list's information and change your settings at
>>>>>> //www.freelists.org/list/programmingblind
>>>>>>
>>>>>> __________
>>>>>> View the list's information and change your settings at
>>>>>> //www.freelists.org/list/programmingblind
>>>>>>
>>>>>> __________
>>>>>> View the list's information and change your settings at
>>>>>> //www.freelists.org/list/programmingblind
>>>>> __________
>>>>> View the list's information and change your settings at
>>>>> //www.freelists.org/list/programmingblind
>>>>>
>>>>> __________
>>>>> View the list's information and change your settings at
>>>>> //www.freelists.org/list/programmingblind
>>>>>
>>>>>
>>>>
>>>>
>>> __________
>>> View the list's information and change your settings at
>>> //www.freelists.org/list/programmingblind
>>>
>>>
>>
>>
> __________
> View the list's information and change your settings at 
> //www.freelists.org/list/programmingblind
> 

__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

Other related posts: