Sign in Join

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

Mailing lists / lazarus / 2010-02

Flex/RIA Framework

16 messages · 6 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 made a similar post on Delphi newsgroups but I it will be fpc lazarus compatible since I need to use it with both envrionments.

I have started a Rich Internet Application framework which I'll eventually put on google code under LGPL or similar license. I am using Adobe Flex as my client but other clients like ExtJS, Silverlight, OpenLazlo, etc should be easy enough to implement.

I'm still in early stages of development, but I need the framework for projects that I have to do so I'm working pretty hard on it. Here's is a small wink/flash demo showing the concept.

http://www.datatrakpos.com/misc/test_flex_delphi.htm

Reply by email

Graeme Geldenhuys
to Lee Jenkins

Hi Lee (and anybody else),

In you flash demo, I saw something interesting in Delphi (sorry, not related to Flex/RIA) - the code navigation highlighted in the attached screenshot.

Is that something standard with Delphi or is it a add-on package? I've been wanting to implement something like that in Lazarus for ages. I remember Visual Basic 6 also had code navigation like that, and it worked quite well. While in the editor, you immediately know in which class/method you are by simply glancing at the toolbar and navigation is easy. I implemented Procedure List some years back, but I think a toolbar navigation will be even better. The Editor Toolbar add-on for Lazarus already has some of that functionality (jumping to intf. or impl. etc.) though.

Anyway, could you tell me more about that feature in Delphi.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -------------- next part -------------- A non-text attachment was scrubbed... Name: delphi.png Type: image/png Size: 18507 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100209/d66d83e4/attachment.png>

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 11 lines
Hi Lee (and anybody else), In you flash demo, I saw something interesting in Delphi (sorry, not related to Flex/RIA) - the code navigation highlighted in the attached screenshot. Is that something standard with Delphi or is it a add-on package? I've been wanting to implement something like that in Lazarus for ages. I remember Visual Basic 6 also had code navigation like that, and it worked quite well. While in the editor, you immediately know in which class/method you are by simply glancing at the toolbar and navigation is easy.

I always hated that thing in VB.

If you need to look at that to know where you are, maybe your procedures are too long. Here at work we use the following rule of thumb: a procedure may never be longer as 50 lines. If it is, it should be split out. An advantage of that is that most of the time, the procedure header is visible.

Michael.

Reply by email

Adrian De Armas
to Graeme Geldenhuys: In you flash demo, I saw something interesting in Delphi (sorry, not related to Flex/RIA)…

CNWizard from www.cnpack.org/ implements that.

Regards

2010/2/9 Graeme Geldenhuys :

Show quoted text 33 lines
Hi Lee (and anybody else), In you flash demo, I saw something interesting in Delphi (sorry, not related to Flex/RIA) - the code navigation highlighted in the attached screenshot. Is that something standard with Delphi or is it a add-on package? I've been wanting to implement something like that in Lazarus for ages. I remember Visual Basic 6 also had code navigation like that, and it worked quite well. While in the editor, you immediately know in which class/method you are by simply glancing at the toolbar and navigation is easy. I implemented Procedure List some years back, but I think a toolbar navigation will be even better. The Editor Toolbar add-on for Lazarus already has some of that functionality (jumping to intf. or impl. etc.) though. Anyway, could you tell me more about that feature in Delphi. Regards, ?- Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Adrian De Armas
to Lee Jenkins: I made a similar post on Delphi newsgroups but I it will be fpc lazarus compatible since…

It is amazing.
Thank u for sharing.

2010/2/8 Lee Jenkins :

Show quoted text 24 lines
Hi all, I made a similar post on Delphi newsgroups but I it will be fpc lazarus compatible since I need to use it with both envrionments. I have started a Rich Internet Application framework which I'll eventually put on google code under LGPL or similar license. ?I am using Adobe Flex as my client but other clients like ExtJS, Silverlight, OpenLazlo, etc should be easy enough to implement. I'm still in early stages of development, but I need the framework for projects that I have to do so I'm working pretty hard on it. ?Here's is a small wink/flash demo showing the concept. http://www.datatrakpos.com/misc/test_flex_delphi.htm -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Graeme Geldenhuys
to Lee Jenkins
Lee Jenkins wrote
Indeed. CNWizards is the tool that provides that navigator drop down. The functionality that it provides speeds development in the Delphi IDE 30% or more for me I would estimate.

Without having Delphi to try it out, what other features does it have? The cnpack.org website doesn't have any information on CNWizard (well, nothing I could find other than a screenshot with lots of red circles).

It would be very nice to see some of its features implemented in Lazarus.

Luckily Lazarus IDE, "editor toolbar add-on" and "procedure list add-on" are all open source - and you have all this code already on your system. I will gladly review your modifications. ;-)

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Lee Jenkins
to Graeme Geldenhuys
Graeme Geldenhuys wrote 9 lines
Lee Jenkins wrote: > Indeed. CNWizards is the tool that provides that navigator drop down. The > functionality that it provides speeds development in the Delphi IDE 30% or more > for me I would estimate. Without having Delphi to try it out, what other features does it have? The cnpack.org website doesn't have any information on CNWizard (well, nothing I could find other than a screenshot with lots of red circles).

A lot of the features, Lazarus already has like block highlighting, etc.

Some of CnWizards:

Tab Order Wizard
Statistics (Effective lines of code, etc)
Export to source to HTML

My personal favorite is the Auto Drop Down for code insite which shows relevant suggestions for built in types as well as declared variables, etc. Makes typing so much faster.

Warm Regards, Lee

Reply by email

Mattias Gaertner
to Lee Jenkins
[...] My personal favorite is the Auto Drop Down for code insite which shows relevant suggestions for built in types as well as declared variables, etc. Makes typing so much faster.

Can you give some examples for this feature?

Mattias

Reply by email

Lee Jenkins
to Mattias Gaertner
Mattias Gaertner wrote 12 lines
On Tue, 09 Feb 2010 10:21:39 -0500 Lee Jenkins wrote: > [...] > My personal favorite is the Auto Drop Down for code insite which shows relevant > suggestions for built in types as well as declared variables, etc. Makes typing > so much faster. Can you give some examples for this feature? Mattias

Its like C# editor in VS if you've ever used that. Basically monitors your key strokes for the first few characters of typing each word in your code. If I type in "tst" then the code insite suggestion box comes up and shows me TStrings, TStringList, etc. and all I have to do is hit Tab or Enter and the chosen keyword is entered automatically.

The CnWizard version is pretty smart and seems to take into account context and recent use of keywords. You can also set the number of characters that must be input before suggestions will popup.

I posted about it once before I think. Not only is it a time saver for me, but it promotes better variable and type naming since I don't have to type out TMyAbstractComponent, I just type "TMy", the suggestion box pops up, I hit enter/tab and keep on rolling.

Warm Regards, Lee

Reply by email

Mattias Gaertner
to Lee Jenkins
Show quoted text 28 lines
Mattias Gaertner wrote: > On Tue, 09 Feb 2010 10:21:39 -0500 > Lee Jenkins wrote: > >> [...] >> My personal favorite is the Auto Drop Down for code insite which shows relevant >> suggestions for built in types as well as declared variables, etc. Makes typing >> so much faster. > > Can you give some examples for this feature? > > Mattias > Its like C# editor in VS if you've ever used that. Basically monitors your key strokes for the first few characters of typing each word in your code. If I type in "tst" then the code insite suggestion box comes up and shows me TStrings, TStringList, etc. and all I have to do is hit Tab or Enter and the chosen keyword is entered automatically. The CnWizard version is pretty smart and seems to take into account context and recent use of keywords. You can also set the number of characters that must be input before suggestions will popup. I posted about it once before I think. Not only is it a time saver for me, but it promotes better variable and type naming since I don't have to type out TMyAbstractComponent, I just type "TMy", the suggestion box pops up, I hit enter/tab and keep on rolling.

The Lazarus completion box pops up automatically after typing '.', although I prefer Ctrl+Space.
I found the "popup after some characters" annoying, so I didn't implement it. Feel free to provide a patch if you want that feature.

Mattias

Reply by email

Lee Jenkins
to Mattias Gaertner
Mattias Gaertner wrote 35 lines
On Tue, 09 Feb 2010 11:48:42 -0500 Lee Jenkins wrote: > Mattias Gaertner wrote: >> On Tue, 09 Feb 2010 10:21:39 -0500 >> Lee Jenkins wrote: >> >>> [...] >>> My personal favorite is the Auto Drop Down for code insite which shows relevant >>> suggestions for built in types as well as declared variables, etc. Makes typing >>> so much faster. >> Can you give some examples for this feature? >> >> Mattias >> > Its like C# editor in VS if you've ever used that. Basically monitors your key > strokes for the first few characters of typing each word in your code. If I > type in "tst" then the code insite suggestion box comes up and shows me > TStrings, TStringList, etc. and all I have to do is hit Tab or Enter and the > chosen keyword is entered automatically. > > The CnWizard version is pretty smart and seems to take into account context and > recent use of keywords. You can also set the number of characters that must be > input before suggestions will popup. > > I posted about it once before I think. Not only is it a time saver for me, but > it promotes better variable and type naming since I don't have to type out > TMyAbstractComponent, I just type "TMy", the suggestion box pops up, I hit > enter/tab and keep on rolling. The Lazarus completion box pops up automatically after typing '.', although I prefer Ctrl+Space. I found the "popup after some characters" annoying, so I didn't implement it. Feel free to provide a patch if you want that feature.

I do want that feature, just not enough learn the intricacies of the Lazarus editor timers, IDE code, etc. Though it would be an interesting project if I ever had time for it.

Thanks,

Warm Regards Lee

Reply by email

JoshyFun
to Mattias Gaertner: On Tue, 09 Feb 2010 11:48:42 -0500 The Lazarus completion box pops up automatically after…

Hello Lazarus-List,

Tuesday, February 9, 2010, 6:42:19 PM, you wrote:

MG> The Lazarus completion box pops up automatically after typing '.', MG> although I prefer Ctrl+Space.
MG> I found the "popup after some characters" annoying, so I didn't MG> implement it. Feel free to provide a patch if you want that feature.

CNPack have such feature because it shows any identifier that have that characters at whichever position (beginning, end or middle) so if it jumps after the '.' the selector combobox will take ages to be filled. Maybe would be interesting to have a way to instruct the combobox to show any identifier that matches an amount of chars at any position invokable by pressing Ctrl+Space again when combobox is just shown as sometimes I know a part of the name but not exactly how it starts, an example is Stream, writting it options for TStream, TFileStream, TStreamFilter, etc, will be shown.

Best regards, JoshyFun

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt: I always hated that thing in VB. If you need to look at that to know where you are, maybe…
Michael Van Canneyt wrote
I always hated that thing in VB.

Each one for there own. :)

If you need to look at that to know where you are, maybe your procedures are too long. Here at work we use the following rule of thumb: a procedure may never be longer as 50 lines. If it is, it should be split out.

The feature is not exclusively for finding out where you are (that's just a bonus), it's also used for navigation (jumping to a specific method's implementation).

The navigation could also (possibly) be used to jump to inherited methods or color code (say faded red) "abstract" methods that need to be implemented. Simply select the "faded red" method, and CodeTools generates the method implementation stub. Possibilities are endless. :-)

As for the length of procedures - I agree with your coding rule but on my screen I can only see 35 lines of code, so clearly I need a bigger screen. :-) I'm using a widescreen LCD with standard 1440x900 resolution. See attached screenshot for Lazarus IDE window layout I use. Any suggestions on a better window layout? BTW: Bottom left "white" window is the Messages window that actually spans the width of the IDE layout (currently partially covered by the Source Editor).

Screenshot replaced with ascii art. You need a mono-font to view it correctly.

+------------------------------------+
| Main Form |
| |
+------------------------------------+
+--------++--------------------------+
| || |
|Project || Source Editor |
|Inspect || |
| || |
| || |
| || |
| || |
+--------+| |
+--------+| |
| Msg || |
| Window || |
+--------++--------------------------+

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 5 lines
[...] The navigation could also (possibly) be used to jump to inherited methods or color code (say faded red) "abstract" methods that need to be implemented. Simply select the "faded red" method, and CodeTools generates the method implementation stub. Possibilities are endless. :-)

Well, for this you could use the refactoring tool Show abstract methods.

[...]

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gaertner
Mattias Gaertner wrote
Well, for this you could use the refactoring tool Show abstract methods.

Umm, another new feature I didn't notice before.

I know the "enhanced" editor toolbar will duplicate features in other areas of the IDE (like it does already), but it will bring them together in a single easily accessible and more visible location.

Anyway, I added it to my todo list, but have a ton of stuff to do before I'll be able to get to it.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email