* * *

Recent Posts

Pages: [1] 2 3 ... 10
1
FPSpreadsheet / Re: user define function
« Last post by kjteng on Today at 04:21:26 am »
Thanks for the info. Congratulation.
2
RichMemo / Re: TRichMemo example for attributes via Keystroke?
« Last post by skalogryz on Today at 03:47:58 am »
If I set RichMemo1.Font.Style += [fsBold] it is bold, when I disable it, everything I typed is unbold.
don't. Assigning Font to richmemo changes the whole text to the specified font.
instead you could use code like this:
Code: Pascal  [Select]
  1. var
  2.   fn : TFontParams;
  3. begin
  4.   RichMemo1.GetTextAttributes(RichMemo1.SelStart, fn);
  5.   fn.Style:=fn.Style+[fsBold];
  6.   RichMemo1.SetTextAttributes(RichMemo1.SelStart, 0, fn);
  7. end;
  8.  

Working on an Email like client
RichMemo is not suitable for the task. The reason is simple - no support for embedding images.
3
RichMemo / TRichMemo example for attributes via Keystroke?
« Last post by ozznixon on Today at 01:40:00 am »
I am able to highlight words, CTRL-B, and viola, Bold wording... however, if I Clear the RichMemo, Ctrl-B, and start typing - it is not bold. If I set RichMemo1.Font.Style += [fsBold] it is bold, when I disable it, everything I typed is unbold.

I copied and applied Rich2xxx's Set Attribute code, it does the same - selections change, but, to do on the fly from keyboard (or via buttons that contain the same code) nada.

Is there an example of using Keyboard and Buttons to toggle attributes where SelLength == 0?

Also, i have downloaded 3 different RTF2HTML pascal units, none work with TRichMemo's RTF output. Does anyone have a SaveToHTML and LoadFromHTML for TRichMemo? Working on an Email like client - and the other end is dCEF based - so I have to send/receive HTML from their product.

PS. My app runs on Linux and Mac, so I cannot use all these Windows tricks.  >:D

Regards,
Ozz
4
Third party / Re: TGIFViewer component
« Last post by wp on Today at 01:15:01 am »
My problem is that you seem to stuff too much unrelated material into the gifviewer package which is not absolutely needed or which could have more general use.

What do you want?

Provide a gifviewer? Then the units
- gvTranslate (similar stuff is in LCLTranslator)
- Typeshelpers (large overlap with type-helpers built into fpc now)
- and probably even uFastBitmap (because I am rather sure that you can paint the gif also with the routines of fcl-image)
are not needed.

Or do you want to provide a general-purpose package with translation utils, fast bitmap, additional type helpers and - of course - gif viewer? Then you should name the package differently and emphasize its multi-use character.

A few other comments:
  • I see two .po files in your locale folder. Translaters don't like this. Usually they prefer a single po file per package.
  • Did you know that, unlike Delphi, fpc already has built-in gif support (unit fpreadgif in source folder packages/fp-image/src of the fpc installation)? I did not compare, but I am rather sure that there is a lot of overlap with your unit. Why write the same again when it's already there?
Please don't misunderstand these critical word - I really think your units are great work.
5
Third party / Re: TwilioLib - Send SMS from Freepascal
« Last post by Trenatos on Today at 12:31:43 am »
Thanks for the feedback Xor-el!

I've updated the unit and example, would you mind taking a look again?
6
Third party / Re: TGIFViewer component
« Last post by BeanzMaster on Today at 12:09:28 am »
Why do you introduce a new translation system here? Lazarus has good built-in translation support, you only must activate the i18n option and define a language folder in the package settings, as well as declare the message strings as resource strings.

Hi, it's not a new translation system. TGVTranslate it's just an helper. The i18n is activated but if i well understand it an application for example if i want have tanslation in french of lcl the po (lclstrconsts.fr.po in this case)  must be place in a subfolder of the application name "languages" after for loading just use
Code: Pascal  [Select]
  1. Translations.TranslateUnitResourceStrings('LCLStrConsts', LF);
where LF is the path where is po files. But perhaps i'm not understanding well on how to translate an application correctly. I like the possibility to change languages dynamically for testing. Translating french to english or vice-versa can occurs some problems in IHM due to the length of string. French sentence are often longer.

I'm open for all advices and suggestions

Notes : I've tested under Mac and  it doesn't work. I've a bug with folder settings. Don't say why. But i think i must add something in the bundle for make it work.

7
FPSpreadsheet / Re: user define function
« Last post by wp on Today at 12:04:24 am »
I accidentally keyed in an invalid formula (=BB)  into a cell say A1 of sheet3, an error message pop up (see e1.png attached) and the invlaid formula would not be shown in the worksheet.

After that, whenever I key in something to the worksheet (in any cell), I will get the same error message.

However, if i key in a valid 3D formula in cell A1 eg Sheet1!B12, the worksheet would be back to normal (error message wont popup anymore).
This is hard stuff. I tried several approaches, but none of them worked out, mostly things are even getting worse...
Maybe I've got an operating solution now - it based on the old Borland article https://community.embarcadero.com/article/technical-articles/149-tools/12766-validating-input-in-tedit-components and looks ok to me. Now it is no longer possible to exit the CellEdit or edited WorksheetGrid cell while an entered formula is not valid.
8
Third party / Re: TGIFViewer component
« Last post by wp on June 24, 2018, 11:42:09 pm »
[...] Translated internal messages thrue PO files (use a modified TGVTranslate component from Gilles Vasseurs's french tutorial : https://gilles-vasseur.developpez.com/tutoriels/lazarus-traduction/
Why do you introduce a new translation system here? Lazarus has good built-in translation support, you only must activate the i18n option and define a language folder in the package settings, as well as declare the message strings as resource strings.
9
General / Re: Compile Photoshop Pascal Code
« Last post by VTwin on June 24, 2018, 11:34:58 pm »
Thanks guys, I appreciate the responses.

A few years ago I started writing a vector library using TVector and TMatrix objects (I write scientific software at a university). At some point I encountered some unexpected behavior. I inquired here, and learned that objects were deprecated, or at least not maintained. It sounds like you (Nitorami)  may have encountered the same issue. Despite the error in my earlier post, I was using object constructors, which I forgot. (I have long since rewritten the library using dynamic arrays and operator overloading).

I do use advanced records extensively, often to set and get options for a complex procedure which are logically grouped together. These are typically set in a dialog box, and then saved to a preferences dictionary in memory, which can be written to a file and reloaded when the program is restarted. Each such record must have default values, which I set in an Init method. It is not such a big deal, but it would be nice to have a constructor to do that automatically. 

So at least one other person has had issues, at least with object constructors or inheritance. I suppose I could use objects and not use constructors or inheritance, but advanced records seem to work well.

10
Third party / Re: TwilioLib - Send SMS from Freepascal
« Last post by Xor-el on June 24, 2018, 11:28:05 pm »
nice job. thanks.
some issues exist though

1). you seem to forget to free your "twilio" variable in your README Example.

2). TwilioResult is not defined in your readme. (seems it's a type error).

improvement tips

1). you can make your TTwilio class inherit from TInterfacedObject in mode Delphi to enable reference counting via interfaces.

2). it is not advisible to return an "unmanaged" type from a function like you did in "function TTwilio.send_sms( from_number, to_number, message: String ): TStringlist;"
where you returned a stringlist.
make that a procedure an allow the user pass in an Initialized stringlist via a "var" parameter so that the user is certain that he is responsible for freeing the stringlist.
in the method, check if the stringlist is initialized, and if not create it or raise an exception.
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