Searching for code samples lazarus / 13-General ---------------------------------------------------------------------- Elmug · 2011-08-26 12:15 Good people, I read this in another thread, and it looks useful. But I could not make sense so as to use it: "I can recommend searching for code samples in Lazarus code base itself. Just use Ctrl-Shift-F, select Lazarus src top dir and search... Juha" I am on Windows XP, and can't figure out where should the focus be when I hit Ctrl-Shift-F, to start with. Thanks for any replies! ---------------------------------------------------------------------- Shebuka · 2011-08-26 13:28 Focus must be on any IDE form, then search for whatever function you need (all names are quite mnemonic) ---------------------------------------------------------------------- Curt Carpenter · 2011-08-26 14:08 I didn't know that.  Pretty nice! ---------------------------------------------------------------------- JuhaManninen · 2011-08-26 15:48 Quote from: Shebuka on August 26, 2011, 03:28:18 pmFocus must be on any IDE form, then search for whatever function you need (all names are quite mnemonic) No Shebuka, focus must be on a source editor for the shortcut Ctrl- Shift-F to work. You can also select it from menu: Search -> Find in Files... and then focus can be anywhere. I also recommend you to look at menu entries in main menu. There are many useful features (including this Search -> Find in Files...) Lazarus trunk also has a revamped menu structure. Please check out. Juha ---------------------------------------------------------------------- Shebuka · 2011-08-26 16:01 Quote from: JuhaManninen on August 26, 2011, 05:48:53 pmQuote from: Shebuka on August 26, 2011, 03:28:18 pmFocus must be on any IDE form, then search for whatever function you need (all names are quite mnemonic) No Shebuka, focus must be on a source editor for the shortcut Ctrl- Shift-F to work. You can also select it from menu: Search -> Find in Files... and then focus can be anywhere. I also recommend you to look at menu entries in main menu. There are many useful features (including this Search -> Find in Files...) Lazarus trunk also has a revamped menu structure. Please check out. Juha Ah ok, dunna know that. On Mac, maybe because of different Application structure (there must be only one MainMenu assigne ti application at any time), the focus can be on any of IDE forms. ---------------------------------------------------------------------- Elmug · 2011-08-26 17:58 Thank you all for the kindness and good replies! ---------------------------------------------------------------------- Carver413 · 2011-08-26 19:49 it is also a good Idea to create a folder some where an fill it with source code from where ever you can find it. even if you think you will never use it it may give you answers when all else fails. when tring to figure how to do something with Xwindows I ended up finding my answer in some game engine. probably the last place I would have looked. ---------------------------------------------------------------------- JuhaManninen · 2011-08-27 09:08 Quote from: Shebuka on August 26, 2011, 03:28:18 pmFocus must be on any IDE form, then search for whatever function you need (all names are quite mnemonic) Sorry, I must fix my earlier comments. For "Ctrl-Shift-F" focus can indeed be on IDE forms like Object Inspector or Messages, but not on Form Designer. The command dispach system is rather primitive and partly broken. For example Copy/Paste commands are not forwarded from menu to Designer. It has its own bindings for Ctrl-C and Ctrl-V shortcuts. I tried to forward them and Undo/Redo commands to Designer but failed badly. It broke many other parts of the IDE. The command dispach system must be revamped some time in future, maybe in Lazarus 2.0 at year 2025. It should also support truely context sensitive main menu items like eg. Eclipse has. Juha ---------------------------------------------------------------------- Elmug · 2011-08-27 11:42 By any chance, was Eclipse developed with FreePascal/Lazarus, so they should share back the code? ---------------------------------------------------------------------- JuhaManninen · 2011-08-29 06:13 Quote from: Elmug on August 27, 2011, 01:42:50 pmBy any chance, was Eclipse developed with FreePascal/Lazarus, so they should share back the code? Eclipse is made with Java. It is one of the best known Java IDEs out there. It has lots of resources and support from big companies. Yet, IMO, it is not much better than Lazarus. For example the Eclipse Codetools equivalent hogs memory and stops working during a long editing session and Eclipse must be restarted. The numerous plugins also start to make the IDE messy.  http://www.eclipse.org/ BTW, even if some other IDE made with FreePascal implemented a proper command dispach system, it couldn't be just copy/pasted to Lazarus. It requires many changes in Lazarus internals. Juha ---------------------------------------------------------------------- Curt Carpenter · 2011-09-03 16:13 Juha writes:  "Lazarus trunk also has a revamped menu structure. Please check out." Can anyone point me to some docs describing what the "Lazarus trunk" is, and how to use it?  I'm a new user, and really paranoid about changing anything about my FPC/Lazarus setup until I have a lot more experience with it.   The revamped menu structure sounds interesting though, and I'd like to check it out if I knew how ---------------------------------------------------------------------- BigChimp · 2011-09-03 17:11 Good that you're paranoid. Read up on installing a second install of Lazarus and FPC (hint search on -primary-config-path, that's the parameter you need to add when calling your second (or higher) instance of Lazarus). Must be somewhere in the wiki, don't have time right now Trunk is simply the latest subversion version (i.e. the bleeding edge code). Periodically, branches are taken and frozen and a release is made out of that. Fixes and improvements from trunk may filter back to a fixes branch to improve a certain release. Is basically SVN speak, there should be references in the wiki as well ---------------------------------------------------------------------- Martin_fr · 2011-09-03 18:19 "revamped menu structure" is mainly re-ordering. The menu items did exist before, but they were all in other places, and harder to find. You can download a snapshot (see link on the left of this page). You are looking for a snapshot that has 0.9.31 in the name (rather than 0.9.30.1) e.g: Lazarus + fpc 2.4.4  | win32 | Lazarus-0.9.31-32164-fpc-2.4.4-20110903-win32.exe but make sure you read up on --primary-config-path which should point to an EMPTY directory. Lazarus will create the config on first start (it will bring up a dialog, if not, you done something wrong)