Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-04

SynEdit

14 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Lee Jenkins

Hi all,

I was curious about Lazarus' version of SynEdit and if the Delphi examples are more or less still relevant to coding against the LCL version?

I need implement Completion proposal, AutoComplete, AutoCorrect and Muti-Syntax.

I'm thinking of writing a simple editor for OpenLaszlo...

Thanks,

Warm Regards, Lee

Reply by email

Martin
to Lee Jenkins
Lee Jenkins wrote 6 lines
Hi all, I was curious about Lazarus' version of SynEdit and if the Delphi examples are more or less still relevant to coding against the LCL version?

Not sure which "delphi examples"?
- Something that comes with lazarus, and I have overlooked?
- Something that comes with Delphi?
- Something from the originla SynEdit website/distribution?
- Something else?

The SynEdit in Lazarus is based on something around Version 1.2 of the original SynEdit. And the Lazarus version has since been heavily modified.

I need implement Completion proposal, AutoComplete, AutoCorrect and Muti-Syntax.

There are classes for completion proposal (drop down) and afaik Auto-complete (look at the syncompletion unit)

I don't think there currently is any AutoCorrect implementation

"Muti-Syntax." refers to syntax highlighting? Not sure what you mean?

Martin

Reply by email

Lee Jenkins
to Martin
Martin wrote 13 lines
On 21/04/2010 18:34, Lee Jenkins wrote: > > Hi all, > > I was curious about Lazarus' version of SynEdit and if the Delphi > examples are more or less still relevant to coding against the LCL > version? Not sure which "delphi examples"? - Something that comes with lazarus, and I have overlooked? - Something that comes with Delphi? - Something from the originla SynEdit website/distribution? - Something else?

I meant current Delphi examples. Well, relatively current as I don't think the demos have been changed in quite some time, even with the unicode version that is available now.

The SynEdit in Lazarus is based on something around Version 1.2 of the original SynEdit. And the Lazarus version has since been heavily modified.

Ouch!

Show quoted text 10 lines
> > I need implement Completion proposal, AutoComplete, AutoCorrect and > Muti-Syntax. There are classes for completion proposal (drop down) and afaik Auto-complete (look at the syncompletion unit) I don't think there currently is any AutoCorrect implementation "Muti-Syntax." refers to syntax highlighting? Not sure what you mean?

Yeah for syntax. In Delphi SynEdit there is TSynMultiSyn where you can use two different highlighters. This is important since the editor will handle both XML and JavaScript within CDATA tag like Adobe's MXML and MS's WPF markup, XAML.

Warm Regards, Lee

Reply by email

Martin
to Lee Jenkins
Lee Jenkins wrote 24 lines
Martin wrote: > On 21/04/2010 18:34, Lee Jenkins wrote: >> >> Hi all, >> >> I was curious about Lazarus' version of SynEdit and if the Delphi >> examples are more or less still relevant to coding against the LCL >> version? > > Not sure which "delphi examples"? > - Something that comes with lazarus, and I have overlooked? > - Something that comes with Delphi? > - Something from the originla SynEdit website/distribution? > - Something else? I meant current Delphi examples. Well, relatively current as I don't think the demos have been changed in quite some time, even with the unicode version that is available now. > The SynEdit in Lazarus is based on something around Version 1.2 of > the original SynEdit. And the Lazarus version has since been heavily > modified. Ouch!

From this I assume, that the examples are not part of lazarus, but from some other source...

Show quoted text 15 lines
>> >> I need implement Completion proposal, AutoComplete, AutoCorrect and >> Muti-Syntax. > > There are classes for completion proposal (drop down) and afaik > Auto-complete (look at the syncompletion unit) > > I don't think there currently is any AutoCorrect implementation > > "Muti-Syntax." refers to syntax highlighting? Not sure what you mean? Yeah for syntax. In Delphi SynEdit there is TSynMultiSyn where you can use two different highlighters. This is important since the editor will handle both XML and JavaScript within CDATA tag like Adobe's MXML and MS's WPF markup, XAML.

The SynMultiSyn still exists in Lazarus. Not sure if anyone has used it lately, or if it was tested.
But if bug reports are made, it will be fixed and maintained.

Otherwise, as for examples, how to add thinks to SynEdit. I wouldn't be to sure examples that are not part of Lazarus will work out of the box. There may still be similarities.

Syncompletion is used in SourceEditor, Syncompletion is also available as a component on the component palette => so that should be a start

Martin

Reply by email

Lee Jenkins
to Martin
Martin wrote 5 lines
The SynMultiSyn still exists in Lazarus. Not sure if anyone has used it lately, or if it was tested. But if bug reports are made, it will be fixed and maintained.

Martin,

Looks like its a no go with the Multi highlighter in Lazarus synedit. Throws an exception when trying to assign the multi highlight to a TSynMemo at design time and the application sig faults when I try to assign the multi highlighter in code.

0.9.29 rev 23574. I was banking on it working since I assumed lazarus support Assembly within .pas file though I'm not certain on that.

Back to Delphi I guess for this one.

Thanks again,

Warm Regards, Lee

Reply by email

Martin
to Lee Jenkins
Lee Jenkins wrote 13 lines
Martin wrote: > > The SynMultiSyn still exists in Lazarus. Not sure if anyone has used > it lately, or if it was tested. > But if bug reports are made, it will be fixed and maintained. > Martin, Looks like its a no go with the Multi highlighter in Lazarus synedit. Throws an exception when trying to assign the multi highlight to a TSynMemo at design time and the application sig faults when I try to assign the multi highlighter in code.

Can you send me your test code that failed, please?

I am doing (in OnFormCreate)

   h := TSynMultiSyn.Create(self);
   SynMemo1.Highlighter:= h;

