Hashtable?

FlowCanvas Forums Support Hashtable?

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1472
    kong
    Participant

    Hello, New Preferred Type ” Hashtable”!
    When I open the Variable Object Editor, messages appear.

    IndexOutOfRangeException: Array index is out of range.
    ParadoxNotion.Design.EditorUtils.DictionaryEditor (UnityEngine.GUIContent content, IDictionary dict, System.Type dictType, System.Object contextInstance) (at Assets/ParadoxNotion/FlowCanvas/Framework/_Commons/Design/PartialEditor/EditorUtils/EditorUtils_GUIEditors.cs:142)
    ParadoxNotion.Design.EditorUtils.GenericField (System.String name, System.Object value, System.Type t, System.Reflection.MemberInfo member, System.Object context) (at Assets/ParadoxNotion/FlowCanvas/Framework/_Commons/Design/PartialEditor/EditorUtils/EditorUtils_GUI.cs:412)
    FlowCanvas.FlowNode.DrawValueInputsGUI () (at Assets/ParadoxNotion/FlowCanvas/Module/FlowNode.cs:1164)
    FlowCanvas.FlowNode.OnNodeInspectorGUI () (at Assets/ParadoxNotion/FlowCanvas/Module/FlowNode.cs:1151)
    FlowCanvas.Nodes.ReflectedMethodNodeWrapper.OnNodeInspectorGUI () (at Assets/ParadoxNotion/FlowCanvas/Module/Nodes/Reflection/ReflectedMethodNodeWrapper.cs:232)
    NodeCanvas.Framework.Node.ShowNodeInspectorGUI () (at Assets/ParadoxNotion/FlowCanvas/Framework/Design/PartialEditor/EDITOR_Node.cs:687)
    NodeCanvas.Framework.Graph.ShowInspectorGUIPanel (UnityEngine.Event e, Vector2 canvasMousePos) (at Assets/ParadoxNotion/FlowCanvas/Framework/Design/PartialEditor/EDITOR_Graph.cs:475)
    NodeCanvas.Framework.Graph.ShowGraphControls (UnityEngine.Event e, Vector2 canvasMousePos) (at Assets/ParadoxNotion/FlowCanvas/Framework/Design/PartialEditor/EDITOR_Graph.cs:139)
    NodeCanvas.Editor.GraphEditor.OnGUI () (at Assets/ParadoxNotion/FlowCanvas/Framework/Design/Editor/Windows/GraphEditor.cs:473)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

    #1474
    Gavalakis
    Keymaster

    Hey!

    Please use a Dictionary instead of a Hashtable. Hashtables are not really supported.
    Is there a reason you prefer Hashtable over a dictionary? 🙂

    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

    #1475
    kong
    Participant

    Hello again,
    I tried to use a dictionary but could not find a key value pair. Do I need to add “iDictionary” in a new type? Or should I add another type?

    Thank you!

    #1476
    amoka
    Participant

    I, too, am chasing dictionaries. I added all items that rhymed with dictionary to the preferred types list, and I have now some nodes, but can’t get any of them to create a new dictionary.
    I would like to recreate this in FlowCanvas:

    This is from here: https://docs.unity3d.com/Manual/UnityAnalyticsCustomEventScripting.html

    #1479
    Gavalakis
    Keymaster

    Hello guys,

    I have attached for you here a unitypackage, which includes nodes for support of Dictionaries(string, T).
    Only string as Key is supported, but any type as Value.

    Specifically there is now a “Create Dictionary(T)” node, similar to the “Create Collection(T)” node under the “Variables” category, as well as several other nodes under the “Functions/Dictionary” category like TryGetValue, AddItem, RemoveItem, GetItem, ContainsKey etc.
    Dictionaries

    These nodes will also be included in the next version as well.
    For your information, you don’t have to add any type in the Preferred Types Editor, for these nodes to work.

    Let me know if these work for you.
    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

    Attachments:
    You must be logged in to view attached files.
    #1481
    Gavalakis
    Keymaster

    Apparently I forgot the unitypackage 🙂

    Join us on Discord: https://discord.gg/97q2Rjh

    Attachments:
    You must be logged in to view attached files.
    #1484
    kong
    Participant

    Thanks Gavalakis!

    #1485
    amoka
    Participant

    This looks great!
    I downloaded this package and the nodes appeared as described. Thank you for preparing these.

    I remember seeing at some similar nodes that there were dele buttons at the right side of each item. Do you think that would be feasible with this variable node, too?

    #1488
    Gavalakis
    Keymaster

    You are welcome.
    I will work on the Dictionary inspector a bit more, as to make it possible to delete entries similar to how it’s done for lists, yes 🙂

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.