Client: website http://sms.kdev.it/

Code: by me

Graphics: by me

Description: this Application allows to send SMS to italian mobile numbers paying a small feee (about 20-30% cheaper than other carries fees);

Time: about 2 full days of development;

iTunes Price: free

iTunes Link: download (http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=360990893&mt=8)


Problem:

your class has to support the  UITableView delegate and/or datasource and is a simple UITableViewController os NSobject subclass.

Description:

While developing on the iPhone, using XCode,  I found really annoying to recreate all the uitableview delegate and datasource methods if the class was before an NSObject or a UIViewController without any table, for now the only way was to do a copy and paste from another class or to create a new one class that is a subclass of UITableViewController.

The Solution:

  1. XCode: goto Scripts menu->Edit User Scripts
  2. Create a new Script
  3. Insert the following Code:
    #! /usr/bin/perl -w
    
    # Insert UITableView default methods (delegate and datasource) into a class.
    # insertTableViewMethod.pl - inserts delegate and datasource methods into a class.
    
    use strict;
    print "
    #pragma mark Table view methods
    
    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
    }
    
    // Customize the number of rows in the table view.
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 0;
    }
    
    // Customize the appearance of table view cells.
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @\"Cell\";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    }
    // Set up the cell...
    return cell;
    }
    
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // Navigation logic may go here. Create and push another view controller.
    // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@\"AnotherView\" bundle:nil];
    // [self.navigationController pushViewController:anotherViewController];
    // [anotherViewController release];
    }
    
    /*
    // Override to support conditional editing of the table view.
    - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the specified item to be editable.
    return YES;
    }
    */
    
    /*
    // Override to support editing the table view.
    - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    if (editingStyle == UITableViewCellEditingStyleDelete) {
    // Delete the row from the data source
    [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
    }
    else if (editingStyle == UITableViewCellEditingStyleInsert) {
    // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
    }
    }
    */
    
    /*
    // Override to support rearranging the table view.
    - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
    }
    */
    
    /*
    // Override to support conditional rearranging of the table view.
    - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the item to be re-orderable.
    return YES;
    }
    */
    ";
    
    exit 0;
    
  4. Have -quick-fun!



In questo numero ben tre articoli:

1) intervista Bjarne Stroustrup: di mia iniziativa (e di nessun altro, come forse si potrebbe evincere da alcune frasi inserite non dal sottoscritto) ho contattato Bjarne Stroustrup e gli ho richiesto un’intervista via email, è stsato molto cortese e me l’ha concessa.

2) iPhone: questa vosta si parla dell’accelerometro

3) Go- il linguaggio di programmazione nato in casa Google: vorrei precisare che non consiglio a nessuno di utilizzare questo linguaggio poichè è troppo sperimentale, ma per divertirsi qualche ora merita
.

In questo articolo ho trattato di NSTimer, NSDate e di come eseguire semplici suoni.

E’ inoltre presente un articolo su Mono, framework che consente di eseguire .Net su piattaforme non microsoft.

Inside the -(BOOL)canPerformAction:(SEL)action withSender:(id)sender method

when holding the mouse pointer in the simulator on a word of a webpage loaded on a uiwebview this method is called properly, but the copy: selector isn’t analyzed and not even called (but the text is normaly copied) , I’ve opened a ticket o Apple Bug Report.

This bug don’t allow to fully disable the contextual menu on uiwebview, and the only solution is to disable all using javascript on the  loaded page.

These weeks Windows 7 finds a new update(s) quite every week and asks to reboot, nice feature, this means a much secure os, but the continue reboots is becoming really annoying, i keep my pc turned on to avoid shutdown/reboot times and now it’s useless…

I discovered that ntfs-3g (current version) , an application that allows to write on ntfs partitions is really buggy, it corrupted some external ntfs usb drives i own, and in windows they became unreadable (it asks to format them!).

The only solution to fix this issue was to remove these drivers, and use paragon ntfs. I managed also to repair those drives using the disk utility application after uninstalling ntfs-3g, because before its features didn’t work.

I’m not very happy about this project, I believe it will bring much confusion and problems than else.

  • Performances: the pre-alpha version creates executable of about 7MB for applications of about 3 sheets, i develop them, same functionalities, on about 700KB. Actionscript uses a virtual machine with garbage collector, iPhone OS doesn’t, so who knows if the Actionscript->Source  Code conversion is the best available, and developers will be allowed to fix it?
  • API sync: how long it will take to Adobe to release the update to be in sync with the official iPhone SDK? Weeks, months? And will be bug-proof? i don’t think so.
  • Bugs: Apple fixes bugs not so quickly, how long it will take for Adobe to fix theirs?
  • Project killed: if Adobe will drop this feature what will happen to the projects developed in Actionscript? You will have to learn Objective-C and redo the project from scratch.
  • Debug: if the conversion made by Adobe will create leaks or crash how the developer will be able to fix them if it create the final package without any Objective-C source? Debugger? how will  work?
  • Compiler: Adobe uses only LLVM, in XCode you can choose between GCC and LLVM.
  • Fast-food programmers: the power of Objective-C is his nature of being so close to C allowing to develop using object-oriented programming; a well trained developer can use C to speed his applications/game: an Actionscript developer will never be allowed to go so deeply (at least for now).
  • Black Box: all the conversions will be hidden to the developer: he has to trush in the Adobe engineers.
  • Multithread: AVM2 doesn’t support to develop multithreaded applications, while Objective-C/C and the iPhone OS yes: did they allow to use this feature or not?

