Search Results

Search found 14645 results on 586 pages for 'unity launcher api'.

Page 3/586 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Running Unity 2d - Does not work on actual system but works fine in VM

    - by Dylan
    So I'm running Ubuntu 10.10 and I cannot get Unity 2d to work with my system. This is particularly frustrating as it works just fine in all the VMs I've tested it on. I actually really like Unity and I want to get to know it (in part) before Ubuntu 11.04. I checked Synaptic and it looks like everything's there. The only thing not installed are dev libs and so on. Should I install those as well? Obviously the difference between my system and a VM is that the VM is running off a basically brand new OS. I only use VMs to test new stuff out and remake them often, so my only guess is that I have something installed on my system that is preventing Unity from running. Any thoughts?

    Read the article

  • Unity 2d support dropped in 12.10, what now?

    - by tomodachi
    So its been announced. Ubuntu is dropping unity 2d support. I wouldn't mind if it wasn't for two things that are important to me. 1) A working system Unity is nice, i try to use it quite often. But it lags. 2) Support for older hardware. I also have old computers. You can imagine how they would work with unity if my current laptop is slog in Ubuntu. I guess i could use another desktop environment/ window manager , like switching to fluxbox. Anyone have any suggestion ideas/solutions on how to proceed with Ubuntu in the future? All insights welcome

    Read the article

  • Force Unity to open any file with any program

    - by Strae
    When you drag a file to the Unity launcher, only the applications that are supposed to open that file will remain active, while all others become deactivated. Is it possible to configure Unity to ignore that setting and open the file, no matter what extension the file has, with any of the applications on the launcher? I'd be glad to get an unsupported file type from the application when I make a mistake instead of losing a bunch of time configuring what application can open what file (that's because it is no longer possible to add a custom application/path in the Open with... menu)

    Read the article

  • How to add a "Show desktop" icon to the launcher?

    - by Aleksandar Maricak
    I recently upgraded from 10.04 to 12.04, and there is no show desktop in the launcher. I know I can use Ctrl+Super+D, but is there a way to get it in the launcher? Edit: I just installed the "show desktop" icon on the launcher with MyUnity (see below) and it worked fine. It did not install the icon above Dash launcher, but well below it. That bug has apparently been fixed. This is as of 2012.9.30.

    Read the article

  • Icons can't be seen on Ubuntu 12.04 LTS's Launcher after updates

    - by Jan Tait
    After updating yesterday, (can unfortunately not remember the specific updates) the launcher could not be made to appear. Rebooting the system showed the launcher only as a black bar at the left edge of the screen without any icons in the launcher. If the mouse arrow is moved over the black launcher bar, the names of the applications next to the launcher appears. What could be done to have the icons to be visible in the launcher?

    Read the article

  • Unity Dashboard won't find local files, rearrange icons on two computers

    - by Stanton.Sculpture
    Suddenly I can't move icons around my unity launcher and the Dash won't search for my local files and folders. Was working when I first installed 13.10, but now it won't search for local files, and it won't let me rearrange the icons in any way. I've tried turning on and off all the scopes (lenses?) in multiple combinations, but it won't find any files unless I use nautilus to find them its mostly unresponsive. I can't see my recently used files, or files and folders scope at all. Dragging and dropping the icons on the side dock doesn't work, they only stick to my mouse until I put them back where they were. I cannot unlock any icons from the launcher, it just doesn't do anything when I click it. I tried rebooting both of my computers and its still won't function normally. I used ubuntu-bug -w to report a bug, no one has gotten back to me. Is there some option that I changed to cause this? This is a problem on both my laptop and Desktop. Please Help, Alex

    Read the article

  • Is there a way to hide & reveal the launcher at will with the press of a key?

    - by thanos
    I'm using Ubuntu 12.04 with the default Unity desktop environment. I'm aware of all the keyboard shortcuts that relate to the launcher as well as the possible tweaks using Ubuntu Tweak Tool, Unsettings, MyUnity. What I'd like to know is this: Is there a way to hide & reveal the launcher at will with the press of a key? Example given, press Key A, launcher hides, press Key A again and launcher is revealed until I press the A Key once more and so forth. The autohide function won't do because I want the launcher to stay visible once revealed.

    Read the article

  • How can I add a bash script to the Unity launcher?

    - by hippyjim
    I open my favourite IDE (PhpStorm) using a custom bash script. I would like to add the script to the Unity launcher. I thought I could add it by clicking the "keep in launcher" option, and sure enough, the icon stays on the launcher after I close the app. But clicking the icon doesn't reopen the IDE - the launcher just sits there, flashing. When I relogin in, the launcher icon is gone. Anyone got any ideas how I can make this work?

    Read the article

  • Can you load Google Maps API v3 via Google AJAX API loader

    - by Salman A
    Some time ago I used the regular method of loading Google Maps API like this: <script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=abcdefg&sensor=true"> Later I switched to Google AJAX APIs to load Google Maps API. This was because a couple of "widgets" on my website needed the Google Ajax API loader so I chose to be consistent and used the AJAX APIs to load Google Maps as well: <script type="text/javascript" src="http://www.google.com/jsapi?key=abcdef"></script> <script type="text/javascript"> google.load("maps", "2", {"other_params": "sensor=true"}); </script> Now that I have finally decided to use Google Maps API v3, this page does not list API v3 in the available version list. None of the examples on API v3 documentation show the use of AJAX APIs as well. Is is possible (and supported) to load Google Maps API v3 via AJAX API loader?

    Read the article

  • Add Eclipse to Unity Dock in Ubuntu 12.04

    - by csilk
    I'm using the following eclipse.desktop file [1] on the Unity dock but I keep seeing the following error [2] in the ".xsession-errors" file everytime I click the Eclipse icon. Are there any ideas why this is happening? [1] [Desktop Entry] Encoding=UTF-8 Name=Eclipse Comment=Java IDE Exec=/bin/sh /home/USERNAME/eclipse/eclipse Icon=/home/USERNAME/eclipse/icon.png Categories=Application;Development;Java;IDE Version=1.0 Type=Application Terminal=0 [2] /home/USERNAME/eclipse/eclipse: 5: /home/USERNAME/eclipse/eclipse: Syntax error: "(" unexpected

    Read the article

  • How can I remove a Unity window entry?

    - by Pol Delgado Martin
    I installed Eclipse long time ago from the Software Center, but recently I needed a newer version than the repo one. Then I removed it via Software Center and installed Eclipse Kepler in /opt. However, the window opened is not called Eclipse, it is the name of an old program I made (Eclipse- GMM). However, that's not the main issue, but that even if I created a .desktop file it launches the same, having "two" eclipses in the dock, the actual program and the launcher. How can I remove Unity .desktop cache or wathever it is this?

    Read the article

  • How to define AUTHPARAMS in Amazon EC2 API call

    - by The Joker
    I am trying to make an API call to EC2. I want to add my IP address to the security group. https://ec2.amazonaws.com/ ?Action=AuthorizeSecurityGroupIngress &GroupName=grppp20 &GroupId=sg-b2z982mq &IpPermissions.1.IpProtocol=tcp &IpPermissions.1.FromPort=3389 &IpPermissions.1.ToPort=3389 &IpPermissions.1.IpRanges.1.CidrIp=22.951.17.728/32 &&AWSAccessKeyId=AOPLDRACULALK6U7A And i get the following error. AWS was not able to validate the provided access credentials I have a secret access key & a username. I searched internet & found that we have to make a signature of the secret key & use it in the request instead of adding it directly. Can anyone tell me how to make a signature of my AWS secret key & how to use them with my API call? Let my secret key be: 2WwRiQzBs7RTFG4545PIOJ7812CXZ Username: thejoker

    Read the article

  • Clone Unity Dock for All Users?

    - by jduc
    I've spent 3 days trying to figure out how to clone the Unity dock from my firstuser profile in Ubuntu 12.04 to all of the other profiles I'm hoping to create. I've read where the /etc/skel folder contents get populated to all new profiles but this doesn't seem to include the dock or the desktop folders and icons. I've also copied the entire contents of my /home/firstuser folder to my /home/seconduser folder (including .* files) but the dock is still showing the stock icons and not the icons I've designated in my firstuser profile dock. Does anyone have any suggestions?

    Read the article

  • Is it possible to auto-arrange the active Unity launcher icons?

    - by tijybba
    I am using Ubuntu 12.04 x64 bit as default DE. I was guessing it is possible to Auto Arrange the Current-Active applications in Unity Launcher panel to align in Lastly-Opened or Firstly-Opened in ascending or descending order, irrespective of their locked positions in the Unity Launcher panel. Just to get rid of Scrolling down the launcher panel every time to search active application thereby depriving the need of Alt-Tab shortcut. I mean Alt-Tab alternative in more smarter way, though I also use Alt-Tab for the task Management purpose.

    Read the article

  • How are you coping with Ubuntu's Unity app launcher? (It auto-hides, can't minimize apps)

    - by Bad Learner
    [Firstly, let me tell you that this cannot be subjective in anyway, as I think at least Ubuntu beginners will have these questions boggling in their mind; and yes, this is a question that has a definite answer - - so, I am completely within the rules.] Okay, coming to the point, I see that Ubuntu uses Unity since v10.xx (netbook edition?) and carried the same to v11.04 & v11.10. As someone who's stuck to Windows for all these years, it's somewhat difficult to cope with Ubuntu's Unity, for the following reasons: [1] The Unity app launcher (to the screen's left) auto-hides when a window is maximized. [2]- And once launched, apps cannot be minimized by clicking the app's icon in the launcher. I have to go to the top-left of the screen and click the "_" button. I do know I can fix these issues by installing some configuration tool. But the thing is, if that's how it's meant to work, Canonical/Ubuntu would have designed it that way. But they didn't. Why? w.r.t above points [1], [2]: [1] EDITED: So, does it mean, it's good to work without maximizing the windows? Because if I maximize the window, the app launcher hides. And I need to hover the mouse to the left of the screen, wait a bit (even if it's a sec or even less, I can still feel the lag), and then click on the next app icon in the launcher to switch to it. I do know, I can use Alt+TAB to switch, but I am not sure which window comes next. This, I feel, isn't productive. Also, this makes me feel, Ubuntu is designed for large screens (it's nice on my 1920x1080p screen), because I can have two windows side-by-side or something like that on a large screen. This is not possible on smaller screens. [2]- Being able to minimize an application's window by clicking on its icon in the launcher (just like it works on Windows & probably elsewhere) would have been great, rather than having to go to the top-left and clicking the _ (minimize) button which brings up the app launcher itself (from hiding) most of the time. It's too tiring to have these small issues in the UI. I really would like to know how you are coping with these issues the way they are?

    Read the article

  • Unity 3d support for multiple X-screens

    - by stewbond
    I've installed Ubuntu 12.04 this weekend and have had problems getting Unity3d to work with my triple monitor set-up. I've installed the latest nVidia drivers for my 2 nVidia video cards and have used NVIDIA X Server Settings to configure everything. If I stick each monitor on a separate X screen, all but the primary X screen will appear white and the cursor will be a black X. I can start a terminal on this screen but cannot drag other windows to it. If I kill the "Nautilus" process, the white background disappears and I see my desktop background, but my cursor is still an X and I still cannot drag windows to it. If I enable TwinView, I can get one screen on two monitors to work properly, but the white screen remains on my third monitor. In addition, I don't like using TwinView because my full-screen applications get stretched. My current solution is to "Enable Xinerama", use all separate X screens and revert to Unity2d. I'd love a solution to this as Ubuntu 12.10 is not planned to support Unity-2d and prefer the aesthetics of 3d anyways. I can provide Xorg.conf for all configurations and any other suggested diagnostic information. Below is my closest-to-working xorg.conf: # nvidia-settings: X configuration file generated by nvidia-settings # nvidia-settings: version 295.33 (buildd@zirconium) Fri Mar 30 13:38:49 UTC 2012 Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" RightOf "Screen2" Screen 1 "Screen1" RightOf "Screen0" Screen 2 "Screen2" 0 0 InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" Option "Xinerama" "1" EndSection Section "Files" EndSection Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/psaux" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection Section "InputDevice" Identifier "Keyboard0" Driver "kbd" EndSection Section "Monitor" Identifier "Monitor0" VendorName "Unknown" ModelName "Microvitec PLC MV191" HorizSync 30.0 - 81.0 VertRefresh 56.0 - 75.0 Option "DPMS" EndSection Section "Monitor" Identifier "Monitor1" VendorName "Unknown" ModelName "CRT-1" HorizSync 28.0 - 55.0 VertRefresh 43.0 - 72.0 Option "DPMS" EndSection Section "Monitor" Identifier "Monitor2" VendorName "Unknown" ModelName "Microvitec PLC MV191" HorizSync 30.0 - 81.0 VertRefresh 56.0 - 75.0 Option "DPMS" EndSection Section "Monitor" Identifier "Monitor3" VendorName "Unknown" ModelName "Microvitec PLC MV191" HorizSync 30.0 - 81.0 VertRefresh 56.0 - 75.0 EndSection Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce GTS 450" BusID "PCI:1:0:0" Screen 0 EndSection Section "Device" Identifier "Device1" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce 9500 GT" BusID "PCI:2:0:0" EndSection Section "Device" Identifier "Device2" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce GTS 450" BusID "PCI:1:0:0" Screen 1 EndSection Section "Device" Identifier "Device3" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce GTS 450" BusID "PCI:1:0:0" Screen 2 EndSection Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Monitor0" DefaultDepth 24 Option "TwinView" "0" Option "metamodes" "DFP-0: 1280x1024_75 +0+0; DFP-0: 1280x1024 +0+0" SubSection "Display" Depth 24 EndSubSection EndSection Section "Screen" Identifier "Screen1" Device "Device1" Monitor "Monitor1" DefaultDepth 24 Option "TwinView" "0" Option "metamodes" "nvidia-auto-select +0+0" SubSection "Display" Depth 24 EndSubSection EndSection Section "Screen" Identifier "Screen2" Device "Device2" Monitor "Monitor2" DefaultDepth 24 Option "TwinView" "0" Option "metamodes" "DFP-2: 1280x1024_75 +0+0; DFP-2: nvidia-auto-select +0+0" SubSection "Display" Depth 24 EndSubSection EndSection Section "Screen" Identifier "Screen3" Device "Device3" Monitor "Monitor3" DefaultDepth 24 Option "TwinView" "0" Option "metamodes" "DFP-2: nvidia-auto-select +0+0" SubSection "Display" Depth 24 EndSubSection EndSection Section "Extensions" Option "Composite" "Disable" EndSection Other people have had similar issues. I haven't been successful at any of the few suggestions submitted. Can not get Dual Monitors to work on Different GPUs http://askubuntu.com/questions/30412/3-monitors-with-2-video-cards-not-working?rq=1 How to get second display to work alongside primary display? http://askubuntu.com/questions/148007/multiple-monitors-only-work-with-unity-2d/201086#201086 xorg.conf and Unity3D?

    Read the article

  • Is libunity planning on including functions for Unity Places?

    - by SaidKLE
    I am unclear on this, because I have heard mention of a proposed API for Unity Places, and such an API would be extremely useful for projects involving home automation. I am interested in developing in that direction, but I haven't been able to find the API for Unity Places. It would make the most sense of libunity was to include Unity Places because it would put all the functionality of the Unity launcher into one place. If libunity is not the API for UPs, does such an API exist, and how would I find it?

    Read the article

  • 12.04 LTS: unity --reset hangs

    - by Gregory R. Pace
    Nearly each time I reboot my machine, the system panel and integrated app menus fail to load. At a terminal, when issuing 'unity --reset', I get the following errors: ... Initializing widget options...done Initializing winrules options...done Initializing wobbly options...done ERROR 2012-11-05 04:36:48 unity.glib-gobject <unknown>:0 g_object_unref: assertion `G_IS_OBJECT (object)' failed ERROR 2012-11-05 04:36:48 unity.gtk <unknown>:0 gtk_window_resize: assertion `width > 0' failed WARN 2012-11-05 04:37:14 unity <unknown>:0 Unable to fetch children: No such interface `org.ayatana.bamf.view' on object at path /org/ayatana/bamf/application885622223 ERROR 2012-11-05 04:37:21 unity.glib-gobject <unknown>:0 g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed Setting Update "main_menu_key" Setting Update "run_key" WARN 2012-11-05 04:38:06 unity.iconloader IconLoader.cpp:438 Unable to load icon stock-person at size 24 WARN 2012-11-05 04:38:26 unity.glib.dbusproxy GLibDBusProxy.cpp:182 Unable to connect to proxy: Error calling StartServiceByName for com.canonical.Unity.Lens.Applications: Timeout was reached WARN 2012-11-05 04:38:26 unity.glib.dbusproxy GLibDBusProxy.cpp:182 Unable to connect to proxy: Error calling StartServiceByName for com.canonical.Unity.Lens.Applications: Timeout was reached The procedure hangs at this point. Any ideas how to solve these problems ? Thanks in advance.

    Read the article

  • Ubuntu 11.10 is falling back to Unity 2D. How to get back to Unity 3D?

    - by marcioAlmada
    It happened some minutes ago when I plugged my secondary monitor and my graphical interface simply crashed. So I had to restart my session. Since the crash Ubuntu insists to use Unity2D fall back instead of the default one. I used to plug the secondary monitor everyday when at home and nothing bad happened before. This 2D version of the GUI is ugly and has a lot of problems. How can I go back to Unity 3D GUI? update It seems somehow I lost my opengl support (driver issues). $ glxinfo name of display: :0.0 Xlib: extension "GLX" missing on display ":0.0". Xlib: extension "GLX" missing on display ":0.0". Xlib: extension "GLX" missing on display ":0.0". Xlib: extension "GLX" missing on display ":0.0". Xlib: extension "GLX" missing on display ":0.0". Error: couldn't find RGB GLX visual or fbconfig Xlib: extension "GLX" missing on display ":0.0". Xlib: extension "GLX" missing on display ":0.0". Xlib: extension "GLX" missing on display ":0.0". Xlib: extension "GLX" missing on display ":0.0". Xlib: extension "GLX" missing on display ":0.0". Xlib: extension "GLX" missing on display ":0.0". Xlib: extension "GLX" missing on display ":0.0". And: $ glxgears Xlib: extension "GLX" missing on display ":0.0". Error: couldn't get an RGB, Double-buffered visual How can I revert things and go back to the right driver?

    Read the article

  • no launcher, no dash, no unity, how to get back to my desktop?

    - by Numan Syed
    FYI, I have tried these, but none worked as of yet! Please help! I must not want to reinstall Ubuntu precise: AskUbuntu:Unity Launcher missing AskUbuntu: Unity doesn't load Youtube:Restore missing launcher AskUbuntu:Unity 3D no longer works! Is there any other way to find a solution, any help is highly appreciated! Please do ask for any further info u may need to point me to a better direction. Edit: I have still the opportunity to use ctrl+Alt+T for the terminal. And from there I used firefox & to get the browser on. Edit 2: Tried to find more; found more explained situation http://askubuntu.com/q/260578/176470. Edit 3:@Adithya: tried that no luck! Here is what my terminal gave me so far... [1447:22] (~) bash $ unity --reset WARNING: Unity currently default profile, so switching to metacity while resetting the values unity-panel-service: no process found Checking if settings need to be migrated ...no Checking if internal files need to be migrated ...no Backend : gconf Integration : true Profile : unity Adding plugins Initializing core options...done compiz (core) - Warn: failed to receive ConfigureNotify event on 0x1600004 compiz (core) - Warn: failed to receive ConfigureNotify event on 0x30000b8 compiz (core) - Warn: failed to receive ConfigureNotify event on 0x2c00fc1 Initializing composite options...done Initializing opengl options...done Initializing decor options...done Initializing vpswitch options...done Initializing snap options...done Initializing mousepoll options...done Initializing resize options...done Initializing place options...done Initializing move options...done Initializing wall options...done Initializing grid options...done Initializing session options...done Initializing gnomecompat options...done Initializing animation options...done Initializing fade options...done compiz (core) - Error: Couldn't load plugin '/usr/lib/compiz/libunitymtgrabhandles.so' : /usr/lib/compiz/libunitymtgrabhandles.so: undefined symbol: _ZN10CompOption7setNameEPKcNS_4TypeE compiz (core) - Error: Couldn't load plugin 'unitymtgrabhandles' Initializing workarounds options...done Initializing scale options...done compiz (expo) - Warn: failed to bind image to texture Initializing expo options...done Initializing ezoom options...done compiz (core) - Error: Couldn't load plugin '/usr/lib/compiz/libunityshell.so' : /usr/lib/compiz/libunityshell.so: undefined symbol: _ZN10CompOption7setNameEPKcNS_4TypeE compiz (core) - Error: Couldn't load plugin 'unityshell' compiz (core) - Warn: unhandled ConfigureNotify on 0xc000a0! compiz (core) - Warn: this should never happen. you should probably file a bug about this. compiz (core) - Warn: unhandled ConfigureNotify on 0xc000a3! compiz (core) - Warn: this should never happen. you should probably file a bug about this. compiz (core) - Warn: unhandled ConfigureNotify on 0xc000a6! compiz (core) - Warn: this should never happen. you should probably file a bug about this. Initializing addhelper options...done Initializing animationaddon options...done Initializing annotate options...done Initializing bench options...done Initializing blur options...done Initializing clone options...done Initializing colorfilter options...done Initializing commands options...done Initializing crashhandler options...done Initializing cube options...done Initializing cubeaddon options...done Initializing extrawm options...done Initializing fadedesktop options...done Initializing firepaint options...done Initializing group options...done Initializing imgjpeg options...done Initializing kdecompat options...done Initializing loginout options...done Initializing mag options...done Initializing maximumize options...done Initializing mblur options...done Initializing neg options...done Initializing notification options...done Initializing obs options...done Initializing opacify options...done Initializing put options...done Initializing reflex options...done Initializing resizeinfo options...done Initializing ring options...done Initializing rotate options...done Initializing scaleaddon options...done Initializing scalefilter options...done Initializing screenshot options...done Initializing shelf options...done Initializing shift options...done Initializing showdesktop options...done Initializing showmouse options...done Initializing splash options...done Initializing staticswitcher options...done Initializing switcher options...done Initializing td options...done Initializing thumbnail options...done Initializing trailfocus options...done Initializing unitymtgrabhandles options...done Initializing unityshell options...done Initializing wallpaper options...done Initializing water options...done Initializing widget options...done Initializing winrules options...done Initializing wobbly options...done Setting Update "main_menu_key" Setting Update "run_key" Anything suspicious herein?

    Read the article

  • Ubuntu Unity (64-bit) Bugs on Nvidia dual screen [closed]

    - by Kristofer
    On my work computer I have upgraded 10.04 to 10.10 and now to 11.04. Upgrades have mostly worked well and the dual screen setup is almost working. There are however a couple of annoying bugs which I tried to report but the bug reporting tool told me to ask about the bugs here. Here's what I have found: Auto-hide stops working. It doesn't seem to matter which application is maximised/covering the dock, it just stays on top. I have tested changing the autohide settings with no result. Scenario: One maximised window on each screen. If I now try to drag the window that doesn't have focus by dragging the top of the window nothing happens. I can also not give the window focus by clicking the top bar, I have to click inside the window and then I can drag the window. If I unmaximise the window with focus it does work and I can both change focus and drag the window directly by clicking the top of the maximised window. Any bug fixes coming for these issues? Any work-arounds?

    Read the article

  • Using Unity – Part 1

    - by nmarun
    I have been going through implementing some IoC pattern using Unity and so I decided to share my learnings (I know that’s not an English word, but you get the point). Ok, so I have an ASP.net project named ProductWeb and a class library called ProductModel. In the model library, I have a class called Product: 1: public class Product 2: { 3: public string Name { get; set; } 4: public string Description { get; set; } 5:  6: public Product() 7: { 8: Name = "iPad"; 9: Description = "Not just a reader!"; 10: } 11:  12: public string WriteProductDetails() 13: { 14: return string.Format("Name: {0} Description: {1}", Name, Description); 15: } 16: } In the Page_Load event of the default.aspx, I’ll need something like: 1: Product product = new Product(); 2: productDetailsLabel.Text = product.WriteProductDetails(); Now, let’s go ‘Unity’fy this application. I assume you have all the bits for the pattern. If not, get it from here. I found this schematic representation of Unity pattern from the above link. This image might not make much sense to you now, but as we proceed, things will get better. The first step to implement the Inversion of Control pattern is to create interfaces that your types will implement. An IProduct interface is added to the ProductModel project. 1: public interface IProduct 2: { 3: string WriteProductDetails(); 4: } Let’s make our Product class to implement the IProduct interface. The application will compile and run as before despite the changes made. Add the following references to your web project: Microsoft.Practices.Unity Microsoft.Practices.Unity.Configuration Microsoft.Practices.Unity.StaticFactory Microsoft.Practices.ObjectBuilder2 We need to add a few lines to the web.config file. The line below tells what version of Unity pattern we’ll be using. 1: <configSections> 2: <section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 3: </configSections> Add another block with the same name as the section name declared above – ‘unity’. 1: <unity> 2: <typeAliases> 3: <!--Custom object types--> 4: <typeAlias alias="IProduct" type="ProductModel.IProduct, ProductModel"/> 5: <typeAlias alias="Product" type="ProductModel.Product, ProductModel"/> 6: </typeAliases> 7: <containers> 8: <container name="unityContainer"> 9: <types> 10: <type type="IProduct" mapTo="Product"/> 11: </types> 12: </container> 13: </containers> 14: </unity> From the Unity Configuration schematic shown above, you see that the ‘unity’ block has a ‘typeAliases’ and a ‘containers’ segment. The typeAlias element gives a ‘short-name’ for a type. This ‘short-name’ can be used to point to this type any where in the configuration file (web.config in our case, but all this information could be coming from an external xml file as well). The container element holds all the mapping information. This container is referenced through its name attribute in the code and you can have multiple of these container elements in the containers segment. The ‘type’ element in line 10 basically says: ‘When Unity requests to resolve the alias IProduct, return an instance of whatever the short-name of Product points to’. This is the most basic piece of Unity pattern and all of this is accomplished purely through configuration. So, in future you have a change in your model, all you need to do is - implement IProduct on the new model class and - either add a typeAlias for the new type and point the mapTo attribute to the new alias declared - or modify the mapTo attribute of the type element to point to the new alias (as the case may be). Now for the calling code. It’s a good idea to store your unity container details in the Application cache, as this is rarely bound to change and also adds for better performance. The Global.asax.cs file comes for our rescue: 1: protected void Application_Start(object sender, EventArgs e) 2: { 3: // create and populate a new Unity container from configuration 4: IUnityContainer unityContainer = new UnityContainer(); 5: UnityConfigurationSection section = (UnityConfigurationSection)ConfigurationManager.GetSection("unity"); 6: section.Containers["unityContainer"].Configure(unityContainer); 7: Application["UnityContainer"] = unityContainer; 8: } 9:  10: protected void Application_End(object sender, EventArgs e) 11: { 12: Application["UnityContainer"] = null; 13: } All this says is: create an instance of UnityContainer() and read the ‘unity’ section from the configSections segment of the web.config file. Then get the container named ‘unityContainer’ and store it in the Application cache. In my code-behind file, I’ll make use of this UnityContainer to create an instance of the Product type. 1: public partial class _Default : Page 2: { 3: private IUnityContainer unityContainer; 4: protected void Page_Load(object sender, EventArgs e) 5: { 6: unityContainer = Application["UnityContainer"] as IUnityContainer; 7: if (unityContainer == null) 8: { 9: productDetailsLabel.Text = "ERROR: Unity Container not populated in Global.asax.<p />"; 10: } 11: else 12: { 13: IProduct productInstance = unityContainer.Resolve<IProduct>(); 14: productDetailsLabel.Text = productInstance.WriteProductDetails(); 15: } 16: } 17: } Looking the ‘else’ block, I’m asking the unityContainer object to resolve the IProduct type. All this does, is to look at the matching type in the container, read its mapTo attribute value, get the full name from the alias and create an instance of the Product class. Fabulous!! I’ll go more in detail in the next blog. The code for this blog can be found here.

    Read the article

  • Why can I only put some items in the launcher?

    - by HaskellElephant
    Whenever I search for an item using dash it knows the default way of opening it. However if I drag a file into the launcher it can't be added, even if it is executable. For example if you would like minecraft to show up you will have to add a custom launcher, or if you use dash to find a pdf file, you can double click it and it opens evince however you cannot drag it into the launcher. The animation surrounding this behavior suggests that this was done by design. Why is this useful or necessary? Is it a bug?

    Read the article

  • Keyboard shortcuts are not working when unity plugin in ccsm is disabled?

    - by Pioneer11X
    I am using ubuntu 11.10 with unity 2d , I dont like the unity launcher and use Docky . So , i have created a new seeion and using some tweaking and playing around i have been successful to get rid of the unity launcher and make a perfect interface that i like , but there are two problems .. Keyboard shortcuts not working I had to disable the ubuntu unity plugin in ccsm to get rid of the unity laucher..when it is enabled , i can use the keyboard shortcuts such as alt+tab etc .. But when i disable it , I am unable to use some shortcuts , I can still use some shortcuts like alt+F4 ect. When I maximise a window , it used to show two window (close , maximise , minimize )buttons and title bars So , i set the window decoration in ccsm to !maxvert from any , and it is working fine for most of the time until i try to snsp the window to a side then the title bar just disappears , leaving space between the panel and the window , I cant close this window until i use the alt+mouse to drag it out , because no buttons would be displayed ..

    Read the article

  • How can I remove the Unity Launcher?

    - by Magnus Hoff
    I'm running Ubuntu Netbook. With the recent upgrade to 10.10 I was excited about the Application Menu/the global menu bar and its implications for screen real estate. Unfortunately, the Unity Launcher on the left hand side of the screen takes more valuable space away than the new menu bar gives. Is there any way to get rid of the Launcher? Alternatives I would be satisfied with include: Not having the Launcher at all Having the Launcher hide automatically Having applications open on top of the Launcher (not next to it) (edit:) Note that I am specifically looking for a way to keep the global menubar, while getting rid of the Launcher.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >