Trying to make a factory method but getting an error
-
Ah yeah I missed that bit.
-
@d-healey
So now this one has me baffled:
I am just making a simple factory method for buttons and I cannot get the LAF to work inside the function.
I triple checked spelling and everything.HiseSnippet 3092.3oc6as0baiaElxIZ6J0KSyL6S8Ir9IJuxRTR1wwMsMqsSbZlDm0Sr2LcFOtYfHgjvZJBURnXqMS9O2+AsmC.3MIJYYEm81XsYkMAN3fykuyEPRytRxB7XduKJfOZDSZYU5dGGJbYQQhPqRUOcxHlUo+P4SlDHGbv.JOv5EO0pzWW9PpqTDNgLjIGH7H8DgjtzHtKo6XoTDXs+jQznHlmUoR2643xJU49VpO+2mrO0mF3xRGxx5sBtK6U7gbY5nG+suj66eH0icJeXFp25aegqH3.guXLHh2qri0Hp6Ez9rWSQxVqr0+jFMvpzFkcc2ZW1i50dGm16x11aqtsa4Pa6r6t6vna631cWFscuttNVk9hm4wA84DIUxhrJc+8EdSNYf3x.8F7VdDuqOCunk0IvNqG9PguGph3nVGLf66kX6h.K48yXIum1R9UkOh6wSFO0h9mUSPRWQVCXo0xKd2Km30Jq34jQ7JPjJkQjtuVjdP4SbC4ijoyfxyuu7KBjrvdTvOkUTzzZs1CJW9.APQfrwP5ErCCgKRVg8CcbpSfup83pU4At9i8X1q+p8NrwODsNNVyljX.TVTCPqOOfQ5MNvUxEAD2PFnw6ijruhB6.vGWmbUcxjZU+P0J.ibGvbufv6QbECGIB.IhP8g04MgvthGIidb0J9BWpOwk72IwBcel7fX5ULk7Mj0yrQfXVoZEfq1eMO5ordfX4Y6VqFA1w8hhFCKH.VLQziHGvR26Hx.56YjtLV.wSurpU.A0HBZ8LibP87xnYSKDFMEEE7e5U2HhIsW+Rtmb.PviPib9oFv38GHg4ZqmC9GH0vTDI6JYhrDAhAtoONcjQ9bIFEAyD0Pc0AvU9GPiX1yrMHyfMIYQm4bNJ+v+8MYFr04IhOHD.FXlbEjMIWNXBwSvh.aIOBLrRxkhvKdRtM7UnH9Jg3h8B7Njw7sQ7jdZXGvOUq7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Y5r5JY2vhlyv7pUlli21kOwwj4RMnLFsa11IdZrD9IfaNc1sa1xYN9ubIommyKliMMHhlnaLQJzi197MiIqd5bf6p8mJz452c6ba+bRbeikphRVfAKUNy1jD3Z2QE45Xn1YnGkY0ToVrbWlMyAhVfbBALy8vfokD8zarDtyEK5fjuCfNtNMH8VGOkhXV+TJvBGEztMZpR6j79ldMI+MDnuEfdrdzw9R06TYxrEcy+T5xdQmptGfIJtnWOfUajWKlq5CpPpOJw8L0MRTm.hrb4efL6366zhxBcLRwR9tjTvV9d7k.zs3DdwysRo6lhwfBmmce9y00dg45ZmMWmRaU8bXZti1Mxt3Zgsp8ojbD22YSIkMTOYBc9qMyfiZeaTWsnzwcNep7MYDBcs1b4KscvPiYsN0.Yz4SIUY1mJ0z4.UTXOkrhRiRHVlTj5tW.7Y92F70w27YdP+3ayOYgmhNtzsNJwL5JEfLMGywq4Dc7J3rBwjL2nCf+OmIIFgZOPTlSHiongpqaC06ScuneHBblxEN6yJv4JmVcdTqcqm7DFS.d3c0mVaNag9rZXi4a9I84ZEv3Ql.UAEWhh4N0xTq7HtmGbZviEQbzFB9kMxJ+Ic5G2Lpo6y5jN5PFEnBetVwLTqX+s+AwoZkkiS1w0YRmREeUTlGr+7MaUqVlM+ynkMqeSy1S0+Ulrbl7KG.g60Sdb3Ulsl6yBfCBxZ3IF20mcp3DIDK1OUwwDIflNcsyrh09hPUbSghTWe.HmYq0Px53iwZQOMO0e1QcEWwRpCpFYewUKWvcL02xuaDF0tKFbhwljn+yXXpq0cL2WVg7O6zYBaMamx.W7dUbF8rVZSEV04tpl17l1fNjFdAlhF+SwJwmiGU8CwGMsv2MmE9JJzp32PgcJ9ETXmU5ETnxGMXmh.OdBYNnCb8RCbzzdGro.XCdrFgj74.xLm2lqGVLj4gFHyh68ZkvTl6JwGsReszCXWcH2mg+8P7+kfB98O
The .setLocalLookAndFeel(LAF.button); works outside of the function, but not in.
-
@VirtualVirgin I think it has to do with your namespace "LAF" and the name of your included script named "LAF"
I changed the the name of the included script to "Laf" and now it seems to work.
I noticed the problem when I got the undefined error at line 30 on the onInit callback, that is this line:button.setLocalLookAndFeel(LAF.button);
If you encounter issues, always look in the Console, very often you can find what the problem is
HiseSnippet 3205.3oc6as0TajbEdD1ZyJkKU1T6SIuzgmFgEBMRfAG1Da.abbsFuTFVWIkKhqVyzRpWFMsxLsLn0k+ajeS4mSdNujbNc2yMoQfP.duTn0KvzWN8WeNemK8LiXmKYAdLu2EEvGNjIsrJcuCCEtrnHQnUopGOdHypzup7QiCj82qOkGX8hmZU52UdOwfgh.VfbepqTDN1Z2wCoQQLOqRkt2ywwUpx8sTe9OOdWpOMvkk1jk0aDbW1K4C3xzVO7IeM22eepG6X9fLid8m7BWQvdBewH.S2qbSqgT2So8XuhhCaoxV+UZTeqRqT1yYcmta4Re3VNq2x0s0Va15Qa5xnc6xdnyFat9VcWuK0sYKqRe1y73.tORRkrHqR2eWg23i5KNKPu.ugGw63yvKbrNBVYcy6K78vsH1p0d849dIJqHP0c+Lpt6oUceY4C3d7j1SUg+VUGjzYjUAVZo7v6d4fmSV30LC7J.Rkx.o6qgzWT9H2P9PYZOHd9kkeQfjEBpGVNnnGq0RuqLXygQDHaLfdJa+P3hjYX+vlMqSfeTa6pU4At9i7X1K+RZ2FeWzxXaqsFwPTHcnQbWRmQRoH.FqOOfQ5NJvUxEAD2PFri2EGxtpQXG.135jyqSFWq5GpVADjael6oDdWhaLGjP8g44MlvNmGIi1tZEegK0m3R9yjXP2iIS3rJgRd.Y4LKD.yJUq.R09OxidJqK.KOa2Z0HvJtSTzHXBAvjIhtDYeV5ZGQ5SeOizgwBHd5oUsB.TCDz6yL3f54kYmMIHL6TDJ3+zytQDSZu7YbOYeX.agJ47c0mw60WB80R2G7O.0PWDI6bYBVh.XfK51osLzmKQuHnmnFpq1CtxeOZDydpkAEFrHIS5sMOAwO7eOHSiNmj.e.Dubm8IcEg4r5jUIm0eLwSvh.cIOBTrRxYhvSebtE7kHDeoPb5NAd6y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MGOp5GhOZZguaNW3qnfSwugBaV7KnvlKzKnPkOZ3NEQd7DxbTG354l3nG6czlBnM3wZDRxsAkYFuMWOrXJyCMTlKt1qEhSYtqDezJ80ROfc99beF98g3+Ctq0bZB
-
@ulrik said in Trying to make a factory method but getting an error:
@VirtualVirgin I think it has to do with your namespace "LAF" and the name of your included script named "LAF"
I changed the the name of the included script to "Laf" and now it seems to work.
I noticed the problem when I got the undefined error at line 30 on the onInit callback, that is this line:button.setLocalLookAndFeel(LAF.button);
If you encounter issues, always look in the Console, very often you can find what the problem is
HiseSnippet 3205.3oc6as0TajbEdD1ZyJkKU1T6SIuzgmFgEBMRfAG1Da.abbsFuTFVWIkKhqVyzRpWFMsxLsLn0k+ajeS4mSdNujbNc2yMoQfP.duTn0KvzWN8WeNemK8LiXmKYAdLu2EEvGNjIsrJcuCCEtrnHQnUopGOdHypzup7QiCj82qOkGX8hmZU52UdOwfgh.VfbepqTDN1Z2wCoQQLOqRkt2ywwUpx8sTe9OOdWpOMvkk1jk0aDbW1K4C3xzVO7IeM22eepG6X9fLid8m7BWQvdBewH.S2qbSqgT2So8XuhhCaoxV+UZTeqRqT1yYcmta4Re3VNq2x0s0Va15Qa5xnc6xdnyFat9VcWuK0sYKqRe1y73.tORRkrHqR2eWg23i5KNKPu.ugGw63yvKbrNBVYcy6K78vsH1p0d849dIJqHP0c+Lpt6oUceY4C3d7j1SUg+VUGjzYjUAVZo7v6d4fmSV30LC7J.Rkx.o6qgzWT9H2P9PYZOHd9kkeQfjEBpGVNnnGq0RuqLXygQDHaLfdJa+P3hjYX+vlMqSfeTa6pU4At9i7X1K+RZ2FeWzxXaqsFwPTHcnQbWRmQRoH.FqOOfQ5NJvUxEAD2PFri2EGxtpQXG.135jyqSFWq5GpVADjael6oDdWhaLGjP8g44MlvNmGIi1tZEegK0m3R9yjXP2iIS3rJgRd.Y4LKD.yJUq.R09OxidJqK.KOa2Z0HvJtSTzHXBAvjIhtDYeV5ZGQ5SeOizgwBHd5oUsB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Mep7y5Ct60Sdb3UlNm6yBfCBxZ3IF0wmcr3HI3K1KciiARfc5j4NyBqcEgJ+lBgTGefHmYo0Tx53iw5hdZdpujfcDmyRxCpZYWw4ymyc7nuge2HLa6NnyI5aRh9mifttTywLeYEx+rSmxs0rbJEbwqUwQzypoMYXUm6pZZwaZE5.Z3oXHZ7KNYhMGOp5GhOZZguaNW3qnfSwugBaV7KnvlKzKnPkOZ3NEQd7DxbTG354l3nG6czlBnM3wZDRxsAkYFuMWOrXJyCMTlKt1qEhSYtqDezJ80ROfc99beF98g3+Ctq0bZB
I'm sorry but that makes me more confused.
A) that doesn't work over on my end:
B) what would the capitalization of the file name have to with it?
C) the LAFs are not working inside the function, but they do on the outside (regardless of the include file name capitalization):As you can see, if I add the last line back in to the script FactoryButtonBasicButton.setLocalLookAndFeel(LAF.button);
That button will use the LAF. -
@VirtualVirgin Ah, sorry I misunderstood
-
@ulrik said in Trying to make a factory method but getting an error:
@VirtualVirgin Ah, sorry I misunderstood
Thanks for checking it out though :)
-
@VirtualVirgin The issue is caused because of your naming system.
Your button variable is called "button" and the laf function you are trying to assign is called... "button"
Now outside of the inline function HISE manages to resolve the LAF namespace properly and avoid the conflict but within the inline function
local
variables take precedence.So instead of calling your component variable button, call it something like
btnBasic
. -
@d-healey Oh man! Looks so obvious when you point it out!
Thanks :) -
@VirtualVirgin said in Trying to make a factory method but getting an error:
Looks so obvious when you point it out!
Yep, but it still took me at least 30 minutes to figure out what was going on.