Raised This Month: $51 Target: $400
 12% 

New API and Syntax


Post New Thread Reply   
 
Thread Tools Display Modes
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 03-18-2015 , 14:50   Re: New API and Syntax
Reply With Quote #421

Quote:
Originally Posted by Wliu View Post
Another question Bailopan: Will there be ways to test your code through special functions in future versions of Sourcepawn?
Examples: Junit, xUnit, Jasmine...
You could try PawnUnit. You can't test asynchronous code yet though.
__________________
Peace-Maker is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 03-18-2015 , 19:55   Re: New API and Syntax
Reply With Quote #422

Quote:
Originally Posted by Peace-Maker View Post
You could try PawnUnit. You can't test asynchronous code yet though.
Awesome, had no idea that something like that existed. Thanks!
So I guess the new question is: Will this async limitation get squashed soon or will we have to wait a while?
__________________
~Wliu
Wliu is offline
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 03-18-2015 , 21:28   Re: New API and Syntax
Reply With Quote #423

Probably not, because I barely have time for the ZR plugin. I also need to migrate that project to GitHub for pull requests or to give others access to it - or just fork it.
__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)
rhelgeby is offline
Send a message via MSN to rhelgeby
kossolax
AlliedModders Donor
Join Date: Jan 2008
Location: Belgium
Old 03-20-2015 , 09:48   Re: New API and Syntax
Reply With Quote #424

Quote:
Originally Posted by KissLick View Post
Unused functions are reported and unused stocks are not compiled, so there is no need to report them (and you should use them only via includes).
public functions are not reported, private are.

It might be usefull to show "unused" functions. regardless they are forward or not.

Last edited by kossolax; 03-20-2015 at 09:49.
kossolax is offline
R1KO
Member
Join Date: Sep 2013
Old 03-20-2015 , 12:35   Re: New API and Syntax
Reply With Quote #425

how to inherit the class constructor?

PHP Code:
methodmap Menu2 Menu
{
    public 
Menu2(MenuHandler handlerMenuAction actions=MENU_ACTIONS_DEFAULT)
    {
//        this = new Menu(handler, actions); // not compiled

    
};

    
// My functions ...

Analog in c++
PHP Code:
class Point {
public:
    
Point() {
        
00;
    }
    
Point(int xint y) {
        
this->x;
        
this->y;
    }
private:
    
int xy
};

class 
Circle : public Point {
public:
    
Circle() : Point() {
        
range 0;
    }

    
Circle(int xint yint range) : Point(xy) {
        
this->range range;
    }
private:
    
int range;
}; 

Last edited by R1KO; 03-20-2015 at 12:48.
R1KO is offline
Send a message via Skype™ to R1KO
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 03-20-2015 , 13:19   Re: New API and Syntax
Reply With Quote #426

Quote:
Originally Posted by kossolax View Post
public functions are not reported, private are.

It might be usefull to show "unused" functions. regardless they are forward or not.
actually it makes sense public things aren't reported as unused for the following reason: It's visible to everyone. The compiler see public as the following: "This thing is defined, but I'm not 100% sure it's going to be used or not. *Sigh* No point in tagging it unused then." Private ones are only tagged because it's only visible to what defined it which tells the compiler, "Hey, this thing you can 100% know if it's used or not."
__________________
WildCard65 is offline
VoiDeD
AlliedModders Donor
Join Date: Mar 2009
Location: Illinois, USA
Old 03-20-2015 , 13:24   Re: New API and Syntax
Reply With Quote #427

Quote:
Originally Posted by R1KO View Post
how to inherit the class constructor?

PHP Code:
methodmap Menu2 Menu
{
    public 
Menu2(MenuHandler handlerMenuAction actions=MENU_ACTIONS_DEFAULT)
    {
//        this = new Menu(handler, actions); // not compiled

    
};

    
// My functions ...

Code:
public Menu2(...)
{
    return view_as<Menu2> new Menu(...);
}
__________________
VoiDeD is offline
Kailo
Senior Member
Join Date: Sep 2014
Location: Moscow, Russia
Old 03-20-2015 , 13:55   Re: New API and Syntax
Reply With Quote #428

I find bug with new syntax and send it on tracker, but accidentally set status UNCONFIRMED, need set it as NEW. https://bugs.alliedmods.net/show_bug.cgi?id=6326

Last edited by Kailo; 03-20-2015 at 13:56.
Kailo is offline
Kailo
Senior Member
Join Date: Sep 2014
Location: Moscow, Russia
Old 03-20-2015 , 16:25   Re: New API and Syntax
Reply With Quote #429

Quote:
Originally Posted by WildCard65 View Post
It's unconfirmed because no one had a look at it. I think the new auto expires after x amount of time after being posted
No. It happen when i add comment.
Kailo is offline
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 03-20-2015 , 16:47   Re: New API and Syntax
Reply With Quote #430

because an admin quickly look at it so it no new anymore so they are aware of it and will test it to confirm it?
Mathias. is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode