Jump to content

Recommended Posts

On 11/23/2017 at 2:46 PM, engima said:

New version!

 

Version 0.59

-Added all script commands in Arma 3 version 1.76.

-It is now possible for CPack authors to add a line to the top of description.ext.

-Fixed: Crasch if the CPack installer tries to write to a file that is open by another process.

-Fixed: Stability issues.

-SQX: Analyzer improvements

I cannot install it, I'm warned about a potential threat. I can't even manually run it, Windows stops me, lol? I'm downloading from Armaholic, could be something to do with archive packing (@foxhound) but I highly doubt it.

Share this post


Link to post
Share on other sites
On 11/23/2017 at 2:46 PM, engima said:

New version!

 

Version 0.59

-Added all script commands in Arma 3 version 1.76.

-It is now possible for CPack authors to add a line to the top of description.ext.

-Fixed: Crasch if the CPack installer tries to write to a file that is open by another process.

-Fixed: Stability issues.

-SQX: Analyzer improvements

I cannot install it, I'm warned about a potential threat. I can't even manually run it, Windows stops me, lol? I'm downloading from Armaholic, could be something to do with archive packing (@foxhound) but I highly doubt it.

 

EDIT: Just downloaded from official site, same issue...

 

EDIT 2: SERIOUSLY... These forums are completely f*cked.

Share this post


Link to post
Share on other sites

That's a Windows 10 feature. Non signed packages gives a warning upon execute. That means Windows do not promise that the package is not malware, which means you have to trust me. If you're on a computer where you are not local admin, the admin might have prohibited installation of such packages. Otherwise you can override it by allowing it in the User Account Control.

Share this post


Link to post
Share on other sites
On ‎11‎/‎27‎/‎2017 at 7:29 AM, engima said:

That's a Windows 10 feature. Non signed packages gives a warning upon execute. That means Windows do not promise that the package is not malware, which means you have to trust me. If you're on a computer where you are not local admin, the admin might have prohibited installation of such packages. Otherwise you can override it by allowing it in the User Account Control.

yep.. 

 

Share this post


Link to post
Share on other sites
On 11/27/2017 at 12:29 PM, engima said:

That's a Windows 10 feature. Non signed packages gives a warning upon execute. That means Windows do not promise that the package is not malware, which means you have to trust me. If you're on a computer where you are not local admin, the admin might have prohibited installation of such packages. Otherwise you can override it by allowing it in the User Account Control.

Don't worry, I know it's not malware. I have full admin rights, I have tried running as admin. It just doesn't give me an option to continue anyway. No idea why... :S

 

EDIT: I just tried again, just this second and it worked. Same download as the other day. So weird, no idea was it didn't work before.

Share this post


Link to post
Share on other sites

@engima - Suggestion: If possible, it would be nice to have an in-built cached Wiki with description and maybe an example of commands and even functions too that you can search for as it types out. Similar to KTown's Intellij Plugin.

http://www.armaholic.com/page.php?id=30898

Share this post


Link to post
Share on other sites

There is no pop-up window when I select the text and want to copy it with RMB. Seriously..?

Share this post


Link to post
Share on other sites

Yes, seriously. Who uses that anyway? :tounge_o::smileee:

Ctrl + A = Select All

Ctrl + C = Copy
Ctrl + X = Cut

Ctrl + V = Paste

These are the main ones you'll need.

Share this post


Link to post
Share on other sites

I know. But it would be good if you add that option. At least the windows default one. Sometimes it's faster to use the mouse

Share this post


Link to post
Share on other sites

New version:

 

Version 0.60

-Added parameter check in calls to functions (if first command in function is "params").

-SQX: Added parameter check in calls to methods (if first command in method is "params").

-SQX: Added support for static fields in classes.

-SQX: Added support for static properties in classes.

-SQX: Fixed: Some Operators compiled incorrectly (e.g. the lookup operators >> and /).

-SQX: Fixed: Compiler adds faulty semicolons at end of array elements.

 

This is an important update, since I add the parameter check for functions (SQF) and methods (SQX). Parameter checks will be automatically enabled, and it works in the following conditions:

  • A function's (or method's) first script command must be params. "params" is a command that lets you recieve sent in parameters in a very convenient way, and it replaces the old way of reading parameters with "_this select n" on a row for each parameter.
  • The parameters sent in must be an array literal or any argument except for arrays. Best practice is to always use array literals, like this: [arg1, someVar, true] call myFnc;

Hope you like it!

Please notify me about any errors (typesqf@outlook.com) and I'll fix them as soon as I have a possibility.

  • Thanks 1

Share this post


Link to post
Share on other sites

New version.

 

Version 0.61

-SQX: Added parameter check in calls to constructors (if first command in constructor is "params")

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
On 20/01/2018 at 9:42 PM, engima said:

New version.

 

Version 0.61

-SQX: Added parameter check in calls to constructors (if first command in constructor is "params")

 

Hello Enigma

 

Nice and clever project, but why restrict its use ? You should use at least git for code + wiki for the documentation

 

Other improvements can be to separate:

- src (with sqx)

- release (with sqf)

- use import keyword to retrieve the package on git (like in go) instead of outoforder service :(

 

other thing, I think there is an implementation problem on check type that should be outside of the method structure

		public static method BlowUpTank {
			params ["_tank" as Crowd];
			if (_tank is Crowd) then {};

it shoud be also check at run time like "is"

 

		public static method BlowUpTank (Crowd _tank) {
			if (_tank is Crowd) then {};

 

Share this post


Link to post
Share on other sites

Thanks for the feedback. Both things you mention are in the pipe. Editor is on its way to github, but I need to fix a few things first.

 

Your other suggestion (parameters in method header) is also planned as a coming alternate syntax.

 

Not sure what you mean with the "is" command. Isn't it working?

Share this post


Link to post
Share on other sites

Hi Engima,

 

To be more precise, I am the official maintainer of the oop project. With another person, we are always interested to see how different people are doing to implement the object oriented language. So, last night, we had completely check the typesqf to see the advantages / disadvantages of this method. Personally, I find that there are a lot of interesting things. We do it more by intellectual challenge than anything else, because we like to brainstorm on subjects a little complex. In fact clearly as soon as Arma will propose the object oriented language, we will switch to the native solution and we will move to other subject.

For "is", it seems to work as expected, but we have not tested all use cases. Normaly, we check the parameter type before the execution of the method cause you can use the same method name with differents parameters type. It s weaken than interface but it s also a good solution.

 

I thought that on this project, what is limiting is having everything organized around a remote site (wich is down, i used wayback machine to retrieve the api guide) and around an IDE. For the idea it has advantages but also disadvantages, for exemple, for people who use text editors or alternative ide. Maybe an external compiler would have been a good solution.

I am looking forward to the publication of the next version. Anyway, i think also a SQ(X,Z,..) language evolution with scheduler / thread / sockets, evolution of try catch, yield,  etc could become a very interesting language outside of Arma  (@Dedmen, @x39 ??)

Share this post


Link to post
Share on other sites

New version:

 

Version 0.62
-SQX: Fixed: Type names no longer case sensitive.
-SQX: Fixed: Parameters (params) with default value got wrong type.
-Added all script commands for Arma 3 version 1.84 to ScriptCommands.xml.

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

A note to everyone. All script commands are in a perfect readable format in the file ScriptCommands.xml. This is so that user can fix errors and add commands by themselves if they want to. But of course I am also interested of eventual updates, so that I can implement them officially. :)

  • Like 2

Share this post


Link to post
Share on other sites

New version.

 

Version 0.64

-Fixed: Parameters declared with "params" no longer generate a warning of not being used.
-Minor fixes and improvements.
-SQX: Made it possible to compile the current open file instead of the whole project.
-SQX: Interface method declarations now require complete parameter list, e.g. "method String GetName("_unit" as Object);"
-SQX: Class method declarations now allow alternative syntax for explicitly specified parameters, e.g. "public method Scalar GetAge("_unit" as Object) { ... };"
-SQX: Added parameter check in calls to interface methods.

 

Verson 0.63
-SQX: Fixed: Interfaces returning custom types not recognized as implemented in interfaced classes.

  • Like 1

Share this post


Link to post
Share on other sites

Hi,

 

very interesting project you got here. I've tried it out tonight and ran into one issue. Is it possible to create singletons? Or, are there default values for properties? I tried my best but did not get it to work properly.

I was hoping to get something going like this:

 

namespace Test.Classes {
	
	// Logs all events to the default profile log file.
	public class Logger {
		
		// Our shared instance.
		public static property Logger shared {get; private set;} = new Logger;
		
		// MARK: - Initialization
		
		// Init is private b/c callers have to use our shared instance.
		private constructor() {};
		
		// Logs the given text.
		// - parameter text: - The text to log.
		public method log("_text" as String) {
		
			diag_log(format["*** Log: %1", _text]);
		};
	};

};

// Info:
// This way i'd be able to call Logger.shared.log("Important msg")

But it wont let me assing a value to my static properly like that.

Do you guys have any idea how to create shared instances /  singleton patterns?

 

Best Regards!

Share this post


Link to post
Share on other sites
19 hours ago, Xpect said:

Hi,

 

very interesting project you got here. I've tried it out tonight and ran into one issue. Is it possible to create singletons? Or, are there default values for properties? I tried my best but did not get it to work properly.

I was hoping to get something going like this:

 


namespace Test.Classes {
	
	// Logs all events to the default profile log file.
	public class Logger {
		
		// Our shared instance.
		public static property Logger shared {get; private set;} = new Logger;
		
		// MARK: - Initialization
		
		// Init is private b/c callers have to use our shared instance.
		private constructor() {};
		
		// Logs the given text.
		// - parameter text: - The text to log.
		public method log("_text" as String) {
		
			diag_log(format["*** Log: %1", _text]);
		};
	};

};

// Info:
// This way i'd be able to call Logger.shared.log("Important msg")

But it wont let me assing a value to my static properly like that.

Do you guys have any idea how to create shared instances /  singleton patterns?

 

Best Regards!

 

Yes. Use a static Init method to create the logger:

public static method Init()
{
    _self.shared = new Logger;
};

 

And make sure it is called once at mission start by calling it from the init file (init.sqx):

using Test.Classes;
call Logger.Init;

 

I'm glad you're asking! :)

Share this post


Link to post
Share on other sites

Thank you so much for the fast answer and a happy new year to every one who reads this comment. It works like a charm! I've spent my free day today with it and I'm a huge fan. I'm already collecting bugs and feature request and I'll most likely be hitting up this thread with those soon, engima! :P

 

One thing I'll share right now is that when I use a "shared" instance of a class like Logger the editor won't autocomplete Logger.shared.log but thats just a minor thing.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×