Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 20 10:59
    tbrodbeck commented #98
  • Jan 20 10:58
    tbrodbeck commented #98
  • Jan 20 08:53
    jeff-h closed #98
  • Jan 20 08:53
    jeff-h commented #98
  • Jan 19 18:33
    tbrodbeck opened #98
  • Jan 19 17:44
    tbrodbeck commented #97
  • Jan 19 08:42
    tbrodbeck edited #97
  • Jan 19 08:42
    tbrodbeck edited #97
  • Jan 19 08:40
    tbrodbeck commented #97
  • Jan 18 20:42
    jeff-h commented #97
  • Jan 18 17:54
    tbrodbeck commented #97
  • Jan 15 06:33
    jeff-h closed #94
  • Jan 15 06:33
    jeff-h commented #94
  • Jan 15 06:22
    jeff-h closed #93
  • Jan 15 06:22
    jeff-h commented #93
  • Jan 15 06:20
    jeff-h commented #97
  • Jan 15 05:25
    tbrodbeck commented #97
  • Jan 15 00:52
    jeff-h commented #97
  • Jan 14 11:16
    tbrodbeck edited #97
  • Jan 14 11:15
    tbrodbeck opened #97
Perceval Faramaz
@perfaram
I found
Prabhu Subramanian
@prabhu
Hello everyone. Great project. I have a question about navigating to a url from the menu. The usual window.location approach doesn't seem to work. Should I be doing something else?
Anoop Nayak
@anoopknayak
Hi everybody :). Has anyone tried using angularjs on Macgap? I was thinking to build one. But i seem to get this error as described in here https://docs.angularjs.org/error/$compile/tpload?p0=..%2F..%2Fviews%2Fcommon%2Fibox_tools.html
DB Hurley
@dbhurley
I've got a stupid question - when calling MacGap.Menu.getItem(.... I get an error that Menu is not a function...any idea what I'm doing wrong?
Cosmin Ciobanu
@ciobanucos
Hi, I'd like to help with the documentation for MG2... where do I start?
DB Hurley
@dbhurley
Why can I not perform a window.location redirect in my javascript and yet still have access to my javascript and macgap functions?
BTW, my last question I had to completely give up on MacGap2 as it continued to fail miserably, At least with MG1 I can create menus and trigger javascript functions...though they will only give me native JS control (like throwing an alert) and cannot run something in my JS file since I've performed a window redirect.
Tim Debo
@rawcreative
@dbhurley because window.location changes the page, just like in a browser
Tim Debo
@rawcreative
@dbhurley I'm not sure how you're wiring things up but any callbacks added to the menu trigger as expected for me even after changing pages via window.location
DB Hurley
@dbhurley
Thanks @rawcreative - that helps to make a bit of sense. I was under the impression that since we were within the MacGap framework it would maintain the local files throughout the application regardless of the browser location. I appreciate the clarification :smile:
BTW, we do a lot of web dev. so if you are still looking for some assistance we'd be happy to help!
How is MG2 coming along?
Tim Debo
@rawcreative
@dbhurley ideally that's what I would like to happen. I intend on writing a 'backend' of sorts, similar to the way atom-shell handles things (browser & client). The backend would be where you wire up your application, i.e. menus, events, etc. And handle interaction/dom based stuff on the client side. This would provide better inter-window communication (one main window controlling the others), better event handling and more capabilities overall. It's just a bit of an undertaking and at the moment I don't have the extra time.
DB Hurley
@dbhurley
Totally get that! :) Thanks for all you're doing. I know it's ridiculously hard to balance freebie open source and work life.
Tim Debo
@rawcreative
I haven't tested it but in theory if you needed to navigate to other pages you could do so within an iframe controlled by the main webview
DB Hurley
@dbhurley
that's what I was playing with last night, full-page iframe, kinda ugly "hack" but I think it works
Tim Debo
@rawcreative
btw I think your issue with the menus might be because the docs are wrong..
DB Hurley
@dbhurley
oh yeah?
Tim Debo
@rawcreative
are you having issues with the callbacks not triggering?
DB Hurley
@dbhurley
yeah, I was with MG2, switched to 1 and could get them working
Tim Debo
@rawcreative
yeah that's where the docs are wrong. I'm not sure who is handling the docs now. I'm hands off with the site and docs, Jeff-h handles all of that stuff.
The correct way to add a menu item is:
var menu = MacGap.Menu.addItem({ label: 'Label', index: 1 });
DB Hurley
@dbhurley
ok, so object for the Item. So one problem I found was being able to reference the existing menu items (e.g. File) with getItem('File')
Tim Debo
@rawcreative
//Create main menu item
var menu = MacGap.Menu.addItem({ label: 'Label', index: 1 });

//add items to the menu
menu.submenu.addItem({label: 'First Item'}, function() { ... });
Callbacks have to be passed as a second parameter, not inside the attributes object
DB Hurley
@dbhurley
ahhh, got it
Tim Debo
@rawcreative
this is only because JavaScriptCore strips them out when converting to objective-c
no idea why it does it, I've never received a response on any of the topics I've posted on the apple dev forums
A key thing to remember is that unless you are trying to modify the actual main menu item itself, you're going to need to use the 'submenu' property of the menu to actually access it's items..
Tim Debo
@rawcreative
So lets say you wanted to add something to the File menu:
var fileMenu = MacGap.Menu.getItem(1) OR MacGap.Menu.getItem('File');
// add an item
fileMenu.submenu.addItem({label: '...', index: 4}, function() { ... });
// remove an item
fileMenu.submenu.getItem(3).remove();
DB Hurley
@dbhurley
I'll give that a shot.
Thanks for taking the time to write it out!
Tim Debo
@rawcreative
np
DB Hurley
@dbhurley
So every time I add a menu item either in MG1 or MG2 I get the item duplicated.
Tim Debo
@rawcreative
Can you paste the code you're using to create a menu?
Denis Duvauchelle
@desduvauchelle
Hello. Thanks for the amazing code!
jp-amis
@jp-amis
Something happens that my Save menu is always disabled no matter what I do, I'm having to create it manually, is it normal?
Eli Israel
@eliasisrael
Hey all. Has anyone gotten an OAuth2-style login sequence to work in MacGap2? Any guidance on how to make it work? Thanks!
Sharoon Thomas
@sharoonthomas
using MacGap2 and the error on console is Can't find variable: MacGap
how does MacGap get injected ?
Jacques Crocker
@jacquescrocker
@eliasisrael any luck on this?
Andrew Reedy
@andrewreedy
Are there any active developers on this project?
Jacques Crocker
@jacquescrocker
Has anyone been able to get MacGap working with apple's codesigning? So that people can use the app without opening system preferences and enabling "run all apps from all developers"
Stefan Kröner
@sk7
@railsjedi we are in the process of publishing our MacGap app in the app store. signing works
Xu Jingxin
@sailxjx
I use MacGap2 and I know how to reload the page by javascript interface. But how can I reload the page by cmd+r or a menu item?
Martijn Verbove
@Convergate
Any one know about the licensing for MacGap2?
Renato Marinho
@renato2marinho_twitter
Hey guys, I'm GitScrum founder. I want to invite group members to get to know GitScrum. Site: https://site.gitscrum.com/
Philippe Ombredanne
@pombredanne
@Convergate any news on the licensing side?
@rawcreative this question has been pending for 4 years ... MacGapProject/MacGap2#47 ... any update?
@jeff-h may be you know?