and that doesn't give an error. But it may depend on settings given to the highlighter...

0.9.29 rev 23574. I was banking on it working since I assumed lazarus support Assembly within .pas file though I'm not certain on that.

Reply by email

Lee Jenkins
to Martin
Martin wrote 24 lines
On 21/04/2010 19:58, Lee Jenkins wrote: > Martin wrote: >> >> The SynMultiSyn still exists in Lazarus. Not sure if anyone has used >> it lately, or if it was tested. >> But if bug reports are made, it will be fixed and maintained. >> > > Martin, > > Looks like its a no go with the Multi highlighter in Lazarus synedit. > Throws an exception when trying to assign the multi highlight to a > TSynMemo at design time and the application sig faults when I try to > assign the multi highlighter in code. Can you send me your test code that failed, please? I am doing (in OnFormCreate) h := TSynMultiSyn.Create(self); SynMemo1.Highlighter:= h; and that doesn't give an error. But it may depend on settings given to the highlighter...

My TSynMultiSyn was dropped on the form at design time. Also have TSynJavaSyn on the same form and assigned to the Schemes[0] property. These extra properties might have something to do with the problem.

Here is a zip with the simple project in it.

http://leebo.dreamhosters.com/misc/syn-multi/multi-syn-test.zip

Thanks for taking a look.

Warm Regards, Lee

Reply by email

Flávio Etrusco
to Lee Jenkins
Lee Jenkins wrote 42 lines
Martin wrote: > > On 21/04/2010 19:58, Lee Jenkins wrote: >> >> Martin wrote: >>> >>> The SynMultiSyn still exists in Lazarus. Not sure if anyone has used it >>> lately, or if it was tested. >>> But if bug reports are made, it will be fixed and maintained. >>> >> >> Martin, >> >> Looks like its a no go with the Multi highlighter in Lazarus synedit. >> ?Throws an exception when trying to assign the multi highlight to a TSynMemo >> at design time and the application sig faults when I try to assign the multi >> highlighter in code. > > Can you send me your test code that failed, please? > > I am doing (in OnFormCreate) > > ?h := TSynMultiSyn.Create(self); > ?SynMemo1.Highlighter:= h; > > and that doesn't give an error. But it may depend on settings given to the > highlighter... My TSynMultiSyn was dropped on the form at design time. ?Also have TSynJavaSyn on the same form and assigned to the Schemes[0] property. ?These extra properties might have something to do with the problem. Here is a zip with the simple project in it. http://leebo.dreamhosters.com/misc/syn-multi/multi-syn-test.zip Thanks for taking a look. -- Warm Regards, Lee

Using the component from upstream SynEdit should be easy.

-Fl?vio

Reply by email

Flávio Etrusco
to Lee Jenkins
Lee Jenkins wrote 18 lines
Fl?vio Etrusco wrote: > > Using the component from upstream SynEdit should be easy. > > -Fl?vio > Flavio, Sorry, I'm not certain what that means. ?Can you clarify? Thanks, -- Warm Regards, Lee

I meant that using the component from "original" SynEdit should be easy to do, either by replacing the one in Lazarus or renaming and adding the new one.

-Fl?vio

Reply by email

Lee Jenkins
to Flávio Etrusco
Fl?vio Etrusco wrote 8 lines
I meant that using the component from "original" SynEdit should be easy to do, either by replacing the one in Lazarus or renaming and adding the new one. -Fl?vio --

Gotcha. I'm not sure how easy it would actually be, though I'm guessing that porting the original to LCL would at least require more time that I able to apply to the task.

Thanks though :-)

Warm Regards, Lee

Reply by email

Martin
to Flávio Etrusco: I meant that using the component from "original" SynEdit should be easy to do, either by…
Fl?vio Etrusco wrote 25 lines
On Wed, Apr 21, 2010 at 8:58 PM, Lee Jenkins wrote: > Fl?vio Etrusco wrote: > >> Using the component from upstream SynEdit should be easy. >> >> -Fl?vio >> >> > Flavio, > > Sorry, I'm not certain what that means. Can you clarify? > > Thanks, > > -- > Warm Regards, > > Lee > > I meant that using the component from "original" SynEdit should be easy to do, either by replacing the one in Lazarus or renaming and adding the new one.

I don't think it would. LazSynEdit has a different communication with it's Highlighters than "original upstream".

Reply by email

Martin
to Lee Jenkins: My TSynMultiSyn was dropped on the form at design time. Also have TSynJavaSyn on the…
Lee Jenkins wrote 35 lines
Martin wrote: > On 21/04/2010 19:58, Lee Jenkins wrote: >> Martin wrote: >>> >>> The SynMultiSyn still exists in Lazarus. Not sure if anyone has >>> used it lately, or if it was tested. >>> But if bug reports are made, it will be fixed and maintained. >>> >> >> Martin, >> >> Looks like its a no go with the Multi highlighter in Lazarus >> synedit. Throws an exception when trying to assign the multi >> highlight to a TSynMemo at design time and the application sig >> faults when I try to assign the multi highlighter in code. > > Can you send me your test code that failed, please? > > I am doing (in OnFormCreate) > > h := TSynMultiSyn.Create(self); > SynMemo1.Highlighter:= h; > > and that doesn't give an error. But it may depend on settings given > to the highlighter... My TSynMultiSyn was dropped on the form at design time. Also have TSynJavaSyn on the same form and assigned to the Schemes[0] property. These extra properties might have something to do with the problem. Here is a zip with the simple project in it. http://leebo.dreamhosters.com/misc/syn-multi/multi-syn-test.zip Thanks for taking a look.

Thanks.

found the problem. Will be fixing it, but it will take a while...

Martin

Reply by email