Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnWizards IDE Wizards
» %ArgList% and %Arguments% don't work with current procedure
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: %ArgList% and %Arguments% don't work with current procedure
harghh
新警察
UID 41212
Digest Posts 0
Credits 6
Posts 2
点点分 6
Reading Access 10
Registered 2008-11-7
Status Offline
#1
Post at 2008-11-7 06:28
Profile
|
Blog
|
P.M.
%ArgList% and %Arguments% don't work with current procedure
Hi!
When I try to insert one of these macros while the cursor is INTO a procedure the parameters of the NEXT procedure are used. This is not a big problem, but annoying.
Example:
procedure TMyClass.Remove(const AID: Integer);
begin
// using %ArgList% or %Arguments% here result in "Value" parameter
end;
procedure TMyClass.SetMode(const Value: Integer);
begin
// ....
end;
Also it would be great if another macro exists (%CurrMethodName% ?) which is only the name of the method, without the name of the class. Ie 'SetMode' instead of 'TMyClass.SetMode'.
Thank you for your wonderful tools!
Harghh
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#2
Post at 2008-11-7 23:40
Profile
|
Blog
|
P.M.
The %ArgList% and %Arguments% means NEXT procedure's ones. We should add %CurrArgList% and %CurrArguments% to the macros, but it's not so easy due to our design limitation.
But we can add a %CurrMethodName% quickly for a method name without a classname.
The coming 0.8.9.459 nightly build version will contain this enhancement.
http://www.cnpack.org/downbuilds.php
harghh
新警察
UID 41212
Digest Posts 0
Credits 6
Posts 2
点点分 6
Reading Access 10
Registered 2008-11-7
Status Offline
#3
Post at 2008-11-8 21:28
Profile
|
Blog
|
P.M.
Thank you for your reply and for adding %CurrMethodName%!
By curiosity, what make it difficult to implements %CurrArgList% and %CurrArguments%?
I would eventualy want to modify CnPack myself to add them but I need to understand how it work first.
Also, is there a workaround for "simulating" %CurrArgList% and %CurrArguments%?
For example a shorcut which will jump from the body of the procedure to BEFORE the procecure, use %CurrArgList%, and move generated text to the body of the procedure?
It may be something doable with Pascal Script.
What do you think?
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#4
Post at 2008-11-11 20:05
Profile
|
Blog
|
P.M.
We use mwPasLex to parse the pascal code. But it's not implemented or wrapped in Pascal Script due to Pascal Script's grammar limitation. So now in Pascal Script we can't parse the code as needed. We can only call some wrapped function in CnWizards.
Poll
Trade
Reward
Activity
CnPack Forum
CnPack English Forum
> CnWizards IDE Wizards
> CVSTracNT
> Announcements & Others
All times are GMT++8, the time now is 2024-12-4 17:09
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.007428 second(s), 8 queries , Gzip enabled
TOP
Clear Cookies
-
Contact Us
-
CnPack Website
-
Archiver
-
WAP
Member's CP Home
Edit Profile
Credits Transaction
Public User Groups
Buddy List
Main
Page Views
User Agents
Posts History
Top Forums
Top Threads
Post Ranking
Credit Ranking
Online Time
Team
Moderation Stats