WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Would this be useful to anyone else but me? :) NotePad++ Question! (https://www.wowinterface.com/forums/showthread.php?t=46261)

fRodzet 04-12-13 12:30 PM

Would this be useful to anyone else but me? :) NotePad++ Question!
 
Greetings,

So.. As i was kinda bored i decided to Add Tooltips aswell as auto-complete WoW API's for NotePad++

It is not yet done, however here are some screenshots of how it operates so far:

Auto-Complete Suggestion:


Tooltip note:


Should i continue this and finish it so that other can have the pleasure of it, or would it not be worth it?

Regards,
fRodzet

myrroddin 04-12-13 12:55 PM

People keep asking for such a thing periodically. You would get users, for sure. Hopefully you can keep it current with the changes Blizzard eventually makes.

p3lim 04-12-13 01:12 PM

If kept complete and updated you would probably get regular users, but only if you do so.
So many plugins and syntax stuff for editors end up discontinued.

fRodzet 04-13-13 09:54 AM

This deffinately takes longer than i thought. First of all there is thousands of API's and loads of EVENTS.

So for the first version i will only include auto completion aswell as a small tooltip. The next version will have better API tooltips and will include auto-completion/tooltips for events aswell.

the expected release date is April the 17th 2013.

Nibelheim 04-13-13 09:58 AM

This might just tempt me to go back to Notepad++ :cool:

myrroddin 04-13-13 10:35 AM

To give you a leg up on patch 5.3, here is the known API change log: http://www.wowpedia.org/Patch_5.3.0/API_changes

fRodzet 04-13-13 11:34 AM

Quote:

Originally Posted by myrroddin (Post 276404)
To give you a leg up on patch 5.3, here is the known API change log: http://www.wowpedia.org/Patch_5.3.0/API_changes

Ty :)

I will also add the states of the API's e.g if its PROTECTED it would look like this:


Ailae 04-13-13 12:48 PM

Looks pretty sweet!

Although I don't see the point in adding the PROTECTED functions, since they are unusable by definition.

Nibelheim 04-13-13 12:54 PM

Quote:

Originally Posted by Ailae (Post 276415)
Looks pretty sweet!

Although I don't see the point in adding the PROTECTED functions, since they are unusable by definition.

Nah, you can use Protected functions, as long as you do so securely.

Seerah 04-13-13 01:00 PM

AcceptBattlefieldPort is usable - it just requires a hardware event.

Some protected functions require a hardware event (ie, the addon can't just call the function automatically) and some protected functions are only protected during combat.

Ailae 04-13-13 01:04 PM

I suppose that should be tagged as HARDWARE then rather than PROTECTED, no?

When I said protected I was thinking about stuff like CastSpellByID etc. Mainly just the ones with a protected-banner on WoW Programmings reference page.
http://wowprogramming.com/docs/api_categories

Phanx 04-13-13 01:30 PM

There are three main categories of protected functions, and some functions may fall into multiple categories, or may behave differently under different circumstances.

1. Functions that are completely protected, and can only be called by Blizzard code. There is probably no point in including functions like CastSpellByName that are always in this category, since they cannot be used by addons.

2. Functions that can only be called by addons out of combat, like CancelPlayerBuff.

3. Functions that require a hardware event, but do not require a secure code path, like ReportPlayer.

Some functions, like CancelPlayerBuff, are both restricted to non-combat usage and require a hardware event.

Functions that fall into Category 1 only under some circumstances should probably be included, with notes. For example, AcceptBattlefieldPort cannot be called to leave a battleground queue through a tainted code path, which is why users of my addon Broker_LFG cannot leave battleground queues while the addon is enabled -- the menu is tainted because it's opened from the Broker plugin instead of the minimap icon.

The main problem is that the "PROTECTED" label is used for all of these functions, even though what it actually means can differ greatly. You'd have to go through them one by one and figure out what kind of protection applies to each function.

fRodzet 04-13-13 02:03 PM

Quote:

Originally Posted by Phanx (Post 276420)
The main problem is that the "PROTECTED" label is used for all of these functions, even though what it actually means can differ greatly. You'd have to go through them one by one and figure out what kind of protection applies to each function.

I will go through each protected labels if needed. But for the beta version of this "tool" i will not add a complete tooltip notification as mentioned earlier.

It will just return the small tooltip provided by wowpedia aswell as the arguments required e.g:

Frame:CreateFontString(["name"[,"layer"[,"inheritsFrom"]]]) - Create and return a new FontString as a child of this Frame - Can instantiate virtuals in 1.11.

however, you can call any variable instead of Frame you can use w/e you like and the CreateFontString will still show its tooltip aswell as its required arguments.

Though i did end up having some errors where 2 equal "functions" has two different outputs e.g:

MessageFrame:AddMessage
and
ScrollingMessageFrame:AddMessage

both uses the same call but has 2 different arguments

therefor in the tooltips i added this:

Lua Code:
  1. MessageFrame:
  2.        
  3.      - Add a message to the frame which will fade
  4.      eventually.
  5.    
  6.      AddMessage("text", red, green, blue, messageId, holdTime)
  7.        
  8. ScrollingMessageFrame:
  9.        
  10.      - Add a message to the frame, with an optional
  11.      color ID. (Updated in 2.4.2)
  12.    
  13.      AddMessage("text", red, green, blue, [id], [addToStart])

I expect to have a fix for this somehow, just need to figure out how :)


Also when the final release is out different libaries like Ace etc will be included in the list.

Torhal 04-13-13 06:28 PM

Quote:

Originally Posted by Phanx (Post 276420)
There are three main categories of protected functions, and some functions may fall into multiple categories, or may behave differently under different circumstances.

1. Functions that are completely protected, and can only be called by Blizzard code. There is probably no point in including functions like CastSpellByName that are always in this category, since they cannot be used by addons.

Except that CastSpellByName can be called via a hardware event if the name being passed is that of a tradeskill - yay Blizzard!

Phanx 04-14-13 03:39 AM

Quote:

Originally Posted by Torhal (Post 276438)
Except that CastSpellByName can be called via a hardware event if the name being passed is that of a tradeskill - yay Blizzard!


fRodzet 04-14-13 12:52 PM

Updated Screenshot:





Tho i will have to change release date till around the 20th.

fRodzet 04-15-13 04:14 AM

Went to SCiTE instead of NotePad++..

Reasons:

- SCiTE's auto-completion + Hint Calls is way better and way more flexible than NotePad++
- SCiTE offers an easy way to input Syntax Highlighting so not only will it now show tooltips but it will also Highlight the API's by category. By this you are allways sure that you call the right functions for the right type .
- Includes an interpreter that can be run by pressing F5 which i actually managed to change abit so that it can Run some of the WoW environment functions.
- It is also way easier to type in the different API's because it is a .API file over a .XML file NotePad++ uses.

oh and yeah i will include loads of cool features ;)

Seerah 04-15-13 12:27 PM

Awww.... :(

But it's your project. It's whatever you want to use and want to keep updated. :)

fRodzet 04-15-13 05:10 PM

Quote:

Originally Posted by Seerah (Post 276550)
Awww.... :(

But it's your project. It's whatever you want to use and want to keep updated. :)

I made SCiTE pretty much act the exact same way as NotePad++

Check this, note this is just the BETA stage, don't mind the Syntax Highlight coloring as i'm not done with it yet.

An interpreter that works with some of the WoW environment. The output frame can be placed as you please
Press F5 to Go and F7 to compile.


Auto-Completion of keywords and functions.


Syntax Highlighting and Detailed CallTips.


Some other feutures:

If your writing example a "string" wether its in XML or Lua it will have an error highlighting until the string ends. Also if the argument in your function is a string, it will recognize it and make sure that its a string your typing.

CTRL + Click = Follow link to relevant wowprogramming.com api.

and loads more..

Nibelheim 04-15-13 05:53 PM

Definitely going to be very useful. One of the biggest time-wasters I spent while learning WoW Lua was constantly having to look up the API info, so having that info in the editor will save people a LOT of time :D


All times are GMT -6. The time now is 12:13 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI