Jump to content
Sign in to follow this  
Icefire

I propose a change to programming.

Recommended Posts

Basically the change is that in almost all cases the compiler/gui is in complete control over the layout of a window. This means that instead of an application declaring where every window element would be, it would have a file that would declare every element. Here's some examples using pictures from Apple's HI guideline.

WindowNoResize (Settings, "Imagetype Changer Preference"); //declares a standard window with no resizing handles, dimensions are automatic. also declares the title of the window and the call function (Settings).
Include Help (manual.pdf); //declares that there is a help button included, which in this case launches the pdf manual
section 1 ("General Editing") //creates the first section and gives it a title. the following is it's contents
radio (ImageOption, 0="Select existing image", 1="Add a margin around image") //declares a radio button with two option, sets the result to ImageOption 
InputBox Integer ( "Size:", ImageSize, "points") //declares an inputbox for numbers, surrounding text, and location where to store the result.
CheckBox (ReposChange, "Reposition windows after change") //declares a checkbox and sends the result (TRUE/FALSE) to ReposChange
CheckBox (Remember, "Remember recent items") //declares a checkbox and sends the result to Remember
end section 1; //finishes section
section 2 ("Clipboard settings") //declares section two
Radio (ClipOpt, 0="Copy selection from image only", 1="Erase section from Image") //declares radio, sends results to ClipOpt
CheckBox (Dither, "Dither content of clipboard") //declares checkbox, sends results to Dither
end section 2;
section 3 ("Color Optimization:") //declares section three
CheckBox (Calc, "Calculate best color table")
CheckBox (Ver, "Verify color table integrity")
CheckBox (NoteLoss, "Notify on loss of color information")
CheckBox (NoteBef, "Notify before CMYK to RGB conversion")
end section 3;
end window //declres the end of the window's code.

then the compiler or the Operating System's GUI will use this information to render the following window:

lyoutappprefexample.jpg

This will also be a boon for cross-platform programming because the compiler and GUI have full control, so they can make the code follow the Interface guidelines of the OS being compiled for (or that the program is sunning on, in the case of java and other cross-platform executables).

 

and yes, I know that there are serious flows in the code itself, but I'm not really a programmer.

Edited by Icefire

Share this post


Link to post
Share on other sites

Microsoft Windows provides relatively low-level C APIs to the programmer. The result is inconsistent behavior across applications.

 

There have been various attempts to remedy this, such as Microsoft Foundation Classes and .NET's Windows Forms and Windows Presentation Foundation.

 

The hacks required to create cross-platform applications have already been implemented by projects like wxWidgets and Qt

Share this post


Link to post
Share on other sites

This will also be a boon for cross-platform programming because the compiler and GUI have full control, so they can make the code follow the Interface guidelines of the OS being compiled for (or that the program is sunning on, in the case of java and other cross-platform executables).

 

and yes, I know that there are serious flows in the code itself, but I'm not really a programmer.

 

i think you want a cross-platform way,

 

this is possible in one-way, Java Applets ...

Share this post


Link to post
Share on other sites

I guess I never did really explain myself. Mostly I'm looking for a way to program so that when you compile on any platform it will be pretty much identical to a native application, in the sense that there are no user interface flaws that are correct on one OS but horribly wrong on another.

Share this post


Link to post
Share on other sites

XUL provides a lot of functionality to achieve that, as well as systems like wxWidgets and Qt. But inevitably there'll be some cross-platform differences. XUL lets you create separate CSS themes to adjust your user interface for each platform -- and it lets you write mort of your application in JavaScript.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.