Hello all,
am a new bee. But throughly enjoying. Any one can help me how to find out where I can document the way to save a current image in memory from within the language ? Besides, is there any definitive way to scientifically search out such functionalities? Thanks Shyam _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
You would want either the
ObjectMemory class method #snapshot and its relatives, or the class
Snapshot.
For anything that's on a menu, here's a technique. Look at the menu item for the thing you want to know how to do programmatically. Open a browser. From the menu bar, use Find->Methods with Strings Matching... Type in the name used on the menu for that function with stars in front and behind to catch any extra characters. So, in this case *Save Image*. That will take you two methods, #launcherToolBar and #menuBar. Either will do. You can look at them as source code looking for the string (use the "Source" tab), but they're big literal arrays that hold the window definition so you may be better off clicking the Edit button, loading the UI Painter tools if they're not already there, and looking at it in the menu tool. There you'll find the menu item for Save Image, and its "value" is #imageSave. So that's the method you want. Looking for implementors of that shows you one that calls ObjectMemory snapshot. Another technique that's often valuable is to just invoke the operation you want, hit control-Y and then look in the resulting debugger for what the system is doing. But for fast operations you might have to be quick with the interrupt key. And that's probably not a good idea to do for testing an image save, as interrupting the system at the wrong point during a save operation might be a bad thing. Or at least, if you're trying that approach, have a backup copy of your saved image in case you stopped it half-way through writing and are left without a saved image.
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Shyam Sundaresan
Hello.
Maybe you are looking for the methods in 'system backup/exit' protocol of ObjectMemory class, such as #snapshot or #saveAs:thenQuit:. Ladislav Lenart On 19.1.2012 16:41, Shyam Sundaresan (Personal) wrote: > Hello all, > > am a new bee. But throughly enjoying. Any one can help me how to find out where I can document the way to save a current image in memory from within the language ? Besides, is there any definitive way to scientifically search out such functionalities? > > Thanks > Shyam > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > > _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Alan Knight-2
Thanks, Giorgio, Alan and Lenart.
BTW Alan, as a new comer, your technique will be IMMENSELY helpful in unraveling and de-mystifying the overwhelming world behind VW development environment. Thanks a lot. Shyam. On Thu, Jan 19, 2012 at 4:59 PM, Alan Knight <[hidden email]> wrote:
Shyam Sundaresan +39 335 74 39 444 _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Alan's technique works great for anything you can interrupt, but not for the save as. I found tracking down the functions behind the save image menu item rather problematic, but eventually I ended up with this:
ObjectMemory globalCompactingGC. ObjectMemory saveAs: ObjectMemory imageFilePrefixWithoutPath thenQuit: true. It works great for me. On Thu, Jan 19, 2012 at 9:03 AM, Shyam Sundaresan (Personal) <[hidden email]> wrote: Thanks, Giorgio, Alan and Lenart. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Shyam Sundaresan
Another cool trick at my current project is a set of extensions that adds a small colored borderless action button to the upper left corner of each canvas (and subcanas) that gets built (in our dev images only). It is small enough to be unobtrusive, but when clicked gives the option of 'Browse', 'Halt' or 'Inspect'. It doesn't work with popup menus, but is invaluable for applicationModels and dialogs.
For composed UIs (screens which embed other UIs), it lets us quickly see what classes are responsible for a given subcanvas to help determine in which class a given change must be made. With this extension turned on, each standard refactoring browser in VW 7.6 shows 8 of these buttons. Depending on the selected tabs in the browser, clicking on one of these buttons can bring you straight to aSelectorNavigatorPart, aBrowserDefinitionTool, aRegexCodeTool, etc.
Our dynamically created views often display objects created as the result of a database query. These UIs can contain potentially hundreds of subcanvases, one for each object being displayed. The buttons allow us to quickly inspect individual objects without having to navigate down from the main UI or window. Dave Stevenson[hidden email] From: Shyam Sundaresan (Personal) <[hidden email]> To: [hidden email]; [hidden email] Sent: Thu, January 19, 2012 11:03:14 AM Subject: Re: [vwnc] How to save current image ? Thanks, Giorgio, Alan and Lenart. BTW Alan, as a new comer, your technique will be IMMENSELY helpful in unraveling and de-mystifying the overwhelming world behind VW development environment. Thanks a lot. Shyam.
On Thu, Jan 19, 2012 at 4:59 PM, Alan Knight <[hidden email]> wrote:
Shyam Sundaresan
+39 335 74 39 444
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Jon Paynter-2
Thanks, Jon and Dave for your note. Will get back as soon as I try out (and digest!) the suggestions received.
On Thu, Jan 19, 2012 at 6:46 PM, Jon Paynter <[hidden email]> wrote: Alan's technique works great for anything you can interrupt, but not for the save as. I found tracking down the functions behind the save image menu item rather problematic, but eventually I ended up with this: Shyam Sundaresan +39 335 74 39 444 _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |