[MSEide-MSEgui-talk] About macros and .prj

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[MSEide-MSEgui-talk] About macros and .prj

fredvs
About macros and .prj

Hello Martin.

I would like to create a "universal" layout file.

For this I use this in the prj file:

mainfile=${PROJECTNAME}.pas
targetfile=${PROJECTNAME}
makecommand=${ULTIBOCOMP} // from a general macro.

It works like charm, just rename the .prj with same name as main file and
copy it in the directory of the project.

But to load by default this main file in the source-editor, I did try with
this in the .prj:

 panel1
units=
 (
 a=0,8245,6,Pascal Units
 c=1
  (
  file=${PROJECTNAME}.pas
  kind=1
  a=0,8196,0,${PROJECTNAME}.pas
  )
 )

sourcefiles=1
 ${PROJECTDIR}/${PROJECTNAME}.pas

But doing this, at loading of the prj, there is that error message:

Unable to open file "/home/fred/test/${PROJECTDIR}/{PROJECTNAME}.pas
No such file or directory.

Are you OK to enable macro-conversion at this stage too?

Thanks.

Fre;D





--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] About macros and .prj

mse
Administrator
On Thursday 08 November 2018 00:11:09 fredvs wrote:
> About macros and .prj
>
>
> Are you OK to enable macro-conversion at this stage too?
>
I fear that has too many side effects. The main program can be opened
by 'Project'-'Source'. Or use the 'Project'-'Options'-'Templates'-'New
Project' functionality. There macros will be expanded and files with
activated 'L' column loaded in editor.

Martin


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] About macros and .prj

fredvs
>  fear that has too many side effects.

Ha, strange...

I did use some expandprmacros(afilename) in sourceform.openfile method and
it works like charm.

Hum, could you explain what kind of side effects it can have ?

Thanks.



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] About macros and .prj

mse
Administrator
On Thursday 08 November 2018 15:29:09 fredvs wrote:
> >  fear that has too many side effects.
>
> Ha, strange...
>
> I did use some expandprmacros(afilename) in sourceform.openfile method and
> it works like charm.
>
> Hum, could you explain what kind of side effects it can have ?
>
I don't know exactly but I have a bad feeling. If it works for you OK, but I
don't want it in my code especially because MSEide already has a mechanism
for initializing projects.

Martin


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] About macros and .prj

fredvs
In reply to this post by mse
Hello Martin.

> and files with activated 'L' column loaded in editor.

Not sure to understand, what 'L' column in editor?

> Or use the 'Project'-'Options'-'Templates'-'New Project' functionality.

Yes, of course, but not so fast as rename lot of prj files if you have lot
of new MSE  projects to create from Lazarus projects for example.

Fre;D
 




--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] About macros and .prj

fredvs
In reply to this post by mse
> If it works for you OK, but I don't want it in my code.

Aaargh, if you don't do it in MSE code, I will not do it for ideU.
This because I want that all ideU prj are 100% compatible with MSEide.

;-(

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] About macros and .prj

mse
Administrator
In reply to this post by fredvs
On Thursday 08 November 2018 15:53:28 fredvs wrote:
> Hello Martin.
>
> > and files with activated 'L' column loaded in editor.
>
> Not sure to understand, what 'L' column in editor?
>
If the "x" is set in the 'L' column of 'Project'-'Options'-'Templates'-'New
Project'-grid the according File will be loaded into editor at project
creation.

Martin


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] About macros and .prj

fredvs
Hello Martin.

OK, let's do a other way.

I will add a option in ProjectOptions:

x "Source editor at loading" // loadsource : boolean = false;


And add this at end in openproject():

function tmainfo.openproject(const aname: filenamety;
                               const ascopy: boolean = false): boolean;
begin
...
if loadsource then actionsmo.projectsourceexe(nil); // add this at end.
end;

That way, no change in prj behavior and everybody is happy.

Huh,... ok ?.

Fre;D




--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] About macros and .prj

fredvs
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] About macros and .prj

mse
Administrator
In reply to this post by fredvs
On Thursday 08 November 2018 17:14:56 fredvs wrote:
>
> Huh,... ok ?.
>
I hope so. :-)

Martin


_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk