problem about lazarus-Collection of common programming errors

Braiam
dpkg lazarus
I’m trying to install lazarus from here. I had broken packages, but I fixed the problem by removing sources in gedit /var/lib/dpkg/status as described here. Then I tried to install lazarus again, and the lazarus itself installs, but fpc and fpc-src packages cannot be installed. It gives me this error:Reading database … (Reading database … 5% (Reading database … 10% (Reading database … 15% (Reading database … 20% (Reading database … 25% (Reading database … 30% (Reading database …
Filburt
delphi lazarus dynamic-forms
I have 5 forms created at design time. I need to dynamically create an instance of each form and put on a tab.My question: If the form names are in an array of strings and I call my procedure like this:ShowForm(FormName[3]);// To show the 3rd form on a tab page.How can I define and create the new instance for each form?This is what I have for now:procedure TForm1.ShowFormOnTab(pProcName:String); varNewForm: TfrmSetupItemCategories;//***HERE IS MY PROBLEM***NewTab: TTabSheet;FormName: String;begi
Marco van de Voort
windows visual-studio gui lazarus
I need to develop a simple Windows application with 6 or 7 forms. Its main purpose is to manage files and launch a external program. These are my wishes, in descending importance orderFree Be Visual, I mean, the possibility to paint forms and object in the screen. Possibility to carry it in a USB pen-drive.I need a light/small size language, not a very complex one. My program is going to have very few forms and its functionality is simple.Is there any language that meet this wishes? If not, is
TLama
fixed lazarus tstringgrid
I am using Lazarus 0.9.30.2. I have a standard TForm with a standard TStringGrid on it. The string grid has no columns or rows on it at design time. In the Object Inspector the following values are set.ColCount = 0 Columns = 0 FixedCols = 0 FixedRows = 0 RowCount = 0I want to add a number of TGridColumns at run time, and have been able to do so but always get a fixed column, which I don’t want. I have written code very similar to the sample below to do so. When I compile and run it I get the f
Charles
console freepascal lazarus writeln debugln
When writing a Lazarus program, you have the option of using $APPTYPE console or deselecting the Win32 GUI Application (-WG option) in the Project Options .I noticed that without these options DebugLn and WriteLn raise exceptions. Is there a way to create a console even if the program is not compiled above mentioned options and output to it with DebugLn and WriteLn afterwards?
David Heffernan
delphi lazarus
I’m creating tabs at run-time like this:procedure TForm1.ShowFormOnTab(pProcName:String); varNewform: TForm;ClassToUse: TFormClass;NewTab: TTabSheet;FormName: String;beginNewTab := TTabSheet.Create(PageControl1);NewTab.PageControl:= PageControl1;PageControl1.ActivePage := NewTab;if pProcName=’ProcfrmSetupItemCategories’ thenClassToUse := TfrmSetupItemCategorieselse if pProcName=’ProcfrmZones’ thenClassToUse := TfrmZoneselseClassToUse := nil;if Assigned(ClassToUse) thenbeginNewForm := ClassTouse
Braiam
installation lazarus
I have a little problem with installing and running Lazarus. I just upgrade ubuntu from 13.04 to 13.10. When i had 13.04, i could install lazarus without any problems, but in 13.10 lazarus magicaly dissapeared, and when i tried install it from ubuntu software center, it said something like in my software resources lazarus-ide-0.9.30.4 doesnt exist.After some research on net i tried delete all files from earlier installations, download deb packages from sourceforge and install them, but when i wa
mamcx
conditional lazarus freepascal
I need to disable some code when run under the debugger.So, I just imagine that doing:{$IFNDEF DEBUG} … {$ENDIF}However, the code inside the ifndef is executed in the debugger, makin it crash.I have lazarus 0.9.29 & FPC 2.4.0
Arcturus
mono dllimport lazarus
I’m stucked with a problem with Mono Interop in Linux. I have a native shared library (made in Lazarus) that I need to use in a C# assembly. The shared library is used by a Mono C# assemblie on Windows and on Linux.The assembly loads the shared library via DllImport at runtime, and calls an exported function that generates a file and returns a string with the new file’s name. The function in the shared library works fine, but in Linux the Mono runtime crashes at Object.__icall_wrapper_mono_marsh
Ben Hooper
clipboard pascal freepascal lazarus
I’m going to admit, right off the bat, that I’m Pascal-inexperienced, to say the least. So, any help I can get will be greatly appreciated. :)As part of a larger program, I need to write a string variable to the clipboard. I’ve created a new project in Lazarus (version 1.0.12) so I can try to figure out how to do so without the complications caused by extra, unnecessary code, which I have included below:program varToClipboard;uses Clipbrd;vartextToCopy:string;begintextToCopy := ‘Test text from P
1_bug
procedure lazarus sigsegv unhandled-exception turbo-pascal
I have to write procedure for euler’s method to differential equations in Pascal. I have this:program Euler_proc;{$mode objfpc}{$H+} uses{$IFDEF UNIX}{$IFDEF UseCThreads}cthreads,{$ENDIF}{$ENDIF}Classes{ you can add units after this };{$IFDEF WINDOWS}{$R project1.rc}{$ENDIF}{THIS PART I JUST COPIED FROM BOOK: }type fxy = function (x,y : Extended) : Extended; function f(x,y:Extended): Extended; far; begin f:= x+x*y+y+1; end;procedure Euler (var x0 : Extended;x1 : Extended;var y : Extended;f
Gustavo Carreno
lazarus fpc apache-modules
I finally had success compiling a “blank” Apache module, but now I’ve hit a rather annoying snag.I want to communicate with a MongoDB server and I opted for the only lib around for FreePascal/Lazarus, pebongo.Dependency for pebongo is synapse.Somehow I’m getting “/usr/lib/apache2/modules/mod_visius.so: undefined symbol: WSRegisterCustomImageList” when loading my module into Apache.I’ve tracked down the symbols onto Menus.pp, I think, and lazarusall(something) also plays a role in this. Again, I
Web site is in building