Subscribe to RSS feed



Macintosh Entwicklung – Linkliste

20. August 2007
macintosh-entwicklung-linkliste

Hier eine Übersicht von guten Mac Development Communitys,Blogs,Maillinglisten…

http://www.osxentwicklerforum.de/

Erste Anlaufstelle für Deutschsprachige Mac Entwickler

http://cocoadevcentral.com/
Super einstiegstutorials auf Englisch

http://cocoablogs.com/
Zusammengefasster Feed mehrerer Entwicklerblogs

http://cf.adiumx.com/
Englisches Forum rund um die OpenSource Projekte Adium, Growl, Cyberduck, Vienna und viele mehr

http://www.cocoabuilder.com
Super Mailingliste

http://developer.apple.com

ADC – Die erste Anlaufstelle für Offizielle Dokumentation von Apple

Man sollte sich bei fast allen Seiten auf Englisch einstellen. Was aber gar nicht so schlimm ist.

  • Facebook
  • Twitter
  • Technorati
  • del.icio.us
  • Digg
  • Google Bookmarks
  • MisterWong
  • DZone
  • Live
  • Mixx
  • MySpace
  • email
  • PDF
  • Print

Wie man einen String splittet

25. Mai 2007
wie-man-einen-string-splittet

Dim arrString(-1) As String
Dim strQuelle,strZiel1,strZiel2 As String //strQuelle = "Hello World"
arrString=Split(strQuelle," ")
strZiel1=arrString(0) //strZiel1 = "Hello"
strZiel2=arrString(1) //strZiel2 = "World"
  • Facebook
  • Twitter
  • Technorati
  • del.icio.us
  • Digg
  • Google Bookmarks
  • MisterWong
  • DZone
  • Live
  • Mixx
  • MySpace
  • email
  • PDF
  • Print

Dictionary füllen

25. Mai 2007
dictionary-fuellen

Im folgenden Codebeispiel wird beschrieben, wie ein Dictionary (dicTest) gefüllt wird.

Dim dicTest(10,6) As String
dicTest(0,0) = EditField1.Text
dicTest(0,1) = EditField2.Text
dicTest(0,2) = String
dicTest(0,3) = String
.
.
.
  • Facebook
  • Twitter
  • Technorati
  • del.icio.us
  • Digg
  • Google Bookmarks
  • MisterWong
  • DZone
  • Live
  • Mixx
  • MySpace
  • email
  • PDF
  • Print

Datentypen konvertieren

25. Mai 2007
datentypen-konvertieren

String nach Double

double = CDbl(string)

String nach Integer (Wert nach dem Komma wird abgeschnitten)

double = Val(string)

Double/Integer nach String

string = Str(double)
  • Facebook
  • Twitter
  • Technorati
  • del.icio.us
  • Digg
  • Google Bookmarks
  • MisterWong
  • DZone
  • Live
  • Mixx
  • MySpace
  • email
  • PDF
  • Print

Aus Listbox heraus drucken

25. Mai 2007
aus-listbox-heraus-drucken

Im folgenden Codebeispiel wird der Inhalt der Listbox “lstTest” ausgedruckt.

  dim g as Graphics
  dim page as PrinterSetup
  dim h,w,x,z,mw,mh as Integer
  page = new PrinterSetup
  g = OpenPrinterDialog(page)
  if g = Nil then
    return
  end if
  g.TextFont = "Arial"
  g.TextSize = 12
  w = g.Width/lstDruck.columnCount
  h = g.textHeight
  for x = 0 to lstTest.ListCount-1
    for z = 0 to lstTest.columnCount-1
      g.DrawString lstTest.cell(x,z), (z*w), (x*h)+h
    next
  next
  • Facebook
  • Twitter
  • Technorati
  • del.icio.us
  • Digg
  • Google Bookmarks
  • MisterWong
  • DZone
  • Live
  • Mixx
  • MySpace
  • email
  • PDF
  • Print

Füllen einer Listbox aus einem Dictionary heraus

25. Mai 2007
fuellen-einer-listbox-aus-einem-dictionary-heraus

Im folgenden Codebeispiel wird eine Listbox, welche 2 Spalten hat, mit dem Inhalt eines mehrdimensionalen Dictionarys gefüllt.

lstTest.DeleteAllRows
Dim intZaehler As Integer
Dim b As Integer
Dim a As Integer
Dim i,y,x As Integer
b = intZaehler // Anzahl der Zeilen des Dictionarys
x = 0
lstTest.columnCount=2
lstTest.columnWidths="66%,34%"
lstTest.AddRow ""
lstTest.Cell(x,0) = "Equitania Weight"
lstTest.CellBold(x,0) = true
lstTest.Cell(x,1) = "Überschrift"
x = x+1
lstTest.AddRow ""
lstTest.CellBorderBottom(x,0)=ListBox.BorderThinSolid //Fügt eine Trennlinie zwischen der Überschrift
lstTest.CellBorderBottom(x,1)=ListBox.BorderThinSolid //und dem 1. Eintrag ein.
x = x+1
lstTest.AddRow ""
x = x+1
do until a > b
    lstTest.AddRow ""
    lstTest.Cell(x,0) = dicTest(a,0)
    lstTest.Cell(x,1) = dicTest(a,7)
    x = x+1
    lstTest.AddRow ""
    x = x+1
    lstTest.AddRow ""
    lstTest.Cell(x,0) = "Beschreibung:"
    lstTest.Cell(x,1) = dicTest(a,1)
    x = x+1
    lstTest.AddRow ""
    lstTest.Cell(x,0) = "Größe:"
    lstTest.Cell(x,1) = dicTest(a,2)
    x = x+1
    lstTest.AddRow ""
    lstTest.Cell(x,0) = "Gewicht"
    lstTest.Cell(x,1) = dicTest(ia,3)
    x = x+1
    lstTest.AddRow ""
    lstTest.CellBorderBottom(x,0) = ListBox.BorderThinSolid //Fügt eine Trennlinie zwischen der Überschrift
    lstTest.CellBorderBottom(x,1) = ListBox.BorderThinSolid//und dem nächsten Eintrag ein.
    x = x+1
    lstTest.AddRow ""
    x = x+1
    a = a+1
  Loop
  • Facebook
  • Twitter
  • Technorati
  • del.icio.us
  • Digg
  • Google Bookmarks
  • MisterWong
  • DZone
  • Live
  • Mixx
  • MySpace
  • email
  • PDF
  • Print

Neuen Ordner erstellen

25. Mai 2007
neuen-ordner-erstellen

Im nachstehenden Codebeispiel wird geprüft, ob der Ordner “Neuer Ordner” auf dem Desktop existiert und wenn dies nicht der Fall ist, wird er neu erstellt.

Dim folTest As FolderItem
folTest = DesktopFolder.Child("Neuer Ordner")
if folTest <> nil
  if not folTest.Exists then
    folTest.CreateAsFolder
  end if
end if
  • Facebook
  • Twitter
  • Technorati
  • del.icio.us
  • Digg
  • Google Bookmarks
  • MisterWong
  • DZone
  • Live
  • Mixx
  • MySpace
  • email
  • PDF
  • Print

Webservice ansprechen mit Realbasic

24. April 2007
webservice-ansprechen-mit-realbasic

Ich hab mich auf die suche gemacht nach einem echt einfachen Webservice um mal zu test wie man in Realbasic Webservices anspricht.
Hier ein kleiner beispielcode:

Dim sm as SOAPMethod
 
Dim sr as SoapResultProgressWheel1.Visible = true
 
sm = New SOAPMethod
 
sm.url = "http://webservices.iter.dk/calculator.asmx?WSDL"
 
sm.methodNamespace = "http://www.iter.dk/webservices/calculator.asmx"
 
sm.action ="http://www.iter.dk/webservices/calculator.asmx/Add"
 
sm.parameter("intA") = EditField2.Text
 
sm.parameter("intB") = EditField1.Text
 
sr= sm.invoke("Add")
 
if sr <> Nil then
 
StaticText1.Text = "=" + sr.Result("AddResult")
 
ProgressWheel1.Visible = false
 
end if
 
Exception err
 
ProgressWheel1.Visible = false
 
MsgBox "Exception: " + err.message

Mehr über den einfachen Webservice gibts hier:
http://webservices.iter.dk/calculator.asmx?op=Add

  • Facebook
  • Twitter
  • Technorati
  • del.icio.us
  • Digg
  • Google Bookmarks
  • MisterWong
  • DZone
  • Live
  • Mixx
  • MySpace
  • email
  • PDF
  • Print