Re: [Lazarus] INVALID_* consts

2013-06-03 Thread Alberto Narduzzi
what can we do about INVALID_FILE_SIZE? const INVALID_FILE_SIZE = DWORD($); is the above correct? it would seem to be from what i can make out from MSDN and the various C code files i've found it defined in... i kind of have to laugh because on place i read spoke of examples checking

Re: [Lazarus] INVALID_* consts

2013-06-03 Thread Alberto Narduzzi
all i can do is point to the links i just posted to mattias where it is defined and routines are shown with how to use it... Uh... I just went through the first 2 or 3 links and the amount of crap I found is unbelievably enormous. Why the hell should I consider 4 platforms on 2

Re: [Lazarus] Splash window with drop shadow

2012-11-02 Thread Alberto Narduzzi
That's what I meant. Cheers, A. Paul, I noted you implemented TCustomForm's.AlphaBlend property, is it possible to just alphablend part of the form?. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] Process ID

2012-09-14 Thread Alberto Narduzzi
Yeah. Everybody doing his own parsing of system textfiles is *such* a good principle to build durable applications on *g* as far as the text files maintain their structure, well, indeed it is. *g* -- ___ Lazarus mailing list

Re: [Lazarus] Function to get the mimetype from a file extension

2012-05-10 Thread Alberto Narduzzi
the 'file' command looks at the magic numbers, but for example KDE looks at the extension. my KDE, sic 3, looks at the magic numbers... I can rename a .pdf to whatever, even no extension at all, an it will still display the correct icon and open it with adobe reader. So maybe with KDE 4

Re: [Lazarus] TImage - Getting image properties in 'canvas space'

2012-04-18 Thread Alberto Narduzzi
But often (depending on the compiler) the mere declaration of an empty derived class allows to access protected members of the base class. What does depending on the compiler mean? The compiler is obviously FPC. If it is really true that you can access protected members in that way (like Svens

Re: [Lazarus] TImage - Getting image properties in 'canvas space'

2012-04-18 Thread Alberto Narduzzi
It should be mentioned that class helpers do not solve all problems, Not being able to access a member that you should not access is not a problem. It's what visibility in OOP is ment to do. It is by design that you cannot access that member. Having an official way to do this is IMHO bad.

Re: [Lazarus] Strange dependency of units

2012-04-04 Thread Alberto Narduzzi
Separation is very advantages for large and/or professional projects. separation, as you call it, is simply a good-design practice; no matter whether the project is small or big. I quite don't believe (allow me this simple paragon) you would mix your winter and summer clothing in the same

Re: [Lazarus] Strange dependency of units

2012-04-02 Thread Alberto Narduzzi
Do I need to study the whole LCL in detail to write programs with Lazarus? It seems so. no, you don't need indeed to study it all, but a little understanding may help. But how should I know that this is necessary? I used a simple unit in a console application. And the error messages gave

Re: [Lazarus] Strange dependency of units

2012-04-02 Thread Alberto Narduzzi
Just forgot one simple thing: If you code compiled and worked good under Delphi, that is because Delphi is platform specific (that is, Windows specific) hence the unit GRIDS already had its implementation completely done; and unit GRIDS in Delphi may not be made of abstract classes at all.

Re: [Lazarus] Alternative to getTime() of JavaScript

2011-09-23 Thread Alberto Narduzzi
First of all, Silvio, it's amazing how you can formulate questions and answers all by yourself ;-) then, I think you should replace the 08:00:00 with a more suitable 00:00:00... MilliSecondsBetween(StrToDateTime('1970-01-01 08:00:00'), now); Cheers, A. --

Re: [Lazarus] Is Lee Jenkins around? (l...@datatrakpos.com)

2011-09-01 Thread Alberto Narduzzi
Is he on holiday or something? That shouldn't cause his website to be down and his email to stop responding? Actually, what Mr. Jenkins is doing should be only _his_ business. Shall he want to cut out with the rest of the World, none of us has the right to stop, or even to question him. And

Re: [Lazarus] How to make TCheckListBox read only

2011-08-04 Thread Alberto Narduzzi
I saw that my reply posted from the web was not readable... :-( So here it is again. A simple checklistbox1.enabled := false wouldnt do it. Try this code : procedure TForm1.CheckListBox1ItemClick(Sender: TObject; Index: integer); begin checklistbox1.Checked[index] := not

Re: [Lazarus] Determining OS

2011-08-01 Thread Alberto Narduzzi
here, on a sligthly old Fedora 7: cat /etc/*-release gives the following: Fedora release 7 (Moonshine) and lsb_release -a (of course, we ask for -a to have a handful of information...) gives: LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch Distributor

Re: [Lazarus] How to I publish the SearchFont method of TFontManager?

2011-06-20 Thread Alberto Narduzzi
Hi. The method of SearchFont is declared in protected session. So, how to I use this method in other classes? IIRC, this means that you can _still_ see it within your derived class... Anyone orrect me if I'm wring on this one ;-) Cheers, A. --

Re: [Lazarus] Frog game. OO-izing SDL. Replace record with class then Lazarus can't find .create or .free for class

2011-01-28 Thread Alberto Narduzzi
I am modernising the SDL unit by replacing all of the records with classes. This should avoid warnings. and then var whatever1 : whatever; begin // new(whatever1); // becomes whatever1 := whatever.create; ... and Lazarus does not understand how to do a whatever1.whatever.create; nor a

Re: [Lazarus] problem opening html help pages with spaces in path

2010-09-14 Thread Alberto Narduzzi
Is there already a function for this that can be used in the LCL? I may guess... S := StringReplace(S, ' ', '%20', [rfReplaceAll]); Cheers, A. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] Sample code needed to create form at runtime only (see mock up below).

2010-09-05 Thread Alberto Narduzzi
I would guess something like: { this code is all untested and typed straight into my email client } procedure create_formA( Image_filename : string; StringList1 : TStringList ); var FormA : TForm; (...) wouldn't it be better to define the form within the IDE, with all of its components;

Re: [Lazarus] How can I increment/decrement a alphanumeric value?

2010-08-21 Thread Alberto Narduzzi
Antônio, why reinvent the wheel...? as already pointed out by Henry yesterday: http://freepascal.org/docs-html/rtl/strutils/dec2numb.html http://freepascal.org/docs-html/rtl/strutils/numb2dec.html it is as easy as: Uses strutils; Procedure IncrementHex(Var HexS:String); Begin HexS :=

Re: [Lazarus] How can I increment/decrement a alphanumeric value?

2010-08-19 Thread Alberto Narduzzi
E.g: 001 002 .. 00A 00B .. 0A0 0A1 .. ZZZ Is there a native routine in Free Pascal to do that? write a convert procedure from base-10 numbers into base-36 and you're done. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] tFileOpen Action, Is it possible to cancel the dialog...

2010-08-01 Thread Alberto Narduzzi
Is in possible to cancel the dialog in the BeforeExecute event, my plan was to ask the user to save the current file (Yes/No/Cancel) before opening another. Cannot you check if the current file needs to be saved and prompt the user for it _before_ opening the dialog? Cheers, A. --

Re: [Lazarus] tFileOpen Action, Is it possible to cancel the dialog...

2010-08-01 Thread Alberto Narduzzi
(...) The FileOpen Action is tied to a couple of controls though (Menu, ToolButton) then handle it within the FileOpen Action. I guess there you have if(MyFileDialog.Execute) Then OpenTheFile(MyFileDialog.FileName), right? So check for the file to be saved as first thing. At least, this is

Re: [Lazarus] My Island_maker D5/7 port test code - Error: Incompatible type for arg no. 1: Got TTranslateString, expected QWord

2010-05-22 Thread Alberto Narduzzi
Hi, the two hints, you may just ignore them; they just inform you that within the event handler you are not using the parameter. Then, for the errors: max_y := inttostr( max_y_param.text ); // ^^^ it is a TEdit inttostr _gets_ an integer as parameter and

Re: [Lazarus] Would you like a single button of Lazaru s IDE on the taskbar on Linux? (Você gostaria de um único botão da IDE do Lazarus na barra de tarefas no L inux?)

2010-04-16 Thread Alberto Narduzzi
Visualize how it would be: (Visualize como seria:) http://yfrog.com/izsiglebuttonidegtkp under KDE, in a Fedora 7 machine, I get only one button for Lazarus. Then, if I click on that button, nothing happens, but a popup shows, with the options to minimize (if they are visible) or

Re: [Lazarus] More simple way to add control icons?

2010-04-07 Thread Alberto Narduzzi
Maybe I don't get you but... Is there more simple way to add control icons to my package using new resource style in FPC 2.4 like this {$R 'images\TNewEdit.png'} if this is possible, what else do you happen to have in mind? anyway, maybe you can use a TImageList (or whatever it's called),

Re: [Lazarus] main form icon and other things

2010-04-03 Thread Alberto Narduzzi
For example? 1. create a new application 2. set it's main form BorderStyle to bsDialog 3. set up an icon for your form 4. compile and run you should not see your icon as the application's one, the X-server one instead. if you change the BorderStyle either to bsSingle or bsSizeable, and just

Re: [Lazarus] main form icon and other things

2010-04-02 Thread Alberto Narduzzi
Paul, Forms with bsDialog style does not have icon. This is so in delphi too. this is true (well, I take it as you say it), but what I was pointing out is that with the previous versions it indeed had the icon, so I didn't dig the thing and focused only on some strange (more correct?)

Re: [Lazarus] main form icon and other things

2010-04-02 Thread Alberto Narduzzi
Ah, Paul, one more thing, thinking about Delphi: Forms with bsDialog style does not have icon. This is so in delphi too. ok, but in my case the bsDialog form was the main one; and since there is no other way of having the application have an icon to show in the taskbar, I saw that

Re: [Lazarus] main form icon and other things

2010-04-02 Thread Alberto Narduzzi
Dear Paul, There are differences between widgetsets. On windows application is a separate window and the project icon is associated with it. On gtk2 taskbar icons are shown per form and icons are the same as forms have (btw, bsDialog should not have a taskbar icon but currently in gtk2 it

Re: [Lazarus] Cross compiling

2010-04-02 Thread Alberto Narduzzi
Patrick, I have quick-read the links, and I think the quickest and easiest way of doing it is to install fpc and Lazarus on a Windows box, and then recompile the same source code. As I have a virtual Windows machine (under VirtualBox) on my Linux box, I think I can give it a try. (also

[Lazarus] main form icon and other things

2010-04-01 Thread Alberto Narduzzi
Hi all, I am pretty new to this list, althou I used Lazarus and fpc a lot in the past; and now I am back to it. I recently updated both Lazarus and the fpc compiler to the following versions: Lazarus: 0.9.28.2 beta SVN Revision: 22288 fpc: Free Pascal Compiler version 2.2.4 [2009/10/05]

Re: [Lazarus] main form icon and other things

2010-04-01 Thread Alberto Narduzzi
Paul, (...)Maybe paticular images does not work properly. Please create a bug report with a test application and we will see what is wrong there. ok, so I created a brand new project, and the icon worked. So must be something with my project having been created with a previous version of

Re: [Lazarus] main form icon and other things

2010-04-01 Thread Alberto Narduzzi
Dear all, ok, as sometimes, only talking about something is enough to get it solved... I saw I was suing bsDialog as the style of my main form, and that prevented the icon to show. Setting it to either bsSingle, or bsSizeable solved the issue. Now I have only to check if also the

[Lazarus] Cross compiling

2010-04-01 Thread Alberto Narduzzi
Hi all again... so, what do I need to install/configure, in order to be able to produce _also_ windows executables from my Linux box with Lazarus and fpc? Thank you, A. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org