archive-be.com » BE » B » BENNYMICHIELSEN.BE

Total: 348

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Cocoa Programming for Mac OS X (Ch 19-21) – Benny Michielsen
    AppKit framework Chapter 21 Pasteboards and Nil Targeted actions The clipboard in Windows pasteboard in OS X Different name same concept although I ve never read about it in any Net book I ve seen but you know what it does What you need to remember from this chapter is that you can do a lazy paste Meaning that you don t have to put it in the clip errr pasteboard when the user presses the copy command You can wait until he presses paste very valuable if you re working with large quantities of data Nil targeted actions are best explained with an example You can set the selector method signature for net people of a menu item to anything you want say removeEmployee when the menu item s target is nil and the menu item is invoked it will traverse the responder tree until someone acts upon it Nothing fancy was covered in these past chapters but you need to know about these things I did spend quite some time on the applications probably because there was a two week pause For those interested I ve attached all the source code As always you can get the book here TypingTutor Chapter 19 zip 46 44 kb TypingTutor Chapter 20 zip 53 47 kb TypingTutor Chapter 20 Challenge 1 zip 53 73 kb TypingTutor Chapter 20 Challenge 2 zip 57 89 kb TypingTutor Chapter 21 zip 53 58 kb TypingTutor Chapter 21 Challenge 1 zip 53 75 kb RaiseMan Chapter 21 Challenge 2 zip 111 20 kb Author BennyM Posted on 13 07 2008 Categories Software Development Tags book c cocoa development objective c programming Leave a Reply Cancel reply Your email address will not be published Required fields are marked Comment Name Email Website Post navigation Previous Previous

    Original URL path: http://blog.bennymichielsen.be/2008/07/13/cocoa-programming-for-mac-os-x-ch-19-21/ (2016-04-29)
    Open archived version from archive


  • c – Benny Michielsen
    13 zip 86 38 kb RaiseMan Chapter 14 zip 87 29 kb RaiseMan Chapter 15 zip 87 67 kb RaiseMan Chapter 16 zip 111 13 kb Author BennyM Posted on 04 06 2008 Categories Software Development Tags book c cocoa development objective c programming 2 Comments on Cocoa Programming for Mac OS X Ch 13 16 Cocoa Programming for Mac OS X Ch 9 12 Read part one here part two here and get the book here The plot thickens Chapter 9 NSUndoManager For those wondering what that NS is doing everywhere it comes from NeXTSTEP more information about it here This chapter is all about adding undo redo capabilities to your application and maybe it s because the current sample application is well a sample but it s rather easy to add this capabilities to your program Also you get it integrated with the menu bar at no extra cost the window shows that there are changes and the undo and redo buttons come to live The underlying mechanism relies heavy upon Key Value coding which was discussed in chapter 7 again demonstrating it power void insertObject Person p inEmployeesAtIndex int index NSLog adding to p employees NSUndoManager undo self undoManager undo prepareWithInvocationTarget self removeObjectFromEmployeesAtIndex index if undo isUndoing undo setActionName Insert Person self startObservingPerson p employees insertObject p atIndex index Chapter 10 Archiving The sample application now tracks changes and when you try to close an edited window it asks if it should save its changes So the logical next chapter is about adding this capability In this chapter we learn that the notion of an interface in Net actually also exists in Objective C but it s called a protocol and unlike Net and Java you can have optional methods in a protocol so any method marked optional does not need to be implemented Archiving is coupled with the NSCoding protocol and the abstract NSCoder class most of the time you ll be dealing with the abstracted class which hides the underlying mechanism Implementing this can be compared to the implementation in Net Though it requires less code to write since your object graph is stored automatically in a file You can configure the extension and the icon from within XCode it was also nice to see that OS X had automatically associated the extension with my application import Foundation Foundation h interface Person NSObject NSCoding NSString personName float expectedRaise property readwrite copy NSString personName property readwrite float expectedRaise end import Person h implementation Person id init super init expectedRaise 5 0 personName New Person return self void dealloc personName release super dealloc synthesize personName synthesize expectedRaise void setNilValueForKey NSString key if key isEqual expectedRaise self setExpectedRaise 0 0 else super setNilValueForKey key void encodeWithCoder NSCoder coder coder encodeObject personName forKey personName coder encodeFloat expectedRaise forKey expectedRaise id initWithCoder NSCoder coder super init personName coder decodeObjectForKey personName retain expectedRaise coder decodeFloatForKey expectedRaise return self end Chapter 11 Basic Core Data You thought it was good well it just gets better All the code we still had to write to add undo redo change tracking and archiving to our application can be done without writing any line as illustrated with this chapter Again we see the power of Key Value coding Chapter 12 Nib Files and NSWindowController Nib files contain the state of the window designed with interface builder this chapter tells you how you can postpone loading a window panel to save memory and resources It also how you can load classes this includes Windows custom classes etc by their name Much like the Activator in Net IBAction showAboutPanel id sender BOOL successful NSBundle loadNibNamed About owner self if successful NSLog Loaded nib from NSBundle else NSLog Unable to load nib RaiseMan Chapter 9 zip 72 21 kb RaiseMan Chapter 10 zip 74 18 kb CarLot Chapter 11 zip 43 54 kb RaiseMan Chapter 12 zip 85 23 kb Author BennyM Posted on 02 06 2008 Categories Software Development Tags book c cocoa development objective c programming Leave a comment on Cocoa Programming for Mac OS X Ch 9 12 Cocoa Programming for Mac OS X Ch 6 8 View Chapters 1 5 here get the book here The title of chapter 6 Helper Objects did not sound good Whenever I find classes with the words Helper or Util in their name this usually indicates a code smell and most of time the underlying problem is a leaky domain model Turns out something completely different is the subject of this chapter delegates They can be compared with delegates in Net though they are being used in a different way I ll illustrate with a sample The TableView UI component deals with displaying data like a table compare this with the Net grid What it displays however is not part of his responsibility this behaviour can be added though by using delegates The tableView has a delegate member which you can set if that object implements methods which map to delegate methods of the tableView they will be called otherwise they won t This means that you don t need to implement everything just what you need I think in Net this behaviour would be implemented by using interfaces So if you had your own grid component it s datasource could be set to something of type IDatasource which would provide the necessary functionality that would be called by the grid component Overall this is off course a powerful feature though implementing it requires attention misspelling the method name means that your method won t be called and you won t get any errors The author states that the best way is to look at the documentation and copy paste the method signatures in your code Chapter 7 Key Value Coding Key Value Observing A short chapter only 12 pages but it seems to be a core concept If you have an instance variable foo in class Bar you can have other objects be notified of changes to

    Original URL path: http://blog.bennymichielsen.be/tag/c/ (2016-04-29)
    Open archived version from archive

  • development – Benny Michielsen
    book I m still staring at the screen sometimes wondering why I got three errors when there s only a missing Oh yeah thanks Lemmy for giving me a tilde over IM I haven t found that key on the keyboard yet p RaiseMan Chapter 13 zip 86 38 kb RaiseMan Chapter 14 zip 87 29 kb RaiseMan Chapter 15 zip 87 67 kb RaiseMan Chapter 16 zip 111 13 kb Author BennyM Posted on 04 06 2008 Categories Software Development Tags book c cocoa development objective c programming 2 Comments on Cocoa Programming for Mac OS X Ch 13 16 Cocoa Programming for Mac OS X Ch 9 12 Read part one here part two here and get the book here The plot thickens Chapter 9 NSUndoManager For those wondering what that NS is doing everywhere it comes from NeXTSTEP more information about it here This chapter is all about adding undo redo capabilities to your application and maybe it s because the current sample application is well a sample but it s rather easy to add this capabilities to your program Also you get it integrated with the menu bar at no extra cost the window shows that there are changes and the undo and redo buttons come to live The underlying mechanism relies heavy upon Key Value coding which was discussed in chapter 7 again demonstrating it power void insertObject Person p inEmployeesAtIndex int index NSLog adding to p employees NSUndoManager undo self undoManager undo prepareWithInvocationTarget self removeObjectFromEmployeesAtIndex index if undo isUndoing undo setActionName Insert Person self startObservingPerson p employees insertObject p atIndex index Chapter 10 Archiving The sample application now tracks changes and when you try to close an edited window it asks if it should save its changes So the logical next chapter is about adding this capability In this chapter we learn that the notion of an interface in Net actually also exists in Objective C but it s called a protocol and unlike Net and Java you can have optional methods in a protocol so any method marked optional does not need to be implemented Archiving is coupled with the NSCoding protocol and the abstract NSCoder class most of the time you ll be dealing with the abstracted class which hides the underlying mechanism Implementing this can be compared to the implementation in Net Though it requires less code to write since your object graph is stored automatically in a file You can configure the extension and the icon from within XCode it was also nice to see that OS X had automatically associated the extension with my application import Foundation Foundation h interface Person NSObject NSCoding NSString personName float expectedRaise property readwrite copy NSString personName property readwrite float expectedRaise end import Person h implementation Person id init super init expectedRaise 5 0 personName New Person return self void dealloc personName release super dealloc synthesize personName synthesize expectedRaise void setNilValueForKey NSString key if key isEqual expectedRaise self setExpectedRaise 0 0 else super setNilValueForKey key void encodeWithCoder NSCoder coder coder encodeObject personName forKey personName coder encodeFloat expectedRaise forKey expectedRaise id initWithCoder NSCoder coder super init personName coder decodeObjectForKey personName retain expectedRaise coder decodeFloatForKey expectedRaise return self end Chapter 11 Basic Core Data You thought it was good well it just gets better All the code we still had to write to add undo redo change tracking and archiving to our application can be done without writing any line as illustrated with this chapter Again we see the power of Key Value coding Chapter 12 Nib Files and NSWindowController Nib files contain the state of the window designed with interface builder this chapter tells you how you can postpone loading a window panel to save memory and resources It also how you can load classes this includes Windows custom classes etc by their name Much like the Activator in Net IBAction showAboutPanel id sender BOOL successful NSBundle loadNibNamed About owner self if successful NSLog Loaded nib from NSBundle else NSLog Unable to load nib RaiseMan Chapter 9 zip 72 21 kb RaiseMan Chapter 10 zip 74 18 kb CarLot Chapter 11 zip 43 54 kb RaiseMan Chapter 12 zip 85 23 kb Author BennyM Posted on 02 06 2008 Categories Software Development Tags book c cocoa development objective c programming Leave a comment on Cocoa Programming for Mac OS X Ch 9 12 Cocoa Programming for Mac OS X Ch 6 8 View Chapters 1 5 here get the book here The title of chapter 6 Helper Objects did not sound good Whenever I find classes with the words Helper or Util in their name this usually indicates a code smell and most of time the underlying problem is a leaky domain model Turns out something completely different is the subject of this chapter delegates They can be compared with delegates in Net though they are being used in a different way I ll illustrate with a sample The TableView UI component deals with displaying data like a table compare this with the Net grid What it displays however is not part of his responsibility this behaviour can be added though by using delegates The tableView has a delegate member which you can set if that object implements methods which map to delegate methods of the tableView they will be called otherwise they won t This means that you don t need to implement everything just what you need I think in Net this behaviour would be implemented by using interfaces So if you had your own grid component it s datasource could be set to something of type IDatasource which would provide the necessary functionality that would be called by the grid component Overall this is off course a powerful feature though implementing it requires attention misspelling the method name means that your method won t be called and you won t get any errors The author states that the best way is to look at the documentation and copy paste the method signatures

    Original URL path: http://blog.bennymichielsen.be/tag/development/ (2016-04-29)
    Open archived version from archive

  • Developing .NET Software on a Mac – Benny Michielsen
    Comment Name Email Website Post navigation Previous Previous post Adding object definitions from non local classes Next Next post Cocoa Programming for Mac OS X Ch 19 21 Search Search for Search Follow me Recent Comments Rick on Partitioning and wildcards in an Azure Data Factory pipeline BennyM on WCF HTTPS And Request Entity Too Large Justin on WCF HTTPS And Request Entity Too Large The Morning Brew Chris Alcock

    Original URL path: http://blog.bennymichielsen.be/2008/07/12/developing-net-software-on-a-mac/ (2016-04-29)
    Open archived version from archive

  • .net – Benny Michielsen
    development mac Leave a comment on Developing NET Software on a Mac Search Search for Search Follow me Recent Comments Rick on Partitioning and wildcards in an Azure Data Factory pipeline BennyM on WCF HTTPS And Request Entity Too Large Justin on WCF HTTPS And Request Entity Too Large The Morning Brew Chris Alcock The Morning Brew 2052 on Getting up and running with Mono and Raspberry Pi 3 bhldev

    Original URL path: http://blog.bennymichielsen.be/tag/net/ (2016-04-29)
    Open archived version from archive

  • mac – Benny Michielsen
    shop on iTunes etc A home build system on the other hand can do whatever you want it to do So I waited on Macworld in January hoping for an Apple TV update which had an optical drive and the introduction of iTunes rentals in Europe Alas Steve didn t bring anything for me well there was an Apple TV upgrade but that only affected the US market With the Apple idea now abandoned I looked to small form factor mini itx to be precise because that s what appealed me the most in the two Mac systems This site proved to be very useful it offers reviews shows what fits together and what not user projects and has an online shop If I had more experience in this matter and money was not a problem then I would probably have bought my parts here The absence of any helpful guides and how to s related with playing back HD content on any mini itx based system scared me I also didn t find any case which would take two 3 5 devices DVD BD ROM and hard disk and two full sized expansion cards So I just went for micro atx the path others had taken before me These sites proved to be very informative Vista XP Media Center Community AVS Forum Silent PC Review I read through the links above googled asked my colleagues and compiled my final list of components Case Antec NSK2480 Black Motherboard Asus P5B MX CPU Intel Core 2 Duo E4600 RAM 2GB Kingston 667 Mhz Harddisk Samsung HD SpinPoint T133 500GB SATA II 7200 Optical Drive Pioneer BDC 202BK Wlan DLink DWL G122 GPU Asus Radeon 3450 256 MB Let me comment on these I did not want the case to look like a computer this one has more of a HIFI look and it comes at a reasonable price The only thing I feared was that the front panel is silver while my optical drive is black The two did however fit together For the motherboard I went for the most basic around with enough connection abilities Asus has a variant of this one with onboard wifi but since I ve had problems in the past with wireless products of different manufactures working together I chose this one and added a wifi dongle to the shopping list I maxed out the RAM since memory these days has never had such low prices The hard disk with 500GB is more than enough I don t plan to use it to store data indefinitely but you can never have enough space The graphics card had to be able to play back high definition content but nothing more I was not going to play games or do any photo editing on this machine Now the only thing left was an affordable optical drive the Pioneer BDC 202BK was just what I needed It can play Blu Rays DVDs and CDs and burn DVDs and CDs

    Original URL path: http://blog.bennymichielsen.be/tag/mac/ (2016-04-29)
    Open archived version from archive

  • Adding object definitions from non-local classes – Benny Michielsen
    Spring will look at the current loaded assemblies to resolve the type so with this trick you can make it work The topic can be found here and the source code can be found here don t forget to change the path of the ClassLibrary1 assembly to make it work class Program static void Main string args Assembly LoadFile C MyPathToSomeDllClassLibrary1 dll object o ContextRegistry GetContext GetObject MyObject Console WriteLine Retrieved object from context Console ReadLine objects xmlns http www springframework net object id MyObject type ClassLibrary1 Class1 property name Test value MyTestValue object objects Author BennyM Posted on 10 07 2008 Categories Spring NET Leave a Reply Cancel reply Your email address will not be published Required fields are marked Comment Name Email Website Post navigation Previous Previous post Once Upon a Time in the West Next Next post Developing NET Software on a Mac Search Search for Search Follow me Recent Comments Rick on Partitioning and wildcards in an Azure Data Factory pipeline BennyM on WCF HTTPS And Request Entity Too Large Justin on WCF HTTPS And Request Entity Too Large The Morning Brew Chris Alcock The Morning Brew 2052 on Getting up and running with Mono and

    Original URL path: http://blog.bennymichielsen.be/2008/07/10/adding-object-definitions-from-non-local-classes/ (2016-04-29)
    Open archived version from archive

  • Once Upon a Time in the West – Benny Michielsen
    object definitions from non local classes Search Search for Search Follow me Recent Comments Rick on Partitioning and wildcards in an Azure Data Factory pipeline BennyM on WCF HTTPS And Request Entity Too Large Justin on WCF HTTPS And Request Entity Too Large The Morning Brew Chris Alcock The Morning Brew 2052 on Getting up and running with Mono and Raspberry Pi 3 bhldev on Exposing iCal data in WebAPI

    Original URL path: http://blog.bennymichielsen.be/2008/07/09/once-upon-a-time-in-the-west/ (2016-04-29)
    Open archived version from archive