CFGulp: CommandFusion, Gulp and Browserify Integrataion

55 views
Skip to first unread message

Grid Sound and Screen

unread,
Apr 26, 2014, 12:30:30 PM4/26/14
to comman...@googlegroups.com
I've seen a few posts about people wanting to use Browserify for managing JS dependencies for CommandFusion. I've done this on a few projects and found it to be really handy. I've created an example CF project using Gulp and Browserify. It includes a build and watch tasks for easy development. Check it out and let me know what you think! Feel free to file issues on GitHub for bugs or feature requests. Thanks!

Vladimir Shabunin

unread,
Nov 12, 2016, 10:09:51 AM11/12/16
to comman...@googlegroups.com
Hi. 

Great work. 

Started new project and it is really useful. But I have a question.

When we assign js code to button in gui it doesn't work because there is no global objects - everything is wrapped. Instead, I may use CF.ObjectPressedEvent and it's ok. But in case with dynamic list how do I suppose to do it?

Thanks.

суббота, 26 апреля 2014 г., 19:30:30 UTC+3 пользователь Grid Sound and Screen написал:

Vladimir Shabunin

unread,
Nov 24, 2016, 6:56:39 PM11/24/16
to CommandFusion Software
So I have tried in two ways. First, added function to CF object:

  CF.selectGroup = function (list, listIndex, join) {
    CF
.listContents(list, listIndex, 0, function (items) {
      console
.dir(items);
   
});
 
};

Then assigned js code in gui. Everything works fine. I get Array[12] in debugger.

Also I tried to create array of joins and watch ObjectPressedEvent. Variable list that I get from tokens is "l20250", listIndex is right. But items returned by CF.listContents is empty array. 
  var grListJoins = grList.map(function (group) {
    return 'l20250:' + grList.indexOf(group) + ':d20250';
  });
  CF.watch(CF.ObjectPressedEvent, grListJoins, function (join, value, tokens) {
    var list = tokens["[list_join]"];
    var listIndex = tokens["[item_index]"];
    CF.listContents(list, listIndex, 0, function (items) {
      console.dir(items);
    });
  });

Can't understand why

суббота, 26 апреля 2014 г., 19:30:30 UTC+3 пользователь Grid Sound and Screen написал:
I've seen a few posts about people wanting to use Browserify for managing JS dependencies for CommandFusion. I've done this on a few projects and found it to be really handy. I've created an example CF project using Gulp and Browserify. It includes a build and watch tasks for easy development. Check it out and let me know what you think! Feel free to file issues on GitHub for bugs or feature requests. Thanks!

Vladimir Shabunin

unread,
Nov 24, 2016, 7:08:02 PM11/24/16
to CommandFusion Software
Problem was that listIndex should be integer value. Everything is fine now

пятница, 25 ноября 2016 г., 2:56:39 UTC+3 пользователь Vladimir Shabunin написал:
Reply all
Reply to author
Forward
0 new messages