Search Results

Search found 954 results on 39 pages for 'jakob simon gaarde'.

Page 12/39 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • debugging loadwith has subnodes in domainservice, but not when called in viewmodel

    - by Jakob
    Hi, I'm trying to use the .LoadWith method I have these lines of code in my domainservice: public IEnumerable<Subject> GetSubjectList(Guid userid) { DataLoadOptions loadopts = new DataLoadOptions(); loadopts.LoadWith<Subject>(s => s.Notes); this.DataContext.LoadOptions = loadopts; return this.DataContext.Subjects; } I can see debugging that a list of subjects get loaded, and that the Subjects.Notes property which is a List is also populated with subitems, but when I do ctx.Load(ctx.GetSubjectListQuery(WebContext.Current.User.UserId), lo => { serverdata = ctx.Subjects; }, null); I only get a flat list of subjects loaded into serverdata, and no note subitems are loaded to subject.notes

    Read the article

  • Save downloaded content when in app purchase is complete

    - by jakob
    Hello experts! I have created an app which allows users to buy non-consumable content. The retrieving-ids-payment-process works like a charm. What i can't really figure out is how my content should be saved into the phone. The existing structure is that I have all my current content in Resources/packages/. For every package there is an matching entry in a package.plist. When the purchase is complete it is time to download the content from the server. What i retrieve from the server is a zip file with the new package that I have bought. My observer will call a method named provideContent: -(void) provideContent: (NSString*) productIdentifier { In here I will call my server and download the package } What i need from you guys is some sort of step by step walkthrough or tutorial of how, when the zip is retrieved(is zip allowed?), unpack this zip and add it to my current package structure. Thank you in advance

    Read the article

  • First time unit testing (in silverlight)

    - by Jakob
    Hi I've searched some other posts, but most of them assumed that people knew what they were doing in their unit testing, and frankly I don't. I see the idea behind unit testing, and I'm coding an silverlight application much in the blind right now, and I'd like to write some unit tests to kind of be sure I'm on the right path. I'd like to be able to use the SL4 vs 2010 silverlight unit test project template, to keep it simple and not use external tools. So what I need an answer for are questions like: what are the methods of unit testing? what are the differences between unit tests, and automated unit tests? How do I meaningfully unit test in silverlight? What should I be aware of while unit testing (in silverlight) ? Also should I implement some kind of IRepository pattern in my silverlight app to make unit testing easier?

    Read the article

  • Please critique this method

    - by Jakob
    Hi I've been looking around the net for some tab button close functionality, but all those solutions had some complicated eventhandler, and i wanted to try and keep it simple, but I might have broken good code ethics doing so, so please review this method and tell me what is wrong. public void AddCloseItem(string header, object content){ //Create tabitem with header and content StackPanel headerPanel = new StackPanel() { Orientation = Orientation.Horizontal, Height = 14}; headerPanel.Children.Add(new TextBlock() { Text = header }); Button closeBtn = new Button() { Content = new Image() { Source = new BitmapImage(new Uri("images/cross.png", UriKind.Relative)) }, Margin = new Thickness() { Left = 10 } }; headerPanel.Children.Add(closeBtn); TabItem newTabItem = new TabItem() { Header = headerPanel, Content = content }; //Add close button functionality closeBtn.Tag = newTabItem; closeBtn.Click += new RoutedEventHandler(closeBtn_Click); //Add item to list this.Add(newTabItem); } void closeBtn_Click(object sender, RoutedEventArgs e) { this.Remove((TabItem)((Button)sender).Tag); } So what I'm doing is storing the tabitem in the btn.Tag property, and then when the button is clicked i just remove the tabitem from my observablecollection, and the UI is updated appropriately. Am I using too much memory saving the tabitem to the Tag property?

    Read the article

  • datagrid doesn't refresh on changed data

    - by Jakob
    Hi. I have 2 datagrids with data that binds at loadtime in xaml. Then I have a button that inserts a row in the database, but rows aren't added to the datagrids when I press the button. I would like a fix that doesn't just add a gridrow, but actually refreshes the data and fetches the new row from the db. I'm using riaservices, so if that opens up to any tools that can help me, please let me know? thx in advance :D

    Read the article

  • Hook into Application_Start in a HttpModule

    - by Jakob Gade
    I’m implementing a simple HttpModule, where I want some code to run when the web application is started. But I’m surprised to find that the Application_Start event I would normally use from Global.asax is not available from a HttpModule. Is that correct, or am I missing something here? How do I hook into the Application_Start event from an HttpModule?

    Read the article

  • JAX-WS: when input soap validation fails

    - by Jakob
    I have created a web service with JAX-WS. When the input SOAP message is not well formed or can not be validated, a soap fault is returned automatically to the caller. I dont want the caller to receive this standard SOAP message but i want to create an own custom SOAP fault. So if the call looks like this (note Envelope1, its not valid): hello a default return message is something like this: S:Client Couldn't create SOAP message due to exception: unexpected XML tag. expected: {http://schemas.xmlsoap.org/soap/envelope/}Envelope but found: {http://schemas.xmlsoap.org/soap/envelope/}Envelope1 I want the return message to be something like this: S:Client My own custom SOAP message! I have tried to get this to work the whole day, but i cant figure out how to do it. So if someone could help me I would be really glad!

    Read the article

  • Switching textstorage of NSTextViews back and forth

    - by Jakob Dam Jensen
    I'm trying to make a feature in a product which gives the user the ability to split a textview into two. The way this is done is by removing the textview from it's superview, making a NSSplitView and adding the textview as well as a new NSTextView instance to this splitview. Lastly I make these two textviews share the same textstorage in order to make them share the same content. It works great. But the problem is when I want to make one of the two textviews change textstorage. The replaceTextStorage method in NSLayoutManager causes both NSTextView to change textStorage. The API documentation states: replaceTextStorage: All NSLayoutManager objects sharing the original NSTextStorage object then share the new one. This method makes all the adjustments necessary to keep these relationships intact, unlike setTextStorage:. So it makes sense that it would do this. But the question is how do I make it possible to have two (or more) textviews first share the same storage and after that having them using their own? I've tried replacing the layoutManager and even making new instances of NSTextViews but no luck... Any suggestions?

    Read the article

  • silverlight treeview not loading subitems

    - by Jakob
    I'm interested in finding out why this isn't working: I have a treeview with some hierarchicaldatatemplates looking like this: <UserControl.Resources> <sdk:HierarchicalDataTemplate x:Key="nodeEntry"> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Path=Title}" /> </StackPanel> </sdk:HierarchicalDataTemplate> <sdk:HierarchicalDataTemplate x:Key="rootEntry" ItemsSource="{Binding Path=Nodes}" ItemTemplate="{StaticResource nodeEntry}"> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Path=Name}" /> </StackPanel> </sdk:HierarchicalDataTemplate> </UserControl.Resources> <sdk:TreeView Height="250" HorizontalAlignment="Left" ItemTemplate="{StaticResource rootEntry}" ItemsSource="{Binding ElementName=subjectDomainDataSource, Path=Data}" Name="rootTreeView" VerticalAlignment="Top" Width="180"/> The data is passed to the treeview from a domainservice using this method: public IEnumerable<Subject> GetSubjectList(Guid userid) { DataLoadOptions loadopts = new DataLoadOptions(); loadopts.LoadWith<Root>(s => s.Nodes); this.DataContext.LoadOptions = loadopts; return this.DataContext.Roots; } why then are only the root nodes shown in the treeview as if it only loaded a flat list, and not a hierarchy where the root Loads the NodesCollection?

    Read the article

  • What's the topmost iframe in the same domain?

    - by Jakob Stoeck
    How can I get the topmost iframe which is in the same domain, i.e. iframe level 1 example.org iframe level 2 example.org iframe level 2 example.org iframe level 3 example.org <-- would give me iframe level 1 iframe level 1 other-example.org iframe level 2 example.org iframe level 2 example.org iframe level 3 example.org <-- would give me iframe level 2 iframe level 1 other-example.org iframe level 2 example.org iframe level 2 example.org <-- would give me iframe level 2 (this) I need it because I have a website which should work in an iframe of another domain and stand-alone. In this website there are scripts which depend on window.top which shouldn't be top but the topmost iframe in the same domain.

    Read the article

  • IL emit - operation could destabilize runtime when storing then loading

    - by Jakob Botsch Nielsen
    Hey, so I have the following IL: il.Emit(OpCodes.Ldarg_0); il.Emit(OpCodes.Ret); Which works fine. It basically returns the argument given. This, however: il.Emit(OpCodes.Ldarg_0); il.Emit(OpCodes.Stloc_0); il.Emit(OpCodes.Ldloc_0); il.Emit(OpCodes.Ret); Does not work. It crashes with the exception "Operation could destabilize the runtime.". Now, I know that the purpose of that is useless but I'm trying to reach my goal by small steps. Why does that not work?

    Read the article

  • Why should I use MVVM when it breaks built in functionality

    - by Jakob
    I'm struggling to grasp why MVVM is really a good pattern to implement in riaserivces, To me there's nothing but trouble to it, it just add's another tier that I have to code. I Get that I could change the UI, but really I don't need to. Instead i won't be able to user out of the box functionality with riaservices, datagrid, dataform all controls require some implementation. Why can't it just be simple? Is there really no way to get MVVM to automatically set "IsBusy" and all the dataform edit functionality. It's like reinventing the wheel to me, and it seems that I'd be able to write code much faster just using riaservices

    Read the article

  • How to bind to current riacontext user in xaml

    - by Jakob
    Hi. I Have a datacontext that has a "getuserbyguid" method, i want to pass in the current logged in user.userid as a parameter, but I don't know how to bind to the current logged in user through xaml. I've tried {Binding Path=User.UserId} but without any luck. I'm using the built in riaservices authentication methods, so the userinfo should be exposed in the riacontext, or am I wrong about this? I have this for instance <riaControls:DomainDataSource x:Name="FollowingGridData" AutoLoad="True" QueryName="GetUsersFollowedByIDQuery" LoadSize="20"> <riaControls:DomainDataSource.DomainContext> <my:NotesDomainContext /> </riaControls:DomainDataSource.DomainContext> <riaControls:DomainDataSource.QueryParameters> <riaControls:Parameter ParameterName="userguid" Value="{Binding Path=User.UserId}" /> </riaControls:DomainDataSource.QueryParameters> </riaControls:DomainDataSource> But it gives me an error saying that it's not a guid, meaning that it must not be binding correctly

    Read the article

  • Calling private constructors with Reflection.Emit?

    - by Jakob Botsch Nielsen
    I'm trying to emit the following IL: LocalBuilder pointer = il.DeclareLocal(typeof(IntPtr)); il.Emit(OpCodes.Ldarg_0); il.Emit(OpCodes.Stloc, pointer); il.Emit(OpCodes.Ldloca, pointer); il.Emit(OpCodes.Call, typeof(IntPtr).GetMethod("ToPointer")); il.Emit(OpCodes.Ret); The delegate I bind with has the signature void* TestDelegate(IntPtr ptr) It throws the exception Operation could destabilize the runtime. Anyone knows what's wrong? EDIT: Alright, so I got the IL working now. The entire goal of this was to be able to call a private constructor. The private constructor takes a pointer so I can't use normal reflection. Now.. When I call it, I get an exception saying Attempt by method <built method> to access method <private constructor> failed. Apparently it's performing security checks - but from experience I know that Reflection is able to do private stuff like this normally, so hopefully there is a way to disable that check?

    Read the article

  • Add image silverlight hovereffect from codebehind

    - by Jakob
    Hi I have a stackpanel that has a dynamic amount of images that are added programatically, Is there a way I can set a hover/click effect programatically on these images. I would like for the image to "glow" when clicked. How do i do that in silverlight? I've noticed the Image.Effect property, but I'm not really sure how to use it.

    Read the article

  • Mouse management in JavaScript games

    - by Jakob
    Im using JavaScript, the HTML5 canvas-element and WebGL to make a simple 3D-game in first person view for fun. Ideally, I would like to control my movement by using the keyboard to move and the mouse to look around, like you usually do in FPS-games. As you probably understand, there are some limits to this in the browser, since the mouse cant be captured: When using the onmousemove event, no further movement will be detected when the mouse pointer reaches the border of my screen (which means that I wont be able to run in a circle for example) Seeing the mouse move across the screen is not the end of the world, but it is a little annoying From what I know, it's impossible to hide the mouse as well as setting it's position in JavaScript. Hence, my question is this: If we cant to those things, what can we do in order to get close to the desktop gaming experience when it comes to the mouse in the browser? And I mean right now, using current APIs. Not "what could be changed in some standard to make life easier". Also, I realize that I could use the keyboard to look around, but then we're back in 1995 when Quake were actually played like that. And of course I know that it would be easier to write a desktop application or use Flash at least, but Im trying to push JavaScript's limits here. Apart from those things, what are your suggestions? Any kind of reference, existing game, crazy idea, hack or even browser specific solution would be appreciated.

    Read the article

  • How can I implement a splay tree that performs the zig operation last, not first?

    - by Jakob
    For my Algorithms & Data Structures class, I've been tasked with implementing a splay tree in Haskell. My algorithm for the splay operation is as follows: If the node to be splayed is the root, the unaltered tree is returned. If the node to be splayed is one level from the root, a zig operation is performed and the resulting tree is returned. If the node to be splayed is two or more levels from the root, a zig-zig or zig-zag operation is performed on the result of splaying the subtree starting at that node, and the resulting tree is returned. This is valid according to my teacher. However, the Wikipedia description of a splay tree says the zig step "will be done only as the last step in a splay operation" whereas in my algorithm it is the first step in a splay operation. I want to implement a splay tree that performs the zig operation last instead of first, but I'm not sure how it would best be done. It seems to me that such an algorithm would become more complex, seeing as how one needs to find the node to be splayed before it can be determined whether a zig operation should be performed or not. How can I implement this in Haskell (or some other functional language)?

    Read the article

  • Dependencyproperty doesn't have value on load

    - by Jakob
    My problem is this, I have a UC called profile that contains another UC called FollowImageControl. In my Profile.xaml i declaretively bind a property of FollowImageControl called FollowerId to a CurrentUserId from Profile.xaml.cs. Problem is that I CurrentUserId is assigned in Profile.xaml.cs; the Profile.xaml code-behind. This means that I do not initially get the FollowerId. I have these methods in the FollowImageControl.xaml.cs: public static readonly DependencyProperty _followUserId = DependencyProperty.Register("FollowUserId", typeof(Guid), typeof(FollowImageControl), null); public Guid FollowUserId { get { return (Guid)GetValue(_followUserId); } set { SetValue(_followUserId, value); } } public FollowImageControl() { // Required to initialize variables InitializeComponent(); LoggedInUserId = WebContext.Current.User.UserId; var ctx = new NotesDomainContext(); if (ctx.IsFollowingUser(LoggedInUserId, FollowUserId).Value) SwitchToDelete.Begin(); } private void AddImg_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (LoggedInUserId != FollowUserId) { var ctx = new NotesDomainContext(); ctx.FollowUser(FollowUserId, LoggedInUserId); ctx.SubmitChanges(); } } THE WEIRD THING IS that when i insert breakpoints the FollowerUserId in FollowImageControl() is 0, but it has a value in AddImg_MouseLeftButtonDown, and there is no inbetween logic that sets the value of it. How is this??? Here's a little more code info: This is my binding from profile.xaml <internalCtrl:FollowImageControl FollowUserId="{Binding ElementName=ProfileCtrl, Path=CurrentUserId}" /> this is my constructor in profile.xaml.cs wherein the CurrentUserId is set public static readonly DependencyProperty _CurrentUserId = DependencyProperty.Register("CurrentUserId", typeof(Guid), typeof(Profile), null); public Guid CurrentUserId { get { return (Guid)GetValue(_CurrentUserId); } set { SetValue(_CurrentUserId, value); } } public Profile(Guid UserId) { CurrentUserId = UserId; InitializeComponent(); Loaded += new RoutedEventHandler(Profile_Loaded); } I'm seriously dumbfound that one minute the FollowerId has no value, and the next it holds the right, without me having changed the value in the code-behind.

    Read the article

  • make user attend event through sdk

    - by Jakob Dam Jensen
    I was wondering if it's possible to make a user attend an event through the sdk (probably fql). I've been looking at the wiki for FQL info as well as the graph api. But both look like they only support fetching info and not changing... Any suggestions? I would like to build this feature into an application....

    Read the article

  • Having onFocus do several things.

    - by Jakob
    So I have this input tag <input ... onFocus=...> and what I want is for a warning popup to come up if somebody clicks to write in the input field. After the person has read the warning he/she closes the popup and can continue to write in the field. I have managed to implement the popup just fine but my problem is that I lose focus on the input field when the popup comes up so the next time I click the field the popup comes back again and im back on square one. The system I work on uses php and javascript so and I cannot use anything other than that to solve the problem and my experience with both php and javascript is limited.

    Read the article

  • find users that are following other users

    - by Jakob
    Hi I'm wondering how I can go about this problem I have a DB with a Users Table, and a Followers table. The Followers table contains 2 Columns "FollowerID" and "FollowedID" I have a 1 - * relation in my datamodel between Users.ID -> Followers.FollowerID and Users.ID -> FollowedID How do I in LINQ get a set of users that are following a specific user? I'll express what I'm trying to achieve programatically I can get this far: ctx.Followers.Where(f => f.FollowedID == CurrentUser.ID) so now i have a Followers set where I have the ID of the users that follow the CurrentUser, and I could iterate through this collection and then add users after each iteration to a collection that would be a total USER collection that followed CurrentUser, but isn't there a smarter, or LINQ'er way to do this? Much appreciated Thx

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >