Author Topic: I want my file creation back.  (Read 11333 times)

Offline Tjaalie

  • Multiple posting newcomer
  • *
  • Posts: 40
I want my file creation back.
« on: July 18, 2006, 10:24:13 pm »
Is it just me or can't you just create normal files with the newst nightly with codeblocks.
I mean whatever I do I can't get rid of the wizard wich wants me to setup things I don't even
need I just want to clock New File and get the good old box if I want to add it to the project.
No wizard telling me what to do.

Did I just screw up my codeblocks or is this a new feature I have to life with?

Tjaalie,

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: I want my file creation back.
« Reply #1 on: July 18, 2006, 10:41:10 pm »
It is a new feature... But I think the old way was better... I don't like to use a wizard for an empty file...
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: I want my file creation back.
« Reply #2 on: July 18, 2006, 10:42:31 pm »
That's the added extra "smartness" you have to live with :(

Although you can create an empty new file with Ctrl-Shift-N to get around the extra smartness, this is not really usable, as you have to add it to the project manually...

Now just you wait until the IDE gets even smarter and forces you to recompile the whole project if you change one compiler setting... I keep telling you, things should never be too "smart".
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: I want my file creation back.
« Reply #3 on: July 18, 2006, 10:44:41 pm »
I don't get it: If I use the latest nightly/SVN build I click on the "New File" icon, select "Empty file" and an empty editor opens with an empty file named "Untitled". There is no wizard at all - or what do you mean?! :(

Edit: The same applies to the menu: "File" -> "New" -> "Empty File" and voila - an empty editor opens. No wizard.
« Last Edit: July 18, 2006, 10:49:52 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: I want my file creation back.
« Reply #4 on: July 18, 2006, 10:46:23 pm »
That's the added extra "smartness" you have to live with :(
...and that's out of your mouth... ;-)
...anyway: read my previous post (our posts have crossed) and tell me what's wrong with it?

Now just you wait until the IDE gets even smarter and forces you to recompile the whole project if you change one compiler setting... I keep telling you, things should never be too "smart".
I couldn't resist: :lol:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Tjaalie

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: I want my file creation back.
« Reply #5 on: July 18, 2006, 10:48:06 pm »
 :( I want the file creation thingy back :(
Im going to use older nightly's becouse this way s*cks.

But anyway thanks to the developers for the great peace of software
there working on. I hope one day when I get back home with a hangover
and I crawl to the computer to find help becouse my girlfriend left me and
check codeblocks.org and find myself a nightly with the old file creation style
and I will thank god for the fact that he gave me the most imported thing in live.

Code Blocks

*hope my girlfriend doesn't read this*
« Last Edit: July 18, 2006, 10:51:42 pm by Tjaalie »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5179
Re: I want my file creation back.
« Reply #6 on: July 18, 2006, 10:51:52 pm »
What are you missing in the cuurent file new. You have 2 ways now.
1) wizard
2) file new (empty) --> untitled -> save it and you can give it a name and type as you like

 :?:

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: I want my file creation back.
« Reply #7 on: July 18, 2006, 10:54:48 pm »
That's the added extra "smartness" you have to live with :(
...and that's out of your mouth... ;-)
...anyway: read my previous post (our posts have crossed) and tell me what's wrong with it?
Hey, it's not me who wants wizards everywhere ;)
In my opinion, wizards are for children or for people who just learn how to use a computer, not for programmers.
Granted, for a few complicated things, a wizard can be helpful. But for simple things, simple solutions are good, and things should never be smarter than they need to be (because they are not).

Quote
2) file new (empty) --> untitled -> save it and you can give it a name and type as you like
That's an attempt to find a solution for a problem that would not be there if things were not made complicated without need in the first place. And it is a bad solution, too. You have to manually add the file to the project later.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5179
Re: I want my file creation back.
« Reply #8 on: July 18, 2006, 11:00:43 pm »
Quote
You have to manually add the file to the project later.
but often you want a new file and you don't want it to be added to a project. Sometimes you don't even want it saved (print purposes, say little scratchpad). Andthen you have a wizard asking you if it shold be added to the project or not. Woops ..; a wizard ;-)  :mrgreen:

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: I want my file creation back.
« Reply #9 on: July 18, 2006, 11:16:05 pm »
Well, I don't use Code::Blocks as scratchpad. Sadly, SciTE is a lot more usable for that purpose.

Anyway, my point is that "normal, common" things should be easy, and they aren't now.

Creating a console or Win32 application needs a filename and a base path, and that's it. Using the new wizard takes 3 times as long as before. The same goes for a wxWidgets project.
I resort to making a copy of an existing projects now and rename the project file afterwards. That's still less annoying than using the wizard, and I know that it does exactly what I want.

Adding a new source to an existing project happens really often, I do it several times every day. Adding the files by hand is really tedious, and the Wizard even more so.

I could even appreciate using a Wizard, if it was really saving work instead of causing more!
For example, you usually add a source and a header file at the same time, and both need to be added to the same target.
Here, a wizard could really save you some work! It could create the source and the header, insert header guards into the header file and an #include statement into the source, save both files to the target location, and add them both to the selected target(s).
All of this by providing one filename (or basename) and clicking on "OK, do it". That would be great.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5179
Re: I want my file creation back.
« Reply #10 on: July 18, 2006, 11:25:11 pm »
well we still have our class wizard for now.  8)

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: I want my file creation back.
« Reply #11 on: July 18, 2006, 11:30:37 pm »
Yes, in fact the class wizard is a good example how a wizard that actually saves work should be like.
It has no annoying "Welcome... now click OK to start" page, you enter one name and hit enter.

The problem with this one is that it doesn't come up when you press Ctrl-N ;)
I never use it because I never remember it's there. :lol:
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Tjaalie

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: I want my file creation back.
« Reply #12 on: July 18, 2006, 11:31:21 pm »
I think Thomas is right.
I think when you want to program you have at least enough knowlege about a computer to not
have to use an wizard. Maby there could at least be an option to turn them off and show the normal save
file dialog.

Quote
You have to manually add the file to the project later.
but often you want a new file and you don't want it to be added to a project. Sometimes you don't even want it saved (print purposes, say little scratchpad). Andthen you have a wizard asking you if it shold be added to the project or not. Woops ..; a wizard ;-)  :mrgreen:

Ehh, before the wizard was there it was just one litle popup box that asked me if I wanted to add it or not. And I don't count one popup for an wizard.

Offline mdelfede

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: I want my file creation back.
« Reply #13 on: July 18, 2006, 11:40:18 pm »
That's the added extra "smartness" you have to live with :(
...and that's out of your mouth... ;-)
...anyway: read my previous post (our posts have crossed) and tell me what's wrong with it?
Hey, it's not me who wants wizards everywhere ;)
In my opinion, wizards are for children or for people who just learn how to use a computer, not for programmers.
Granted, for a few complicated things, a wizard can be helpful. But for simple things, simple solutions are good, and things should never be smarter than they need to be (because they are not).

Quote
2) file new (empty) --> untitled -> save it and you can give it a name and type as you like
That's an attempt to find a solution for a problem that would not be there if things were not made complicated without need in the first place. And it is a bad solution, too. You have to manually add the file to the project later.

I think more and more that the best solution would be to add a context menu to project files tree (sources, headers, resources...)
It would be simple to right click on headers, for example, select 'new file', give a name and have the header file added to project with no wizards.
It can co-exist with the wizards and also with the 'new empty file' added recently.
So we could have the choice between the wizard magics, the 'empty scratch file creation' and the 'add new file to project'.

Ciao

Max

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: I want my file creation back.
« Reply #14 on: July 18, 2006, 11:44:27 pm »
Ok, here it comes: I've created a wizard (*aaarg* - the BAD word ;-)) for an empty file:
- it shows the info page initially buit his can be turned off.
- it requires max. 2 parameters presented on one dialog
- it allows to select a target the file shall be added to if a project is active
- the default path for the new file is the project's base path (selected by default for the file seelction)

How about if this wizard (*aaargh* again the BAD word) would be added on the same level as "Empty file" now? This would allow to easily create a new file as scratchpad (the old method) and create a new file and quickly add it to a project?

Comments are welcome, find the wizard attached. To install: Copy it to "C::B\share\CodeBlocks\templates\wizard\empty_file" and add the following line to "C::B\share\CodeBlocks\templates\wizard\config.script":
Code: [Select]
    RegisterWizard(wizFiles,       _T("empty_file"),   _T("Empty file"),            _T("C/C++"));

With regards, Morten.

Here is the file: http://www.megaupload.com/?d=O84Q0BO0
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: I want my file creation back.
« Reply #15 on: July 18, 2006, 11:51:06 pm »
It would be simple to right click on headers, for example, select 'new file', give a name and have the header file added to project with no wizards.
Yes, but you would have to at least offer one selection: The target. A project can contain several targets - so to which one shall the new header file be added? ...and that's where the wiazards come into play... ;-)

...I hope I'm not beaten as I'm the only one pro wizards here... ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline kidmosey

  • Multiple posting newcomer
  • *
  • Posts: 95
    • MUSITU International
