Search Results

Search found 3423 results on 137 pages for 'tom daniel'.

Page 58/137 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • Beginner learning assembly preserving esp after function calls

    - by Daniel
    I'm a beginner learning some assembly, when preserving the ESP register before a function call does it matter if you do it by adding or subtracting? hard to explain, consider the following mov esi, esp sub esp, 12 // on 32bit OS this would mean that there are 3 arguments to the function // push, function call etc cmp esi, esp // should be the same or mov esi, esp // push, function call etc add esp, 12 cmp esi, esp // should be the same Also if for some reason the cmp fails, is it safe to do mov esp, esi to re-align the stack? Thanks EDIT: Also how come i need to do this for a call like sprintf, but MessageBox seems to fix ESP for me? How am i to know what function needs this and what doesn't?

    Read the article

  • How to change Jquery UI Slider handle

    - by Tom
    I want to modify the stock JQuery UI slider so that the handle has a arrow on it rather than being a square. i.e. I want to use a custom image as the handle. There are a few tutorials that do it: http://jqueryfordesigners.com/slider-gallery/ http://www.ryancoughlin.com/2008/11/04/using-the-jquery-ui-slider/ http://www.keepthewebweird.com/creating-a-nice-slider-with-jquery-ui/ But I can't get it to work. The following code results in a stationary handle image: <!DOCTYPE html> <html> <head> <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" /> <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script> <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script> <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.slider.js"></script> <style type="text/css"> #myhandle {position: absolute;z-index: 100;height: 25px;width: 35px;top: auto;background: url(http://stackoverflow.com/content/img/so/vote-arrow-down.png) no-repeat;} </style> <script type="text/javascript"> $(document).ready(function(){ $("#slider").slider({handle: '#myhandle'}); }); </script> </head> <body> <div id="slider"><div id="myhandle"></div></div> </body> </html> It is as if JQuery doesn't pick up that I want to use the myhandle id for the handle. I'm wondering: Do I need a plugin for JQuery to recognise the handle option? (it is not documented in http://docs.jquery.com/UI/Slider). Or perhaps it only worked in an old version of JQuery? Any ideas?

    Read the article

  • Howto rotate image using jquery rotate plugin?

    - by Tom
    How do you rotate an image using jquery (www.jquery.com) rotate plugin (http://code.google.com/p/jquery-rotate/)? I have tried the following and it doesn't seem to work: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>View Photo</title> <script type="text/javascript" src="scripts/jquery.js"></script> <script type="text/javascript" src="scripts/jquery.rotate.1-1.js"></script> <script type="text/javascript"> var angle = 0; setInterval ( function (e) { rotate(); }, 100 ); function rotate() { angle = angle + 1; $('#pic').rotate(angle); } </script> </head> <body> <img border="0" src="player.gif" name="pic" id="pic"> </body> </html> Other methods that are supported by most browsers are wanted too, thanks!

    Read the article

  • Sonar maven integration

    - by Tom
    I have followed the directions to integrate Sonar with Maven (http://docs.codehaus.org/display/SONAR/Install+Sonar) - altered settings.xml to include sonar repository at http: //localhost:9000/deploy/maven and I have verified I am able to see the readme.txt file at http: //localhost:9000/deploy/maven/README.txt, but when running sonar:sonar I keep getting the following message: [INFO] [sonar:sonar] [INFO] Sonar host: http: //localhost:9000 [INFO] Sonar version: 1.7 Downloading: http: //localhost:9000/deploy/maven/org/codehaus/sonar/runtime/sonar -core-maven-plugin/20090803213910/sonar-core-maven-plugin-20090803213910.pom Downloading: http: //:8081/nexus/content/groups/public/org/codehaus/ sonar/runtime/sonar-core-maven-plugin/20090803213910/sonar-core-maven-plugin-200 90803213910.pom [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar Embedded error: Unable to build project for plugin 'org.codehaus.sonar.runtime:s onar-core-maven-plugin': POM 'org.codehaus.sonar.runtime:sonar-core-maven-plugin ' not found in repository: Unable to download the artifact from any repository org.codehaus.sonar.runtime:sonar-core-maven-plugin:pom:20090803213910 from the specified remote repositories: sonar (http: //localhost:9000/deploy/maven), nexus (http: //:8081/nexus/content/groups/public), for project org.codehaus.sonar.runtime:sonar-core-maven-plugin [INFO] ------------------------------------------------------------------------ Any idea what I am missing?

    Read the article

  • MEF Property Export with PartCreationPolicy

    - by Daniel Skinner
    When I try to do this: [Export(typeof(IMyService))] [PartCreationPolicy(CreationPolicy.Shared)] private MyService Service { get { var service = new MyService(); service.Configure(); return service; } } I get a compile error: Attribute 'PartCreationPolicy' is not valid on this declaration type. It is only valid on 'class' declarations. Is this a bug? I don't see why MEF would allow property exports but not allow one to specify the part lifetime. Using VS2010 RC.

    Read the article

  • "Does not make sense to draw an image" - Warning after upgrade to MountainLion

    - by Tom
    After I upgraded my programming machine to MountainLion and XCode to the new version I get this warning printed into the console everytime I run my application: It does not make sense to draw an image when [NSGraphicsContext currentContext] is nil. This is a programming error. Break on void _NSWarnForDrawingImageWithNoCurrentContext() to debug. This will be logged only once. This may break in the future. I'm not using an Image anywhere in my Application and I searched the whole project for an image but couldn't find one. Does anybody know what could cause this? I'm using 2 nib files btw: One Popover and the Mainwindow. Neither of them contains an image. Edit: I found the line when this appears: [self.popover showRelativeToRect:[appDelegate.menulet frame] ofView:appDelegate.menulet preferredEdge:NSMinYEdge]; But none of those object is nil. Any suggestions? Edit 2: The Menulet is a NSView subclass btw. So I'm passing a view.

    Read the article

  • setup for prawn, prawnto on heroku

    - by daniel
    I'm trying to use prawn, prawnto for generating pdfs in a rails application hosted on heroku. But I'm struggling on the setup. Is it possible to use prawn, prawnto on heroku? Is there a guide explaining what I should do? Thanks

    Read the article

  • WPF Custom TextBox ContextMenuOpening Problem

    - by Tom Allen
    I've got an issue with a custom control that I've written not firing it's ContextMenuOpening event when I hook it up programatically. The control is basically a wrapper for the standard TextBox: public class MyTextBox : TextBox { public MyTextBox() { this.ContextMenuOpening += new ContextMenuEventHandler(MyTextBox_ContextMenuOpening); } void MyTextBox_ContextMenuOpening(object sender, ContextMenuEventArgs e) { MessageBox.Show("ContextMenuOpening event fired"); } } There's nothing suspect either about the XAML: <local:MyTextBox Height="25" Width="300"/> For some reason though, I can never get the event to fire. I'm trying to intercept the context menu so I can alter it (it's context sensitive) and really am trying to avoid having to hook up the event everywhere the control is used - surely this is possible?

    Read the article

  • Android - phone number contact format

    - by Daniel Benedykt
    Hi In Android I can get phone numbers of all the contacts without any problem. Tha problem is that for most users some numbers are stored as 'local' numbers, meaning that they dont have the country code included. For example, if the user lives in US and he has 2 contacts: 1) John - 555-123-1234 (local) (starting 1 not showing) 2) Jane - 44-123456787 (england phone number) The question is: How do I get all the numbers in an international format, when some of the numbers doesnt include the country code? Any way to figure that out? Thanks

    Read the article

  • Add shadow to UIImage drawn in rounded path

    - by Tom Irving
    I'm drawing a rounded image in a UITableView cell like so: CGRect imageRect = CGRectMake(8, 8, 40, 40); CGFloat radius = 3; CGFloat minx = CGRectGetMinX(imageRect); CGFloat midx = CGRectGetMidX(imageRect); CGFloat maxx = CGRectGetMaxX(imageRect); CGFloat miny = CGRectGetMinY(imageRect); CGFloat midy = CGRectGetMidY(imageRect); CGFloat maxy = CGRectGetMaxY(imageRect); CGContextMoveToPoint(context, minx, midy); CGContextAddArcToPoint(context, minx, miny, midx, miny, radius); CGContextAddArcToPoint(context, maxx, miny, maxx, midy, radius); CGContextAddArcToPoint(context, maxx, maxy, midx, maxy, radius); CGContextAddArcToPoint(context, minx, maxy, minx, midy, radius); CGContextClosePath(context); CGContextClip(context); [self.theImage drawInRect:imageRect]; This looks great, but I'd like to add a shadow to it for added effect. I've tried using something along the lines of: CGContextSetShadowWithColor(context, CGSizeMake(2, 2), 2, [[UIColor grayColor] CGColor]); CGContextFillPath(context); But this only works when the image has transparent areas, if the image isn't transparent at all, it won't even draw a shadow around the border. I'm wondering if there is something I'm doing wrong?

    Read the article

  • What tools provide burndown charts to Bugzilla or Mylyn?

    - by Daniel Jomphe
    My team and I need to work on a project whose bugs are filed in Bugzilla, using Mylyn. Do you know of any tool or plug-in that provides scrum-inspired burndown charts to Bugzilla or Mylyn? Hopefully, this tool would be free for commercial usage, but we're not closed to commercial tools. Update: 4 hours of research allowed me to find very few free tools. Looks like bugzilla isn't popular in agile teams! And obviously, it's not the best fit.

    Read the article

  • Creating a 'Custom Designer' Visual Studio 2010 Add-in

    - by Daniel I-S
    A major part of our work is creating and manipulating certain XML files, for which have a custom editor. The editor is starting to get creaky and we are looking at building a replacement. Since VS2010 has recently arrived, ostensibly with an improved add-in architecture (MEF?), I am interested in the possibility of building the editor as a custom editor within Visual Studio. It would have to appear in the same way as the code editor or the Designer - a tab item, of which there can be many open at once, containing the GUI we use to edit the files. It would integrate with VS's Edit menu. It could use the output window to display messages. It would appear the same as any other editor within Visual Studio. Right now, I am looking for examples of add-ins that work in a similar way - ideally with source code - to see whether this model would suit our requirements. I am also looking for any documentation or tutorials relevant to creating a VS2010 add-in, or information about VS2008 add-ins if this is still relevant. Any input is welcome. Thanks!

    Read the article

  • EWS 2010: Public Folder Problem using .NET

    - by Daniel
    I've recently coded a .NET Console app using C#. It's purpose was to read the emails within a specific folder, parse them for specific values and save them to a database. Our email system, at the time I originally coded this, was Exchange 2003. However, I was made aware we would soon be upgrading to Exchange 2010: ergo, I built the code to work in both environments. Following the migration to 2010, however, the app has broken. The app uses the EWS API for 2010 functionality. When it attempts to use the ExchangeService's FindFolders method to find the publicfoldersroot, it throws an exception. Here's the code: ExchangeService service = new ExchangeService(); FindFoldersResults findRootFldrs; service.UseDefaultCredentials = true; service.AutodiscoverUrl("[email protected]", delegate(string x) { return true; }); FolderView fview = new FolderView(100); fview.Traversal = FolderTraversal.Deep; if (findRootFldrsSub == null) { //Set to root to test local folders -- findRootFldrs = service.FindFolders(WellKnownFolderName.PublicFoldersRoot, fview); } The exception: "The mailbox that was requested doesn't support the specified RequestServerVersion" I've attempted: -Setting the exchangeservice to 2007 (throws an exception: "An internal server error occurred. The operation failed.") -Giving myself the highest level of permission to the Public Folder (no effect) -Manually setting my credentials (no effect) I can view the public folders in outlook; the publicfoldersroot property is available in the intellisense; the code works on local folders (I can parse my inbox). My current thinking is that it's a setting on the recent setup of Exchange 2010: unfortunately that isn't really my field.

    Read the article

  • Managing database connections in an Android Activity

    - by Daniel Lew
    I have an application with a ListActivity that uses a CursorAdapter as its adapter. The ListActivity opens the database and does the querying for the CursorAdapter, which is all well and good, but I am having issues with figuring out when to close both the Cursor and the SQLiteDatabase. The way things are handled right now, if the user finishes the activity, I close the database and the cursor. However, this still ends up with the DalvikVM warning me that I've left a database open - for example, if the user hits the "home" button (leaving the activity in the task's stack), rather than the "back" button. If I close them during pause and then re-query during resume, then I don't get any errors, but then a user cannot return to the list without it requerying (and thus losing the user's place in the list). By this I mean, the user can click on any item in the list and open a new activity based on it, but will often want to hit "back" afterwards and return to the same place on the list. If I requery, then I cannot return the user back to the correct spot. What is the proper way to handle this issue? I want the list to remain scrolled properly, but I don't want the VM to keep complaining about unclosed databases. Edit: Here's a general outline of how I handle the code at the moment: public class MyListActivity extends ListActivity { private Cursor mCursor; private CursorAdapter mAdapter; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mAdapter = new MyCursorAdapter(this); setListAdapter(mAdapter); } protected void onPause() { super.onPause(); if (isFinishing()) { mCursor.close(); } } protected void onDestroy() { super.onDestroy(); mCursor.close(); } private void updateQuery() { // If we had a cursor open before, close it. if (mCursor != null) { mCursor.close(); } MyDbHelper dbHelper = new MyDbHelper(this); SQLiteDatabase db = dbHelper.getReadableDatabase(); mCursor = db.query(...); mAdapter.changeCursor(mCursor); db.close(); } } updateQuery() can be called multiple times because the user can filter the results via menu items (I left this part out of the code, as the problem still occurs even if the user does no filtering). Again, the issue is that when I hit home I get leak errors. Yet, after going home, I can go back to the app and find my list again - cursor fully intact.

    Read the article

  • WCF contract mismatch problem

    - by Tom
    Hi there, I have a client console app talking to a WCF service and I get the following error: "The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error." I think it's becuase of a contract mismatch but i can't figure out why. The service runs just fine by itself and the 2 parts were working together until i added the impersonation code. Can anyone see what is wrong? Here is the client, all done in code: NetTcpBinding binding = new NetTcpBinding(); binding.Security.Mode = SecurityMode.Message; binding.Security.Message.ClientCredentialType = MessageCredentialType.Windows; EndpointAddress endPoint = new EndpointAddress(new Uri("net.tcp://serverName:9990/TestService1")); ChannelFactory<IService1> channel = new ChannelFactory<IService1>(binding, endPoint); channel.Credentials.Windows.AllowedImpersonationLevel = TokenImpersonationLevel.Impersonation; IService1 service = channel.CreateChannel(); And here is the config file of the WCF service: <configuration> <system.serviceModel> <bindings> <netTcpBinding> <binding name="MyBinding"> <security mode="Message"> <transport clientCredentialType="Windows"/> <message clientCredentialType="Windows" /> </security> </binding> </netTcpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="WCFTest.ConsoleHost2.Service1Behavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> <serviceAuthorization impersonateCallerForAllOperations="true" /> </behavior> </serviceBehaviors> </behaviors> <services> <service behaviorConfiguration="WCFTest.ConsoleHost2.Service1Behavior" name="WCFTest.ConsoleHost2.Service1"> <endpoint address="" binding="wsHttpBinding" contract="WCFTest.ConsoleHost2.IService1"> <identity> <dns value="" /> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> <endpoint binding="netTcpBinding" bindingConfiguration="MyBinding" contract="WCFTest.ConsoleHost2.IService1" /> <host> <baseAddresses> <add baseAddress="http://serverName:9999/TestService1/" /> <add baseAddress="net.tcp://serverName:9990/TestService1/" /> </baseAddresses> </host> </service> </services> </system.serviceModel> </configuration>

    Read the article

  • C# Gui setting control.Enabled to false fires OnClick event???

    - by Daniel
    For some really weird reason when i set the .Enabled property to false on a simple text box on a small GUI, it fires a radio buttons OnClick event and its causing lots of problems. I have breakpointed the txtBox.Enabled = false; and after stepping over OR into it i jump straight to the OnClick event of the radio button control Here is the call stack as that happened: TestGUI.exe!TestGUI.frmMain.radiobuttonClicked(object sender = {Text = "Download Single Episode" Checked = true}, System.EventArgs e = {System.EventArgs}) Line 67 C# System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventArgs e) + 0x70 bytes System.Windows.Forms.dll!System.Windows.Forms.RadioButton.OnClick(System.EventArgs e) + 0x27 bytes System.Windows.Forms.dll!System.Windows.Forms.RadioButton.OnEnter(System.EventArgs e = {System.EventArgs}) + 0x3e bytes System.Windows.Forms.dll!System.Windows.Forms.Control.NotifyEnter() + 0x20 bytes System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.UpdateFocusedControl() + 0x195 bytes System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.AssignActiveControlInternal(System.Windows.Forms.Control value = {Text = "Download Single Episode" Checked = true}) + 0x54 bytes System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.ActivateControlInternal(System.Windows.Forms.Control control, bool originator = false) + 0x76 bytes System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.SetActiveControlInternal(System.Windows.Forms.Control value = {Text = "Download Single Episode" Checked = true}) + 0x73 bytes System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.SetActiveControl(System.Windows.Forms.Control ctl) + 0x33 bytes System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.ActiveControl.set(System.Windows.Forms.Control value) + 0x5 bytes System.Windows.Forms.dll!System.Windows.Forms.Control.Select(bool directed, bool forward) + 0x1b bytes System.Windows.Forms.dll!System.Windows.Forms.Control.SelectNextControl(System.Windows.Forms.Control ctl, bool forward, bool tabStopOnly, bool nested, bool wrap) + 0x7b bytes System.Windows.Forms.dll!System.Windows.Forms.Control.SelectNextControlInternal(System.Windows.Forms.Control ctl, bool forward, bool tabStopOnly, bool nested, bool wrap) + 0x4a bytes System.Windows.Forms.dll!System.Windows.Forms.Control.SelectNextIfFocused() + 0x61 bytes System.Windows.Forms.dll!System.Windows.Forms.Control.Enabled.set(bool value) + 0x42 bytes What the hell? It wouldn't have anything to do with the way i subscribe to the events would it? this.radioBtnMultipleDownload.Click += radiobuttonClicked; this.radioBtnSingleDownload.Click += radiobuttonClicked; this.radioCustomUrl.Click += radiobuttonClicked;

    Read the article

  • iPhone/Obj-C: Accessing a UIScrollView from a View displayed within it.

    - by Daniel I-S
    I'm writing a simple iPhone app which lets a user access a series of calculators. It consists of the following: UITableViewController (RootViewController), with the list of calculators. UIViewController + UIScrollView (UniversalScroller), which represents an empty scroll view - and has a 'displayedViewController' property. UIViewController (Calculators 1-9), each of which contains a view with controls that represents a particular calculator. Each calculator takes 3-5 values via UITextFields and UISliders, and has a 'calculate' button. They can potentially be taller than 460px(iPhone screen height). The idea is: User taps on a particular menu item in the RootViewController. This loads and inits UniversalScroller, ALSO loads and inits the UIViewcontroller for the particular calculator that was selected, sets the displayedViewController property of UniversalScroller to the newly loaded calculator UIViewcontroller, and pushes the UniversalScroller to the front. When the UniversalScroller hits its 'viewDidLoad' event, it sets its contentSize to the view frame size of its 'displayedViewController' object. It then adds the displayedViewController's view as a subview to itself, and sets its own title to equal that of the displayedViewController. It now displays the calculator, along with the correct title, in a scrollable form. Conceptually (and currently; this stuff has all been implemented already), this works great - I can design the calculators how I see fit, as tall as they end up being, and they will automatically be accommodated and displayed in an appropriately configured UIScrollView. However, there is one problem: The main reason I wanted to display things in a UIScrollView was so that, when the on-screen-keyboard appeared, I could shift the view up to focus on the control that is currently being edited. To do this, I need access to the UniversalScroller object that is holding the current calculator's view. On the beganEditing: event of each control, I intended to use the [UniversalScroller.view scrollRectToVisible: animated:] method to move focus to the correct control. However, I am having trouble accessing the UniversalScroller. I tried assigning a reference to it as a property of each calculator UIViewController, but did't seem to have much luck. I've read about using Delegates but have had trouble working out exactly how they work. I'm looking for one of three things: Some explanation of how I can access the methods of a UIScrollView from a UIViewController whose view is contained within it. or Confirmation of my suspicions that making users scroll on a data entry form is bad, and I should just abandon scrollviews altogether and move the view up and down to the relevant position when the keyboard appears, then back when it disappears. or Some pointers on how I could go about redesigning the calculators (which are basically simple data entry forms using labels, sliders and textfields) to be contained within UITableViewCells (presumably in a UITableView, which I understand is a scrollview deep down) - I read a post on SO saying that that's a more pleasing way to make a data entry form, but I couldn't find any examples of that online. Screenshots would be nice. Anything to make my app more usable and naturally 'iPhone-like', since shuffling labels and textboxes around makes me feel like I am building a winforms app! I've only recently started with this platform and language, and despite being largely an Apple skeptic I definitely see the beauty in the way that it works. Help me solve this problem and I might fall in love completely. Dan

    Read the article

  • Generate Visual Studio Project Templates with CruiseControl.Net or MSBuild

    - by Daniel A. White
    Hey all. I have a working workflow in CruiseControl.Net that successfully builds and tests an MSBuild project that is calling my Visual Studio 2010 solution. How do I create Visual Studio project templates in either CruiseControl.Net or with MSBuild? The build server does not have Visual Studio 2010 installed. Thanks for your time! Note: This can be extended to any other solution that could be scripted with a batch as well, but I cannot install Visual Studio 2010 on the machine.

    Read the article

  • HTTP Content-Type in ASP.Net SoapHttpClientProtocol

    - by Daniel Fone
    Hi there, I have a problem with a Web Service Consumer written in ASP.NET. The error message is: System.InvalidOperationException: Client found response content type of 'application/xml; charset=utf-8', but expected 'text/xml'. The client is based on System.Web.Services.Protocols.SoapHttpClientProtocol. We can't change the Content-Type given by the provider, this has to be 'application/xml; charset=utf-8'. Is there any way to change what Content-Type the SoapHttpClientProtocol expects? Unfortunately, we are probably limited to .NET 1.1. Thanks! Update: We found a way to change the Content-Type sent by the provider, and this solved the problem. I'd still be curious to know how to change the expectations of the consumer though.

    Read the article

  • Setting a WebControls TabIndex based on the ControlId of another control

    - by Daniel Ballinger
    I have an ASP.NET Webforms site that is regularly having features added. The majority of time a new WebControl is added to the page and I need to increment the TabIndex to all subsequent controls on the page. I'd prefer a more robust solution than choosing an arbitrary gap between the initial assigned tab indexes. Setting the tab indexes using the designer tab order functionality is one option but I'd prefer to stay in the source view. Ideally, if I had three check boxes I'd like to be able to define the tabindex based off the previous controls tabindex. Then I'd only need to insert the new control and change one existing control. <asp:CheckBox ID="checkBoxA" runat="server" TabIndex="0"/> <asp:CheckBox ID="checkBoxB" runat="server" TabIndexAfterControlId="checkBoxA"/> <asp:CheckBox ID="checkBoxC" runat="server" TabIndexAfterControlId="checkBoxB"/> My first thought was to extend System.Web.UI.WebControls.WebControl with a new property, but extension properties aren't supported.

    Read the article

  • How can I load style resources from a dynamically loaded Silverlight application (XAP)?

    - by Tom
    I've followed Tim Heuer's video for dynamically loading other XAP's (into a 'master' Silverlight application), as well as some other links to tweak the loading of resources and am stuck on the particular issue of loading style resources from within the dynamically loaded XAP (i.e. the contents of Assets\Styles.xaml). When I run the master/hosting applcation, it successfully streams the dynamic XAP and I can read the deployment info etc. and load the assembly parts. However, when I actuall try to create an instance of a form from the Dynamic XAP, it fails with Cannot find a Resource with the Name/Key LayoutRootGridStyle which is in it's Assets\Styles.xaml file (it works if I run it directly so I know it's OK). For some reason these don't show up as application resources - not sure if I've totally got the wrong end of the stick, or am just missing something? Code snippet below (apologies it's a bit messy - just trying to get it working first) ... '' # Here's the code that reads the dynamic XAP from the web server ... '' #... wCli = New WebClient AddHandler wCli.OpenReadCompleted, AddressOf OpenXAPCompleted wCli.OpenReadAsync(New Uri("MyTest.xap", UriKind.Relative)) '' #... '' #Here's the sub that's called when openread is completed '' #... Private Sub OpenXAPCompleted(ByVal sender As Object, ByVal e As System.Net.OpenReadCompletedEventArgs) Dim sManifest As String = New StreamReader(Application.GetResourceStream(New StreamResourceInfo(e.Result, Nothing), New Uri("AppManifest.xaml", UriKind.Relative)).Stream).ReadToEnd Dim deploymentRoot As XElement = XDocument.Parse(sManifest).Root Dim deploymentParts As List(Of XElement) = _ (From assemblyParts In deploymentRoot.Elements().Elements() Select assemblyParts).ToList() Dim oAssembly As Assembly = Nothing For Each xElement As XElement In deploymentParts Dim asmPart As AssemblyPart = New AssemblyPart() Dim source As String = xElement.Attribute("Source").Value Dim sInfo As StreamResourceInfo = Application.GetResourceStream(New StreamResourceInfo(e.Result, "application/binary"), New Uri(source, UriKind.Relative)) If source = "MyTest.dll" Then oAssembly = asmPart.Load(sInfo.Stream) Else asmPart.Load(sInfo.Stream) End If Next Dim t As Type() = oAssembly.GetTypes() Dim AppClass = (From parts In t Where parts.FullName.EndsWith(".App") Select parts).SingleOrDefault() Dim mykeys As Array If Not AppClass Is Nothing Then Dim a As Application = DirectCast(oAssembly.CreateInstance(AppClass.FullName), Application) For Each strKey As String In a.Resources.Keys If Not Application.Current.Resources.Contains(strKey) Then Application.Current.Resources.Add(strKey, a.Resources(strKey)) End If Next End If Dim objectType As Type = oAssembly.GetType("MyTest.MainPage") Dim ouiel = Activator.CreateInstance(objectType) Dim myData As UIElement = DirectCast(ouiel, UIElement) Me.splMain.Children.Add(myData) Me.splMain.UpdateLayout() End Sub '' #... '' # And here's the line that fails with "Cannot find a Resource with the Name/Key LayoutRootGridStyle" '' # ... System.Windows.Application.LoadComponent(Me, New System.Uri("/MyTest;component/MainPage.xaml", System.UriKind.Relative)) '' #... any thoughts?

    Read the article

  • SSRS 2008 - How to hide the plus icon in a group visibility toggle cell

    - by Daniel Coffman
    I have a report that shows or hides columns in a group based on a header cell. SSRS makes this pretty easy and is kind enough to place a little plus/minus icon in the toggling cell. I want to HIDE this plus/minus icon when there is only one column of data in the subgroup, because it shows that one column by default so expanding the group doesn't do anything. This really only applies to one specific group, because all the others always have more than one column of data, so a way to hide only the icon for a specific group would be fine. JavaScript won't work (I don't think) because the client ID of the plus/minus image is generated by the report and changes with each generation. see this image for more clarity: http://imgur.com/vqaQA.png

    Read the article

  • How do I stop XElement.Save from escaping characters?

    - by Daniel I-S
    I'm populating an XElement with information and writing it to an xml file using the XElement.Save(path) method. At some point, certain characters in the resulting file are being escaped - for example, > becomes &gt;. This behaviour is unacceptable, since I need to store information in the XML that includes the > character as part of a password. How can I write the 'raw' content of my XElement object to XML without having these escaped?

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >