Sign in Join

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

Mailing lists / lazarus / 2012-01

TProjectDescriptor doubt

14 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

silvioprog

Hello,

It's possible to clear the icon of the project, and change the "Application Settings"? Please see: http://imagebin.org/195178

So, it's possible don't generate the "{$R *.res}" directive? See: http://imagebin.org/195179

The supposed configuration would be:

(...)
function TFoo.InitProject(AProject: TLazProject): TModalResult;
var
  LE: ShortString;
  VSource: string;
  VProject: TLazProjectFile;
begin
  Result := inherited InitProject(AProject);
  VProject := AProject.CreateProjectFile('cgi1.lpr');
  AProject.AddFile(VProject, False);
  AProject.AddPackageDependency(SLWS);
  VProject.IsPartOfProject := True;
//  AProject.Icon.Clear; <<-- Here...
//  AProject.UseAppBundle := False; <<-- Here...
//  AProject.UseManifestFile := False;
(...)

There is some documentation for TProjectDescriptor?

Sorry for my english.

Thanks,

Silvio Cl?cio ==================================== Site - <silvioprog.com.br> LazSolutions - <code.google.com/p/lazsolutions> ====================================

Reply by email

silvioprog
to silvioprog

2012/1/23 silvioprog :

Show quoted text 32 lines
Hello, It's possible to clear the icon of the project, and change the "Application Settings"? Please see: http://imagebin.org/195178 So, it's possible don't generate the "{$R *.res}" directive? See: http://imagebin.org/195179 The supposed configuration would be: (...) function TFoo.InitProject(AProject: TLazProject): TModalResult; var ?LE: ShortString; ?VSource: string; ?VProject: TLazProjectFile; begin ?Result := inherited InitProject(AProject); ?VProject := AProject.CreateProjectFile('cgi1.lpr'); ?AProject.AddFile(VProject, False); ?AProject.AddPackageDependency(SLWS); ?VProject.IsPartOfProject := True; // ?AProject.Icon.Clear; <<-- Here... // ?AProject.UseAppBundle := False; <<-- Here... // ?AProject.UseManifestFile := False; (...) There is some documentation for TProjectDescriptor? Sorry for my english. Thanks,

...and.

It's possible to add "Build modes"?

Silvio Cl?cio ==================================== Site - <silvioprog.com.br> LazSolutions - <code.google.com/p/lazsolutions> ====================================

Reply by email

Joshua Lim
to silvioprog

Hi,

I've been trying out the fpweb extdirect demos and find the js coding part quite challenging for someone who only knows Pascal, so in the absence of a WYSIWYG extjs editor for fpc such as Randaus and UniGui, I thought of using Ext Designer, but the js codes generated by Ext Designer is very different from the examples provided in fcl-web folder.

Meanwhile, I've been searching the net for fpweb json examples, there has only been 2 articles written by Leonardo in 2010 http://leonardorame.blogspot.com/2010/03/web-20-programming-with-object-pascal.html.

Any thoughts on this? Thanks. :)

Rgds,
Joshua

Reply by email

Unknown author
to Joshua Lim
Joshua Lim wrote 7 lines
Hi, I've been trying out the fpweb extdirect demos and find the js coding part quite challenging for someone who only knows Pascal, so in the absence of a WYSIWYG extjs editor for fpc such as Randaus and UniGui, I thought of using Ext Designer, but the js codes generated by Ext Designer is very different from the examples provided in fcl-web folder.

How do you mean ?

Show quoted text 5 lines
Meanwhile, I've been searching the net for fpweb json examples, there has only been 2 articles written by Leonardo in 2010 http://leonardorame.blogspot.com/2010/03/web-20-programming-with-object-pascal.html. Any thoughts on this? Thanks. :)

There is nothing FPC-specific about the way you must program ExtJS to work with fpweb.

FPC just provides Ext.Direct server-side functionality and data for a JSON or XML store. All you need to do is make sure Ext has the correct URL.

Michael.

Reply by email

Mattias Gaertner
to silvioprog: It's possible to clear the icon of the project, and change the "Application Settings"?…
Hello, It's possible to clear the icon of the project, and change the "Application Settings"? Please see: http://imagebin.org/195178

Of course. Your screenshot show one possibility - the project options.

So, it's possible don't generate the "{$R *.res}" directive? See: http://imagebin.org/195179

Yes. Another possibility is to create a "console application" or "program" (Project / New Project).

Show quoted text 20 lines
The supposed configuration would be: (...) function TFoo.InitProject(AProject: TLazProject): TModalResult; var LE: ShortString; VSource: string; VProject: TLazProjectFile; begin Result := inherited InitProject(AProject); VProject := AProject.CreateProjectFile('cgi1.lpr'); AProject.AddFile(VProject, False); AProject.AddPackageDependency(SLWS); VProject.IsPartOfProject := True; // AProject.Icon.Clear; <<-- Here... // AProject.UseAppBundle := False; <<-- Here... // AProject.UseManifestFile := False; (...) There is some documentation for TProjectDescriptor?

Very little. I will write a few lines.

See the examples in ide/projectdefs.pas
TProjectApplicationDescriptor
TProjectProgramDescriptor
TProjectConsoleApplicationDescriptor
...

What do you want to do?

Mattias

Reply by email

Mattias Gaertner
to silvioprog: 2012/1/23 silvioprog : ...and. It's possible to add "Build modes"? Silvio Cl?cio…
Show quoted text 8 lines
2012/1/23 silvioprog : > Hello, > > It's possible to clear the icon of the project, and change the > "Application Settings"? Please see: http://imagebin.org/195178 > > So, it's possible don't generate the "{$R *.res}" directive? See: > http://imagebin.org/195179

The default is to *not* create the resource directive. There is nothing to explain.

Please explain what you want to achieve.

> The supposed configuration would be: > > (...) > function TFoo.InitProject(AProject: TLazProject): TModalResult;

Use as ancestor of TFoo the TProjectDescriptor.

[...] It's possible to add "Build modes"?

Not yet via the TProjectDesciptor. You can use project templates.

Mattias

Reply by email

silvioprog
to Mattias Gaertner: On Mon, 23 Jan 2012 23:16:31 -0200 Of course. Your screenshot show one possibility - the…

2012/1/24 Mattias Gaertner :
[...]

Of course. Your screenshot show one possibility - the project options.

Yes, but I need to do this via TProjectDescriptor.

Show quoted text 5 lines
> So, it's possible don't generate the "{$R *.res}" directive? See: > http://imagebin.org/195179 Yes. Another possibility is to create a "console application" or "program" (Project / New Project).

Both come with the directive {$R *.res}. I created my TProjectDescriptor based on the TProjectDescriptor of the "program".

Show quoted text 6 lines
Very little. I will write a few lines. See the examples in ide/projectdefs.pas TProjectApplicationDescriptor TProjectProgramDescriptor TProjectConsoleApplicationDescriptor

I saw. There is no documentation about "project descriptors"? x(

What do you want to do? Mattias

Add my project in the menu File | New. But my project will have no icon, nor manifest file and by default my project will have two build modes.

Thx.

Silvio Cl?cio ==================================== Site - <silvioprog.com.br> LazSolutions - <code.google.com/p/lazsolutions> ====================================

Reply by email

silvioprog
to Mattias Gaertner: On Mon, 23 Jan 2012 23:22:25 -0200 The default is to *not* create the resource directive.…

2012/1/24 Mattias Gaertner :
[...]

The default is to *not* create the resource directive. There is nothing to explain. Please explain what you want to achieve.

In all the options I've tested is created the directive. Eg, "Program", "Console application" and "Library". And in other projects, eg. "CGI Application". sounds strange to create an icon in a CGI application, right? :)

Use as ancestor of TFoo the TProjectDescriptor.

I already use, please see in; http://pastebin.com/3SczTFBj

Not yet via the TProjectDesciptor. You can use project templates.

x'(

Mattias

Thank you Mattias. ;)

Silvio Cl?cio ==================================== Site - <silvioprog.com.br> LazSolutions - <code.google.com/p/lazsolutions> ====================================

Reply by email

Mattias Gaertner
to silvioprog
Show quoted text 11 lines
2012/1/24 Mattias Gaertner : [...] > The default is to *not* create the resource directive. There is nothing > to explain. > > Please explain what you want to achieve. In all the options I've tested is created the directive. Eg, "Program", "Console application" and "Library". And in other projects, eg. "CGI Application". sounds strange to create an icon in a CGI application, right? :)

You are right about "Program". I change that.
"Console application" does not have an icon. If it does for you, please report this bug.

> Use as ancestor of TFoo the TProjectDescriptor. I already use, please see in; http://pastebin.com/3SczTFBj

It works here under Linux. Maybe the bug only appears under Windows.

I added some fpdoc.

Mattias

Reply by email

silvioprog
to Mattias Gaertner

2012/1/25 Mattias Gaertner :

Show quoted text 29 lines
On Tue, 24 Jan 2012 23:01:41 -0200 silvioprog wrote: > 2012/1/24 Mattias Gaertner : > [...] > > The default is to *not* create the resource directive. There is nothing > > to explain. > > > > Please explain what you want to achieve. > > In all the options I've tested is created the directive. Eg, > "Program", "Console application" and "Library". And in other projects, > eg. "CGI Application". sounds strange to create an icon in a CGI > application, right? :) You are right about "Program". I change that. "Console application" does not have an icon. If it does for you, please report this bug. > > Use as ancestor of TFoo the TProjectDescriptor. > > I already use, please see in; http://pastebin.com/3SczTFBj It works here under Linux. Maybe the bug only appears under Windows. I added some fpdoc. Mattias

I think it's bug...

Please see this video: http://silvioprog.com.br/video/bug

Lazarus 0.9.30.2 r33306 FPC 2.4.4 i386-win32-win32/win64

Silvio Cl?cio ==================================== Site - <silvioprog.com.br> LazSolutions - <code.google.com/p/lazsolutions> ====================================

Reply by email