Re: I want my file creation back.
« Reply #16 on: July 19, 2006, 02:40:46 am »
Okay, so the project's context menu has an option to "Add Files..." and opens up the file open dialog.

Why not allow the user to open non-existent files and only commit them to the project/disk if the user saves them?

Then you'd have a quick create, a scratch pad, and be able to easily add a new empty file to your project.

Edit: I suggest using the "Add Files..." dialog to avoid cluttering the context menu with a "New File..." entry.
« Last Edit: July 19, 2006, 03:02:23 am by kidmosey »
3 years until google knows more than god.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: I want my file creation back.
« Reply #17 on: July 19, 2006, 03:00:56 am »
So far kidmosey's idea is the best approach IMHO, but the current implementation to create a new file has a drawback: no default highlighting.

The current highlighting can be changed, I know that, but it takes many clicks to select it.

A few possible "solutions":
  • 1. How it used to work: show the "save as" dialog and if a project is active the choice to add it to a target or not.
  • 2. Tricky: hit Ctrl+S just after its creation and goto 1.
  • 3. Dialog: show a dialog to select the highlighting to be used + set as default + don't show again. If Ctrl+S then goto 1.

My $20 (we don't have cents neither coins with smaller value still in use :P)

Offline mdelfede

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: I want my file creation back.
« Reply #18 on: July 19, 2006, 11:05:04 am »
It would be simple to right click on headers, for example, select 'new file', give a name and have the header file added to project with no wizards.
Yes, but you would have to at least offer one selection: The target. A project can contain several targets - so to which one shall the new header file be added? ...and that's where the wiazards come into play... ;-)

...I hope I'm not beaten as I'm the only one pro wizards here... ;-)

Mhhhh... could be done in all targets by default (sigh) or show a wizard (arrrrrghhhh!!) to tell on which target put the file...
Of course the best would be to ask in the save dialog the very first time it's saved... but I think this would clobber a bit the dialog.

Ciao

Max

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: I want my file creation back.
« Reply #19 on: July 21, 2006, 11:04:32 am »
...ok I've done some investigations into the new empty_file wizard and the panel itself. I believe it is possible to have a wxCheckListBox there and I see the need for this. I've started implementing this which requires mainly changes in the plugin itself. Please give me some time.

BTW: What I'm also trying is to enable the ability to add a quick "all targets" checkbox and maybe (!) a "select project" combobox for the case you have a workspace with many projects and want to add the file to another project than the active one. The last one I cannot promise because if it makes things too complicated I'll skip this and just stay by the way it is now: "it is required to have the project activated you want to add the files to".

Just to let you know...

With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: I want my file creation back.
« Reply #20 on: July 21, 2006, 04:28:28 pm »
BTW: What I'm also trying is to enable the ability to add a quick "all targets" checkbox
Wow, this is just what I wanted since first time I used C::B!

BTW: why as default all targets are not checked? Isn't more usual to add the file to all targets?
I'm thinking about the classic "Release" and "Debug" targets which must have the same files.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: I want my file creation back.
« Reply #21 on: July 21, 2006, 04:37:08 pm »
BTW: why as default all targets are not checked? Isn't more usual to add the file to all targets?
I'm thinking about the classic "Release" and "Debug" targets which must have the same files.
This would be an issue for projects like C::B. There targets are libs and plugins used by the main (application) target. For such projects this default settings would be annoying. So I guess if I do this mandrav and/or Thomas will kill me. ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline iw2nhl

  • Multiple posting newcomer
  • *
  • Posts: 116
  • BASIC, C, C++, Qt, bash
Re: I want my file creation back.
« Reply #22 on: July 21, 2006, 04:47:50 pm »
Ok, I just asked, but I thought that there were reasons for not doing it ;-)

Well, then I (and people with little projects) really need the "All targets" button...  8)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: I want my file creation back.
« Reply #23 on: July 21, 2006, 07:36:08 pm »
Well, then I (and people with little projects) really need the "All targets" button...  8)
...which I have already implemented. I'm struggling with the issues how to query more than a singluar value to a script. My first attempt wasn't good on second thoughts so now I'm doing a re-write which should do the job better...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Tjaalie

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: I want my file creation back.
« Reply #24 on: July 23, 2006, 11:40:40 am »
Whooooohhhh my first two page thread!!!
Damm it feels good.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: I want my file creation back.
« Reply #25 on: July 25, 2006, 03:12:27 pm »
Ok guys, I've implemented the selection of multiple targets for the single-file wizards in SVN. Please give it a try (e.g. with today's nightly) and feel free to report back.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