* * *

Recent Posts

Pages: [1] 2 3 ... 10
1
Editor / Re: Parasitic cursor in code editor.
« Last post by BrunoK on Today at 10:27:01 am »
In that path is a file "EditorOptions.xml"

Please provide this file.
File attached.
2
Android / [CLOSED] Re: Regular GTK error when compiling
« Last post by Adie on Today at 10:23:37 am »
Hi, Adie!

1) When using LAMW, please, add components only from "Android Bridges ..."  tabs

2) To fix the error:
     2.1 delete the "foreign" component and the units correspondents...
     2.2  clean up the project: "Project" ---> "Project Inspector"  [requerid packages]
             [drop some LCL and Gtk dependencies...]

1.  do that.
2. did that.

No success yet.

***** Conclusion *****
I think for the project I will stick to straight Lazarus for WIN based PC and the cross compiler for Raspberry Pi/ (Raspbian) as it works 100%

For the Android part of the project I will stick to Basic4Android as it is stable, compile for all Android devices without any project changes. ( https://www.b4x.com/b4a.html ) I bought the full package and already developed additional libs etc.

The main reason for evaluating Lazarus+Android was code sharing.  If I need to develop the app with unique components in any case it actually defeats the whole object. 

Due to the unique Android design it is not 'really' [Write once - Compile anywhere] with LAMW. If the 'old' [Customdrawn] controls could be used it might work to a certain extend.

B4X is dedicated to Android with a rich set of controls and bullet proof compilation.  I think Laz+LAMW impliment the screen size/rotation easier as B4A but my app is for industrial use where it will run on specific hardware and in Landscape only.

Pic 1. Test app developed in B4A with complete MySQL data connection (Local and remote as well as connection to PLC)  Other apps with B4A talk remotely to scales in furnace etc.

Similar app is running on WIN and Pi with Lazarus.  (Used to program with C++Builder)

I will evaluate Laz+Android options regularly in the future.  At this stage I just don't have the time as the project must be implimented 14 Jan 2019.  :o

Adie
3
General / Re: LazReport
« Last post by GetMem on Today at 09:56:32 am »
@Deepaak
Quote
How to create LazReport programatically. My project takes different database as per user choice. If somebody can provide sample code or demo project than it will be very usefull.
I'm not sure what you mean. Each LazReport has a DataSet property, which can be assigned just before the report starts like this:
Code: Pascal  [Select]
  1. frReport1.Dataset := frDBDataSet1;

frDBDataSet1 has a DataSet/DataSource property, you can also change that according to your needs:
Code: Pascal  [Select]
  1. frDBDataSet1.DataSet := SQLQuery1;
The query can be linked to whatever database you like.

On the other hand it's also possible to create a report dynamically from scratch, you can find an example for FortesReport here: http://forum.lazarus.freepascal.org/index.php/topic,43151.msg301584.html#msg301584. You can do the same thing for LazReport, but building a complex report dynamically though it's not particularly hard, it's a time consuming task.


4
When you are newbie - at your own you generally have either of two choices:
- Dig whole literature ( 0.5year-2years)
- get stuck on miraculous mistake for another year.
From what you write, I get the impression that you simply don't know where to start.  IOW, you sound like you're wondering where the beginning of that elephant is.

It doesn't take 1/2 a year to read the FPC documentation.  That said, if you really want to fully understand how the compiler works for everything it can do then, it might actually take 1/2 year.

For instance, Chapter 6 of the Free Pascal Reference Guide gives a good description of visibility specifiers.  Here it is:
Quote
[1] Private All fields and methods that are in a private block, can only be accessed in the module (i.e. unit) that contains the class definition. They can be accessed from inside the classes’ methods or from outside them (e.g. from other classes’ methods)

[2] Strict Private All fields and methods that are in a strict private block, can only be accessed from methods of the class itself. Other classes or descendent classes (even in the same unit) cannot access strict private members.

[3] Protected Is the same as Private, except that the members of a Protected section are also accessible to descendent types, even if they are implemented in other modules.

[4] Strict Protected Is the same as Protected, except that the members of a Protected section are also accessible to other classes implemented in the same unit. Strict protected members are only visible to descendent classes, not to other classes in the same unit.

[5] Public sections are always accessible. Published From a language perspective, this is the same as a Public section, but the compiler generates also type information that is needed for automatic streaming of these classes if the compiler is in the {$M+} state. Fields defined in a published section must be of class type.
Array properties cannot be in a published section

That gives you the "theory" then, you write a number of small programs (just skeletons) to play with and see how changing one thing affects another.   That does take a little bit of time but, as they say, seeing is believing. Handoko above was definitely right, nothing takes the place of building your own experience.

I don't think it would take 1/2 year to go through the entire manual, even writing small programs to test every feature .

The other thing is, you focus on what you need to know.  You neither need nor can, know everything. 

My advice to any newbie would be simply, read the manual(s), several times if needed and write as many little programs as necessary to test and understand every compiler feature that is useful to you.  Those features you think you won't use, skip them, cross that code when and if you ever need it.

I understand that the beginning is a bit frustrating but, you can learn a great deal going through the manuals methodically and systematically. When you don't understand something, you come here and ask, someone will shed light on whatever is causing you grief.

Colloquially, they simply call it live and learn.  Try to learn fast because life is short ;)  Being methodical helps accomplish that (it might even help make life longer but... that might just be wishful thinking on my part.)

HTH.



5
Editor / Re: Parasitic cursor in code editor.
« Last post by zeljko on Today at 09:42:10 am »
I currently only have gtk on linux (Fedora 28). Not using it much, but no problems yet.

"2 carets" => both blinking? But only one responds/types input?
Both exactly the same color, or one slightly fainter?

Yes, see attached screenshoot. First caret stays at the beginning where code completion is started, second one after the last typed letter. Both are blinking. Only second one responds to typing in code completion and moving. First one is always at the beginning where code completion window is shown.
6
Strictly from systems theory private and protected do not need a rant. What may be ranting is the correction that was later necessary... I really don't see (at least I wasn't ranting) how to explain the intended behavior in any other way than I described. I am not even strictly ranting on the subject. Merely stating fact, not opinion.
7
LCL / Re: Make own icon?
« Last post by Handoko on Today at 07:57:30 am »
No need to use different resolution, and GIMP won't allow different resolution per layer. For better understand, use your GIMP to open an icon file. You can use the default icon that can be found in the same folder of your Lazarus project.

And remember to tell GIMP you want to save the result as an icon file:
GIMP main menu > File > Export As > choose Microsoft Windows Icon (*.ico) type
8
I am porting a program from windows to macintosh. I have little experience with Macintosh but 99.9% of the port has went w/o issue. One of the last issues deals with modal forms not working as they do in windows/linux.

In my sample code I have mainform and loginform. in mainform.activate, loginform.showmodal is called.

In windows, mainform is displayed, then loginform is displayed on top of that as one would expect.

In Mac, only loginform shows but if anything in loginform is clicked (the form itself or the combobox), then mainform is displayed behind loginform.

I actually want mainform to be hidden when loginform is displayed. If I put self.hide before loginform.showmodal, the same effect occurs. mainform is initially hidden, but clicking on anything in loginform causes mainform to be displayed.

In windows, I get the effect I need: loginform is displayed by itself. When the button is clicked, it is closed and mainform is displayed.

I've searched the forum, the bug tracker, and the 'net and not been able to find anyone discussing this issue. I've tried playing with all the various form settings and nothing I've tried allows the mac version to act properly.

Does any one have any ideas what may be wrong?

Thanks,

bigDan

I'm using Lazarus 2.0RCL2/Cocoa/64bit, compiling on an El Capitan system.
9
LCL / Re: Make own icon?
« Last post by nfol on Today at 05:53:18 am »
Ok. Thank you!

Now I explore Gimp.

> Then, I replace the original images with my icon images, and I save the result.

Do you need to draw 6 images of different resolution, or is there a way to copy from one layer to the others?
10
General / LazReport
« Last post by Deepaak on Today at 05:28:16 am »
How to create LazReport programatically. My project takes different database as per user choice. If somebody can provide sample code or demo project than it will be very usefull.
Pages: [1] 2 3 ... 10

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus