Sep 25, 2012 at 12:07pm
I can’t tell if this is exactly the same issue as discussed here http://www.cycling74.com/forums/topic.php?id=41755 so apologies for duplication.
Essentially when I attempt myDictionary.get(“level1::level2″) as formatted for replace in the help file I get a jsobject where I would expect to see the value. Example below.
– Pasted Max Patch, click to expand. –
Copy all of the following text.Then, in Max, select New From Clipboard.
conversions = new Dict(“conversions”);
//all seems to work as expected
path = “something”;
path = “kepToVG”;
//this is what I’m trying to avoid but it’s a workaround
//going down one level futher
path = “kepToVG::q”;
//replacing as in the help file seems to work fine
// am I doing something wrong here? I would expect to see the value
Sep 25, 2012 at 3:57pm
see if this code helps:
Sep 25, 2012 at 4:36pm
Thanks for your reply. I think I have an idea of what’s going on, but I’m not entirely sure if I understand how to implement – do you mean for me to use that function directly, perhaps like this? Using code above as example as that’s where I’ve just copied and tested it:
Sep 30, 2012 at 11:17am
var obj = dict_conversions.get(“kepToVG”);
if (obj instanceof Dict)
post(“q: “, data, “n”);
Oct 2, 2012 at 9:28pm
Thanks both for your help. I’m still struggling with this problem and wondering if you’d be able to clarify further.
I’ve tried looking at the first suggestion but either it hasn’t worked out or I haven’t been able to figure out how to use or adapt it. Please could you let me know?
I’m still not actually sure if I’m supposed to be able to use dict.get with an argument formatted like so:
I’ve been playing around a bit and trying to work out where it might be going wrong and have come up with the attached patch, just looking at where the process ends up by looking at the type and the keys if it is a dictionary. Rather than the result I’m expecting, it appears to be returning a reference to the dictionary containing it.
Nov 26, 2012 at 6:36pm
Just bumping this thread as I still haven’t managed to resolve it and struggling to move forward with the project – could anyone give any advice please?
You must be logged in to reply to this topic.