Thread Tools Display Modes
04/29/15, 11:51 AM   #41
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Didn't know that if I do

Lua Code:
  1. if not LibMainMenu then return end

Code after will be executed anyway ..

I'll upload and test. Think it's SuperStar and Kill Counter which are only using the library for now.
  Reply With Quote
04/29/15, 12:06 PM   #42
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by Ayantir View Post
Didn't know that if I do

Lua Code:
  1. if not LibMainMenu then return end

Code after will be executed anyway ..
It depends on the loading order. You may lucky or not
It works like this:
Every embedded lib tries to register itself as the newest. The first (not the newest) is newer than nothing, second may newer as the first or not, and so on.
After all addons are loaded, the functions of the newest are registered.
Any code execution before the EVENT_ADDON_LOADED events get triggered, can cause trouble.
LibAddonMenu before r17 had the same problem.
  Reply With Quote
04/29/15, 12:14 PM   #43
QuadroTony
Banned
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 828
yes its kill counter
i update it today and got this
  Reply With Quote
04/29/15, 12:19 PM   #44
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Well, I've updated it. It's now initialized on 1st addon call.
  Reply With Quote
05/11/15, 05:40 PM   #45
QuadroTony
Banned
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 828
still get it sometimes after load a hero

  Reply With Quote
05/12/15, 01:33 AM   #46
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
if there is no error before, (you can check it with interface.log), it's often an xml problem.
  Reply With Quote
06/03/15, 05:37 PM   #47
QuadroTony
Banned
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 828
hehe long time no seen
too many anchors =)

i know its smthing in JunkIt

happends only once
when i:
alt+enter to make game windowed
win+shift to move to other monitor
alt+enter to make game fullscreen windowed again

  Reply With Quote
06/04/15, 05:39 AM   #48
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
That sounds like it is coming from LAM. I'll have a look while I am at it. The new version r18 is nearly ready
  Reply With Quote
07/08/15, 02:37 PM   #49
QuadroTony
Banned
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 828
hmmm
wtf?

  Reply With Quote
07/08/15, 03:00 PM   #50
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
This happens if an insecure code path creates a menu entry which is then re-used by the ingame UI. We now create 10 secure ones on startup to prevent this, but you have 13 menu entries. We can bump this up to a bigger number like 30 to handle bigger menus.
  Reply With Quote
07/08/15, 03:29 PM   #51
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
Maybe it's time to make a library for a secondary level in context menus?
Placing more than 7 entries in one menu is bad UI practice.
  Reply With Quote
07/08/15, 04:25 PM   #52
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by sirinsidiator View Post
Maybe it's time to make a library for a secondary level in context menus?
Placing more than 7 entries in one menu is bad UI practice.
Thats a great idea!
  Reply With Quote
07/09/15, 12:19 AM   #53
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by ZOS_ChipHilseberg View Post
This happens if an insecure code path creates a menu entry which is then re-used by the ingame UI. We now create 10 secure ones on startup to prevent this.
Originally Posted by sirinsidiator View Post
Maybe it's time to make a library for a secondary level in context menus?
Placing more than 7 entries in one menu is bad UI practice.
Originally Posted by circonian View Post
Thats a great idea!
Thank You Chip! This helps alot.

Yes, I agree to sirinsidiator and circonian. If there are more than 10 menu entries on the first level, one starts to seek with the eyes up'n'down just to click there the mouse pointer is already
On the other hand, we must be careful, that it does not end up in a first level menu with two entries and a second level menu with two entries.
Do we really want to copy the windows contextmenu?

@QuadroTony: Try to remember which contextmenus you used before. Not that much addons are using contextmenus. FilterIt and FCO ItemSaver are using my LibCustomMenu already.

@Chip: Did you add security checks, which could make LibCustomMenu contra-productive?
  Reply With Quote
07/09/15, 12:28 AM   #54
QuadroTony
Banned
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 828
votan's settings menu told its LibCustomMenu Rev. 1
  Reply With Quote
07/09/15, 01:37 AM   #55
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by QuadroTony View Post
votan's settings menu told its LibCustomMenu Rev. 1
Yep, that's the newest and only existing version.

Just clarify for those new to this topic:
LibCustomMenu is not an automatic fix. It can't be, because of the "secure" checks:
Any add-on code is "in-secure". Therefore LibCustomMenu can not prevent other add-ons from calling AddMenuItem by hooking it. Because that would make "secure" code "in-secure", too.

Instead LibCustomMenu introduces a new global function AddCustomMenuItem, which should be used by all add-ons calling AddMenuItem.
This function swaps the control-pools before calling AddMenuItem itself and swaps back again. This way the "secure" code does not re-use "in-secure" controls simply because the pools do not contain them.

But if ZOS has extend the "secure" check, this work-around may not work anymore...

BTW: This technique could be used to introduce new menu-item-types, if it is still allowed.

Last edited by votan : 07/09/15 at 02:29 AM.
  Reply With Quote
07/09/15, 02:25 AM   #56
QuadroTony
Banned
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 828
do you like smthing like this?

Last edited by QuadroTony : 07/09/15 at 02:30 AM.
  Reply With Quote
07/09/15, 03:26 AM   #57
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by QuadroTony View Post
do you like smthing like this?
A "more"-button should be doable by hooking ShowMenu and truncating the menuitems table at a specfic index. maybe "smart" enough not truncating for just two more entries. For example starting at index 7, but not if just 10 at all.

What I had in mind was a bit over-sized: Grouping the entries in groups of upto 5 and arrange them radial around the mouse pointer.
But that's a lot stuff for how many contextmenus having more than 10 entries? one?

So, your approach is better.
It highly depends on how other add-ons add their entries and ZOS would tolerate it.

But back to your last error:
What were the previous context-menus?
Do you use Votan's Fish Fillet v1.0.0+? Because v0.9 did cause it again, although I'm sure it did not when I released it. This is why I asked Chip, if they had extend the "secure" check.

Edit 1: Where does "Stats to chat" come from?

Last edited by votan : 07/09/15 at 03:42 AM.
  Reply With Quote
07/09/15, 03:44 AM   #58
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
We could add a new submenu type as part of LibCustomMenu.
Addon authors then can add a submenu entry instead of several normal entries and group their options together logically.

While the idea to dynamically add a "more" element at the end of the list is good, I also think that it should not be necessary as there are not too many addons out there that add context menu entries and once they adapt the submenu it should be back to less than 10 entries.

I already wrote most of the necessary code for a new menu element as part of the iconpicker widget in LAM and it should be pretty easy to adapt it for submenus.
  Reply With Quote
07/09/15, 03:54 AM   #59
QuadroTony
Banned
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 828
Originally Posted by votan View Post

Edit 1: Where does "Stats to chat" come from?
master merchant
btw this error happends only if clicking use on the Psijick part of the recipe without having all other parts
and ye i cant reproduce it next attempt
  Reply With Quote
07/09/15, 10:50 AM   #60
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
What about just just preventing the problem at the source. Stop using the right click context menu, and instead add an icon/button or something to each row entry that would pop-up our own custom context menu created with a library that could be shared, for use with all addons. Or Instead of adding a new button to the row just use the item icon that is already there as our button. Or just make it a left click context menu.
Either way then all of the code is our own. This would completely work around the secure code problem.

It could be a system like libAddonMenu, where addons can register themselves & each addon can have 1 entry to the main context menu (the entry referenced by the addon name registered) which will pop-up a second context menu for that addon, like in QuadroTonys More -> picture.

Last edited by circonian : 07/09/15 at 11:00 AM.
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » which addon caused this error?


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

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