When the first beta will be release we will see hundred of applications and games on the Apple Store developed with this version: bugs, crashes, slow applications, and what else?

Design Patterns teach to decrease to the lower level the coupling, in this way the developer is coupled to Adobe decisions and timing: this is really the

I will test it but without any real interest, I want to have full control on my application/game and to know how in the core my software works: I’m able to dectect and fix bugs in minutes cause i only need to know the language. i’ll never t be forced to wait for Adobe to fix conversions bug hoping that they will be fixed in the “who knows when” fix-release.

Finally a simple way to enable heavy calculation operations in Adobe AIR, using the new Native process API users will be allowed to call and communicate with native applications, so passing an complex structure and letting the CPUs to do the job using C++/C/Java/.NET will be soon allowed.

I faced this problem analyzing huge excel logs using an Excel Actionscript library, the whole interface got  frozen until the end of processing.

I’ll try as soon as possible how the application will work using this new approach.

Athers new really cool additions (copy and paste from Adobe website):

  • Server sockets support: You can listen for incoming socket connections. Using the server socket API, it is now possible to build lightweight servers that run locally, and to communicate across applications using TCP sockets.
  • UDP sockets: You can send and receive messages using the User Datagram Protocol (UDP). For real-time, time-sensitive applications, including multiplayer games, you may find that UDP support in AIR will help provide a better user experience.
  • TLS/SSL sockets:You can now connect to a server that requires TLSv1 or SSLv3 for socket communications. For developers, this means that you have new cryptographic protocols available for accessing sensitive data over network that can help you build more secure applications.
  • More efficient CPU usage: On the Mac, without code change, many applications are consuming 50% less CPU usage when running in the background.
  • Reduced memory usage: Without rebuilding the application, many AIR applications such as TweetDeck are seeing reductions of memory between 15–20%.
  • Smaller runtime installer sizes: The runtime installer sizes for Mac OS and Windows are smaller than AIR 1.5.

ATTENZIONE: questa formula ha i seguenti difetti:

  • Viene ri-attivava entro UN giorno circa dalla sua attivazione, quindi, in questo arco di tempo SIETE SCOPERTI da tale opzione ATTENZIONE AL VOSTRO CREDITO; tale caratteristica non è palesata nel sito, ma c’è un laconico “rinnovo automatico”; dopo una discussione accesa con l’operatore del call center, che mi ribatteva “non c’è scritto rinnovo automatico immediato”, poiché quando ho fatto il piano non sono stato informato a riguardo hanno deciso di fornirmi indietro il credito consumato.

Il nodo è qui, nella FAQ: http://www.119selfservice.tim.it/caring119/o95962/tariffa.do

Maxxi Internet per iPhone dura un mese dall’attivazione. Alla scadenza è previsto il rinnovo automatico sempre al costo di 10 euro, salvo che tu non decida di disdire l’offerta.

Morale della storia: dovete disattivare il controllo di email e la navigazione quando sta per arriva l’ultimo giorno del servizio, attendere la conferma e riattivare il controllo della mail e potrete navigare normalmente.

Aggiornamento: Ho effettuato alcune ricerche; secondo la Delibera n. 126/07/CONS dell’Autorità per le Garanzie nelle Comunicazioni, pubblicata sulla Gazzetta Ufficiale del 30 aprile 2007, articolo 3, comma 6:

Nel caso di opzioni o promozioni che a titolo oneroso diano luogo al diritto di usufruire di una quantità di servizi predeterminata, in termini di tempo o di volume, l’operatore di telefonia informa il consumatore, in prossimità dell’esaurirsi di dette quantità, dell’imminente ripristino delle condizioni economiche previste dall’offerta precedentemente sottoscritta.

Da questo si deduce che la TIM vìola questa delibera palesemente, poichè l’utente non viene avvisato dall’operatore, ma deve provvedere autonomamente a verificare che l’offerta sia scaduta.

Updated: ho inviato un fax segnalando questa violazione che mi aveva fatto perdere circa 15 euro e prontamente me li hanno rimborsati.

Alcuni lettori, che cercano di diventare pseudoprogrammatori iphone leggendo i miei articoli hanno segnalato il fatto che la serie di articoli dedicati alla UITable sono troppi, e desiderano altri argomenti: saranno accontentati ; non scriverò più alcun articolo a riguardo, quindi se avranno problemi dovranno cercare altrove le soluzioni ai loro problemi.

Se non sono stati in grado di comprendere che questo argomento è probabilmente il più importante su cui si incentra tutta l’attività iphone probabilmente abituati al mondo del mordi-e-fuggi dei mini articoli presenti sui blog forse è meglio che continuino a consultare questi pseudo-siti online e smettano di leggere, visto che già alcune pagine hanno destato in loro grandi problemi esistenziali.

Netus

Netus

The ACME SYSTEMS has finally release the Netus board, and the G20 Board, and the new FoxBox will follow soon, i’m working with them to port my beloved Linux From Scracth to it.

Some friends have ported successfully Gentoo (Davide “KantaDev” Kantaluppi), OpenWrt, Debian and others distro will come soon.

It’s a really fun , cheap, and really small (only 7cm the Netus and you have to add the G20 module to add usb and other devices) so take a look to the specs and the tutorial: http://netus.acmesystems.it/