From: Damon C. <da...@tc...> - 2015-04-30 20:46:30
|
So, once you have a build from source, how do you build a standalone .app on the Mac? build/tk/ contains all the necessary pieces, but I’m not sure where they should all go. It would seem that the frameworks need to inside the .app bundle, but Wish.app itself is a symlink into Tk.framework. Seems there’s a lot of recursion here, and I’m not sure how to unravel this snake. :) Damon |
From: Kevin W. <kw...@co...> - 2015-05-01 01:21:18
|
On 4/30/15 4:46 PM, Damon Courtney wrote: > So, once you have a build from source, how do you build a standalone .app on the Mac? build/tk/ contains all the necessary pieces, but I’m not sure where they should all go. It would seem that the frameworks need to inside the .app bundle, but Wish.app itself is a symlink into Tk.framework. > > Seems there’s a lot of recursion here, and I’m not sure how to unravel this snake. :) > > Here's a general tutorial on prepping an app bundle: http://opensource.codebykevin.com/tutorial.html To build a standalone version of Wish with the frameworks embedded, see http://wiki.tcl.tk/12987. You'll need to scroll down the page and look for "embedded." Hope that helps, Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com |
From: Damon C. <da...@tc...> - 2015-05-01 20:15:36
|
I had already read through your tutorial, but it didn’t have what I needed. The ‘make embedded’ is what I was looking for. :) Now, for another one. I’ve created the ::tk::mac::OpenDocument proc in my app, and it opens files properly when I right-click and open with the application, but my app is not responding to drag-and-drop events. I can’t drop a file on the app, and the Tk docs seem to imply that you can. Does that still work? I’m using the latest Tk tip, so I should be using the new Cocoa stuff (though I’m not sure how I would know). Damon > On Apr 30, 2015, at 8:21 PM, Kevin Walzer <kw...@co...> wrote: > > On 4/30/15 4:46 PM, Damon Courtney wrote: >> So, once you have a build from source, how do you build a standalone .app on the Mac? build/tk/ contains all the necessary pieces, but I’m not sure where they should all go. It would seem that the frameworks need to inside the .app bundle, but Wish.app itself is a symlink into Tk.framework. >> >> Seems there’s a lot of recursion here, and I’m not sure how to unravel this snake. :) >> >> > Here's a general tutorial on prepping an app bundle: > > http://opensource.codebykevin.com/tutorial.html > > To build a standalone version of Wish with the frameworks embedded, see http://wiki.tcl.tk/12987. You'll need to scroll down the page and look for "embedded." > > Hope that helps, > Kevin > > -- > Kevin Walzer > Code by Kevin/Mobile Code by Kevin > http://www.codebykevin.com > http://www.wtmobilesoftware.com > |
From: Kevin W. <kw...@co...> - 2015-05-01 20:25:15
|
You may need to read Apple's docs about configuring the info.plist file to identify the document types your app can handle. Without that the open event is ignored. > On May 1, 2015, at 4:15 PM, Damon Courtney <da...@tc...> wrote: > > I had already read through your tutorial, but it didn’t have what I needed. The ‘make embedded’ is what I was looking for. :) > > Now, for another one. I’ve created the ::tk::mac::OpenDocument proc in my app, and it opens files properly when I right-click and open with the application, but my app is not responding to drag-and-drop events. I can’t drop a file on the app, and the Tk docs seem to imply that you can. > > Does that still work? I’m using the latest Tk tip, so I should be using the new Cocoa stuff (though I’m not sure how I would know). > > Damon > > >> On Apr 30, 2015, at 8:21 PM, Kevin Walzer <kw...@co...> wrote: >> >> On 4/30/15 4:46 PM, Damon Courtney wrote: >>> So, once you have a build from source, how do you build a standalone .app on the Mac? build/tk/ contains all the necessary pieces, but I’m not sure where they should all go. It would seem that the frameworks need to inside the .app bundle, but Wish.app itself is a symlink into Tk.framework. >>> >>> Seems there’s a lot of recursion here, and I’m not sure how to unravel this snake. :) >> Here's a general tutorial on prepping an app bundle: >> >> http://opensource.codebykevin.com/tutorial.html >> >> To build a standalone version of Wish with the frameworks embedded, see http://wiki.tcl.tk/12987. You'll need to scroll down the page and look for "embedded." >> >> Hope that helps, >> Kevin >> >> -- >> Kevin Walzer >> Code by Kevin/Mobile Code by Kevin >> http://www.codebykevin.com >> http://www.wtmobilesoftware.com > |
From: Damon C. <da...@tc...> - 2015-05-01 21:11:01
|
I tweaked the Info.plist file, and I’m pretty sure it’s right. Does this work for anyone? Does anyone have this working? > On May 1, 2015, at 3:25 PM, Kevin Walzer <kw...@co...> wrote: > > You may need to read Apple's docs about configuring the info.plist file to identify the document types your app can handle. Without that the open event is ignored. > > >> On May 1, 2015, at 4:15 PM, Damon Courtney <da...@tc...> wrote: >> >> I had already read through your tutorial, but it didn’t have what I needed. The ‘make embedded’ is what I was looking for. :) >> >> Now, for another one. I’ve created the ::tk::mac::OpenDocument proc in my app, and it opens files properly when I right-click and open with the application, but my app is not responding to drag-and-drop events. I can’t drop a file on the app, and the Tk docs seem to imply that you can. >> >> Does that still work? I’m using the latest Tk tip, so I should be using the new Cocoa stuff (though I’m not sure how I would know). >> >> Damon >> >> >>> On Apr 30, 2015, at 8:21 PM, Kevin Walzer <kw...@co...> wrote: >>> >>> On 4/30/15 4:46 PM, Damon Courtney wrote: >>>> So, once you have a build from source, how do you build a standalone .app on the Mac? build/tk/ contains all the necessary pieces, but I’m not sure where they should all go. It would seem that the frameworks need to inside the .app bundle, but Wish.app itself is a symlink into Tk.framework. >>>> >>>> Seems there’s a lot of recursion here, and I’m not sure how to unravel this snake. :) >>> Here's a general tutorial on prepping an app bundle: >>> >>> http://opensource.codebykevin.com/tutorial.html >>> >>> To build a standalone version of Wish with the frameworks embedded, see http://wiki.tcl.tk/12987. You'll need to scroll down the page and look for "embedded." >>> >>> Hope that helps, >>> Kevin >>> >>> -- >>> Kevin Walzer >>> Code by Kevin/Mobile Code by Kevin >>> http://www.codebykevin.com >>> http://www.wtmobilesoftware.com >> |
From: Damon C. <da...@tc...> - 2015-05-01 21:17:17
|
You can drop files on the Dock icon, and that works, but the docs indicate that you can drop files onto the application itself. That’s not what I’m seeing, so I was curious if someone had this working. Damon > On May 1, 2015, at 4:10 PM, Damon Courtney <da...@tc...> wrote: > > I tweaked the Info.plist file, and I’m pretty sure it’s right. > > Does this work for anyone? Does anyone have this working? > > >> On May 1, 2015, at 3:25 PM, Kevin Walzer <kw...@co...> wrote: >> >> You may need to read Apple's docs about configuring the info.plist file to identify the document types your app can handle. Without that the open event is ignored. >> >> >>> On May 1, 2015, at 4:15 PM, Damon Courtney <da...@tc...> wrote: >>> >>> I had already read through your tutorial, but it didn’t have what I needed. The ‘make embedded’ is what I was looking for. :) >>> >>> Now, for another one. I’ve created the ::tk::mac::OpenDocument proc in my app, and it opens files properly when I right-click and open with the application, but my app is not responding to drag-and-drop events. I can’t drop a file on the app, and the Tk docs seem to imply that you can. >>> >>> Does that still work? I’m using the latest Tk tip, so I should be using the new Cocoa stuff (though I’m not sure how I would know). >>> >>> Damon >>> >>> >>>> On Apr 30, 2015, at 8:21 PM, Kevin Walzer <kw...@co...> wrote: >>>> >>>> On 4/30/15 4:46 PM, Damon Courtney wrote: >>>>> So, once you have a build from source, how do you build a standalone .app on the Mac? build/tk/ contains all the necessary pieces, but I’m not sure where they should all go. It would seem that the frameworks need to inside the .app bundle, but Wish.app itself is a symlink into Tk.framework. >>>>> >>>>> Seems there’s a lot of recursion here, and I’m not sure how to unravel this snake. :) >>>> Here's a general tutorial on prepping an app bundle: >>>> >>>> http://opensource.codebykevin.com/tutorial.html >>>> >>>> To build a standalone version of Wish with the frameworks embedded, see http://wiki.tcl.tk/12987. You'll need to scroll down the page and look for "embedded." >>>> >>>> Hope that helps, >>>> Kevin >>>> >>>> -- >>>> Kevin Walzer >>>> Code by Kevin/Mobile Code by Kevin >>>> http://www.codebykevin.com >>>> http://www.wtmobilesoftware.com >>> > |
From: Kevin W. <kw...@co...> - 2015-05-01 23:55:44
|
On 5/1/15 5:17 PM, Damon Courtney wrote: > You can drop files on the Dock icon, and that works, but the docs indicate that you can drop files onto the application itself. That’s not what I’m seeing, so I was curious if someone had this working. I have it working just fine in an a couple of my apps. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com |
From: Kevin W. <kw...@co...> - 2015-05-03 01:07:59
|
On 5/2/15 8:00 PM, Damon Courtney wrote: > I’m pretty sure FileMorph works because you’re including tkdnd. That was my next move, but I was hoping there was some Tk magic based on the documentation. Looks like I need tkdnd, which is fine, I must have just misinterpreted the docs. If the behavior you are looking for is to have the app respond when you drag the file to the app window, you are correct--that is tkdnd. I understood you to be asking about dropping the file on the app icon in Finder (not Dock), sorry if I misunderstood. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com |
From: Damon C. <da...@tc...> - 2015-05-02 14:13:32
|
I see that FileMorph works, so it’s got to be something in my Info.plist that’s not allowing it. I just can’t figure out what it is. I can’t determine the magic voodoo incantation to make my app accept a given filetype. :) I guess I’ll keep plugging away at it. Thanks for the help. Damon > On May 1, 2015, at 6:55 PM, Kevin Walzer <kw...@co...> wrote: > > On 5/1/15 5:17 PM, Damon Courtney wrote: >> You can drop files on the Dock icon, and that works, but the docs indicate that you can drop files onto the application itself. That’s not what I’m seeing, so I was curious if someone had this working. > I have it working just fine in an a couple of my apps. > > --Kevin > > -- > Kevin Walzer > Code by Kevin/Mobile Code by Kevin > http://www.codebykevin.com > http://www.wtmobilesoftware.com > |
From: Damon C. <da...@tc...> - 2015-05-02 14:19:11
|
So, just as a test, I stole FileMorph’s Info.plist file and dropped it into mine and just replaced the executable name to call my own. So, presumably, all the filetype declarations and everything else are exactly the same. I know I can drop files into FileMorph, and it works. But even with the same Info.plist file, I can’t drop them onto my app. What version of Wish does FileMorph ship with? Could this be related to the new Tk Cocoa? I know it’s tiring answering seemingly stupid questions, but I’m just trying to figure this out. Damon > On May 2, 2015, at 9:13 AM, Damon Courtney <da...@tc...> wrote: > > I see that FileMorph works, so it’s got to be something in my Info.plist that’s not allowing it. I just can’t figure out what it is. I can’t determine the magic voodoo incantation to make my app accept a given filetype. :) > > I guess I’ll keep plugging away at it. Thanks for the help. > > Damon > > >> On May 1, 2015, at 6:55 PM, Kevin Walzer <kw...@co...> wrote: >> >> On 5/1/15 5:17 PM, Damon Courtney wrote: >>> You can drop files on the Dock icon, and that works, but the docs indicate that you can drop files onto the application itself. That’s not what I’m seeing, so I was curious if someone had this working. >> I have it working just fine in an a couple of my apps. >> >> --Kevin >> >> -- >> Kevin Walzer >> Code by Kevin/Mobile Code by Kevin >> http://www.codebykevin.com >> http://www.wtmobilesoftware.com >> > |
From: Kevan H. <ha...@br...> - 2015-05-02 18:25:59
|
Dear Damon, > I tweaked the Info.plist file, and I’m pretty sure it’s right. In my Info.plist I have the following lines, embedded in the larger xml structure, to say it will try to open anything. <key>CFBundleTypeExtensions</key> <array><string>*</string></array> The operating system appears to have some memory of previous values for the CFBundleTypeExtension, however, so that when I change it from "*" to "yyy" it still lets me open "txt" files. I seem to recall having to re-start the finder to get the changes to be accepted. > I have it working just fine in an a couple of my apps. Here is an example open document procedure declaration. proc tk::mac::OpenDocument {args} { puts "$args" } I believe these are the only two steps I had to take with a Wish shell compiled with "make embedded" from 8.5.8 sources, and I can open documents by dropping on the icon in MacOS 10.7.5. I want to re-compile and make sure a clean application with these two steps will work, but I'm having some technical problems with the compile (don't have /Developer/Tools/Rez) so will be delayed. Yours, Kevan -- Kevan Hashemi, Electrical Engineer Physics Department, Brandeis University http://alignment.hep.brandeis.edu/ |
From: Damon C. <da...@tc...> - 2015-05-02 18:51:26
|
> In my Info.plist I have the following lines, embedded in the larger xml structure, to say it will try to open anything. > > <key>CFBundleTypeExtensions</key> > <array><string>*</string></array> > > The operating system appears to have some memory of previous values for the CFBundleTypeExtension, however, so that when I change it from "*" to "yyy" it still lets me open "txt" files. I seem to recall having to re-start the finder to get the changes to be accepted. I thought that was all I had to do. In my case I’m using .epub files, but I used a bunch of different combinations to try and find the right magic string, and I still can’t get anything to drop. If I right-click the file, I can Open it with my app (it shows up in the list registered for the .epub file extension). But I still can’t just drop a file on the running app. I’m still looking at it though. :) Damon |
From: Damon C. <da...@tc...> - 2015-05-02 21:50:33
|
Just more information. Even the base Wish.app defines .tcl as an extension it accepts, and I can’t drop a .tcl file onto it. I also went back and built 8.5.18 and tried, and it’s not working there either. This is all on Yosemite, by the way. Damon > On May 2, 2015, at 1:51 PM, Damon Courtney <da...@tc...> wrote: > >> In my Info.plist I have the following lines, embedded in the larger xml structure, to say it will try to open anything. >> >> <key>CFBundleTypeExtensions</key> >> <array><string>*</string></array> >> >> The operating system appears to have some memory of previous values for the CFBundleTypeExtension, however, so that when I change it from "*" to "yyy" it still lets me open "txt" files. I seem to recall having to re-start the finder to get the changes to be accepted. > > I thought that was all I had to do. In my case I’m using .epub files, but I used a bunch of different combinations to try and find the right magic string, and I still can’t get anything to drop. If I right-click the file, I can Open it with my app (it shows up in the list registered for the .epub file extension). But I still can’t just drop a file on the running app. > > I’m still looking at it though. :) > > Damon |
From: Kevin W. <kw...@co...> - 2015-05-02 23:08:05
|
On 5/2/15 5:50 PM, Damon Courtney wrote: > Just more information. Even the base Wish.app defines .tcl as an extension it accepts, and I can�t drop a .tcl file onto it. I also went back and built 8.5.18 and tried, and it�s not working there either. > > This is all on Yosemite, by the way. > > Damon > > Have you defined a tk::mac::OpenDocument procedure? That's what handles the open event. By the way, none of this has anything to do with Cocoa--it's basic Apple Events, which Tk has supported since the dark ages. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com |
From: Damon C. <da...@tc...> - 2015-05-02 23:43:22
|
> Have you defined a tk::mac::OpenDocument procedure? That's what handles the open event. Yes, I have it defined. That’s how I can get it to open files with “Open With…” from the Finder. > By the way, none of this has anything to do with Cocoa--it's basic Apple Events, which Tk has supported since the dark ages. That’s what I figured, but I just couldn’t figure out what I was doing wrong. Oh, well, I’ve bugged everyone enough. I’ll figure it out or just move on without the extra feature. Damon |
From: Kevan H. <ha...@br...> - 2015-05-03 14:35:47
|
> If the behavior you are looking for is to have the app respond when you > drag the file to the app window... I misunderstood as well. Apologies. I was thinking only of dragging the file onto the Finder icon, not the app window. -- Kevan Hashemi, Electrical Engineer Physics Department, Brandeis University http://alignment.hep.brandeis.edu/ |
From: Damon C. <da...@tc...> - 2015-05-04 17:45:33
|
Ok, this was my misunderstanding then. The docs say this for ::tk::mac::OpenDocument: If a proc of this name is defined it is the default Apple Event handler for kAEOpenDocuments, “odoc”, the Apple Event sent when your application is asked to open one or more documents (e.g., by drag & drop onto the app or by opening a document of a type associated to the app). The proc should take as arguments paths to the files to be opened, like so: It was the “by drag & drop onto the app” that got me. Damon > On May 3, 2015, at 9:35 AM, Kevan Hashemi <ha...@br...> wrote: > >> If the behavior you are looking for is to have the app respond when you drag the file to the app window... > > I misunderstood as well. Apologies. I was thinking only of dragging the file onto the Finder icon, not the app window. > > -- > Kevan Hashemi, Electrical Engineer > Physics Department, Brandeis University > http://alignment.hep.brandeis.edu/ |